text
stringlengths
1
1.11k
source
dict
computer-architecture, cpu, virtual-memory, memory-access An inter-processor interrupt is an expensive operation. But, of course, it doesn't need to happen a lot of the time. For example, if the other CPU is not currently using an address space which uses the TLB entry, it can't possibly access the entry until it performs a context switch, so the flush can be delayed until the next time the CPU enters the kernel (say). But even if the other CPU is using the address space right now, you still don't need to perform a shootdown in this specific case, because the stale TLB entry is invalid. Attempting to access it will cause a page fault, so any attempt to use the stale TLB entry will be resolved by the page fault handler. And if that never happens, you've saved yourself a costly inter-processor interrupt.
{ "domain": "cs.stackexchange", "id": 11795, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computer-architecture, cpu, virtual-memory, memory-access", "url": null }
# Find a group G containing exactly 44 elements x s.t. x generates G I think the solution would be to check all $\mathbb{Z}_n$ and count all elements which are relatively prime to $n$. If there is 44 of them, I've found an example of such group. However this is a pretty long process. Can you think of a better solution? Or can I optimize this somehow?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429129677613, "lm_q1q2_score": 0.8143465980217843, "lm_q2_score": 0.8267117983401363, "openwebmath_perplexity": 181.73029532657566, "openwebmath_score": 0.6880049109458923, "tags": null, "url": "https://math.stackexchange.com/questions/2626301/find-a-group-g-containing-exactly-44-elements-x-s-t-x-generates-g" }
python, beginner, python-3.x, game, hangman #print your congratulations for winning print("Well done! You have won the game!") game_times += 1 game_wins += 1 game = False continue #print the hangman. print("This is your hangman:") print(space_1 , " " , space_2 , " " , space_3 , " " , space_4 , " " , space_5) which_letter = input("Which letter do you want to choose?") if letter_one == which_letter: #this means the player has guessed space 1 correctly. print("Well done! You have guessed it correctly!") space_1 = letter_one elif letter_two == which_letter: #this means the player has guessed space 2 correctly. print("Well done! You have guessed it correctly!") space_2 = letter_two elif letter_three == which_letter: #this means the player has guessed space 3 correctly.
{ "domain": "codereview.stackexchange", "id": 28947, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-3.x, game, hangman", "url": null }
beginner, regex, git, kotlin fun File.parseGitLog(): ArrayList<Commit> { return this.readLines().fold(arrayListOf()) { accumulated, current -> val startingWord = current.split("\\s".toRegex())[0] when (startingWord) { "commit" -> accumulated.add(Commit(current.split("\\s".toRegex())[1])) "Author:" -> accumulated.last().author = current.substring(current.indexOf("<") + 1, current.indexOf(">")) "Date:" -> accumulated.last().date = current.split("Date:")[1].trim().parseGitDateString() else -> accumulated.last().message += current.trim() } return@fold accumulated } } fun ArrayList<Commit>.summarizeGitMessages(regexString: String): MutableMap<String, CommitSummary> { val pattern = Pattern.compile(regexString, Pattern.MULTILINE or Pattern.CASE_INSENSITIVE)
{ "domain": "codereview.stackexchange", "id": 31295, "lm_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, regex, git, kotlin", "url": null }
performance, rust boggle_solve_help(grid, dict, new_word, new_coord, new_path); } Some(_) => (), None => (), } } } } fn main() { let contents = fs::read_to_string("words_alpha.txt").unwrap(); let dict = PrefixMap::new(contents.split_whitespace()); let grid: Vec<Vec<char>> = vec![ vec!['c', 's', 't', 'e', 't'], vec!['a', 'i', 'r', 'l', 's'], vec!['p', 'd', 'a', 'e', 's'], vec!['u', 'e', 'c', 's', 'e'], vec!['r', 'o', 't', 'r', 'i'], ]; boggle_solve(&grid, &dict) } (playground - but note that words_alpha.txt doesn't exist, so you can't run it)
{ "domain": "codereview.stackexchange", "id": 36942, "lm_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, rust", "url": null }
python, python-2.x, django PathMax = 10 TotalMax = 90 TotalMaxCounter = 0 SurveyWizardOneCounter = 0 PATH_ONE_IMAGES = ['P1D1.jpg', 'P2D2.jpg', 'P3D3.jpg', 'P4D4.jpg', 'P5D5.jpg', 'P6D6.jpg', 'P7D7.jpg', 'P8D8.jpg', 'P9D9.jpg'] class SurveyWizardOne(SessionWizardView): def get_context_data(self, form, **kwargs): context = super(SurveyWizardOne, self).get_context_data(form, **kwargs) if self.steps.current in ['5','6','7','8','9','10','11','12','13','14','15','16', '17', '18']: step = int(self.steps.current) if step in (5, 6, 7): image = random.choice(PATH_ONE_IMAGES) images.insert(step - 5, image) PATH_ONE_IMAGES.remove(image) context['display_image'] = image
{ "domain": "codereview.stackexchange", "id": 10795, "lm_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-2.x, django", "url": null }
keras, tensorflow, hyperparameter-tuning, binary-classification Typically, if you see no significant change in the results when changing a basic element in the architecture (for example, number of layers) it's because the architectures that you tried have very similar complexity (in terms of number of parameters). Try with 100 neurons per layer, then with 500 neurons per layer, and then see how the performance changes when increasing the number of layers. You might want to increase also the number of epochs. 20 is also very low. Try for 100 with early stopping on the validation loss. -- For the rest:
{ "domain": "datascience.stackexchange", "id": 11870, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "keras, tensorflow, hyperparameter-tuning, binary-classification", "url": null }
antimatter, warp-drives, exotic-matter Title: Exotic Matter -- What is it? I have a conceptual understanding of some theoretical physics concepts, so without getting into the math, what is exotic matter? I have read some articles that say it is anything not normal, while others say it has a negative mass (is that antimatter?). I got interested when I saw the article on potential for 'warp drive' by bending space-time. Exotic matter is matter with negative energy density, or to be more precise, where the energy density tensor trace invariant is negative. There are no known instances of standalone exotic matter in the current universe, but on the other hand, there is no much that we know about the full matter content of the universe, there is a big amount of dark energy driving the expanded acceleration of the universe. It might be due to a cosmological constant, it might be due to quintessence, to negative energy, we really don't know.
{ "domain": "physics.stackexchange", "id": 4627, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "antimatter, warp-drives, exotic-matter", "url": null }
inorganic-chemistry, hydrolysis, pnictogen This concept is so rarely used these days that I actually had to look this up to refresh my memory. Apparently, $\ce{P4O6}$ doesn't have any protons to transfer, so the first category is irrelevant. I also don't think that the question counts basicity of the acids that can be formed by hydrolysis or decomposition of $\ce{P4O6}$ in water, so I doubt your reasoning is relevant to this question. Besides, in hot water there is also elementary phosphorous among the products, and the stoichiometry is going to be quite different and won't justify $n$-factor $9.$ However, since the decomposition of $\ce{P4O6}$ in hot water is in fact a redox reaction: $$\ce{6 \overset{+3}{P}_4O6(s) + 24 H2O(l) ->[Δ] 8 \overset{0}{P}(s, red) + 15 H3\overset{+5}{P}O4(aq) + \overset{-3}{P}H3(g)}\tag{R1}$$ $$n\text{-factor}(\ce{P4O6}) = \frac{8 × |3- 0| + 15 × |3 - 5| + 1 × |3 - (-3)|}{6} = 10\tag{1}$$ which explains answer C. Oxidation with oxygen, another redox reaction, explains answer A:
{ "domain": "chemistry.stackexchange", "id": 12784, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, hydrolysis, pnictogen", "url": null }
catkin, ubuntu, ros-indigo, ubuntu-bionic please understand: 'melodic' is the name of a ROS release, not an Ubuntu release. Ubuntu is your OS (ie: a Linux distribution). ROS is "just" a set of programs that run on top of your OS. Compare with Windows: if I ask you which Windows version you have installed, you cannot answer with "I have Office 2016". Now by circumstances, if you say "I have melodic", we can sort-of assume you are running Ubuntu Bionic as your OS. But we need to be sure. So please run the two commands I've asked you to run and show us what the output is. Comment by notSoTechnical on 2019-09-24: Hi! The output outputs of lsb_release -a and uname -a are: notsotechnical@notsotechnical-VirtualBox:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.3 LTS Release: 18.04 Codename: bionic notsotechnical@notsotechnical-VirtualBox:~$ uname -a
{ "domain": "robotics.stackexchange", "id": 33809, "lm_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, ubuntu, ros-indigo, ubuntu-bionic", "url": null }
boost, ubuntu-trusty, ubuntu, ros-indigo ## Specify additional locations of header files ## Your package locations should be listed before other locations include_directories(${catkin_INCLUDE_DIRS}) include_directories(include) ## Declare a cpp executable add_executable(my_node src/my_node.cpp) ## Add cmake target dependencies of the executable/library ## as an example, message headers may need to be generated before nodes add_dependencies(my_node my_node_generate_messages_cpp) find_package(Boost REQUIRED COMPONENTS thread) include_directories(${Boost_INCLUDE_DIRS}) target_link_libraries(my_node ${Boost_LIBRARIES}) find_package(VISP REQUIRED) include_directories(${VISP_INCLUDE_DIRS}) target_link_libraries(my_node ${VISP_LIBRARIES}) ## Specify libraries to link a library or executable target against target_link_libraries(my_node ${catkin_LIBRARIES}) add_executable(cycle_node src/cycle_node.cpp) target_link_libraries(cycle_node ${catkin_LIBRARIES})
{ "domain": "robotics.stackexchange", "id": 21053, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "boost, ubuntu-trusty, ubuntu, ros-indigo", "url": null }
optics, interference Title: Interferene of Gaussian beams with different waists We want to calculate the interference pattern of two Gaussian beams with different focal points. We use the basic formula for a Gaussian beam $$ \vec{E}(x, y, z) = E_0 \vec{x}\frac{\omega_0}{\omega_z}\exp{\left(\frac{-r^2}{\omega(z)^2}\right) \exp{(-i\left(kz + k\frac{r^2}{2 R(z)} - \psi(z)\right)}} $$ We note that the curvature $R$ and the waist $\omega(z)$ are symmetric around zero, whereas the Guoy phase $\psi(z)$ is anti-symmetric around zero. The above beam has its focal plane at $z=0$. We want two beams with focal planes $\Delta z$ apart, i.e. with focus at $z_{\pm} = \frac{\pm \Delta z}{2}$. To achieve this (approximation), we can translate a beam profile along the $z$ axis, i.e. \begin{equation} \vec{E}_1(x, y, z) = \vec{E}(x, y, z + \frac{\Delta z}{2}) \end{equation} This beam has its focal point at $z = -\frac{\Delta z}{2}$. Similarly, \begin{equation} \vec{E}_2(x, y, z) = \vec{E}(x, y, z - \frac{\Delta z}{2})
{ "domain": "physics.stackexchange", "id": 94103, "lm_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, interference", "url": null }
electromagnetism, electrostatics, electric-fields, charge, conductors The boundary condition for a surface charge density $\sigma$ is a difference of $\frac{\sigma}{\epsilon_0} \mathbf{\hat{n}}$, where $\mathbf{\hat{n}}$ is the unit normal vector. In fact, this boundary condition is derived from the electric field of a surface charge. Suppose you have some external electric field $\mathbf{E}$. Now place a uniform surface charge $\sigma$ in this field. We already know from first principles that the field of the surface charge is $\frac{\sigma}{2\epsilon_0} \mathbf{\hat{n}}$ above and $-\frac{\sigma}{2\epsilon_0} \mathbf{\hat{n}}$ below. By the principle of superposition, the field immediately above the surface will be $\mathbf{E} +\frac{\sigma}{2\epsilon_0} \mathbf{\hat{n}}$, and the field immediately below will be $\mathbf{E} -\frac{\sigma}{2\epsilon_0} \mathbf{\hat{n}}$,
{ "domain": "physics.stackexchange", "id": 67253, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, electrostatics, electric-fields, charge, conductors", "url": null }
homework-and-exercises, electrostatics, potential I have two results for the potential of this system, but they aren't the same. This violates uniqueness. The textbook solution is that the problem is univariate in $\phi$ and therefore linear in $\phi$. And if it's linear in $\phi$ then the $E$ field lines have power law spacing. However, when I did this, I thought of a solution via conformal map where I take the solution of a infinite parallel plate capacitor and map the coordinates with a function so that the two plates become co-linear like in the problem statement. (Credit on Desmos tool found here made by Youtube: Partial Science, I had to make very few edits but it was useful for visualizing with a parameter to map continuously) Starting with the infinite parallel plate capacitor, each sheet on $z=x\pm i\pi/2$, shown below, the same curve in the mapped domain, $w=\exp(z)$ we get the upper/lower plate on $w=\pm iv, v=\exp(x)$ where the gap near zero vanishes as the lower limit of x approaches $-\infty$
{ "domain": "physics.stackexchange", "id": 74312, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, electrostatics, potential", "url": null }
magnetic-fields, path-integral, wick-rotation If the euclidean path integral converges when $A=0$, then it still converges when $A\neq 0$. The reason is simple: When $A=0$, the integrand $\exp\left(-\int dt\ L\right)$ is strictly positive. The $A$-term does not change the magnitude of $\exp\left(-\int dt\ L\right)$, so the $A$-term does not jeopardize the path integral's convergence. (The question already implicitly acknowledges this.) Even though the path integral converges, the $A$-term still needs to be handled with care. If we define the path integral by discretizing time, the $A$ factor must averaged over the interval that defines the discretized time-derivative. Otherwise, we get an incorrect factor of $2$ in the final result (reference 1, chapters 4 and 5). Now I'll get to the core of the question: ... what is the appropriate semiclassical approximation...?
{ "domain": "physics.stackexchange", "id": 80800, "lm_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, path-integral, wick-rotation", "url": null }
# Thread: Diagonalizable question 1. ## Diagonalizable question Is it possible for an order N square matrix to be diagonalizable but have less than 3 distinct eigenvalues? I've heard that it's possible, but can't think of an example. Identity doesn't work, since it yields only the zero-vector for its e-value of 1, which is no good. Edit: It also doesn't imply that the matrix is invertible, right? Since you can have a singular matrix that is diagonalizable, right? Edit: Here is a 3x3 matrix that is singular and has 2 distinct e-values, yet still has 3 linearly independent e-vectors, and hence is diagonalizable: $A=\begin{bmatrix}229& -225 & -30 \\ 225 & 229 & -30 \\ -30 & -30 & 450 \end{bmatrix}$ so I guess I have answered my own question.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9697854146791214, "lm_q1q2_score": 0.8143617482247124, "lm_q2_score": 0.8397339616560072, "openwebmath_perplexity": 458.1245459162011, "openwebmath_score": 0.8369206190109253, "tags": null, "url": "http://mathhelpforum.com/advanced-algebra/90365-diagonalizable-question.html" }
the distance between two random variables (how "close to each other" two random variables are). The basic idea behind this type of convergence is that the probability of an “unusual” outcome becomes smaller and smaller as the sequence progresses. h�ĕKLQ�Ͻ�v�m��*P�*"耀��Q�C��. most sure convergence, while the common notation for convergence in probability is X n →p X or plim n→∞X = X. Convergence in distribution and convergence in the rth mean are the easiest to distinguish from the other two. Given a random variable X, the distribution function of X is the function F(x) = P(X ≤ x). If fn(x) → f∞(x) as n → ∞ for each x ∈ S then Pn ⇒ P∞ as n → ∞. x) = 0. CONVERGENCE OF RANDOM VARIABLES . It tells us that with high probability, the sample mean falls close to the true mean as n goes to infinity.. We would like to interpret this statement by saying that the sample mean converges to the true mean. Convergence in probability: Intuition: The probability that Xn differs from the X by more than ε
{ "domain": "yewtreeapps.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936054891429, "lm_q1q2_score": 0.8324865412561228, "lm_q2_score": 0.8459424353665381, "openwebmath_perplexity": 707.8092446788913, "openwebmath_score": 0.87774658203125, "tags": null, "url": "https://yewtreeapps.com/mobile-synagogue-exolgaj/convergence-in-probability-and-convergence-in-distribution-7da11d" }
I am having a major headache trying to solve problems based upon changing the order of integration. I have understood the concept, and have also seen and studied various threads in this forum based on similar questions. Suppose I am given a problem where I have to change the order of a function f(x,y) with some limits. Then I can successfully draw the all the limits, as well as find the region of integration. The problem, however, comes when I have to 'split' the region of integration. I am unable to understand when am I supposed to divide the region and how. I have lots of problems in which the region has to be divided to get the correct answer.
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.951142217223021, "lm_q1q2_score": 0.8263778327949787, "lm_q2_score": 0.8688267830311354, "openwebmath_perplexity": 209.96306277011948, "openwebmath_score": 0.7862080931663513, "tags": null, "url": "https://www.physicsforums.com/threads/help-in-understanding-the-order-of-integration.382594/" }
information-theory, information-retrieval Title: Calculating Frequency of Terms with Zipf's Law I'm studying for an exam and came across this question. I feel like it's much simpler than I am making it out to be, but I'm not sure. Suppose we have a corpus in which Zipf’s Law holds. If the most frequent term occurs one million times, and the next most frequent term occurs 250,000 times, how often should we expect to see the third most frequent term? And the fourth most frequent term? Wikipedia has the formula $$f\left(k,s,N\right)=\frac{\frac{1}{k^{s}}}{\sum\limits_{n=1}^{N}\frac{1}{n^{s}}},$$ We
{ "domain": "cs.stackexchange", "id": 11072, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "information-theory, information-retrieval", "url": null }
smach Originally posted by knxa with karma: 811 on 2017-09-12 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by amarbanerjee23 on 2017-09-13: Hi, @knxa,I tried doing that but still, the statemachine seems to run in an infinite loop. However,when I try the self transition A->A in a Concurrence container,it runs only once as per requirement. Would that be a good option ? Else, could you please give an example for A->A transition in smach ? Comment by knxa on 2017-09-13: I am not yet too experience with SMACH myself so take my input with caution. Unfortunately I don't have time to construct an example for you. Good luck. Comment by amarbanerjee23 on 2017-09-13: No problem ! Thanks for your inputs !! It seems that Concurrent containers do not get into an infinite loop for a self transition and userdata does not help in changing behaviour of a state at different conditions. Thanks and Cheers !!
{ "domain": "robotics.stackexchange", "id": 28781, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "smach", "url": null }
fluid-dynamics, flow, aerodynamics, aircraft Title: Why are turbines more effective than propellers on airplanes? I have read this question: Why do turbine engines work? The compressor generates a certain volume of air at a high pressure. In the combustion chamber, this air is heated - this leads to a much larger volume of air. Looking at a section of the turbine (tapering to smaller section as compressor stage approaches combustion stage) we see that this further encourages high density mass flow into the combustion stage. At the exhaust stage the pitch of the fan blades is such that work is done by the fast moving air without causing a large pressure drop. In other words - it is "easier" for the air to go out the back. But since there is far more air coming out the back (added a lot of volume by burning fuel) the fast that it is working "less hard" on the way out doesn't stop the engine from producing power / thrust.
{ "domain": "physics.stackexchange", "id": 70422, "lm_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, flow, aerodynamics, aircraft", "url": null }
forces, spacetime, spacetime-dimensions This argument is just numerology, it doesn't work. In string theory, which is the proper way to understand 11 dimensional supergravity, you get larger gauge groups from compactifications, and from defect-orbifold walls, or from branes in a compactification. The gauge groups are larger than the minimum required for the standard model, which is good, because the can accomodate SU(5) or SO(10), which don't fit in this way as 11 dimensional geometric symmetries. So, in a nutshell, no, there is no relation, but people were doing something similar to this kind of numerology in the 1980s. This type of numerology was recently resurrected in the "exceptionally simple theory of everything", which tried to shoehorn spacetime and internal symmetries into a simple group, with even less success.
{ "domain": "physics.stackexchange", "id": 5269, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "forces, spacetime, spacetime-dimensions", "url": null }
javascript Isn't: var g = this; sufficient? > Object.typeOf = (function (g) { > return function (o) { What is the point of the IIFE? There is no code run in it, all it does is add a closure to an empty (more or less) variable object of the outer function. > } > }(g)); If the sole purpose was to pass in a reference to the global object, then: } }(this)); will do the job. Since you aren't in strict mode, you can use the following within a normal function expression: var global = (function(){return this;})(); the big switch statement can be replaced by something like: if (typeof o.nodeType == 'number') { var nodeTypes = {1:'element_node',2:'attribute_node',3:'text_node',4:'cdata_section_node', 5:'entity_reference_node',6:'entity_node',7:'processing_instrction_node', 8:'comment_node',9:'document_node',10:'document_type_node', 11:'document_fragment_node1',12:'notation_node'}; r = nodeTypes[o.nodeType]; }
{ "domain": "codereview.stackexchange", "id": 1680, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript", "url": null }
python, python-3.x, image, pandas, geospatial the function names are not crazy, though you could definitely benefit from implementing type hints; the doc strings should specifically describe all parameters and return values; no, I don't see enum being useful here; logging seems fine to me; Your exceptions are fine. The DRY concern is... not really that big of a deal. You could go out of your way to define a tuple of default keys needed for a dictionary, but it's more hassle than it's worth. About unhandled exceptions: let them stay exceptional. At the most, you may want a top-level except Exception in your main that logs exceptions that fall through. Seems fine, though I don't understand your data well enough to speak authoritatively Yes. Generally, they should be listed in order of dependency (callee first, caller later). This is already what you have.
{ "domain": "codereview.stackexchange", "id": 34806, "lm_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, image, pandas, geospatial", "url": null }
classical-mechanics, hamiltonian-formalism, hamiltonian - \left(\frac{\partial Q}{\partial P}\right)_q \left(\frac{\partial p}{\partial q}\right)_P \left(\frac{\partial p}{\partial P}\right)_q^{-1} & \left(\frac{\partial Q}{\partial P}\right)_q \left(\frac{\partial p}{\partial P}\right)_q^{-1} \\ - \left(\frac{\partial p}{\partial q}\right)_P \left(\frac{\partial p}{\partial P}\right)_q^{-1} & \left(\frac{\partial p}{\partial P}\right)_q^{-1} \end{array} \right) \\ &= \left( \begin{array}{cc} \frac{\partial^2 F_2}{\partial q \partial P} - \frac{\partial^2 F_2}{\partial P^2} \frac{\partial^2 F_2}{\partial q^2} \left(\frac{\partial^2 F_2}{\partial q \partial P}\right)^{-1} & \frac{\partial^2 F_2}{\partial P^2} \left(\frac{\partial^2 F_2}{\partial q \partial P}\right)^{-1} \\ - \frac{\partial^2 F_2}{\partial q^2} \left(\frac{\partial^2 F_2}{\partial q \partial P}\right)^{-1} & \left(\frac{\partial^2 F_2}{\partial q \partial P}\right)^{-1} \end{array} \right). \tag{7} \end{align} It can be verified that Eq. (6.3), hence Eq. (4), is satisfied.
{ "domain": "physics.stackexchange", "id": 25538, "lm_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, hamiltonian-formalism, hamiltonian", "url": null }
python, playing-cards An alternative way of writing the above would be making a nested function that increments and returns a non-local, but I don't consider that a particularly better idea. You're missing various typehints. __lt__(self, other: 'Card') -> bool for one. __init__ always returns -> None. _select_highest_cards_to_add needs typehints. I strongly recommend running mypy; when I was refactoring it caught a bunch of real issues. You use Sequence in various places for your card hand, but since the order of the hand does not matter, you should generalise to Collection.
{ "domain": "codereview.stackexchange", "id": 45027, "lm_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, playing-cards", "url": null }
ros, slam, navigation, g2o, rtabmap-ros The same info is also shown in the About dialog of rtabmapviz. You would also use g2o binaries from ros-kinetic-libg2o if you don't want to build from source g2o. The camera is shaking because of the noise in the depth image. As you are using a Xtion, I recommend to stay up to 4 meters from objects/environments you are scanning. Far features have more noise, so odometry will shake more and will be less reliable. The page https://github.com/introlab/rtabmap/wiki/Change-parameters is outdated. As mentioned at the top, most of these parameters are now used by default. ICP is not activated by default (it is now in Motion Estimation panel). cheers Originally posted by matlabbe with karma: 6409 on 2016-07-18 This answer was ACCEPTED on the original site Post score: 3
{ "domain": "robotics.stackexchange", "id": 25277, "lm_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, navigation, g2o, rtabmap-ros", "url": null }
energy, potential-energy Title: Mechanical energy of a body is relative? Since, the potential energy of a body is relative and depends on the point we choose as having zero potential. Does this mean that the mechanical energy (potential energy + kinetic energy) of the body is also relative? As Vladimir said, the answer is yes, although you are not talking about the same thing as he is. Kinetic energy is relative, because it depends on velocity, which is not the same for every frame of reference. Easiest example is this : say you and your friend are sitting on a train. From your perspective, your friend has zero kinetic energy, since he is not moving relatively to you. But if I stand on the ground and I see the train passing by, I will see your friend going foward with a certain velocity $v$ (the same as the train), and his (classical) kinetic energy will be $\frac{1}{2}mv^2$. Thus we both measure a different energy.
{ "domain": "physics.stackexchange", "id": 32650, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "energy, potential-energy", "url": null }
java, calculator, swing Model class Model { private final EventListenerList listeners = new EventListenerList(); private final StringBuilder content; public Model() { this.content = new StringBuilder(); } public void setResult(String result) { fireOnResult(result); } public void append(String part) { content.append(part); fireOnChange(); } public void clear() { content.delete(0, content.length()); fireOnChange(); } public void dropLast() { content.deleteCharAt(content.length()); fireOnChange(); } public String getText() { return content.toString(); } public void addListener(ModelListener listener) { listeners.add(ModelListener.class, listener); } public void removeListener(ModelListener listener) { listeners.remove(ModelListener.class, listener); }
{ "domain": "codereview.stackexchange", "id": 37017, "lm_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, calculator, swing", "url": null }
gazebo, ros-indigo Title: Recently, I have installed ROS-Indigo on Trusty 14.04. But most of the packages I found is for hydro. would these package work on Indigo too? I want to use iRobot create with Gazebo . But its packages are for hydro: http://answers.ros.org/question/127466/how-to-use-irobot-create-in-gazebo-with-ros-hydro/ I could not find for indigo even for hydro too. when I enter sudo apt-get install ros-hydro-turtlebot It gives this. and same for indigo Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package ros-hydro-turtlebot Originally posted by tonyParker on ROS Answers with karma: 377 on 2014-08-30 Post score: 0 You need to install the indigo version using sudo apt-get install ros-indigo-turtlebot Originally posted by tonybaltovski with karma: 2549 on 2014-08-30 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 19232, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo, ros-indigo", "url": null }
redox, teaching-lab The example reactions given are combustion and firecrackers, which I think are appropriate and accessible to a child. As for experiments to do, I'll suggest another book, the Illustrated Guide to Home Chemistry Experiments by Thompson. (ISBN: 0596514921) There is a chapter on electrochemistry with two experiments that might be of interest to a young learner: the electrolysis of water to make oxygen and hydrogen gas, and the oxidation of iron. Of course, there's also the "make your battery" type experiments which are always fun. As for simulations, I would suggest heading on over to the PHet website and have a stroll through all the activities there. I don't recall off hand what they have for electrochemistry, but there's plenty to keep a budding scientist interested.
{ "domain": "chemistry.stackexchange", "id": 762, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "redox, teaching-lab", "url": null }
it with better code) might be frustrating and expensive when developing commercial software, it tickles me pink when it happens while programming just for the fun of it. One of the goals of the "mini-challenges" is to share opportunities for that delightful experience.
{ "domain": "hpmuseum.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126444811033, "lm_q1q2_score": 0.8413637791072295, "lm_q2_score": 0.8596637469145054, "openwebmath_perplexity": 1845.7878489250068, "openwebmath_score": 0.45289504528045654, "tags": null, "url": "https://www.hpmuseum.org/forum/thread-10782.html" }
thermodynamics, statistical-mechanics, mathematical-physics, temperature, entropy All that this example shows is that the entropy as a function of $\Omega$ is not uniquely fixed by the functional equation $f(x_1x_2) = f(x_1)+f(x_2)$ and $f(1) = 0$ if one requires this to only hold on the integers. The solution $\ln$ becomes only unique if one requires the solution to be a continuous function on the positive real line.
{ "domain": "physics.stackexchange", "id": 28163, "lm_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, statistical-mechanics, mathematical-physics, temperature, entropy", "url": null }
(1) r/(b+w) > w/(b+r) (2) b-w > r Hi chetan2u Is it really necessary to do the long simplifications for st 1 ? $$\frac{r}{(b+w)} > \frac{w}{(b+r)}$$ Since we know "b" is just some constant, we can just start by taking the above as - $$\frac{r}{(w)} > \frac{w}{(r)}$$ After which it simply is - $$r^2 > w^2$$ or $$r > w$$ Is this approach okay? Math Expert Joined: 02 Aug 2009 Posts: 7334 Re: A certain jar contains only b black marbles, w white marbles  [#permalink] ### Show Tags 23 Jan 2019, 22:46 1 blitzkriegxX wrote: anilnandyala wrote: A certain jar contains only b black marbles, w white marbles and r red marbles. If one marble is to be chosen at random from the jar, is the probability that the marble chosen will be red greater then the probability that the marble chosen will be white? (1) r/(b+w) > w/(b+r) (2) b-w > r Hi chetan2u Is it really necessary to do the long simplifications for st 1 ? $$\frac{r}{(b+w)} > \frac{w}{(b+r)}$$
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9496693617046215, "lm_q1q2_score": 0.8090734754325861, "lm_q2_score": 0.8519528038477825, "openwebmath_perplexity": 2588.746083830586, "openwebmath_score": 0.8692762851715088, "tags": null, "url": "https://gmatclub.com/forum/a-certain-jar-contains-only-b-black-marbles-w-white-marbles-104924.html" }
ros, turtlebot, startup Originally posted by unine_ros with karma: 26 on 2012-03-30 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 8783, "lm_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, turtlebot, startup", "url": null }
homework-and-exercises, newtonian-mechanics, forces, mass, weight Title: Apparent weight and true weight I want to know what do we actually measure in a weight machine, true weight or apparent weight? Please help me in understanding this concept. A weighing machine measures the force exerted by a body on the weighing machine. Newton's third law then predicts that there is a force of the same magnitude and opposite in direction acting on the body producing the force. On the Earth if the weighing machine and the body are not accelerating (ignoring the rotation of the Earth) then the reading on the weighing machine will be the weight of the body. If the weighing machine and the body are accelerating then you could call the reading on the weighing machine the apparent weight of the body. So including the effect of the rotation of the Earth it is only at the geographic poles that reading on the weighing machine is the weight of the body.
{ "domain": "physics.stackexchange", "id": 40368, "lm_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, forces, mass, weight", "url": null }
general-relativity, equivalence-principle This means that, no matter how difficult of a spacetime geometry you're trying to study, you can always go to a locally inertial frame in which the metric tensor assumes the form of the Minkowski metric. The concept of equivalence principle, as stated before, is the one which links together the geometry of spacetime with physical laws. This is due to the fact that this physical principle is somewhat similar to Gauss axiom of non-euclidean geometries which says that in every point of space one can find a small region in which the rules of Euclidean geometry apply.
{ "domain": "physics.stackexchange", "id": 70784, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, equivalence-principle", "url": null }
urdf, ros-control, ros-kinetic, ros-canopen, transmission <role>joint1</role> <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface> </joint> <actuator name="actuator_4"> <role>actuator1</role> <mechanicalReduction>1</mechanicalReduction> </actuator> <actuator name="actuator_5"> <role>actuator2</role> <mechanicalReduction>-1</mechanicalReduction> </actuator> </transmission>
{ "domain": "robotics.stackexchange", "id": 31866, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "urdf, ros-control, ros-kinetic, ros-canopen, transmission", "url": null }
beginner, performance, image, vba, excel Const EXIT_TEXT As String = "Please Check Data Sheet" Const NO_PICTURE_FOUND As String = "No picture found" Dim picName As String Dim picFullName As String Dim rowIndex As Long Dim lastRow As Long Dim selectedFolder As String Dim data() As Variant Dim wks As Worksheet Dim cell As Range Dim pic As Picture On Error GoTo ErrorHandler selectedFolder = GetFolder If Len(selectedFolder) = 0 Then GoTo ExitRoutine Application.ScreenUpdating = False Set wks = ActiveSheet ' this is not bulletproof but for now should work fine lastRow = wks.Cells(1, "B").End(xlDown).Row data = wks.Range(wks.Cells(1, "B"), wks.Cells(lastRow, "B")).Value2 For rowIndex = 1 To UBound(data, 1) If StrComp(data(rowIndex, 1), EXIT_TEXT, vbTextCompare) = 0 Then GoTo ExitRoutine
{ "domain": "codereview.stackexchange", "id": 13906, "lm_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, performance, image, vba, excel", "url": null }
study the tutorial on free vibrations before commencing. 5th Ed – Abdul Ghaffar Abdul Rahman. | At this point it seems to be personal preference, and all academic, whether you use the Lagrangian method or the F = ma method. 2 Matrix Equations. know what beats sound like and how they look on an oscilloscope or graph. Recall that the textbook’s convention is that. 00 J, an amplitude of 10. In the present paper, viscously damped free and forced vibrations of circular and annular membranes are investigated using a closed form exact method. For free vibration, P(x,y,t) =0. About two months ago they stopped giving out free keys. III PROBLEM SOLUTION The dynamic equilibrium equations which governs behaviour of damped orthotropic rectangular plate supported by Pasternak foundation is gotten by neglecting the terms representing the applied force in equation (1). No external force acts on the system. MODAL ANALYSIS OF NON-CLASSICALLY DAMPED LINEAR SYSTEMS 219 NATURAL FREQUENCIES AND MODES For a
{ "domain": "bonref.fr", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9867771770811146, "lm_q1q2_score": 0.8327364309254792, "lm_q2_score": 0.843895106480586, "openwebmath_perplexity": 1215.753800379466, "openwebmath_score": 0.46781429648399353, "tags": null, "url": "http://harh.bonref.fr/damped-free-vibration-solved-problems.html" }
java, object-oriented import java.util.*; public class RPNCalculator { public Stack<Integer> stack; private String input; public Map<String, Operator> map; private String operators=""; public RPNCalculator(String userInput){ input = userInput; stack = new Stack<Integer>(); // default hashmap initialization map = new HashMap<String, Operator>(); map.put("+", new Plus()); map.put("-", new Minus()); // this string is constructed for later use in processInput() for(String key: map.keySet()){ operators+= key; } } public RPNCalculator(String userInput, HashMap<String, Operator> mapInput){ input = userInput; stack = new Stack<Integer>(); this.map = mapInput; for(String key: map.keySet()){ operators+= key; } }
{ "domain": "codereview.stackexchange", "id": 25746, "lm_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", "url": null }
c#, .net, console You can directly map these to functions: void EnterANewMovieAndStoreIt() bool WishToContinue() void PrintOutMovies() Then you can compose them like this: Ask for a movie and store it then Print out the already gathered movies until the consumer Answers with yes for continuation when (s)he Answers with no then Print out already gathered movies With that in hand your Main function will look like this: static void Main(string[] args) { do { EnterANewMovieAndStoreIt(); PrintOutMovies(); } while (WishToContinue()); PrintOutMovies(); } Store and Retrieve functionalities Because we have separated storage and retrieval functionalities that's why they can be really small and concise functions: private static void EnterANewMovieAndStoreIt() { Console.WriteLine(); Console.WriteLine("Please enter a movie you want to see but have not seen it yet."); var movieName = Console.ReadLine(); ToBeWatchedMovies.Add(movieName); }
{ "domain": "codereview.stackexchange", "id": 38779, "lm_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#, .net, console", "url": null }
c++, networking, library // Object was created successfully so we have // a valid connection to a server we can not communicate with. c.writeData("This is a message"); std::string resp = c.read(); } From your interface. I would look to rename your class to "Connection" then the expectations for how to use the object may be more like. { // Create the socket and connect to the site. Connection c("https://thorsanvil.com/MyResource"); // Object was created successfully so we have // a valid connection to a server we can not communicate with. c.writeData("This is a message"); std::string response = c.readData(); } Code Review: You don't want to use C++ strings? #include <string.h> A URL? int init(std::string url)
{ "domain": "codereview.stackexchange", "id": 39538, "lm_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++, networking, library", "url": null }
- 4 years, 7 months ago Let Ii be an indicator rv for an event of getting H at ith toss. Let X be a rv which is how many times HT occured. Similarly, let Y be the same but for HH. Then, X = I1I2 +... +I4I5 and Y = I1(1-I2) +...+I4(1-I5). We need to compare EX and EY. Given EIi = 0.5, we can apply linearity of expectation (even for multiplication since events are independent) and get 1 for both expectations. - 4 years ago So, if their expectations are the same, does that mean that you are indifferent about which payoff to take? If so, why? Staff - 4 years ago Yes, because with both payoffs, one can win the same amount of dollars on average. - 4 years ago So, are you indifferent between these 2 payoffs:
{ "domain": "brilliant.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9632305318133554, "lm_q1q2_score": 0.8515336201430932, "lm_q2_score": 0.8840392741081575, "openwebmath_perplexity": 1207.6052515524545, "openwebmath_score": 0.9509485363960266, "tags": null, "url": "https://brilliant.org/discussions/thread/which-payoff-do-you-want-to-go-for-2/" }
Dave. The matrices are symmetric matrices. Let A be a square matrix with entries in a field F; suppose that A is n n. An eigenvector of A is a non-zero vectorv 2Fn such that vA = λv for some λ2F. However, in Example ESMS4 , the matrix has only real entries, but is also symmetric, and hence Hermitian. The following properties hold true: Eigenvectors of Acorresponding to di erent eigenvalues … Theorem A.5 (Rellich) Let an interval be given. In other words, it is always diagonalizable. (1) The scalar λ is referred to as an eigenvalue of A. Similarly in characteristic different from 2, each diagonal element of a skew-symmetric matrix must be zero, since each is its own negative.. Let Gbe a dregular graph.1 Let Abe the adjacency matrix, and let 1 2 n be the eigenvalues of A. Equality of matrices Two matrices $$A$$ and $$B$$ are equal if and only if they have the same size $$m \times n$$ and their corresponding elements are equal. To find the eigenvalues, we need to minus lambda along the
{ "domain": "fitnesswave.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357640753516, "lm_q1q2_score": 0.8049525636150068, "lm_q2_score": 0.8221891305219504, "openwebmath_perplexity": 259.30434603817747, "openwebmath_score": 0.9061729907989502, "tags": null, "url": "https://fitnesswave.com/5x02gmc.php?page=properties-of-eigenvalues-of-symmetric-matrix-84d4c0" }
filters, algorithms, estimation My question is : Is there a way, a general mechanism, a filter, or an algorithm for processing these signal, so that I can find some common regularities between them to which I can assign the distance 1 meter, and predict that distance for different time-series? In general, you can apply a filter with some time constant T which will be giving you a more reliable RSSI value but even in this case, the RSSI will only be an accurate indication of distance under certain assumptions.
{ "domain": "dsp.stackexchange", "id": 2788, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filters, algorithms, estimation", "url": null }
quantum-mechanics Title: Measuring electron position in covalent bond As covalent bond of a molecule is created by the molecular orbital wavefunction of valence electrons, if we measured position of a single electron with sufficient precision, could we collapse the wavefunction, thus breaking the bond? Whatever is the level of descritpion of the electronic state, by electronic wavefunction of a molecule one means the lowest eigentsate of the electronic hamiltonian.
{ "domain": "physics.stackexchange", "id": 54759, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics", "url": null }
All spaces under consideration are Hausdorff. ____________________________________________________________________ Morita’s First Conjecture In 1976, K. Morita posed the following conjecture. Morita’s First Conjecture If $Y$ is a normal space such that $X \times Y$ is a normal space for every normal space $X$, then $Y$ is a discrete space. The proof given in this post is for proving the contrapositive of the above statement. Morita’s First Conjecture If $Y$ is a non-discrete normal space, then there exists some normal space $X$ such that $X \times Y$ is not a normal space.
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9920620049598216, "lm_q1q2_score": 0.8016527754339622, "lm_q2_score": 0.808067208930584, "openwebmath_perplexity": 7027.181819724902, "openwebmath_score": 1.0000100135803223, "tags": null, "url": "https://dantopology.wordpress.com/category/product-space/" }
c#, design-patterns, .net, fluent-interface I would like to get a code review on the code and the unit tests because 1) it's another opinion 2) I'm also not sure what the naming convention is when there is no "Act". Part of the code, i.e. the transliteration was already reviewed by Peter Csala at Transliterate between Cyrillic and Latin scripts Snippet public sealed class Account { public string FirstName { get; set; } = string.Empty; public string MiddleName { get; set; } = string.Empty; public string LastName { get; set; } = string.Empty; public string Username { get; set; } = string.Empty; public string Password { get; set; } = string.Empty; } public sealed class AccountBuilder { private readonly Account _account; public AccountBuilder() { _account = new Account(); } public AccountBuilder WithFirstName(string firstName) { _account.FirstName = firstName; return this; }
{ "domain": "codereview.stackexchange", "id": 43908, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, design-patterns, .net, fluent-interface", "url": null }
beginner, haskell, interpreter, brainfuck step Lib src\Lib.hs:(92,1)-(111,60) 66.7 40.3 advance Lib src\Lib.hs:19:1-90 33.3 0.0 jumpToMatchingLoopBegin Lib src\Lib.hs:35:1-79 0.0 5.8 jumpToMatchingLoopBegin' Lib src\Lib.hs:(38,1)-(42,70) 0.0 35.6 moveMemoryLeft Lib src\Lib.hs:(64,1)-(65,105) 0.0 4.3 moveMemoryRight Lib src\Lib.hs:(60,1)-(61,104) 0.0 4.3 decrementCell Lib src\Lib.hs:51:1-47 0.0 3.4 incrementCell Lib src\Lib.hs:48:1-41 0.0 3.0 wrap Lib src\Lib.hs:57:1-26 0.0 2.5 Looks like jumpToMatchingLoopBegin' is a good candidate to look for further optimizations. advance isn't that slow, by the way, it's just getting called by almost every function, e.g. every non-loop instruction in step calls advance. So the TL;DR of this whole section is: don't append on lists, especially not recursively!
{ "domain": "codereview.stackexchange", "id": 29973, "lm_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, haskell, interpreter, brainfuck", "url": null }
java, performance, spring, jdbc, jpa and gives the query planner more flexibility to choose a good plan which involves sorting, enforcing uniqueness, and maybe table scanning for FK checks. Tacking on an ORDER BY will sometimes result in fuller table blocks, that is, with no randomly ordered INSERTs there was no need for B-tree page splits. But now we're getting into more subtle aspects. set expectations You reported write throughput of 13,000 rows/second, using single DB server and single disk drive. What read throughput could you obtain? (Stop the database, unmount its filesystem, remount, restart, so you're not cheating w.r.t. cache hits when you make timing measurements.) You probably can't pull much more than 90,000 rows/second out of single server + single drive, right? You can always scale out. Attach multiple drives, preferably as multiple tablespaces so the backend query planner can "see" what I/O resources are available. Double the number of cores on your DB server, if measurements show that you're CPU bound
{ "domain": "codereview.stackexchange", "id": 45372, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, spring, jdbc, jpa", "url": null }
hawking-radiation, white-holes If you were asking whether a white hole would emit Hawking radiation, then the answer would be less interesting: even in classical general relativity, white holes emit everything. It's the time-reverse of a black hole: you can't escape from a black hole (classically), and you can't stay inside a white hole (classically).
{ "domain": "physics.stackexchange", "id": 67653, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "hawking-radiation, white-holes", "url": null }
e^{xy}\,\mu(dy).$$ See also, this answer on MathOverflow (and the comments). Suppose that $\mu$ has nonzero weight outside of the set $\{1\}$. Multiplying by $e^{-x}$ and taking second derivatives $$\left(\frac{d}{dx}\right)^2e^{-x}f(x)=\left(\frac{d}{dx}\right)^2\int e^{x(y-1)}\mu(dy)=\int(y-1)^2e^{x(y-1)}\mu(dy) > 0.$$ This means that $e^{-x}f(x)$ is strictly convex, contradicting the fact that it is equal to 1 at more than two points of $\mathbb R$. So, $\mu$ has zero weight outside of $\{1\}$ and $e^{-x}f(x)=\mu(\{1\})$ is constant.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9808759660443166, "lm_q1q2_score": 0.8432235152813475, "lm_q2_score": 0.8596637541053281, "openwebmath_perplexity": 165.11810445446204, "openwebmath_score": 0.8574921488761902, "tags": null, "url": "https://math.stackexchange.com/questions/2317179/from-en-to-ex" }
sequence-analysis, bedtools, coverage, exome Title: What are the columns in bedtools coverage output hist file? I am using bedtools to caculate the coverage of my targets of my WES data, to later plot. But to plot, I need to know what to plot and what it is I am seeing. I have unsuccefully tried to find what exactly the columns are in the output of the bedtool coverage, and how to read them. Also, the documentation does not help me a lot, and I find it confusing. Does anyone know, or where to find this a bit more elaboratly explained? I used the following code: bedtools coverage -hist -abam input.bam -b input.bed > output >2 log Correction note: the code above is actually wrong (thanks to @Alexlok) and should be: bedtools coverage -hist -a input.bed -b input.bam > output 2> log And the output is (first line): Last 5 lines: Thank you in advance Found it, it is an extended .bed file format, so not specific to bedtools output: source bed file output. With 4 added columns to the end from bedtools -hist option: bedtools -hist option
{ "domain": "bioinformatics.stackexchange", "id": 2294, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sequence-analysis, bedtools, coverage, exome", "url": null }
turing-machines, space-complexity, nondeterminism, graph-isomorphism You need to store the permutation (which requires $n\log n$ space, since keeping the index of a vertex in {v_1,...,v_n} requires $\log n $ space). The verfication can reuse space, so you only need enough additonal space to find the permutations $f(u), f(v)$ for any edge $(u, v) \in E_{G_1}$, and check if the corresponding edge exists in $G_2$. To find those you only need counters up to $n$, which can be saved in logarithmic space. Overall you used $O(n\log n)$ space. Note that you didn't actually need the power of PSPACE here (didn't do anything exponential), so this also proves $GI\in NTIME(n\log n)$.
{ "domain": "cs.stackexchange", "id": 6180, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turing-machines, space-complexity, nondeterminism, graph-isomorphism", "url": null }
ros Comment by MartinW on 2013-02-09: Yea Bharadwaj, I just got my controllers to work by synthesizing these two tutorials: http://www.ros.org/wiki/pr2_mechanism/Tutorials/SImple%20URDF-Controller%20Example and http://www.ros.org/wiki/pr2_mechanism/Tutorials/Writing%20a%20realtime%20joint%20controller Comment by MartinW on 2013-02-09: Just make sure you get the namespaces, lib, and plugin names right. I spent a good few hours trying to make my own but after doing those tutorials I finally got my controllers to spawn and run :) But I don't have them doing anything yet, just connected to my joints. Now I'm working on some PID cntrl Comment by Bharadwaj on 2013-02-11: Hay MartinW, are you able to control your URDF model even without the <controller:gazebo_ros_controller_manager Comment by MartinW on 2013-02-12:
{ "domain": "robotics.stackexchange", "id": 12754, "lm_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 }
homework-and-exercises, rotational-dynamics And by the parallel axis theorem $I = I_{com} + Mh^2 = 2\space m_w \cdot (0.4 m)^2 + 2\space m_w (0.2m)^2$. After inputting this value into the original equation for angular acceleration I arrive at an invalid value. What have I done wrong? Also, how do we know definitively when to use the parallel axis theorem? Any help understanding my problem would be appreciated greatly Note: When either rotational inertia value is inputted into the angular acceleration formula the masses will cancel so using the correct approach and canceling the mass $\frac{I}{m_w} = (0.2m)^2 + (0.8m)^2 = 0.68 m^2$ while using my original approach I have $\frac{I}{m_w} = 2((0.4 m)^2 + (0.2m)^2) = 0.4m^2$ Your problem is in the calculation of the COM. You first need to define the origin from where, you will get the COM distance by using the formula. Let the left end(particle 1) be the origin. Now, defining all distances from this origin:-
{ "domain": "physics.stackexchange", "id": 9934, "lm_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, rotational-dynamics", "url": null }
in many fields besides physics, but often implicitly. We will also show how to sketch phase portraits associated with complex eigenvalues (centers and spirals). -σ is the pole of the transfer function so we learn that the position of the pole on the s plane greatly influences the system. Solution Plot (1 ODE) Plots solutions of a single differential equation as a function of t (the independent variable). PhasePlane(sys,tspan,icond) plots the the phase plane portrait for a general second order nonlinear system defined by the function sys(t,x). However, only those trajectories in the first quadrant appear to converge to this point. Denoting Hilbert transform as , the analytic signal is given by. I am able to generate just a phase plane but I can't seem to be able to graph solution curves within inside of it. A careful inspection of the Nyquist plot will reveal a surprising relationship to the Bode plots of the system. The Bode plot of a right-half-plane zero shows the gain increasing by
{ "domain": "ammastyle.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.972414724168629, "lm_q1q2_score": 0.8060723026465414, "lm_q2_score": 0.8289388083214156, "openwebmath_perplexity": 847.6896301243131, "openwebmath_score": 0.5837233662605286, "tags": null, "url": "http://ammastyle.it/vapl/phase-plane-plotter.html" }
inorganic-chemistry, software Title: Calculating reaction products programmatically? I was wondering if there was a known algorithm which could calculate simple reaction products - not anything organic, but things like $$\ce{NaBr + LiF -> NaF + LiBr}$$ While these are quite easily to be worked out mentally, I cannot think of an easy way in which these reaction products could be predicted. Is there some software which does this (most I have found simply uses databases of known reactions), or even better an algorithm which does it? You are looking at the most simple form of double displacement reactions of salts with \[\ce{M^1X^1 + M^2X^2 -> M^1X^2 + M^2X^1}\] Dissolving these salts leads to complete dissociation $\ce{MX -> M+ + X-}$. From the solution, pairs of anions and cations recombine. Using a lookup table with elements, you could identify the cation from each string that represents a starting material (=salt). The remaining string is the anion. Build three lists:
{ "domain": "chemistry.stackexchange", "id": 3233, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, software", "url": null }
php, mvc Controller: <?php class Controller { private $model; public function __construct($model) { $this->model = $model; } public function handlePageLoad($page_name) { $this->path = $model->site_url . "/app/tpl/skins/" . $model->theme . "/" . $page_name . ".php"; if($view->pageExists($this->path) === true) { $this->content = $view->createPage($this->path); return $this->content; } else { header('HTTP/1.1 404 Not Found'); return false; } } } Global: <?php function autoload($class_name) { include "classes/class." . $class_name . ".php"; } spl_autoload_register('autoload'); $global = array( 'site_url' = 'http://localhost/Projects/HassanCMS', 'theme' = 'v1' ); $model = new Model($global); $controller = new Controller($model); $view = new View($model, $controller);
{ "domain": "codereview.stackexchange", "id": 8647, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, mvc", "url": null }
uniform distribution on [loc, loc + scale]. Percentiles are often used to find outliers. The calculator creates statistics over one data set. In our sorted list, the indices follow a discrete uniform distribution. distribution, the uniform distribution. use 0. This video shows how to find percentiles for a uniform distribution. This root is prefixed by one of the letters p for "probability", the cumulative distribution function (c. The ‘q’ and ‘p’ functions do the opposite calculation. Nov 17, 2009 · SO that under uniform distribution there is x% chance of loss exceeding some value Var this x % chance should be same under the normal distribution so that we need to accommodate more area under the curve which equals x% so that probably the percentile needs to go down to equal area equal to x% and thus after adjusting for this we find the Poisson Probability Calculator. To calculate log-normal distribution quantiles you can use the following calculator: extension Widget. Average time it
{ "domain": "co.jp", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765616345253, "lm_q1q2_score": 0.8166385696111087, "lm_q2_score": 0.8333245932423308, "openwebmath_perplexity": 691.6180260788782, "openwebmath_score": 0.7870854139328003, "tags": null, "url": "http://wp.skjapanexport.co.jp/ois5th/uniform-distribution-percentile-calculator.html" }
html, css Title: Responsive search bar implementation using OOCSS I am implementing a search bar here. I have finished basic UI. I have been recently developed a taste for scalable and robust HTML/CSS. Therefore I am closely following things like BEM and OOCSS Am I on the right path? Also, how can I make the UI responsive? index.html <div id="container"> <form class="search-box"> <span class="search-box-icons"> <i class="fa fa-search icon-search"></i> </span> <input class="search-box-input" type="text" placeholder="Search"/> <div class="search-box-autocomplete" style="display: none;"> Foo Bar </div> </form> </div> app.css * { margin: 0; box-sizing: border-box; font-family: 'Roboto', sans-serif; } body { background: #343d46; } #container { width: 500px; margin: auto; margin-top: 30px; background: gray; color: black; } .search-box { width: 100%; position: relative; background: inherit; color: inherit; height: auto; }
{ "domain": "codereview.stackexchange", "id": 11972, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "html, css", "url": null }
When posting on Brilliant: • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused . • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone. • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge. MarkdownAppears as *italics* or _italics_ italics **bold** or __bold__ bold - bulleted- list • bulleted • list 1. numbered2. list 1. numbered 2. list Note: you must add a full line of space before and after lists for them to show up correctly paragraph 1paragraph 2 paragraph 1 paragraph 2 [example link](https://brilliant.org)example link > This is a quote This is a quote # I indented these lines # 4 spaces, and now they show # up as a code block.
{ "domain": "brilliant.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9136765281148513, "lm_q1q2_score": 0.8453608878396986, "lm_q2_score": 0.9252299493606284, "openwebmath_perplexity": 1336.187277103536, "openwebmath_score": 0.9080659747123718, "tags": null, "url": "https://brilliant.org/discussions/thread/problem-solving-2/" }
soft-question, history, mathematics, epistemology http://www.maths.ed.ac.uk/~aar/papers/wigner.pdf.) However, I think this description of "unreasonable effectiveness" clashes with the reality of mathematical physics. Take a look inside Landau & Lifschitz or any other graduate text in mathematical physics. Seeing the horrendous mathematics required to solve many differential equations (Fourier Transforms, Bessel Functions, etc), most of which have no analytical solution anyway, you might then question whether the description of "unreasonable effectiveness" is really appropriate. Even more so when you realise that these complex solutions are still only an approximation to reality since the differential equations have themselves arisen only after making several simplifying assumptions.
{ "domain": "physics.stackexchange", "id": 32122, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "soft-question, history, mathematics, epistemology", "url": null }
conventions, units, dimensional-analysis This is precisely what goes on with, say, the exponential function: if you wanted the exponential of one meter, then you'd need to be able to make sense of $$ \exp(1\:\rm m) = 1 + (1\:\rm m) + \frac12(1\:\rm m)^2 + \frac{1}{3!}(1\:\rm m)^3 + \cdots, $$ and that requires you to be able to add and compare lengths with areas, volumes, and other powers of position. You can try to just trim out the units and deal with it, but keep in mind that it needs to match, exactly, the equivalent $$ \exp(100\:\rm cm) = 1 + (100\:\rm cm) + \frac12(100\:\rm cm)^2 + \frac{1}{3!}(100\:\rm cm)^3 + \cdots, $$ and there's just no invariant way to do it.
{ "domain": "physics.stackexchange", "id": 91636, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "conventions, units, dimensional-analysis", "url": null }
fft, power-spectral-density, normalization That scale will be a function of the window length $M$ and sampling frequency $F_s$. Lets see the implications of this from an example: Consider a continuous-time signal $x_a(t) = \left( \frac{\sin(W t)}{\pi t} \right)^2$ whose CTFT $X_a(\Omega)$ is $$ X_a(\Omega) = \begin{cases} A (1 + \frac{\Omega}{2W}) &, \text{for} -2W < \Omega < 0 \\ A (1 - \frac{\Omega}{2W}) &, \text{for} -0 < \Omega < 2W \\ \end{cases} $$ Which is a bandlimited triangular pulse with $A = X_a(0) = \frac{W}{\pi} $ These two signals are plotted below from their formulas for $W = 7\pi$ rad/second.
{ "domain": "dsp.stackexchange", "id": 5682, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fft, power-spectral-density, normalization", "url": null }
objective-c, ios, animation dispatch_time_t popTime7 = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds + 0.7 * NSEC_PER_SEC); dispatch_time_t popTime8 = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds + 0.8 * NSEC_PER_SEC);
{ "domain": "codereview.stackexchange", "id": 6713, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "objective-c, ios, animation", "url": null }
formal-languages, context-free, pumping-lemma The difficulty of applying pumping lemma comes from, indeed, recognizing "the possible cases for the $vx$" correctly and organizing them in a way that is easy to pump the word up or down to be not in the language. Since the condition on the words in $L$ is about the number of $a$s, $b$s or $c$s in them, we will classify $v$ and $x$ also in the number of $a$s, $b$s or $c$s in them. For pumping length ${n}$, we will let $z$ be $a^n\#b^n\#c^n$, the simplest word in $L$ with length at least $n$.
{ "domain": "cs.stackexchange", "id": 17761, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "formal-languages, context-free, pumping-lemma", "url": null }
javascript, jquery, css a baseline for the mid-window position calculation that gets scaled down to produce the relative mid-scrollbar position, and a baseline for the final offset. Calculating only relative offsets until the very end more clearly separates out this second role and simplifies the bounds testing. barFollower = function (e) { var target = $(e.data.target), scrollbar_button_height = 20, // (depends on browser chrome, unfortunately) window_height = $(window).height(), max_target_offset = window_height - target.height(), scroll_position = $(window).scrollTop(), body_height = $('body').height(), // ratio of full body height to full height of scroll area // which does not include the buttons. scroll_scale_factor = body_height / (window_height - (scrollbar_button_height * 2)), offset = 0;
{ "domain": "codereview.stackexchange", "id": 1345, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, css", "url": null }
Meyer and Christian Buchta (2015). If this is missing x1 is used. The distance to the sea is a fundamental variable in geography, especially relevant when it comes to modeling. Usage rdist(x1, x2) fields.rdist.near(x1,x2, delta, max.points= NULL, mean.neighbor = 50) Arguments . View source: R/distance_functions.r. The Euclidean distance between the two columns turns out to be 40.49691. > > I have a table in.csv format with data for location of samples in X, Y, Z > (column)format. > Hello, > I am quite new to R.(in fact for the first time I am using) > So forgive me if I have asked a silly question. Computes the Euclidean distance between a pair of numeric vectors. Numeric vector containing the second time series. The Euclidean Distance tool is used frequently as a stand-alone tool for applications, such as finding the nearest hospital for an emergency helicopter flight. Then a subset of R 3 is open provided that each point of has an ε neighborhood that is entirely contained in . In der
{ "domain": "stcc.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561676667173, "lm_q1q2_score": 0.8365022813263826, "lm_q2_score": 0.8633916047011594, "openwebmath_perplexity": 1000.7431336171495, "openwebmath_score": 0.7564223408699036, "tags": null, "url": "http://stcc.org/s64cscaw/6e34a5-euclidean-distance-in-r" }
complexity-theory, complexity-classes Title: Prove that $coRP \subseteq RP^{RP}$ I've read in an article that $coRP = RP$ is an open question, but that it is obvious that $coRP \subseteq RP^{RP}$. If $L \in coRP$, I don't understand how access to the oracle helps to build a probabilistic machine that proves $L \in RP^{RP}$. Any explanation would be appreciated. Suppose $L \in \mathsf{coRP}$, so that $\overline{L} \in \mathsf{RP}$. Using an oracle to $\mathsf{RP}$ we can determine whether a given string $x$ is in $\overline{L}$, and so whether $x \in L$. This gives a $\mathsf{P}^{\mathsf{RP}}$ algorithm for $L$.
{ "domain": "cs.stackexchange", "id": 5121, "lm_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, complexity-classes", "url": null }
vba, excel DoEvents End Sub Stringly typed values. DoSimpleChecks can/should be typed as Boolean and renamed. Presently it's checking against a string value "Not Ready". It's also activating cells which means it's doing more than one thing. Rather than checking against a string have your function return a True/False value. Within that member you have a comment '//Check if data has been pasted which makes a fine name of HasDataBeenPasted. Refactor your code so that it does one thing and one thing only, checking whether data has been pasted. Private Function HasDataBeenPasted() As Boolean HasDataBeenPasted = Not (shData.Range("A2").Value2 = vbNullString Or shData.Range("B2").Value2 = vbNullString) End Function
{ "domain": "codereview.stackexchange", "id": 37189, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vba, excel", "url": null }
signal-analysis, continuous-signals, approximation So it is difficult to say a polynomial filters out certain frequencies. However, locally, on an interval, they can pass nicely through data points, so they can smooth data, to some extend. Typical examples are sensor trends or drifts, when they are monotonous, and peaks or bumps. You can find a lot of works on polynomial trend filtering, or polynomial peak filters. When the cost function for those fits is a squared error, you end up with a linear system in the polynomial coefficients, which turns into a weighted average of signal samples, that can be interpreted as coefficients of a linear filter. A famous example is the Savitsky-Golay filter, which was recently analyzed in frequency in 2011 by R. Shafer: What Is a Savitzky-Golay Filter?. This family of filters is also interesting as they provide smoothed derivatives.
{ "domain": "dsp.stackexchange", "id": 4258, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "signal-analysis, continuous-signals, approximation", "url": null }
java, beginner, parsing, math-expression-eval Title: Parsing expression with exponents and evaluating I'm programming a basic command line calculator in java that can parse expressions and evaluate them, does not handle brackets yet. For example an expression: \$9+9/2^2*5-1\$. At this point I can give my program an expression that contains exponents, and It will evaluate them one by one until there are none left. For example, I can input the following string: \$2^2+1\$ and it will output \$4.0+1\$. public class Main { public static void main(String[] args) { String powerExpression = "2^2+1"; loopPower(powerExpression); } public static void loopPower(String exp) { while (containsExponents(exp)) { exp = procPower(exp); } System.out.println("FINAL ANSWER IS: " + exp);
{ "domain": "codereview.stackexchange", "id": 17491, "lm_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, parsing, math-expression-eval", "url": null }
quantum-mechanics, electromagnetism, electromagnetic-radiation, wavefunction, photoelectric-effect The analogy is shaking an apple tree. If you don't shake it fast the apples don't fall down. Even if you have a whole army of people shaking the tree slowly, the apples stay put. Then nearly every textbook says that this is because "light is made of corpuscles each carrying an energy h*v , called photons"(p.11 from Zettili's Quantum mechanics book) implying the wave-particle duality.
{ "domain": "physics.stackexchange", "id": 24092, "lm_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, electromagnetism, electromagnetic-radiation, wavefunction, photoelectric-effect", "url": null }
cosmology, spacetime, space-expansion, topology, cosmic-microwave-background This all doesn't mean the universe is actually infinite. It just states that this cannot be determined by looking at the CMB. It might be interesting to mention that our whole observable universe, all photons which arrive at the Earth, are emitted inside the expanding green circle. Anything emitted just outside of it will reach us in the future (but really just a tiny bit of more layers will do so because they have been expanded along with space to immense measures), and anything far enough outside the green ring does not win the race against the expansion and will never reach us. That's the reason we call the microwave photons we see a ›background‹ (the B in CMB).
{ "domain": "physics.stackexchange", "id": 61324, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, spacetime, space-expansion, topology, cosmic-microwave-background", "url": null }
homework-and-exercises, newtonian-mechanics, kinematics, string Title: Relating velocities of different bodies using classical mechanics In the given question, I'm required to figure out the velocity of block $C$, given that both blocks $A$ and $B$ move towards left with velocities $1$ $m/s$ each.
{ "domain": "physics.stackexchange", "id": 44167, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, kinematics, string", "url": null }
c++, template, coordinate-system Title: C++ math vector template I wrote a basic template for a vector of arbitrary dimension to be used in a 3D-engine. Most operators make use of C++ template meta programming and instances are implicitly convertible to glm types. It is also possible to build a matrix class on top of this. Suggestions in terms of optimizations, safety, readability etc. are welcome. Here we go: #ifndef Log2VECTOR_H #define Log2VECTOR_H #include <glm/glm.hpp> #include <ostream>
{ "domain": "codereview.stackexchange", "id": 32253, "lm_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++, template, coordinate-system", "url": null }
soft-question, quantum-information, quantum-computer Title: Areas of computer science required for quantum computing What knowledge of computer science should I have, to be able to pursue research in quantum computing. I am a Physics undergrad and would take three core courses in QM, before the completion of my degree. SO I guess necessary QM would be done. What about computer science? It is most helpful to know about reversible computation, a bit about circuit complexity, and about universal sets of gates in classical computation (e.g. the standard spiel about the gate set {AND, OR, NOT}, or for that matter the single gate NAND, being sufficient to compute any boolean function). Probably all that you need to know about both of these subjects is contained in Nielsen & Chaung, which still retains it's status as the most popular introductory text book.
{ "domain": "physics.stackexchange", "id": 4068, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "soft-question, quantum-information, quantum-computer", "url": null }
absorption $P_0$ and $P$ are usually determined by means of a light meter. When the transparent medium is not inserted between the beam and the light meter the latter will read $P_0$, but when it inserted between the beam and the light meter the latter will read $P$. We now define the so-called absorbance $A$ as: $$A=\log\frac{P_0}{P}.$$ Where $\log$ stands for logarithm in the base of $10$. Now let us assume the light absorbance is caused by an ingredient dissolved into the transparent medium and that the molar concentration is $c$ (in $\mathrm{mol dm^{-3}}$ or $\mathrm{mol L^{-1}}$, if you prefer), then it is quite intuitive to understand that the higher the concentration is, the higher the absorbance will be, or: $$A \propto c.$$ It is equally intuitive that the longer the optical path length $b$ is, the higher the absorbance will be, or: $$A \propto b.$$ So we have: $$A \propto bc.$$
{ "domain": "physics.stackexchange", "id": 25809, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "absorption", "url": null }
- Unless there are some restrictions on $p, q, r$, (or $x, y, z$) the answer is yes, as we can take $z=0$ and use the well-known solution for $xp+yq=1$ where $p$ and $q$ are coprime. - Possibly he does not want that trivial solution. I guess the question is whether such non-zero $x,~y,~z$ exists. –  rsg Jul 7 '12 at 16:55 Yes, but following what I said, he can take any one of $x, y$ or $z$ to be anything he likes and easily get a solution for the other two. –  Old John Jul 7 '12 at 16:57 True. It holds for $p,q$, so there exist $x',y'$ such that $px'+qy'=1$. Then let $x=(r+1)x'$, $y=(r+1)y'$, $z=-1$. In fact, this can be stated more generally: If $k>1$ and if $n_1,...,n_k\in\Bbb Z$ with any two of the $n_i$ relatively prime, then there exist $x_1,...,x_k\in\Bbb Z$ such that $$\sum_{i=1}^kn_ix_i=1.$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9843363489908259, "lm_q1q2_score": 0.8181243111594274, "lm_q2_score": 0.8311430457670241, "openwebmath_perplexity": 196.37996993296116, "openwebmath_score": 0.962009072303772, "tags": null, "url": "http://math.stackexchange.com/questions/167908/if-p-q-and-r-are-relatively-primes-then-there-exist-integers-x-y-an" }
quantum-field-theory, feynman-diagrams, propagator, 1pi-effective-action, self-energy Title: Proof of geometric series for connected two-point function In deriving the expression for the exact propagator $$G_c^{(2)}(x_1,x_2)=[p^2-m^2+\Pi(p)]^{-1}$$ for $\phi^4$ theory all books that i know use the following argument: $$G_c^{(2)}(x_1,x_2)=G_0^{(2)}+G_0^{(2)}\Pi G_0^{(2)}+G_0^{(2)}\Pi G_0^{(2)}\Pi G_0^{(2)}+\ldots .$$ Here $\Pi$ is the sum of all irreducible diagrams. Using Feynman diagrams to the lower order we can see that this is true, but what about the higher orders? Is there any formal proof (by induction or something else) that this true? Sketched proof: In general we know that a connected diagram is a tree of bare/free propagators $G_0$ and (amputated) 1PI vertices, cf. Lemma 3.11 in Ref. 1. In particular, the full propagator/connected 2-pt function $G_c$ must be strings of bare/free propagators $G_0$ and (amputated) 2-pt vertex $\Sigma\equiv \Pi$, which we call self-energy.
{ "domain": "physics.stackexchange", "id": 53284, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, feynman-diagrams, propagator, 1pi-effective-action, self-energy", "url": null }
php, beginner, session, authentication //from here is the handeling of the data in the "index" page: include("class_def/database.inc"); include("class_def/user.inc"); Session::start(); //here we start the session $up = strip_tags($_POST['user']); //post the user name $pp = strip_tags($_POST['password']); //post the password //check if the variables are set and access the CheckLog method if((isset($up))&&(isset($pp))){ Session::CheckLog($up,$pp); } //get the name of the current file $current_file = basename($_SERVER["SCRIPT_FILENAME"], '.php');
{ "domain": "codereview.stackexchange", "id": 6515, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, beginner, session, authentication", "url": null }
navigation, odometry, rviz, erratic, laserscan Title: ROS odometry problems w/ Videre Erratic robot Hi, I'm somewhat new to ROS, and robotics in general. Recently I've been trying to set up a Videre Erratic robot equipped with a Hokuyo URG-04LX laser rangefinder for navigation and object recognition. While using slam_gmapping, I noticed there seemed to be some major odometry issues (most evident while turning) that were interfering heavily with building a coherent map, and searching about the problem told me that I should run a test by rotating the robot while the fixed frame in rviz is set to /odom. Apparently the laser scans are supposed to form a crude but legible map, but these were the results: Still: Moving:
{ "domain": "robotics.stackexchange", "id": 7492, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, odometry, rviz, erratic, laserscan", "url": null }
computer-architecture, operating-systems, os-kernel Title: How does the processor find kernel code after an interrupt? When an interrupt occurs, the processor preempts the current process and calls kernel code to handle the interrupt. How does the processor know where to enter the kernel? I understand that there are interrupt handlers which can be installed for each interrupt line. But since the processor only executes 'hardwired logic', there has to exist some predefined place that points to either an interrupt handler itself, or some code that executes before the handler (since there can be multiple handlers for one interrupt line, I assume the latter). On startup, the kernel will initialize an interrupt vector table (called an interrupt descriptor table or IDT on x86) that points to an interrupt handler for each line. Before the 80286, the IDT was always stored at a fixed address; starting with the 80286, the IDT is loaded using the LIDT instruction.
{ "domain": "cs.stackexchange", "id": 3303, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computer-architecture, operating-systems, os-kernel", "url": null }
newtonian-gravity, orbital-motion, rocket-science In the above, phi is the angle above horizontal, ecc is the eccentricity of the transfer orbit, a is the semi-major axis of the transfer orbit, v1 is the initial velocity needed to achieve that transfer orbit, v2 is the velocity on the transfer orbit at aphelion (which is occurs at 2000 km above the surface of the Earth), dv2 is the delta V needed to circularize the orbit at aphelion, dvtot is the sum of v1 and dv2, and loss is amount by which dvtot exceeds the ideal teleport delta V (8.798486 km/s, in this example). A key takeaway point: On an airless planet (or moon), it makes much more sense to launch horizontally than vertically. Doing so from the surface of the Earth makes no sense. This would mean flying at Mach 25 through the thickest part of the atmosphere. Rockets launch vertically because the first goal is to get above the thickest part of the atmosphere. Rockets then start a turn toward the horizontal so as to avoid an overly huge penalty for flying vertically.
{ "domain": "physics.stackexchange", "id": 40817, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-gravity, orbital-motion, rocket-science", "url": null }
a rectangle Since the diagonals of a rectangle are congruent, RT has the same length as SA. Video Explanation. NCERT RD Sharma Cengage KC Sinha. To Prove that the two Diagonals of a Rectangle Are of Equal Length. NCERT DC Pandey Sunil Batra HC Verma Pradeep Errorless. In order to prove that the diagonals of a rectangle are congruent, consider the rectangle shown below. toppr. Click hereto get an answer to your question ️ Prove that the diagonals of a rectangle divide it in two congruent triangles. This will help us to improve better. As you can see, a diagonal of a rectangle divides it into two right triangles,BCD and DAB. NCERT NCERT Exemplar NCERT Fingertips Errorless Vol-1 Errorless Vol-2. Prove that the diagonals of a rectangle are congruent. Since the diagonals of a rectangle are congruent MO = 26. In this lesson, we will show you two different ways you can do the same proof using the same rectangle. EASY. to be divided along the diagonals into two triangles that have a congruent
{ "domain": "migf.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9664104904802132, "lm_q1q2_score": 0.8543448403047531, "lm_q2_score": 0.8840392863287585, "openwebmath_perplexity": 1004.5608794985358, "openwebmath_score": 0.46363794803619385, "tags": null, "url": "http://migf.com/acupuncture-in-pnmg/are-the-two-diagonals-of-a-rectangle-equal-why-68fef3" }
python, algorithm, trie def contains_key(self, ch): return self.children[ord(ch)-ord('a')] != 0 def set_end(self): self.end = True def is_end(self): return self.end class Trie: def __init__(self): """ Initialize your data structure here. """ self.root = TrieNode() def insert(self, word): """ Inserts a word into the trie. :type word: str :rtype: void """ curr = self.root for i in range(len(word)): if not curr.contains_key(word[i]): curr.put(word[i]) curr = curr.get(word[i]) curr.set_end() def search(self, word): """ Returns if the word is in the trie. :type word: str :rtype: bool """ curr = self.root for i in range(len(word)): if not curr.contains_key(word[i]): return False curr = curr.get(word[i])
{ "domain": "codereview.stackexchange", "id": 32366, "lm_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, algorithm, trie", "url": null }
classical-mechanics, mathematical-physics, chaos-theory, complex-systems, integrable-systems Now, consider the loop closed by the trajectory between A and B (cyan) and the line from A to B (red). The trajectory will be trapped on either side of this loop after B: It cannot cross the trajectory because trajectories cannot intersect, and it cannot cross the line because the phase-space flow goes in the other direction. In the above example, the trajectory is trapped on the inside and thus has to spiral in; but it might as well spiral out. Either way, the trajectory can never get closer to A than B, which would contradict the requirement of recurrence. Thus the only recurring dynamics in two dimensions are periodic orbits. In three dimensions, things are different because the trajectory cannot divide the phase space in two parts. For discrete-time systems, there are no trajectories to begin with that could entrap something.
{ "domain": "physics.stackexchange", "id": 50175, "lm_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, mathematical-physics, chaos-theory, complex-systems, integrable-systems", "url": null }
c++ Title: Implementing std::format One of the most exciting new functions in C++20 is std::format. I have never liked the ways that strings are formatted in C++ and have been guilty many times of using sprintf and such. Since std::format is not implemented by any of the major compilers at this time, I thought I would try out my own very basic implementation and this is what I have come up with: #include <string_view> #include <iostream> #include <string> #include <sstream> #include <stdexcept> void format_helper(std::ostringstream& oss, std::string_view str) // base function { oss << str; }
{ "domain": "codereview.stackexchange", "id": 42276, "lm_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 }
pushdown-automata Start in q1 Take $\varepsilon$ transition, push $ on stack, state is now q2 Take 0 loop transition, push 0 on stack, state stays q2 Take 1 transition, pop the 0, update state to q3 Take $\varepsilon$ transition, pop $ off, enter accept state q4 The other path is ignored out of q3 But we've still got another 01 on the input string with no exits out of q4, so accept... or assume dead state somehow? Being in state $q_4$ and still having $01$ to read means that the word cannot be accepted (at least with this reading path). Using this formal definition, there is no path leading from the configuration $(q_0, 0101, Z)$ to a configuration $(q, \varepsilon, \gamma)$, so $0101$ is not accepted by the automaton.
{ "domain": "cs.stackexchange", "id": 18863, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pushdown-automata", "url": null }
residual-networks As pointed in the other answer it will lead to an increase of computation cost, with the same number of channels (given all other properties of architecture are the same). Suppose, you had ResNet with the fixed channel size $N$. Standard convolution has computational and storage cost proportional to the product of input and output channels or $O(N^2)$ in the present case. If you concatenated features from the previous layer, after each layer number of channels would be doubled. Therefore, the computational cost would grow $4$ times for each new layer, and the total cost grows exponentially with depth in this approach. However, you can make each of the convolution to shrink the number of channels $2$ times and concatenate only half of the channels from the previous layer. In this way, total computational cost and storage cost is the same in every layer.
{ "domain": "ai.stackexchange", "id": 3014, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "residual-networks", "url": null }
navigation, gps, navsat-transform, robot-localization, amcl just only to let amcl module to publish tf(odom->map), but it often occurs the warnning info as below at last line: process[ekf_localization_local-1]: started with pid [59323] process[ekf_localization_global-2]: started with pid [59449] process[navsat_transform_node-3]: started with pid [59596] [ INFO] [1465373999.050320208, 1465356233.643751380]: Datum (latitude, longitude, altitude) is (30.587115, 103.987225, 452.160004) [ INFO] [1465373999.050385885, 1465356233.643751380]: Datum UTM coordinate is (402897.868551, 3384282.066208) [ INFO] [1465373999.050625052, 1465356233.654742509]: Initial odometry pose is Origin: (-6.2733690279887452945 -0.27920951194753762525 -0.029217864509362003606) Rotation (RPY): (-0.0066287586623609510289, -0.0080349835834440021948, -0.00022201279494916720432) [ INFO] [1465373999.050853030, 1465356233.654742509]: Corrected for magnetic declination of 0.000000 and user-specified offset of 0.000000. Transform heading factor is now -0.000222
{ "domain": "robotics.stackexchange", "id": 24862, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, gps, navsat-transform, robot-localization, amcl", "url": null }
c#, algorithm, pathfinding /// </summary> public bool bats; /// <summary> /// true if room contains a pit, false if not /// </summary> public bool pit; /// <summary> /// what other rooms this room is connected to /// </summary> public int[] adjacentRooms;
{ "domain": "codereview.stackexchange", "id": 13226, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, algorithm, pathfinding", "url": null }
organic-chemistry, amines And before someone asks me if I'm making meth- No. I like my freedom and this is just a hobby of mine. Mostly why I'm trying the birch is because I have heard the color of the solvated electron is quite beautiful. Chemistry is a wonderful science and I wish simply showing an interest in it wasn't considered so unusual! A word of caution: pure ammonia, in either its gaseous or liquified form is extremely dangerous to handle, especially in the context of your 'hobby' where, in your own words you "don't have access to a ton of glassware or specialty equipment." Any ammonia that escapes from your reaction and isn't ventilated properly will cause severe burns to anything it comes into contact with, including completely trashing the lining of your nose and lungs etc. In an attempt to relieve your curiosity, a photograph of a birch reduction showing the characteristic blue is shown below:
{ "domain": "chemistry.stackexchange", "id": 4905, "lm_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, amines", "url": null }
computational-chemistry There's many groups and companies which do use molecular mechanics and other similar approaches to inform their drug and material development process. The issue is that because the energetic potentials being used are only approximate the results from the simulation are also only approximate. Depending on what you're trying to simulate, the results of the simulation may or may not be accurate. As such, these simulations are treated mostly as a first step, to find potential leads/hypotheses, and then the scientists actually have to go into the lab and test the results to confirm.
{ "domain": "chemistry.stackexchange", "id": 7983, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computational-chemistry", "url": null }
Summa summarum: if we want to define the number $0^0$, then the most useful choice is $1$. $$\text{1. }\lim_{\text{t}\rightarrow \infty} \text{e}^{-\text{mt}}\text{t}^{\text{n}}=\text{0 }\left( \text{one can prove this by writing the Taylor }\exp\text{ansion of e}^{-\text{mt}} \right) \\ \text{2.So }\lim_{\text{x}\rightarrow 0} \text{x}^{\text{m}}\left( \ln\text{x} \right) ^{\text{n}}=0 \\ 3.\lim_{\text{x}\rightarrow 0} \text{x}^{\text{x}}=\lim_{\text{x}\rightarrow 0} \text{e}^{\text{x}\ln\text{x}}=\text{e}^0=1$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9407897492587142, "lm_q1q2_score": 0.8255211713969394, "lm_q2_score": 0.8774767922879692, "openwebmath_perplexity": 261.35728347915745, "openwebmath_score": 0.8884240388870239, "tags": null, "url": "https://math.stackexchange.com/questions/11150/zero-to-the-zero-power-is-00-1/11211" }
My guess is that if you want to get polynomials of arbitrary degree, it won't be possible. A proof of that may proceed by something like RobJohn's suggestion -- if the measure were compactly supported, then, by Stone-Weierstrass, its values on continuous functions (and hence Borel sets) would be determined by its values on polynomials. Now the measure you're looking for is assumed to have finite moments of any order, but not necessarily compactly supported. - I think you're right. I have little faith that it will work if we change it to polynomials of arbitrary degree. Thanks for the suggestions! – Tom Jan 8 '12 at 6:02 If you want a quick, lazy answer without any computation:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9724147193720648, "lm_q1q2_score": 0.818603654391208, "lm_q2_score": 0.8418256512199033, "openwebmath_perplexity": 115.07119050717024, "openwebmath_score": 0.902988612651825, "tags": null, "url": "http://math.stackexchange.com/questions/97283/borel-measure-such-that-integrating-a-polynomial-yields-the-derivative-at-a-poin" }
python, python-3.x #------------------------------------------------------------------------------------------- class color: CYAN ='\033[96m';BOLD ='\033[1m';END ='\033[0m';HIGHLIGHT ='\033[01;97;105m'; FLASH ='\033[5m';PINK ='\033[95m';GREEN ='\033[32m';RED ='\033[31m'; class fmt: main = '{:4}: {:2} | {:12.9f} | {:12.9f} | {:12.9f}'; abinit = ' {:12.9f} {:12.9f} {:12.9f} #{:3}'; quantum = '{:2} {:12.9f} {:12.9f} {:12.9f}'; charge = '\nNet charge of cleaved surface: {}{}{}{}\n'; inversion = color.HIGHLIGHT + '{:4}: {:2} | {:12.9f} | {:12.9f} | {:12.9f}' + color.END; header = '{:4} {:2} {:^12} {:^12} {:^12}\n' showParam = 'x-shift: {:4.3f} \ny-shift: {:4.3f} \nz-shift: {:4.3f} \n\nSorting priority: {}-{}-{}\n{}' class Supercell: def __init__(self,structure,name,outputKey,dim,sortBy,shift,charges):
{ "domain": "codereview.stackexchange", "id": 39213, "lm_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", "url": null }
population-genetics Title: Simple interpretation of effective population size? I'm looking for alternate ways to explain effective populations size, in more conceptual terms. These need not be perfectly accurate "definitions" but should at least be generally accurate in non-edge cases. For example, if I have a population with a supposed effective population size of 1000, what (if anything) can I conclude about the amount of genetic diversity present within a single individual sampled at random from the real (census) population? Like, would it be overly simplistic to say that the sampled individual could be expected to contain ~1/1000 of the population's standing variation? Or to say that a given (observed) nucleotide state has a 0.001 probability of being fixed? Again, I'm looking for anything that is not the standard way to explaining Ne to somehow get a student's head partly into the game without being wholly misleading. Thank you
{ "domain": "biology.stackexchange", "id": 9303, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "population-genetics", "url": null }