text
stringlengths
1
1.11k
source
dict
The string is at a slight angle to horizontal $\theta$. It is not exactly horizontal. The slight angle is such that the tension in the string exactly counteracts gravity, $T\sin(\theta)=m g$. So, there is actually a force acting upwards that counteracts gravity, and it is supplied by the string. You're right that if $\theta=0$ exactly, there would be a problem and the object would necessarily fall a bit.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.979667647844603, "lm_q1q2_score": 0.8163811482079963, "lm_q2_score": 0.8333245973817158, "openwebmath_perplexity": 398.51798589659256, "openwebmath_score": 0.6357470154762268, "tags": null, "url": "https://physics.stackexchange.com/questions/216712/why-doesnt-a-spinning-object-in-the-air-fall/216724" }
javascript, beginner, node.js, console, unit-conversion module.exports = { fromCelsius, fromFahrenheit, fromKelvin, }; celsius.js 'use strict'; let toKelvin = (value) => value + 273.15; let toFahrenheit = (value) => (value * (9 / 5)) + 32; module.exports = { toKelvin, toFahrenheit, }; fahrenheit.js 'use strict'; let toCelsius = (value) => (value - 32) * (5 / 9); let toKelvin = (value) => (value + 459.67) * (5 / 9); module.exports = { toCelsius, toKelvin, }; kelvin.js 'use strict'; let toCelsius = (value) => value - 273.15; let toFahrenheit = (value) => 1.8 * toCelsius(value) + 32; module.exports = { toCelsius, toFahrenheit, }; You can see it running by installing it via npm npm i -g thermo.js thermo 10 -celsius => 10°C = 50.00°F = 283.15K
{ "domain": "codereview.stackexchange", "id": 28674, "lm_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, beginner, node.js, console, unit-conversion", "url": null }
Our next theorem says that if a preimage is a nonempty set then we can construct it by picking any one element and adding on elements of the kernel. ##### Proof This theorem, and its proof, should remind you very much of Theorem PSPHS. Additionally, you might go back and review Example SPIAS. Can you tell now which is the only preimage to be a subspace?
{ "domain": "ups.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.985496421586532, "lm_q1q2_score": 0.8169162313972871, "lm_q2_score": 0.8289388104343892, "openwebmath_perplexity": 252.8331561851546, "openwebmath_score": 0.9648892283439636, "tags": null, "url": "http://linear.ups.edu/fcla/section-ILT.html" }
in R Module 3. The use of closed form operators and the corresponding power series expanded operators in Foldy-Wouthuysen transformations is discussed. Scheduling is done on the basis of threads rather than processes Threads in (say) the Time-Sharing class are assigned a priority number from 0 to 59, with 59 representing the highest priority. You have already calculated the expectation values hx2i and hp2i in Exercise 2, namely hx2i = 1 2fi and hp2i = „h2fi 2 Therefore ¢x¢p = „h 2 which is its minimum. Our approach enables us to calculate the contributions of different components of an interaction [e. 1% over the forecast period. Creating a pro forma income statement is a good opportunity to predict your future expenses and costs. Quantum Mechanics: The Hydrogen Atom 12th April 2008 I. The extremal density matrices for pure states provide a complete description of the system, that is, its corresponding energy spectrum and projectors. How to calculate expectation values of position and
{ "domain": "gipad.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9669140177976359, "lm_q1q2_score": 0.8015125557055082, "lm_q2_score": 0.8289388104343893, "openwebmath_perplexity": 1101.7371464684404, "openwebmath_score": 0.6746727824211121, "tags": null, "url": "http://gipad.it/anmp/expectation-value-of-hamiltonian.html" }
python, strings, template, 99-bottles-of-beer Title: n number of x on the y Everyone knows "99 bottles of beer on the wall". Mat's Mug made a comment about mugs on the wall in The 2nd Monitor and I realized I never wrote a "beer on the wall" program. But that seemed way too easy, so I made it a "n number of x on the y" instead. It also seemed like a good excuse to use templates in Python, which I hadn't done before. import sys n = int(sys.argv[1]) x = sys.argv[2] y = sys.argv[3] template = '''\ %i %s on the %s %i %s Take one down, pass it around %i %s on the %s ''' for n in range(n, 0, -1): print template % (n, x, y, n, x, n-1, x, y) Usage: python script.py 99 "mugs of beer" wall
{ "domain": "codereview.stackexchange", "id": 15278, "lm_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, strings, template, 99-bottles-of-beer", "url": null }
"balance" their tests so that there is an equal distribution of correct answer positions. by pointing at a picture), you can use this to work out how likely they could have scored what they got on the test by chance. You randomly guess the answer to each question. answer choices. If a quiz has 10 questions. find the probability of guessing correctly at least 6 of the 10 answers on a true or false examination. Find the probability of guessing an incorrect answer. With 5 possible answers on each question, this gives the probability of guessing the correct answer p=1/5, meaning the probability of getting it wrong is ~p=4/5. Most should at least recognize that the probability of getting any particular question correct is 50%, but they will likely have difficulty extending their thinking into multiple questions. 2 What is the theoretical probability if the correct answer is \. A multiple-choice test has five questions, each with five choices for the answer. Except that there are no
{ "domain": "nxtgeneration.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9822877044076955, "lm_q1q2_score": 0.8248603553577103, "lm_q2_score": 0.8397339716830605, "openwebmath_perplexity": 329.75409601172134, "openwebmath_score": 0.7561070919036865, "tags": null, "url": "http://tzar.nxtgeneration.it/probability-of-guessing-the-correct-answer.html" }
c++, c++11, cryptography return padded; } Input GetInput(std::istream& in) { int c; uint64_t count = 0u; uint32_t next = 0u; BlockVector v; v.reserve(intsPerBlock); while ((c = in.get()) != EOF) { unsigned char charInput = static_cast<unsigned char>(c); next = accumulateUint(next, charInput); if ((++count % int32Size) == 0) { v.emplace_back(next); next = 0; } } if (count > 0) { v.emplace_back(next); } return std::make_pair(std::move(v), count); } void hashSource(std::istream& in, const char* source) { HashVector hashed = sha1(PadInput(move(GetInput(in)))); std::cout << std::hex << std::setfill('0') << std::setw(int32Size); for (auto i : hashed) { std::cout << i; } std::cout << " " << source << std::endl; } } // namespace int main(int argc, char** argv) { if (argc == 1) { hashSource(std::cin, "-"); return 0; } int exitCode = 0; for (auto i = 1; i < argc; i++) { std::ifstream in(argv[i]);
{ "domain": "codereview.stackexchange", "id": 11827, "lm_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++, c++11, cryptography", "url": null }
complexity-theory, time-complexity, algorithm-analysis, asymptotics Title: Finding which functions are bounded by $O(n^2)$ I am asked to select the functions that are bounded by the Big-Oh function O(n^2): $f(n) \in O(n^2)$. $f(n) = \sum_{i=1}^{n} n$ $f(n) = \sum_{i=1}^{n} i$ $f(n) = n + n^2$ $f(n) = 1$ I choose the answers 1, 2, and 4: Simplifies to $n \cdot n = n^2$, which is bounded by $O(n^2)$ Simplifies to $\frac{n(n + 1)}{2} = n^2/2 + 1/2$, which is bounded by $O(n^2)$ $n^2 + n$ is obviously not bounded by $O(n^2)$ $1$ is obviously bounded by $O(n^2)$ However, it was alerted to me that one of my answers is incorrect. That seems strange, considering that after expanding all the expressions mathematically, I believe that I have chosen whether they are bounded by $n^2$ correctly. We have $n^2 + n = O(n^2)$. Indeed, if $n \geq 1$ then $n^2 \geq n$ and so $$ n^2 + n \leq 2n^2. $$
{ "domain": "cs.stackexchange", "id": 17548, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, time-complexity, algorithm-analysis, asymptotics", "url": null }
algorithms, graphs, connected Encode(T, v): Let u be the unique neighbor of v in T. Suppose that u is the i'th smallest neighbor of v in G. Output v, i, and run Encode-child(T, u, v).
{ "domain": "cs.stackexchange", "id": 10676, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, graphs, connected", "url": null }
ros Title: What are the numbers to the left when logging with ROS_INFO_STREAM? Here's what I currently see in my terminal when logging: [ INFO] [1589145832.980129261, 843.227000000]: DriveToTarget received: linear_x=0.00 angular_z=0.00 [ INFO] [1589145832.980202376, 843.227000000]: Drive parameters sent: linear z = 0.000000 angular z = 0.000000 [ INFO] [1589145833.363180798, 843.266000000]: Driving bot I have code to log parameters received, sent and indication that the bot is moving. One example is: DriveToTarget received: linear_x=XXXXXX angular_z=YYYYY
{ "domain": "robotics.stackexchange", "id": 2158, "lm_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 }
zoology, species-identification, mammals Title: Identification of a small mammal Could someone help with identification of this small mammal? Is it a possum? A dormouse? It was photographed in Sukhumi botanical garden, in Abkhazia (west of Georgia, on the shores of the black sea). This is not a marsupial such as an opossum, since no marsupials are native to the region. It looks to be a rodent of some kind, probably a species in the Muridae family. Which species is it is exactly is hard to tell, since there are many species in Muridae which look quite similar, but my best guess is that this is a Tamarisk jird. It could also conceivably be an escaped domestic gerbil or some type of mouse. The one that you found has more pronounced light areas on its coat than the photographs I found, but is within reasonable limits of what variation can be expected. Here are some of the few pictures I was able to find that I could verify were of this species. Klaus Rudloff (source) Klaus Rudloff (source)
{ "domain": "biology.stackexchange", "id": 5416, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "zoology, species-identification, mammals", "url": null }
cc.complexity-theory, reference-request, graph-theory, graph-algorithms, boolean-functions The resulting reformualtion. From this, asking "does $C$ arise from the Cartesian bitwise join of $A$ and $B$?" is equivalent to asking: Is an edge-labelled hypergraph $H_C$ with $m$ vertices and at msot $n$ edges, with distinct edge-labels selected from $[n]$ isomorphic to the diagonal subgraph (i.e. taking only the diagonally labelled edges) of the tensor product $H_A \otimes H_B$ of two labelled hypergraphs $H_A$ and $H_B$, which also have at most $n$ edges each and also have edges labels over $[n]$? I'm not sure if you're going to come closer to a natural graph product formulation of than this. I rather suspect that if this does play a deep role in computational complexity that someone has studied something like this; but without knowing what areas of complexity theory it is pertinent to, I would not be able to tell you where to look, beyond perhaps investigating tensor products of hypergraphs.
{ "domain": "cstheory.stackexchange", "id": 1714, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cc.complexity-theory, reference-request, graph-theory, graph-algorithms, boolean-functions", "url": null }
ros, ros-fuerte Title: Writing a realtime joint controller [Tutorial] Hello everyone, I am doing the "Writing a realtime joint controller" tutorial. So far I have followed it closely and have checked that the plugin is visible to rospack using: rospack plugins --attrib=plugin pr2_controller_interface I can see the .xml file inside. Then when I go to the next tutorial, Running a realtime joint controller, it starts by launching the pr2 in Gazebo (which I do not want), rather I am using my own robot which publishes /joint_state, therefore I skipped to (4.) Running the Controller. I did the configuring but when I tried to check the status of other controllers by running: rosrun pr2_controller_manager pr2_controller_manager list I see nothing on the list. Does anyone what is going on here? Thanks in advance. Kind Regards, Martin
{ "domain": "robotics.stackexchange", "id": 12747, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-fuerte", "url": null }
general-relativity, branes, kaluza-klein Note since the small extra dimension is compactified, the minimal momentum for a moving particle in the extra dimension can be obtained according $$e^{ipL}\rightarrow p=\frac{2\pi n}{L}.$$ So if $L$ is very small, the first excitation energy $\frac{2\pi}{L}$ to move the particle in the extra dimension is very large. Equivalently, the low energy particles are frozen at that direction and can not feel the extra dimension. In a word, the momentum excitation is gapless in extended dimensional space while not in compactified dimensional space.
{ "domain": "physics.stackexchange", "id": 32471, "lm_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, branes, kaluza-klein", "url": null }
thermodynamics, temperature, evaporation Title: Does temperature in a vessel with same top surface area as a earthern pot and same amount of water have same temperature of water? Many people answer the question 'why earthern pot keep water cool?' In this way 'Because it has large surface area that allow more evaporation than other vessels we used to keep, so more cooling.' But, Is it only reason? Because suppose I take a normal metal or plastic vessel whose top surface area is equal to full curved surface area of pot. And that vessel and pot contain same amount of water. So overall vessel has same surface area as pot at its top(open ) and same volume of water. So does the water in that vessel have same temperature as pot due to equal amount of evaporation?
{ "domain": "physics.stackexchange", "id": 82891, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, temperature, evaporation", "url": null }
c++, performance, c++17 int main() { std::unordered_map<std::string_view, std::string_view> my_map{ {"this", "that"}, {"hes", "her"}, {"my", "yours"} }; std::string my_string{ "This is hes chocolate and my aswell" }; utils::replace_all(my_string, my_map); std::cout << my_string << std::endl; return 0; } It works and outputs: This is her chocolate and yours aswell as expected. Analysing this in MSVC 2019 with C++ Core guidelines turned on I do get the following warnings though: C:\dev\MyVSProjects\AE\AE\include\AE\Main.cpp(23): warning C26486: Don't pass a pointer that may be invalid to a function. Parameter 0 '$S1' in call to '<move><std::pair<std::basic_string_view<char,std::char_traits<char> > const ,std::basic_string_view<char,std::char_traits<char> > > const & __ptr64>' may be invalid (lifetime.3). C:\dev\MyVSProjects\AE\AE\include\AE\Main.cpp(21): warning C26487: Don't return a pointer '(*(*map))' that may be invalid (lifetime.4).
{ "domain": "codereview.stackexchange", "id": 37707, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, performance, c++17", "url": null }
quantum-mechanics, homework-and-exercises, schroedinger-equation, quantization Amore et al. treat this as a boundary-value problem in $\mathbb C$ and using a change to a complex variable. This complicates the issue more than is really necessary and for simplicity I will use only real variables, though this comes at the cost of dealing with modified Bessel functions instead of standard ones. The initial step is to change variable to $z=2\sqrt{A}e^{x/2}$, so that $Ae^x=z^2/4$ and derivatives transform as $$ \frac {\partial }{\partial x}=\frac {\partial z}{\partial x}\frac {\partial }{\partial z}=\frac {z }{2}\frac {\partial }{\partial z} \text{ so } \frac {\partial^2 }{\partial x^2} =\frac14\left( z^2\frac {\partial^2 }{\partial z^2}+z\frac {\partial }{\partial z} \right). $$ The final equation is thus $$ \left[ z^2\frac {\partial^2 }{\partial z^2}+z\frac {\partial }{\partial z}-(z^2+\nu^2) \right]\psi=0 \tag{equation} $$ where $\nu=i\sqrt{4E}$. (Yes. Some complexness is inevitable. No fear, it will eventually not matter.)
{ "domain": "physics.stackexchange", "id": 9156, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, homework-and-exercises, schroedinger-equation, quantization", "url": null }
java, stream, hash-map, lambda List<List<Integer>> cartesianProduct = new ArrayList<>(); List<String> distinct1 = Arrays.asList("1", "2", "3", "4", "5", "6", "7", "2") List<String> distinct2 = Arrays.asList["3", "3", "2", "4", "7"] Map<String, List<Integer>> result1 = IntStream.range(0, distinct1.size()).boxed() .collect(Collectors.groupingBy(i -> distinct1.get(i))); Map<String, List<Integer>> result2 = IntStream.range(0, distinct2.size()).boxed() .collect(Collectors.groupingBy(i -> distinct2.get(i))); result1.entrySet().stream() .filter(x -> result2.containsKey(x.getKey())) .collect(Collectors.toMap(x -> x.getValue(), x -> result2.get(x.getKey()))) .entrySet().forEach(a1 -> a1.getValue().stream() .forEach(b1 -> a1.getKey().stream().forEach(c1 -> cartesianProduct.add(Arrays.asList(b1, c1)))));
{ "domain": "codereview.stackexchange", "id": 37740, "lm_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, stream, hash-map, lambda", "url": null }
electric-circuits, electric-current, physical-chemistry, ions Title: Do ions in solution flow through wires in electric circuit? In typical electric circuit where we have for example a battery and a light bulb, electrons travel through whole circuit. But what does travel when we use two electrodes and a battery in e.g. NaCl solution? What confuses me is that cathode attracts anions, so after some time won’t all anions stick to cathode and all cations stick to anode? I’ve read that ions transfer charge, but do they enter wires and then battery? In an electrolyte the charge carriers are ions, so there is no appreciable flow of free electrons. In a wire the charge carriers are free electrons, so there is no appreciable flow of ions. The purpose of an electrode is to provide a place for a chemical reaction to occur. This chemical reaction converts the ion-based current in the electrolyte to electron-based current in the metal. Without that chemical reaction the circuit does not complete.
{ "domain": "physics.stackexchange", "id": 91060, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electric-circuits, electric-current, physical-chemistry, ions", "url": null }
python, beginner, pandas, matplotlib Title: Extending die roll simulations for complex data science tasks I've developed a Python script that simulates die rolls and analyses the results. I'm now looking to extend and modify this code for more complex data science tasks and simulations. Is this code simple and readable? Are there more insightful statistics or visualisations that can be generated from the die roll data? How could this code be extended or modified for more complex data science tasks or simulations? import unittest from random import randint import matplotlib.pyplot as plt import pandas as pd def roll_die() -> int: """Simulate rolling a fair six-sided die and return the result""" return randint(1, 6) num_rolls = 1000 die_rolls = [roll_die() for _ in range(num_rolls)] df = pd.DataFrame({"Rolls": die_rolls}) roll_counts = df["Rolls"].value_counts().sort_index() print(df) print(roll_counts)
{ "domain": "codereview.stackexchange", "id": 45144, "lm_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, pandas, matplotlib", "url": null }
electromagnetism, electric-current, charge, conservation-laws, maxwell-equations $$ \mathbf{J}\left(\mathbf{r}\right)=\alpha\int ds'\: \boldsymbol{\mathcal{\dot{R}}}\left(s'\right)\delta^{\left(3\right)}\left(\mathbf{r}-\boldsymbol{\mathcal{R}}\left(s'\right)\right) $$ Where $\boldsymbol{\mathcal{R}}\left(s\right)$ is the trajectory of your wire, parametrized by arc-length $s$. Assuming $\boldsymbol{\mathcal{\dot{R}}}.\boldsymbol{\mathcal{\dot{R}}}=\mathcal{\dot{R}}^2=const$ Value of $\alpha$ follows from: $$ \int_S{d^2}r\: \mathbf{\hat{n}}.\mathbf{J}=I\Delta\left(s\in S\right)\cos\theta_\mathcal{\dot{R}}=\alpha\mathcal{\dot{R}}^2\,\Delta\left(s\in S\right) $$
{ "domain": "physics.stackexchange", "id": 83777, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, electric-current, charge, conservation-laws, maxwell-equations", "url": null }
general-relativity, curvature Title: How can we model intrinsic curvature? Can it only be done in Euclidean space? Doesn't Euclidean space only model extrinsic curvature? No, Euclidian space is not necessary. You can "model" intrinsic curvature using the beautiful language of Riemannian geometry, whose great triumph was formulating a vocabulary that lets you talk about the curvature of a space without making reference to an extrinsic space in which the curved space is embedded: hence the term intrinsic. This is crucial to general relativity, since embedding a curved 4-space in flat Euclidean space requires that the Euclidean space be ten-dimensional, and dealing with that embedding would suck.
{ "domain": "physics.stackexchange", "id": 2758, "lm_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, curvature", "url": null }
python, performance, physics, genetic-algorithm Describe what self.genes is, and how it is meant to work – A good description here could be in place, and help understanding of the general code, and the following algorithm. Use better names in evaluate() – I think you would benefit from typing out the variable names, and then removing comments in evaluate(). In most of the formulas you only use one or two of the preceding calculate formulas, so there should plenty of space within the 80 character line length limit to use longer more descriptive names like in this code segment: def evaluate(self): """Calculates the glide range of the aircraft."""
{ "domain": "codereview.stackexchange", "id": 16861, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, physics, genetic-algorithm", "url": null }
ios, swift private func redirectToView(screen: Screen) { self.window = UIWindow(frame: UIScreen.mainScreen().bounds) let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil) switch screen { case .ActivateScreen: let activateVC: ActivateViewController = storyboard.instantiateViewControllerWithIdentifier("ActivateController") as ActivateViewController let navigationVC = UINavigationController(rootViewController: activateVC) self.window?.rootViewController = navigationVC case .LoginScreen: let loginVC: LoginViewController = storyboard.instantiateViewControllerWithIdentifier("LoginController") as LoginViewController let navigationVC = UINavigationController(rootViewController: loginVC) self.window?.rootViewController = navigationVC default: println("No view controller specified") } self.window?.makeKeyAndVisible() }
{ "domain": "codereview.stackexchange", "id": 8975, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ios, swift", "url": null }
ethology, behaviour, anthropology, instinct "If you search on the Web of Science database for papers on the emotion of fear, you’ll get back 6,477 published papers. Search for papers on laughter and you’ll get a paltry 175." -Sophie Scott 2015 In other words, the lack of research into laughter possibly is because research usually tries to solve a problem. Generally, laughter isn't perceived as a problem and is relatively seldom investigated. Notably, there is a symptom called the Pseudobulbar affect. It describes someone that laughs (or cries) uncontrollably. "Analysing humour is like dissecting a frog; few people are interested, and the frog dies of it."
{ "domain": "biology.stackexchange", "id": 4617, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ethology, behaviour, anthropology, instinct", "url": null }
ruby, ruby-on-rails, search Never write the pattern "empty array" + each + push + return array. That's a map (more on functional programming here) Is this "lib" thing really in lib/? it should go to app/. In lib you only have generic code that may be reused across applications. Don't write routes by hand, ever, that's terrible practice, use the helper router methods provided by Rails. Don't write tags by hand, use content_tag. Abstract and simplify by identifying repeated patterns in your code. I'd write: def autocomplete results.map do |result| title, caption, route = case result.type.to_sym when :past_event [result.content, "PastEvent", past_event_path(result)] ... end label = "%s %s" % [title, content_tag(:span, caption, class: 'search-type')] {title: title, label: label, value: route} end end
{ "domain": "codereview.stackexchange", "id": 2867, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ruby, ruby-on-rails, search", "url": null }
We can now construct the expression $$−((2.0∗x)+y)$$ with: val e = Negate(Add(Multiply(Num(2.0),Var("x")),Var("y"))) Or, by using the overridden operators, with: val e = -((Num(2.0) * Var("x")) + Var("y")) In both cases, the objects in memory look like this: The file package.scala in the source code of the Expressions assignment includes the following implicit conversions: implicit def doubleToNum(v: Double) = Num(v) implicit def intToNum(v: Int) = Num(v) These conversions allow us to write the above expression even more compactly: val e = -(2.0 * Var("x") + Var("y")) You can read more on implicit conversions and parameters in Programming in Scala, 1st edition. ## Evaluation We now have the basic data structure for expressions. Let us next implement a method that allows us to evaluate the value of an expression when the variables in the expression are given some values.
{ "domain": "aalto.fi", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9808759621310288, "lm_q1q2_score": 0.8236748575734365, "lm_q2_score": 0.8397339616560072, "openwebmath_perplexity": 6769.832450948417, "openwebmath_score": 0.5483542084693909, "tags": null, "url": "https://a1120.cs.aalto.fi/notes/round-recursion--expressions.html" }
simulation, ros-hydro, stage, build, stage-ros Title: Issues installing stage/stage_ros from source on hydro Hello All, So I recently upgraded to Ubuntu 13.04 at which time I was forced to switch from ROS fuerte to one of the newer distros, in this case Hydro. I have been working on developing my own "navigation stack" for fuerte for several months now and have been doing all of my simulations in stage. After installing Hydro and catkinizing all of my fuerte packages the last thing I need to do is install stage and I am having some issues doing so. I understand that stage for ros has now been changed to a two-part setup with a 'stage' and 'stage_ros' package, both of which are automatically installed with hydro-desktop-full, however I want to install them from source in my catkin workspace so that I can more easily edit the wrapper. On the ROS wiki there are listed git's for each at: https://github.com/rtv/Stage and https://github.com/ros-simulation/stage_ros however that is where the description of the new setup ends.
{ "domain": "robotics.stackexchange", "id": 15766, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "simulation, ros-hydro, stage, build, stage-ros", "url": null }
newtonian-mechanics, forces, vectors Title: What dot product means when it's 0? The following image taken from one of the books: As it says, it moves to the dotted line which means box will move to the $x$ as well as $y$ direction. In the same book, there's a vector product example as below, but I don't understand what $0$ means. I understand math, but not physics. Does 0 mean box won't move at all(but this contradicts the first picture). What does 0 mean? What $\vec A \cdot \vec B = 0$ means is that the two forces are neither opposing nor assisting each other. Note that it's a scalar value, with units of square-newtons, and is not something you'll see much in physics. That it's a scalar means it has no information about direction of motion.
{ "domain": "physics.stackexchange", "id": 95184, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces, vectors", "url": null }
velocity, orbital-mechanics, escape-velocity Title: Is the radius used in the formula for the escape velocity the average radius of the celestial object or the radius at the starting location? I learnt that the escape velocity is given by $$v_e = \sqrt{\frac{2GM}{r}}$$ Say I want to launch a rocket from the earth into space and want to calculate the escape velocity $v_e$ (I guess without air resistance). Which value of $r$ do I have to use: The mean radius of the earth... ... or the distance between the center of mass of the earth and the launch location?
{ "domain": "astronomy.stackexchange", "id": 1711, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "velocity, orbital-mechanics, escape-velocity", "url": null }
We will now see how close our normal approximation will be to this value. First, we must determine if it is appropriate to use the normal approximation. I have to use the normal approximation of the binomial distribution to solve this problem but I can't find any formula ... Will be this the approximation formula? The normal distribution can be used as an approximation to the binomial distribution, under certain circumstances, namely: If X ~ B(n, p) and if n is large and/or p is close to ½, then X is approximately N(np, npq) (where q = 1 - p). The binomial problem must be “large enough” that it behaves like something close to a normal curve. To calculate the probabilities with large values of n, you had to use the binomial formula which could be very complicated. Thank you. This video shows you how to use calculators in StatCrunch for Normal Approximation to Binomial Probability Distributions. Stirling's Formula and de Moivre's Series for the Terms of the Symmetric Binomial, 1730.
{ "domain": "qien.eu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9744347838494567, "lm_q1q2_score": 0.8077468043931948, "lm_q2_score": 0.8289388040954683, "openwebmath_perplexity": 325.9838073415349, "openwebmath_score": 0.8606991171836853, "tags": null, "url": "https://qien.eu/the-blackwater-gqp/article.php?page=09782a-normal-approximation-to-binomial-formula" }
fluid-statics, buoyancy The Doubt : Does buoyancy force act on the small weights ? Essentially, does buoyancy force act on an object inside an object ? The buoyancy force acts on the exterior of the sphere and is based on the overall density of the sphere (total mass divided by total volume). It does not individually act on the small weights. The only effect the small weights may have is on which part of the surface of the sphere is submerged (the part of the surface where the weights accumulate. Well, if it doesn't, then the object HAS to sink till the bottom due to weight being more than upthrust at any instant.** **I may be wrong here because I assumed that the body without additional masses floats partially I'm having trouble following you here. But like I said, the sphere will not sink as long as its density is not greater than water. Hope this helps.
{ "domain": "physics.stackexchange", "id": 82166, "lm_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-statics, buoyancy", "url": null }
A. 40 B. 20 C. 10 D. 5/2 E. 5/4 $$4^{4x} = 1600$$ --> $$4^{2x} = 40$$ - $$4^{(x-1)^2}=4^{2(x-1)}=4^{2x-2}=\frac{4^{2x}}{4^2}=\frac{40}{16}=\frac{5}{2}$$. Hi Bunuel, why isn't (x-1)^2 is not treated like (a-b)^2 formula? Thanks Actually parenthesis were missing there. Edited, it should read: $$(4^{(x-1)})^2=4^{2(x-1)}=4^{2x-2}=\frac{4^{2x}}{4^2}=\frac{40}{16}=\frac{5}{2}$$. If exponentiation is indicated by stacked symbols, the rule is to work from the top down, thus: $$a^m^n=a^{(m^n)}$$ and not $$(a^m)^n$$, which on the other hand equals to $$a^{mn}$$. So: $$(a^m)^n=a^{mn}$$; $$a^m^n=a^{(m^n)}$$ and not $$(a^m)^n$$. Hope it helps. _________________ SVP Status: The Best Or Nothing Joined: 27 Dec 2012 Posts: 1858 Location: India Concentration: General Management, Technology WE: Information Technology (Computer Software) Followers: 36 Kudos [?]: 1562 [3] , given: 193 If 4^4x = 1600, what is the value of (4^x–1)^2? [#permalink] ### Show Tags
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes.\n2. Yes.\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 1, "lm_q1q2_score": 0.8116760165346717, "lm_q2_score": 0.8116760165346717, "openwebmath_perplexity": 12107.593772595445, "openwebmath_score": 0.6843048334121704, "tags": null, "url": "http://gmatclub.com/forum/if-4-4x-1600-what-is-the-value-of-4-x-161823.html?sort_by_oldest=true" }
physical-chemistry, thermodynamics, gas-laws, pressure Title: Isothermal vs adiabatic compression of an ideal gas Could someone please explain these specific questions physically (especially the first question!)? I understand the corresponding mathematical proofs, but not the physical reasoning? I have looked online and can only find answers to what I believe correspond with my second question. Why is isothermal work larger than adiabatic work for the compression of an ideal gas for the same change in pressure? Why is isothermal work less than adiabatic work for the compression of an ideal gas for the same change in volume? There are a number of ways to look at this. One is to look at the equations. Another is to plot the pressure p as a function of volume V. The area under the pressure curve on the plot is the total work done on the system.
{ "domain": "chemistry.stackexchange", "id": 12594, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "physical-chemistry, thermodynamics, gas-laws, pressure", "url": null }
earth, time We also teach that in order to construct time zones (as a replacement of solar time), one divided 360° by 24 (to have a zone for each hour of the day), which results in 24 zones with 15° each. Now my question is: Why does one mix the measures for sidereal day and solar day? Or put differently: Why doesn't one calculate 361°/24 or 360° / 23.933? The Earth takes 23 hours 56 minutes to rotate once. But that is not relevant to most people. Sure, the stars will be in the same position again after 23 hours 56 minutes, but the sun will not be in the same position. It is far more important, for most people, to measure the time from noon to noon. And the average time from noon to noon is 24 hours. This is because the motion of the sun is a combination of both the spinning of the Earth and the orbit of the Earth around the sun. The orbital motion of the Earth adds four minutes. You should also teach the students In twenty-four hours the sun advances 360 degrees. (solar day)
{ "domain": "astronomy.stackexchange", "id": 4830, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "earth, time", "url": null }
gazebo Title: How to programmatically reset Gazebo Students in the class I'm TAing are wondering if there is a way to programmatically reset the Gazebo simulation so they can debug their projects faster. I could benefit from this too :). A couple of them said that they looked through the documentation and couldn't find anything in the Gazebo API. Is it possible to programmatically reset a Gazebo simulation? thanks, --ben www.meam620.info Originally posted by ben on ROS Answers with karma: 674 on 2011-02-22 Post score: 0 here's the ticket and the potential candidate patch Originally posted by hsu with karma: 5780 on 2011-02-23 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 4834, "lm_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", "url": null }
Concentration: Finance GPA: 3.7 WE: Corporate Finance (Retail Banking) Re: If a, b, c, and d, are positive numbers, is a/b < c/d? [#permalink] ### Show Tags 09 Nov 2015, 08:46 Bunuel, 2) This quite clearly sufficient 1) However, it was not very clear to me how this one is insufficient. Is there any way we know this choice is not sufficient w/o resorting to number picking? Thanks! _________________ My journey V46 and 750 -> http://gmatclub.com/forum/my-journey-to-46-on-verbal-750overall-171722.html#p1367876 Kudos [?]: 460 [0], given: 197 Math Revolution GMAT Instructor Joined: 16 Aug 2015 Posts: 3985 Kudos [?]: 2696 [2], given: 0 GPA: 3.82 Re: If a, b, c, and d, are positive numbers, is a/b < c/d? [#permalink] ### Show Tags
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9849273708061969, "lm_q1q2_score": 0.8249948202358408, "lm_q2_score": 0.8376199552262967, "openwebmath_perplexity": 4299.89453809255, "openwebmath_score": 0.6671302914619446, "tags": null, "url": "https://gmatclub.com/forum/if-a-b-c-and-d-are-positive-numbers-is-a-b-c-d-135521.html" }
water, material-science such as having enough velocity for supercavitation, somehow induce electrolysis along the surface, have a slow chemical reaction producing gases or somehow bleed additional air to the surface through pores. Also keep in mind that the current methods of laser etching the metal is hard pressed to produce one square inch.
{ "domain": "physics.stackexchange", "id": 20342, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "water, material-science", "url": null }
c#, entity-framework and an extension to for the DbContext that provides the nolock option public static class DbContextExtensions { public static T AsNolock<TDbContext, T>(this TDbContext context, Func<TContext, T> query) where TDbContext : DbContext { using (var scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = IsolationLevel.ReadUncommitted })) { var result = query(context); scope.Complete(); return result; } } } Usually I use this by creating a static class for queries for the particular model: // theoretical foo-context for a foo-model public class FooContext : DbContext { public virtual ICollection<string> Strings { get; set; } } // query service for the foo-model public class FooQueryService : QueryService<FooContext> { public FooQueryService(string environmentName) : base("Foo", environmentName) { } }
{ "domain": "codereview.stackexchange", "id": 20626, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, entity-framework", "url": null }
python, regex Title: Extracting citations of court documents in multiple languages I've got 20'000+ court documents I want to pull specific data points out of: date, document number, verdict. I am using Python and Regex to perform this. The verdicts are in three languages (German, French and Italian) and some of them have slightly different formatting. I am trying to develop functions for the various data points that take this and the different languages into regards. I'm finding my functions very clumsy. Has anybody got a more pythonic way to develop these functions? def gericht(doc): Gericht = re.findall( r"Beschwerde gegen [a-z]+ [A-Z][a-züöä]+ ([^\n\n]*)", doc) Gericht1 = re.findall( r"Beschwerde nach [A-Za-z]. [0-9]+ [a-z]+. [A-Z]+ [a-z]+ [a-z]+[A-Za-z]+ [a-z]+ [0-9]+. [A-Za-z]+ [0-9]+ ([^\n\n]*)", doc) Gericht2 = re.findall( r"Revisionsgesuch gegen das Urteil ([^\n\n]*)", doc) Gericht3 = re.findall( r"Urteil des ([^\n\n]*)", doc)
{ "domain": "codereview.stackexchange", "id": 23688, "lm_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, regex", "url": null }
black-holes, singularities, event-horizon Title: Are black holes really singularities? A popular assumption about black holes is that their gravity grows beyond any limit so it beats all repulsive forces and the matter collapses into a singularity. Is there any evidence for this assumption? Why can't some black holes be just bigger neutron stars with bigger gravity with no substantial difference except for preventing light to escape? And if neutrons collapse, can they transform into some denser matter (like quark-gluon plasma) with strong interaction powerful enough to stop the gravity? In this video stars are approaching supermassive black hole in the center of our galaxy in a fraction of parsec. The tidal force should tear them apart, but it doesn't. Can there be some kind of repulsive force creating limits for attractive forces?
{ "domain": "physics.stackexchange", "id": 11294, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "black-holes, singularities, event-horizon", "url": null }
lidar, laser, turtlebot, hokuyo, ethernet Title: use Hokuyo LIDAR with ethernet in ROS Hi! I got a Hokuyo UTM-30LX-EW which I would like to use with my Turtlebot. The sensor has a power and an ethernet connector. I connected the power to the turtlebot, it seems to be working. I connected the ethernet cable to the wifi router. I can ping the sensors IP from the turtlebot, it seems to be up and running. I then installed the ros_groovy_laser_drivers package. Then I wanted to try: roslaunch hokuyo_node hokuyo_test.launch
{ "domain": "robotics.stackexchange", "id": 13469, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lidar, laser, turtlebot, hokuyo, ethernet", "url": null }
fats, lipids Title: How much lipoic acid is contained within octanoic acid? As I understand it, lipoic acid is synthesized from octanoic acid: Lipoic acid is synthesized de novo in mitochondria from octanoic acid, an 8-carbon fatty acid (C8:0), bound to the acyl-carrier protein (ACP; see article on Pantothenic Acid) during the process of fatty acid synthesis (Figure 2). However, I am wondering how much is actually contained within octanoic acid? Such as if you had 100 ml of octanoic acid, how much lipoic acid would you consume? Background One lipoic acid molecule is enzymatically produced from one octanoic acid molecule in the mitochondrion or in the bacterium by the enzyme lipoyl synthase (LipA).
{ "domain": "chemistry.stackexchange", "id": 14959, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fats, lipids", "url": null }
ros, image-pipeline Originally posted by mihaibujanca on ROS Answers with karma: 1 on 2015-08-09 Post score: 0 Disclaimer: I haven't tried this, but it should work. What you could try is transmitting the stream via Gstreamer, running a Gstreamer pipeline on the Pi and another one on your target computer as input of the gscam ROS camera driver. Here is a tutorial for using Gstreamer on the Pi. What would need to be changed is piping the output to RGB output on the receiver side (instead of the video sink visualizer). This then can be used by the gscam driver which publishes standard ROS images. Originally posted by Stefan Kohlbrecher with karma: 24361 on 2015-08-10 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 22403, "lm_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, image-pipeline", "url": null }
digital-communications, ofdm On the other hand, if we can normalize the added SFO by $N$ to have the maximum added SFO 1ppm multiplied by the difference between $x[N]$ and $x[N-1]$, the above equation will be: $y\left [ n \right ] = x\left [ n \right ] + n \times \frac{x\left [ n + 1 \right ] - x\left [ n \right ]}{N \times 10^6}$ Unfortunately, the rotation is still very big and the signal is completely deteriorated. The sampling frequency offset will induce a time offset on every symbol that is increasing from symbol to symbol. This results in the rotation as observed. Frequency is the derivative of phase with respect to time, so a constant frequency offset would result in a linearly increasing phase versus time.
{ "domain": "dsp.stackexchange", "id": 11257, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "digital-communications, ofdm", "url": null }
c#, wpf, rubberduck, xaml private readonly ICommand _removeCommand; public ICommand RemoveCommand { get { return _removeCommand; } } private readonly ICommand _printCommand; public ICommand PrintCommand { get { return _printCommand; } } private readonly ICommand _commitCommand; public ICommand CommitCommand { get { return _commitCommand; } } private readonly ICommand _undoCommand; public ICommand UndoCommand { get { return _undoCommand; } } private readonly ICommand _externalRemoveCommand; // this is a special case--we have to reset SelectedItem to prevent a crash private void ExecuteRemoveComand(object param) { var node = (CodeExplorerComponentViewModel) SelectedItem; SelectedItem = Projects.First(p => ((CodeExplorerProjectViewModel) p).Declaration.Project == node.Declaration.Project); _externalRemoveCommand.Execute(param); }
{ "domain": "codereview.stackexchange", "id": 20242, "lm_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#, wpf, rubberduck, xaml", "url": null }
To review the GMAT Club's Forums Posting Guidelines, please follow these links: Quantitative | Verbal Please note - we may remove posts that do not follow our posting guidelines. Thank you. _________________ SC Butler has resumed! Get two SC questions to practice, whose links you can find by date, here. Choose life. Intern Joined: 10 Jun 2019 Posts: 9 Re: If y is a positive integer, and |x| < 5 − y, then what is the least po  [#permalink] ### Show Tags 17 Jun 2019, 01:29 Since y is a positive integer so y=1,2,3,4,5,...... Now |x| must be >=0 since modulus of an expression cannot be zero. So, if we put the values of y starting with 5,4,3,2,1, we get 1) y=5 => |x|<0 (INVALID! as |x| must be non-negative) 2) y=4 => |x|<1 => this implies that magnitude of x must be less than. Option C as value for x satisfies this condition giving us the least possible integer for x. 3) y=3 => |x|<2 => This option gives us x such that it could be 0 or 1. Here also, 0 is the least possible value for x.
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9263037302939515, "lm_q1q2_score": 0.8031384538291746, "lm_q2_score": 0.8670357546485408, "openwebmath_perplexity": 2278.1011399087774, "openwebmath_score": 0.612427294254303, "tags": null, "url": "https://gmatclub.com/forum/if-y-is-a-positive-integer-and-x-5-y-then-what-is-the-least-po-261724.html" }
• When you run re = ImplicitRegion[((1.2 x)^2 + (1.4 y)^2 - 1)^3 - (1.3 x)^2 y^3 == 0, {x, y}]; soln = FindMaximum[{EuclideanDistance[{x1, y1}, {y1, y2}], {{x1, y1} \[Element] re, {x2, y2} \[Element] re}}, {{x1, 0.33}, {y1, 0.82}, {x2, -0.9}, {y2, 0.3}}] ContourPlot[((1.2 x)^2 + (1.4 y)^2 - 1)^3 - (1.3 x)^2 y^3 == 0, {x, -1.5, 1.5}, {y, -3/2, 3/2}, AspectRatio -> Automatic, Epilog -> {PointSize[Large], Red, Point[{{x1, y1}, {x2, y2}} /. soln[[2]]]}].you will get another result. – yode Mar 8 '16 at 21:37 • @yode: As I noted, the FindMaximum algorithm tends to get "stuck" on points with $x = 0$ or $y = 0$, for reasons I'm not entirely clear on. This is one such example. Note that FindMaximum returns an error message for your code (due to poor convergence to a maximum), but does not for mine. (Also, you have an error in your expression: it should be EuclideanDistance[{x1, y1}, {x2, y2}] instead of what you have.) Mar 8 '16 at 21:46 • Sorry my English.And thanks four your explaination.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.941654159388319, "lm_q1q2_score": 0.8003788982861249, "lm_q2_score": 0.849971181358171, "openwebmath_perplexity": 3141.7556138410387, "openwebmath_score": 0.1797262728214264, "tags": null, "url": "https://mathematica.stackexchange.com/questions/109462/finding-the-two-points-on-a-heart-shaped-curve-which-have-maximal-distance-betwe" }
c /* BGR RGB DEC COLOR 000 000 0 black 100 001 1 blue 010 010 2 green 110 011 3 cyan (blue + green) 001 100 4 red 101 101 5 magenta (red + blue) 011 110 6 yellow (red + green) 111 111 7 white (red + blue + green) */ void setLed(int8 nled, int16 color) { switch(nled) { case 0: bit_mask16 = (7<<0); leds1 = (leds1 & (~bit_mask16)) | (color<<0); break; case 1: bit_mask16 = (7<<3); leds1 = (leds1 & (~bit_mask16)) | (color<<3); break; case 2: bit_mask16 = (7<<6); leds1 = (leds1 & (~bit_mask16)) | (color<<6); break; case 3: bit_mask16 = (7<<9); leds1 = (leds1 & (~bit_mask16)) | (color<<9); break; case 4: bit_mask16 = (7<<12); leds1 = (leds1 & (~bit_mask16)) | (color<<12); break; case 5: bit_mask16 = (7<<15); leds1 = (leds1 & (~bit_mask16)) | (color<<15);
{ "domain": "codereview.stackexchange", "id": 24863, "lm_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 }
metallurgy, nuclear-chemistry, geochemistry But why would some rocks originally contain more than their fair share of specific minerals? One reason is the second geological process that leads to selective concentration of some minerals. This is that, as liquid rocks in the mantle cool, different minerals will crystallise from the mix at different times. a visible manifestation of this process can be seen in many of the polished granites used to decorate kitchen tops or the floors and walls of buildings. Granites consist of three key minerals: feldspars, quartz and mica each with very different mineral contents. The rock is usually formed deep in the crust when a large body of liquid rock cools. But the feldspars crystallise first, giving the large colourful crystals that make the polished surfaces so attractive. Sometimes the large crystals even show patterns of flow in the liquid source rock. The important general point is that the composition of the liquid changes as crystals form and this may concentrate some components. But
{ "domain": "chemistry.stackexchange", "id": 15075, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "metallurgy, nuclear-chemistry, geochemistry", "url": null }
5. Originally Posted by CaliMan982 Hi all, I am struggling to finish this problem and was seeing if anyone could help me. There are two circles. Circle 1 has a center at (2,4), and radius 4. Circle 2 has a center at (14,9) and radius 9. I need to find the equation for common tangent line of these two circles. The circles touch so there is just one exterior tangent line. Any help is appreciated, Thanks. Hello, you'll find all necessary methods here: http://www.mathhelpforum.com/math-he...712-post1.html 6. Originally Posted by earboth Hello, you'll find all necessary methods here: http://www.mathhelpforum.com/math-he...712-post1.html Maybe you meant here .....? 7. Originally Posted by mr fantastic Maybe you meant here .....? nope. he was almost right the first time, here's the thread. the user double posted 8. If you want to get the equation using calculus, follow these steps:
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9697854120593483, "lm_q1q2_score": 0.8183971654768525, "lm_q2_score": 0.8438951084436077, "openwebmath_perplexity": 484.19199180257056, "openwebmath_score": 0.692771315574646, "tags": null, "url": "http://mathhelpforum.com/pre-calculus/26541-help-calculate-tangent-equation-two-circles.html" }
# Some t values that are appropriate to plot the solution t = np.linspace(0,100,1000) # Solve it! y = odeint(f, 0.01, t).flatten() # Plot it!! plt.plot(t,y); This looks kinda like we might have expected. The population continues to grow but that growth rate slows down. Note that the flatten at the end of odeint(f, 0.01, t).flatten() is not, strictly speaking, necessary to plot the solution. The point of flatten is that it "flattens" the output of odeint from a column vector to a 1D array. Let's look at the first few terms of the odeint result: In [4]: odeint(f, 0.01, t)[:8] Out[4]: array([[0.01 ], [0.01104125], [0.01218961], [0.0134558 ], [0.01485155], [0.01638971], [0.01808431], [0.01995063]]) And here that is flattened: In [5]: odeint(f,0.01,t)[:8].flatten() Out[5]: array([0.01 , 0.01104125, 0.01218961, 0.0134558 , 0.01485155, 0.01638971, 0.01808431, 0.01995063])
{ "domain": "marksmath.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9881308807013052, "lm_q1q2_score": 0.8168994573799987, "lm_q2_score": 0.8267117983401363, "openwebmath_perplexity": 1508.2181808869123, "openwebmath_score": 0.8829213976860046, "tags": null, "url": "https://marksmath.org/classes/Fall2020DiffEq/Code/NumericalMethods1.html" }
quantum-mechanics, hilbert-space, operators, wavefunction, notation The step that really confuses me here is that we seemingly use $$\langle x| \hat{p} |0\rangle = \hat{p}\langle x|0\rangle$$ where I fail to see why this holds true. Any help would be greatly appreciated. Just to elaborate on Cosmas's answer: when one writes $\hat{p} = -i \hbar \ d/dx$, what they really mean is that $\hat{p}$ is given by this expression in the $x$-representation. In other words, $\hat{p}$ has the following matrix elements with respect to the $|x\rangle$ basis: $$ \langle x | \hat{p} | x' \rangle = -i \hbar \frac{d}{dx} \delta(x-x') $$ One way you can "prove" the above is to insert a resolution of the identity $\int dp |p \rangle \langle p|$, use $\hat{p} |p \rangle = p |p\rangle$, and $\langle x | p \rangle = e^{ipx/\hbar} / \sqrt{2\pi \hbar}$. (I say "prove" in quotes, because it's somewhat a matter of what you take as your starting point: the definition of the operator, or the overlap $ \langle x | p \rangle$.)
{ "domain": "physics.stackexchange", "id": 85002, "lm_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, hilbert-space, operators, wavefunction, notation", "url": null }
javascript, react.js and Note that this method is fired on every render, regardless of the cause. Your implementation returns a new state object every render regardless, but it should return null when nothing needs to be updated. By returning a new state object each render then unnecessary re-renders may occur in children components if passed any values from this component's state as they would fail shallow object comparison. class OptionsRow extends React.PureComponent { state = { currentPage: 0 } ... static getDerivedStateFromProps(props, state) { if (props.pageSize !== state.prevPageSize) { // Reset page on pageSize change return { currentPage: 0, prevPageSize: props.pageSize } } // Nothing changed, return null to keep existing state return null; } ... } However, in 3+ years working with react I've not ever had any compelling reason to reach for getDerivedStateFromProps and the docs even specify
{ "domain": "codereview.stackexchange", "id": 39202, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, react.js", "url": null }
newtonian-mechanics, newtonian-gravity, orbital-motion, centrifugal-force $$\frac{G\,M_\oplus}{r^2} = \omega_s^2 r$$ where $\omega_s = 2\pi/T_s$ is $2\pi$ radians per sidereal day $T_s\approx 23.9\times 3\,600{\rm s}$ and $M_\oplus$ the Earth's mass. You can simplify this in terms of known $g$, since $G\,M/r_\oplus^2 = g$, as: $$g\,\frac{r_\oplus^2}{r^2} = \omega_s^2 r$$ whence I reckon $r$ to be (taking $r_\oplus\approx 6\,400{\rm km}$: $$r=\sqrt[3]{g\,\frac{r_\oplus^2\,T_s^2}{4\,\pi^2}} = 42\, 270{\rm km}$$ i.e. an altitude of $ 42\, 270-6\,400 \approx 36\,000{\rm km}$.
{ "domain": "physics.stackexchange", "id": 16544, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, newtonian-gravity, orbital-motion, centrifugal-force", "url": null }
python, beginner, algorithm, programming-challenge, pathfinding # solver arguments parser.add_argument("-si", "--solve", default="" , help="maze file to solve") parser.add_argument("-sg", "--solvegenerated", action="store_true" , default=False, help="generate and then solve a maze") parser.add_argument("-dfs", "--dfs", action="store_true" , default=False, help="solve using dfs algorithm") parser.add_argument("-dji", "--djikstra", action="store_true" , default=False , help="solve using djikstra algorithm") return parser.parse_args() def main(): arguments = parse_arguments()
{ "domain": "codereview.stackexchange", "id": 35609, "lm_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, algorithm, programming-challenge, pathfinding", "url": null }
Let $r$ be the largest real root of $f$. Then, by the functional equation, $2r^3+r$ is also a root of $f$, and so by the definition of $r$, $$r \geq 2r^3+r$$ which simplifies to $$0 \geq r$$ Similarly, if we let $n$ be the smallest root of $f$, once again by the functional equation $2n^3+n$ is also a root and so $$n \leq 2n^3+n$$ which simplifies to $$0 \leq n$$ So any root of $f$ must be between $0$ and $0$ and hence can only be $0$. So now there are two possibilities: 1) $f$ has no real roots 2) $f$ only has roots at $x=0$. In the second case, $f$ must be of the form $$f(x) = a x^n$$ for some constant $a$ and non-negative integer $n$. Substituting this in the functional equation yields $$ax^n a(2x^2)^n = a (2x^3+x)^n$$ $$a^2 2^n x^{3n} = a (2x^3+x)^n$$ which is only possible if $n=0$ since otherwise the RHS has multiple terms. Hence, we are left with $$a^2 = a$$ and $$f(x)=a$$ so $a=0$ or $a=1$, but we must take $a=0$ since case 2) is under the assumption that $f$ has a root at
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9715639686018701, "lm_q1q2_score": 0.8010174927706101, "lm_q2_score": 0.8244619177503205, "openwebmath_perplexity": 96.80529920290876, "openwebmath_score": 0.9312252998352051, "tags": null, "url": "https://math.stackexchange.com/questions/2600903/solve-fxf2x2-f2x3x" }
optics, visible-light, reflection, refraction That said, if you constrain the possible location of the sun (which we can do from prior knowledge), and you consider it a success to hit a large target, then using a suitable parabolic mirror or some such would work much of the time. Alternatively, if you consider it a success that some light always hits the target, then you can make the room a big integrating sphere, resulting in a uniform illumination of the interior.
{ "domain": "physics.stackexchange", "id": 84218, "lm_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, visible-light, reflection, refraction", "url": null }
c++, array, c++20 private: constexpr Iterator(MDSpan& owner, std::size_t index = 0) : m_owner{ owner }, m_index{ index } { } friend class MDSpan; private: MDSpan& m_owner; std::size_t m_index; }; }; I would appreciate any kind of review and criticism, but have some specific questions, too: MDSpan::operator[] returning a sub-view could be marked as const, since it does not modify this in any way. However it still grants access to the underlying data. The same applies for MDSpan::data(), MDSpan::begin() and MDSpan::end(). Therefore it should not be const in my opinion. Is this the right decision? In the non-const version of MDSpan::at() I use the const one with a const_cast. Since I am just dropping the previously applied const qualifier, this should be well defined, but is it good practice to do so?
{ "domain": "codereview.stackexchange", "id": 45394, "lm_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++, array, c++20", "url": null }
the-sun, algorithm The page above also links to https://gml.noaa.gov/grad/solcalc/calcdetails.html which provides a simpler formula, but notes that it's fairly inaccurate. Finally, you may want to visit Where can I find the positions of the planets, stars, moons, artificial satellites, etc. and visualize them? which lists many other resources
{ "domain": "astronomy.stackexchange", "id": 6082, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "the-sun, algorithm", "url": null }
My Working : $$\prod^{\infty}_{n=2} \frac{n^3-1}{n^3+1}= 1 - \prod^{\infty}_{n=2}\frac{2}{n^3+1} = 1-0 = 1$$ Is it correct - It would have been true if $\prod_{n=1}^{\infty} (a_n-b_n) = \prod_{n=1}^{\infty} a_n - \prod_{n=1}^{\infty} b_n$. Sadly, it's not... – user66258 Aug 7 '13 at 17:14 Try factorization of numerator and denominator. – Kunnysan Aug 7 '13 at 17:15 What @Kunnysan, plus note that $(n+1)^2-(n+1)+1 = n^2+n+1$. – Thomas Andrews Aug 7 '13 at 17:21 Maple produces $$product((1-1/n^3)/(1+1/n^3), n = 2 .. infinity)$$ $$\frac 2 3 ,$$ product(1-1/n^3, n = 2 .. infinity) $$1/3\,{\frac {\sin \left( \pi \, \left( 1/2+1/2\,i\sqrt {3} \right) \right) }{\pi }},$$ and $$product(1+1/n^3, n = 2 .. infinity)$$ $$1/2\,{\frac {\sin \left( \pi \, \left( 1/2+1/2\,i\sqrt {3} \right) \right) }{\pi }}.$$ The imaginary parts equal zero. – user64494 Aug 7 '13 at 17:28 From where can I get the details on telescoping series.. please suggest thanks... to all of you.. – sultan Aug 7 '13 at 17:29
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9669140254249554, "lm_q1q2_score": 0.8179536054580495, "lm_q2_score": 0.8459424353665381, "openwebmath_perplexity": 1204.2520984159905, "openwebmath_score": 0.8874220252037048, "tags": null, "url": "http://math.stackexchange.com/questions/462082/how-to-solve-this-prod-infty-n-2-fracn3-1n31" }
thermodynamics, energy, statistical-mechanics, entropy, probability Title: Boltzmann distribution derivation from Lagrange Multipliers Context In the derivation of the Boltzmann factor and the canonical partition function based essentially on Lagrange multipliers presented here, the equalities, \begin{align*} p_j &= \frac{1}{Z} e^{\frac{\lambda_2 E_j}{k_B}} \\ Z &= \sum_j e^{\frac{\lambda_2 E_j}{k_B}} \end{align*} are established, where $E_j$ refers to the energy of a microstate, $k_B$ is the Boltzmann constant, and $\lambda_2$ is the remaining undetermined multiplier. Then, using the Gibbs entropy $S = - k_B \sum_j p_j \ln(p_j)$ along with some algebra, \begin{gather*} S = -\lambda_2 U + k_B \ln(Z) \end{gather*} Finally, the article suggests the derivative, \begin{gather*} \frac{\partial S}{\partial U} = - \lambda_2 \end{gather*} without further work. Note that the article also improperly uses a total derivative instead of a partial here as the whole point is to make the identification $\frac{\partial S}{\partial U} = - \lambda_2 = \frac{1}{T}$.
{ "domain": "physics.stackexchange", "id": 97151, "lm_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, energy, statistical-mechanics, entropy, probability", "url": null }
statistical-mechanics, condensed-matter, physical-chemistry, computational-physics, molecular-dynamics What about the $NVT$ ensemble? Constant temperature perhaps seems reasonable for equilibrium, "real world" chemistry, but I am not so sure about constant volume. Now let's jump back to my very rudimentary of MD simulations in the literature. In MD simulations, molecules sit in a simulation box to which periodic boundary conditions are applied. From reading some literature articles it seems that the $NPT$ ensemble is used for equilibration -- to obtain the simulation box size that gives an average pressure of, for example, 1 atm. Then, the system is simulated in the $NVT$ ensemble -- that is, the simulation box's dimensions are held fixed, hence fixing the system volume. It is from this simulation in the $NVT$ ensemble that ensemble averages are computed and the system's chemistry is analyzed. Why is the $NVT$ ensemble used for MD simulation production runs? To amplify on something in the Ron's answer: Fixed energy is hard to maintain numerically; the slight computational errors
{ "domain": "physics.stackexchange", "id": 14416, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics, condensed-matter, physical-chemistry, computational-physics, molecular-dynamics", "url": null }
// 6n - 1 and 6n + 1 for n = 1, 2, 3, ... // is equivalent to n and n + 2 for n = 6m + 5 where m = 0, 1, 2, ... for(ulong n = 5; n <= max; n += 6) { if(number % n == 0) return false; if(number % (n + 2) == 0) return false; } return true; } } } We can also leverage known primes. If N is small then we can simply do a lookup into a list of all known primes up to some value. There are also probabilistic methods for testing primality, e.g. the Miller-Rabin test. This sort of method takes the number to be tested along with a factor indicating the required accuracy. Methods like this are efficient and useful when testing very large numbers for primality but for moderately sized numbers their performance lags significantly behind the exhaustive test methods. # The nth prime
{ "domain": "alandavies.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9886682481380669, "lm_q1q2_score": 0.8128722894650741, "lm_q2_score": 0.8221891327004132, "openwebmath_perplexity": 759.7021361001217, "openwebmath_score": 0.5288369059562683, "tags": null, "url": "https://alandavies.org/blog/2018/02/18/on-primes" }
r, single-cell, seurat, ggplot2 Higher color shows higher expression. Now, for some genes I want to highlight some cells in Featureplot so that apart from yellow or red colours I want to colour a subsets of cells with another color. I mean I want to map a list of cells in Featureplot or tSNE plot. Let's say I want to know the location of cells 1, 4, 80 and highlight them with another color. My Seurat object in this link. Seurat itself beautifully maps the cells in Featureplot for defined genes with a gradient of colours showing the level of expression. Saying I have genes A and B, in excel. I have coloured cells that express a gene > mean + se, < mean - se or between these values. For instance, for this gene, 36 cells express this gene > mean + se, I want to map these cells in Featureplot or tSNE plot in distinct colour so I can locate them in clusters easily. Something like binary (on off) expression to relative expression.
{ "domain": "bioinformatics.stackexchange", "id": 1233, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "r, single-cell, seurat, ggplot2", "url": null }
physical-chemistry, kinetics, units Title: Order of the reaction between hemoglobin and oxygen I have the reaction: $$\ce{Hb + O2 <=>[$k$][$k'$] HbO2}$$ where $\ce{Hb}$ is hemoglobin, $k$ is the rate constant of the forward reaction, $k'$ is the rate constant of the inverse reaction. On my book there is the rate law: $$W = kP(\ce{O2})[\ce{Hb}] - k'[\ce{HbO2}]$$ where $W$ is in $\pu{mol m-3 s-1}$, $P(\ce{O2})$ is a partial pressure in Pascal ($\pu{kg m m-2 s-2 = kg m-1 s-2}$). The inverse reaction is a first order reaction because: $$\pu{mol m-3 s-1} = [k'] (\pu{mol m-3})$$ thus $[k'] = \pu{s-1}$. I am in trouble with the forward reaction because I got a strange unit of measurement: $$\frac{\pu{mol}}{\pu{m3 s}} = [k] \frac{\pu{kg}}{\pu{m s2}} \frac{\pu{mol}}{\pu{m3}}$$ $$[k] = \frac{\pu{m s}}{\pu{kg}}$$
{ "domain": "chemistry.stackexchange", "id": 9344, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "physical-chemistry, kinetics, units", "url": null }
### Logic interpretation Let's start with the maths. The left-hand side is $(P \implies R) \vee (Q \implies R)$. This is exactly $(\neg P \vee R) \vee (\neg Q \vee R)$ or rearranging $R \vee \neg P \vee \neg Q$. But $\neg(P\wedge Q) \equiv \neg P \vee \neg Q$ and therefore$$(P \implies R) \vee (Q \implies R) \quad \equiv \quad R \vee \neg (P\wedge Q) \quad \equiv \quad (P\wedge Q) \implies R$$ What does this mean in words? It's as follows: Suppose we know whether you have a cold ($P$), whether you have a headache ($Q$) and whether you should go to the doctors ($R$). Then "you DON'T have a cold, OR you DON'T have a headache, OR you're going to the doctors" is exactly the same as "you DON'T have both a cold AND a headache, OR you're going to the doctors". Which is obviously true. But it's weird when we rephrase in terms of implications - but this is because the implications become trivial. Let's look at some particular examples in the truth table.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9811668717616667, "lm_q1q2_score": 0.8111422185532143, "lm_q2_score": 0.8267117876664789, "openwebmath_perplexity": 480.844118502405, "openwebmath_score": 0.7983846664428711, "tags": null, "url": "http://math.stackexchange.com/questions/361610/logic-question-how-does-p-to-r-vee-q-to-r-equiv-p-wedge-q-to-r" }
c++, beginner, file, caesar-cipher Put your variables where they are first used, and ready to be initialized. Don’t put them all clustered at the top of the function. Caesar *caesar = new Caesar; If you did need an object, there is no need to allocate it on the heap. Unlike certain other languages that came later, C++ lets you declare variables as values which are allocated on the stack frame of the function. So just Caesar caesar; whould be what you use. The body of main has almost identical blocks for choice 1 and choice 2. The only difference is the call to Encrypt vs Decrypt. In the updated code above, this would be a difference of calling the same function with a 3 or a −3. In any case, write the block once, and use an if statement or the like only for the part that is different. Hope that helps with some of the deeper understanding. Good luck, and keep at it!
{ "domain": "codereview.stackexchange", "id": 30766, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, beginner, file, caesar-cipher", "url": null }
statistical-mechanics, temperature, ground-state Addendum - September 18, 2017 In response to a question in the comments about whether or not at zero temperature the system is in a pure state: Recall that a quantum state (density matrix) $\rho$ is said to be pure if and only if $\rho^2 = \rho$. We now show that as $T\to 0$, or equivalently as $\beta\to+\infty$, the thermal density matrix $\rho$ approaches a density matrix $\rho_*$ that is pure if the ground level is non-degenerate and not pure otherwise. We will rely on an argument quite similar in character to the one given above in which we compared the probabilities of finding a system in a given energy level when we approach zero temperature.
{ "domain": "physics.stackexchange", "id": 82919, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics, temperature, ground-state", "url": null }
c++, c++17, template-meta-programming, stl, doxygen Should this not return pointer? [[nodiscard]] T* data() noexcept { return std::launder(reinterpret_cast<T*>(elems.data())); }
{ "domain": "codereview.stackexchange", "id": 35777, "lm_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++, c++17, template-meta-programming, stl, doxygen", "url": null }
hoare-logic Title: Hoare logic - invariant of loop I am trying to prove partial corectness of following program: {s = 0 and j = 0} while j <= n do begin { s + j = (j - 1)j/2 and j <= n + 1} s := s + j; { s = (j-1)j/2 and j <= n + 1} { s = j(j+1)/2 and j + 1 <= n + 1} j := j + 1; { s = (j-1)j/2 and j <= n + 1 } end; { s = (j-1)j/2 and j <= n + 1 and j > n} {s = n*(n+1)/2} And I am trying to find invariant. It seems to me that good candidate is s = (j-1)j/2 and j <= n + 1. Am I ok ? There is an issue below: {s = 0 and j = 0} while j <= n do begin { s + j = (j - 1)j/2 and j <= n + 1} (*) s := s + j; { s = (j-1)j/2 and j <= n + 1} (**) { s = j(j+1)/2 and j + 1 <= n + 1} j := j + 1; { s = (j-1)j/2 and j <= n + 1 } end; { s = (j-1)j/2 and j <= n + 1 and j > n} {s = n*(n+1)/2}
{ "domain": "cs.stackexchange", "id": 6964, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "hoare-logic", "url": null }
forces, friction, everyday-life Title: What forces act on a person sitting in a chair with wheels when they push off another stationary object What is slowing me down when I push off my desk? What are the "Major" contributors? and Does how hard I push with one hand (or with two hands) make a significant difference? Friction generated from the rotation of the wheels provides a torque to slow down their rate of rotation. As the entire chair slows down, friction between your body and the seat of the chair slows you down. That's the only major contributor. A phenomenological approach would be to assume the wheel friction provides a force to slow the chair down proportional to $v^{\alpha} m^\beta$ where $v \equiv dx/dt$ is the velocity of the chair, $m$ is the mass of the Argus + chair system, and both $\alpha$ and $\beta$ are unknown exponents. Let $K$ represent the unknown proportionality constant. Then $\begin{equation} m v \frac{dv}{dx} = - K v^{\alpha} m^\beta \end{equation}$
{ "domain": "physics.stackexchange", "id": 3598, "lm_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, friction, everyday-life", "url": null }
c++, linked-list All the nodes were allocated with new. Does your list use sentinels? (not at the moment see below). (Sure I could come up with more). Personally I would wrap this up in a class where the user never sees a node object. Code Re-Use You have repeated chunks of code that do the same things. void removeFromList(node* &head, int toBeRemoved){ // STUFF if (head->data == toBeRemoved){ head = head->next; delete temp; } // STUFF temp->next = temp->next->next; delete removeThis; }
{ "domain": "codereview.stackexchange", "id": 25199, "lm_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++, linked-list", "url": null }
homework-and-exercises, rotational-dynamics $$\mu mg R=\frac{mR^2}{2}\alpha$$ $$\alpha=\frac{2\mu g}{R}$$ Using $\omega_{f}=\omega_{i} +\alpha t$ $$\omega=\frac{2\mu gt}{R}$$ $$t=\frac{\omega R}{2\mu g}$$ My answer is not matching what I have done wrong ? To calculate the time until the angular velocity of the disk becomes zero you can consider the loss of angular momentum and thus loss of angular velocity due to the torque exerted on the disk by the friction of the disk on the surface. You have not calculated the torque on the disk correctly. To get it right you have to integrate the infinitesimal torques of the friction force exerted on infinitesimal rings of thickness rdr at radius r. Then you get the correct torque and from this the correct answer for the time until the angular velocity becomes zero. The answer for t is then identical to the one you obtained with a numerical factor in it which is different to 1/2.
{ "domain": "physics.stackexchange", "id": 33781, "lm_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 case of single tail, say, in position 2 we have sequence 11111... for all heads and sequence 11011... for tail at position 2. Probability to get such events are the same and equal to (1/2)100. • In case of "at least one tail" we are comparing sequence 1111... vs list of sequences 0111..., 1011..., 1101... etc, which obviously, counted as total, shall be 100 times more probable. In other words, it is now one events vs 100 events. Let's do some math and look at the problem as a case of Binomial Distribution. Probability of k tails in n trials is given as P(k|n, p) = C(n, k) * pk * (1-p)n-k, and C(n, k) is binomial coefficient C(n,k) = n!/(k! (n-k)!) For the case of fair coin p = 1/2, n = 100, so P(k|100, 1/2) = C(100, k) * (1/2)100 We could compute ratio of at least one tail to no tails probabilities P(1|100,1/2) / P(0|100,1/2) = ... = 100!/99! = 100 which is exactly what we surmised earlier.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9898303437461132, "lm_q1q2_score": 0.8291016622532065, "lm_q2_score": 0.8376199694135332, "openwebmath_perplexity": 635.657594852383, "openwebmath_score": 0.8053148984909058, "tags": null, "url": "https://stats.stackexchange.com/questions/330954/tossing-a-fair-coin-100-times-could-the-probability-of-some-specif-events-be-le" }
motion-planning, python, planning #If it is indeed a wide valley, we return the angle corresponding to the sector (k_n + s_max)/2. if type_of_valley == "Wide": theta = 5*(best_sector + s_max)/2 return theta #Otherwise, we find the far border of the valley and return the angle corresponding to the mean value between the best sector and the far border. elif type_of_valley == "Narrow": for sector in range(best_sector, best_sector + s_max): if self.Hist[sector] < thrs: far_border = sector theta = 5*(best_sector + far_border)/2 return theta
{ "domain": "robotics.stackexchange", "id": 978, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "motion-planning, python, planning", "url": null }
speed-of-light, light-emitting-diodes Title: Speed of the light, is it everywhere light? I have studied Electronics Engineering and of course the LED. I was wondering that they claim that the speed of light is $3\cdot10^8$ m/s, but do they claim the speed of the light of the sun rays ? or any light ? Because the speed of light that comes out of semi-conductors like LEDs can be controlled, correct ? The speed of light is of course $3\cdot10^8$ m/s in a vacuum. This is the Universal limit for the speed of light, which all electromagnetic waves (Radio, Ultraviolet Light, Visible, etc.) travel at. Where they differ is wavelength and frequency. Where frequency is determined by the speed of light in a vacuum and the wavelength: $$f = \frac{c}{\lambda}$$ And you can determine the wavelength in the same manner: $$\lambda = \frac{c}{f}$$ However this only in a vacuum. It changes once we introduce different materials for these electromagnetic waves to travel through.
{ "domain": "physics.stackexchange", "id": 9543, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "speed-of-light, light-emitting-diodes", "url": null }
performance, c, memory-management, io fseek ( fp, filepos, SEEK_SET); if(t_size<1 || t_size>1000000) // set restrictions to integer { printf("The number must be 1<= N <= 1.000.000",strerror(errno)); // error with the integer number getchar(); // wait the user press a key return 0; // returning an int of 0, exit the program } else { printf("Create a size of %d array\n", t_size); int* my_array = NULL; my_array = malloc(t_size*sizeof(*my_array));
{ "domain": "codereview.stackexchange", "id": 10638, "lm_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, c, memory-management, io", "url": null }
special-relativity You may be thinking of the fact that if we concentrate on some inertially-moving particle, then there is a unique spatial axis that is orthogonal to the particle's worldline. This axis is of course the spatial axis of the rest frame of the particle: the Lorentz frame that has its temporal axis along the particle's worldline.
{ "domain": "physics.stackexchange", "id": 3792, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity", "url": null }
## Perturbation analyses We can infer the contribution of each matrix element to the total population growth rate by doing perturbation analyses on the matrix. The logic behind them is simple: if we change only one of the transition values, keeping everything else constant, the change in $\lambda$ that we will see is a reflex of the change in the element we are looking at. This way, we can assess the contribution of each transition element, and consequently of the vital rates for each life stage, to the growth of the population as a whole. In our example matrix, the transition (or more accurately permanence) in the adult stage corresponds to the survival rate in this stage. We can then ask the following question: • If some external factor changed the adult survival rate, what would be the consequence for the population as a whole?
{ "domain": "usp.br", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232924970204, "lm_q1q2_score": 0.8058102635736423, "lm_q2_score": 0.8198933315126791, "openwebmath_perplexity": 1391.6036752092082, "openwebmath_score": 0.6301097869873047, "tags": null, "url": "http://ecovirtual.ib.usp.br/doku.php?id=en:ecovirt:roteiro:pop_str:pstr_mtr" }
beam, concrete If the columns and slabs are built and the wall is raised before their formwork is removed, then the wall will suffer compression. In this case, when the formwork is removed, the wall will (try to) impede the deflection of the slab and will therefore be compressed. If the slab is actually supported by a ring of beams, the same effects apply as described above. That being said, the beams will dramatically increase the stiffness of the slabs, and will therefore reduce the deflection of the structure above the wall. This will reduce the compression suffered by the wall (either immediately or due to creep), but not eliminate it.
{ "domain": "engineering.stackexchange", "id": 900, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beam, concrete", "url": null }
ros Depends: ros-fuerte-common-msgs (= 1.8.13-0precise-20120908-1740-+0000) but 1.8.13-0precise-20120812-0100-+0000 is to be installed Depends: ros-fuerte-common-rosdeps (= 1.2.0-s1347122840~precise) but 1.2.0-s1344802959~precise is to be installed Depends: ros-fuerte-driver-common (= 1.4.0-s1347168681~precise) but 1.4.0-s1344802685~precise is to be installed Depends: ros-fuerte-geometry (= 1.8.2-s1347128281~precise) but 1.8.2-s1344803881~precise is to be installed Depends: ros-fuerte-image-common (= 1.8.0-s1347133482~precise) but 1.8.0-s1344804269~precise is to be installed Depends: ros-fuerte-nodelet-core (= 1.6.5-s1347168835~precise) but 1.6.5-s1344806081~precise is to be installed Depends: ros-fuerte-perception-pcl (= 1.2.3-s1347170256~precise) but 1.2.2-s1344806759~precise is to be installed Depends: ros-fuerte-robot-model (= 1.8.1-s1347133837~precise) but 1.8.1-s1344897545~precise is to be installed
{ "domain": "robotics.stackexchange", "id": 12231, "lm_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 }
nomenclature, notation, isotope The isotopes of an element all bear the same name (but see Section IR-3.3.2) and are designated by mass numbers (see Section IR-3.2). For example, the atom of atomic number 8 and mass number 18 is named oxygen-18 and has the symbol $\ce{^{18}_{}O}$. IR-3.3.2 Isotopes of hydrogen Hydrogen is an exception to the rule in Section IR-3.3.1 in that the three isotopes $\ce{^{1}_{}H}$, $\ce{^{2}_{}H}$ and $\ce{^{3}_{}H}$ can have the alternative names protium, deuterium and tritium, respectively. The symbols D and T may be used for deuterium and tritium but $\ce{^{2}_{}H}$ and $\ce{^{3}_{}H}$ are preferred because D and T can disturb the alphabetical ordering in formulae (see Section IR-4.5). The combination of a muon and an electron behaves like a light isotope of hydrogen and is named muonium, symbol $\ce{Mu}$.⁵
{ "domain": "chemistry.stackexchange", "id": 8076, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nomenclature, notation, isotope", "url": null }
algorithms, data-structures, trees, probability-theory, coding-theory step 1: [1/55,2/55,3/55,4/55,5/55,6/55,7/55,8/55,9/55,10/55] step 2: [3/55,3/55,4/55,5/55,6/55,7/55,8/55,9/55,10/55] step 3: [4/55,5/55,6/55,6/55,,7/55,8/55,9/55,10/55] step 4: [6/55,6/55,7/55,8/55,9/55,9/55,10/55] step 5: [7/55,8/55,9/55,9/55,10/55,12/55] step 6: [9/55,9/55,10/55,12/55,15/55] step 7: [10/55,12/55,15/55,18/55] step 8: [15/55,18/55,22/55] step 9: [22/55,33/55] step 10: [1]
{ "domain": "cs.stackexchange", "id": 6084, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, data-structures, trees, probability-theory, coding-theory", "url": null }
observational-astronomy, telescope, space-telescope, james-webb-space-telescope NIRISS simulated PSFs, with 0.0656 arcsec pixels
{ "domain": "astronomy.stackexchange", "id": 5698, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "observational-astronomy, telescope, space-telescope, james-webb-space-telescope", "url": null }
# How to find the limit of this recurrence relation? $a_n$ is a sequence where $a_1=0$ and $a_2=100$, and for $n \geq 2$: $$a_{n+1}=a_n+\frac{a_n-1}{(n)^2-1}$$ I have a basic understanding of sequences. I wasn't sure how to deal with this recurrence relation since there is $n$ in the equation. By using an excel sheet, I know the limit is 199. And I confirmed this with Wolfram Alpha, which showed that the "Recurrence equation solution" is: $f(x)=199-\frac{198}{x}$ My question: Is it possible to find the limit of this sequence or even the "recurrence equation solution" without using an excel sheet or Wolfram Alpha? If so, can you clearly explain how this is done?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806546550656, "lm_q1q2_score": 0.844807701414238, "lm_q2_score": 0.8615382094310357, "openwebmath_perplexity": 278.83536778450224, "openwebmath_score": 0.9684588313102722, "tags": null, "url": "http://math.stackexchange.com/questions/684946/how-to-find-the-limit-of-this-recurrence-relation/685013" }
orbital-motion, satellites Those sun-synchronous orbits are also used for satellites that don't care about day and night on earth, but need an unceasing supply of energy. Examples are satellites that use radar to image the earth's surface. Radar is an active technology that needs lots of power to work over 800-km distances, and that power is supplied by the sun. The sun-synchronous orbits puts the satellite into eternal sunlight, allowing it to work 24/7 with a minimal battery and solar cell array size.
{ "domain": "physics.stackexchange", "id": 63384, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "orbital-motion, satellites", "url": null }
newtonian-mechanics, energy Title: Calculating the force and energy at impact of a falling object If an object falls from $32.9184 m$ and a mass of $212.281 kg$ how hard does that object hit the ground? I somehow got $68,481.92N$ by using this formula I found: $$\frac 12 m v^2 = m g h$$ I'm not sure if I'm correct and would appreciate a second look from professionals. Thank you. I can provide more information if needed. How we usually solve a question like this: The question in your homework is asking you to calculate the force with which the object hits the ground (how hard). Although that's not a very good way of asking which quantity you're supposed to find, I'm assuming you are required to find force. Now, if you're just starting physics, you've probably studied Newton's Laws of motion. According to Newton's Second Law, $$\sum F_{ext}=ma$$
{ "domain": "physics.stackexchange", "id": 66737, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, energy", "url": null }
field-theory, standard-model, elementary-particles Title: Can we fully describe the physical world as a collection of fields? I'm new to the Physics SE, coming from a pure math background. I think my question is full of incomprehension and lack of basic knowledge, but here goes. I'm trying to wrap my head around the modern description of our physical world. My basic understanding is that there are $n$ known elementary particles (that might be 17/24/25/31 depending on what counts, but the details are not so important to me). Particles can be understood as 'ripples' or 'excitations' of their underlying fields. I assume the nature of this field might change depending on the particle (scalar/vector/tensor?), but what does excitation mean? Above/below some kind of threshold that brings the field to a 'non-ground' state?
{ "domain": "physics.stackexchange", "id": 76759, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "field-theory, standard-model, elementary-particles", "url": null }
# Function f(x) such that integral area is divided in half at the same point k where f(k)=half of the max function value This is my first question here, so please be patient! For chance, I met these statistical functions... s(t) = 0.8^t {t>0} s(t) = 0.9^t {t>0} They go from 1 (at t=0) towards 0 (for x going to +inf) Calculating the integral from 0 to k and from k to +inf and finding the point k0 where the two areas are balanced (equal) we get: Solve[Integrate[(.9^(x)),{x,0,k}]==Integrate[(.9^(x)),{x,k,Infinity}],{k}] {{k->6.57881}} What surprised me is that at x=2.40942 0.9^x is exactly 0.5 Solve[.9^(x)==.5,{x}] {{k->6.57881}} So, dividing the domain [0,+inf) in two such that the left area and the right area below the curve are the same, is equivalent to dividing the codomain (0,1] in two at half Same applies for 0.8, for 0.75, for 0.5 and, I'd guess, any other base from 0 to 1. My questions are:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561703644735, "lm_q1q2_score": 0.8073716821002346, "lm_q2_score": 0.8333246015211008, "openwebmath_perplexity": 679.7373137841795, "openwebmath_score": 0.9999145269393921, "tags": null, "url": "https://math.stackexchange.com/questions/3251729/function-fx-such-that-integral-area-is-divided-in-half-at-the-same-point-k-whe" }
javascript, algorithm, shuffle Title: Fisher-Yates Shuffle This is a cut-and-dried Fisher-Yates implementation. As not typically a JS developer, I've tried to incorporate as many best practices as I can. I would appreciate any input as to make it conform to more best practices and continue to be maintainable. (function fisherYates () { "use strict"; var shuffle = function shuffle (array) { var beginningIndex = 0, currentIndex = array.length, indexDecrement = 1, randomIndex = 0, temporaryValue = 0; // While elements remain to be shuffled... while (currentIndex !== beginningIndex) { // Pick an element from the remaining elements... randomIndex = Math.floor(Math.random() * currentIndex); currentIndex -= indexDecrement;
{ "domain": "codereview.stackexchange", "id": 32041, "lm_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, algorithm, shuffle", "url": null }
ros2, ros-humble, joint-state-publisher, joint-states Reference https://index.ros.org/p/joint_state_publisher/ Don't start a joint_state_publisher node if you are already publishing to joint_states manually. That way there is only a single message being published to that topic.
{ "domain": "robotics.stackexchange", "id": 38883, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2, ros-humble, joint-state-publisher, joint-states", "url": null }
optics, astronomy, spectroscopy Title: How do astronomers identify different elements from the combined emission spectrum of multiple substances? It is said that the spectral lines of a particular atom or molecule is unique and this could be used to identify the substance by comparing the spectrum with the existing library of spectra of different atoms, molecules and compounds. In other words, spectral lines are like the fingerprints which help to identify different substances. This is used by astronomers to identify the chemical composition of distant stars and planets. The Wikipedia article on spectral lines gives the spectral lines for most of the elements in the periodic table. Usually stars and planets have diverse composition i.e., have different atoms, molecules and compounds. So the spectrum observed from these sources must have spectral lines belonging to each and every substance superposed on one another.
{ "domain": "physics.stackexchange", "id": 64152, "lm_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, astronomy, spectroscopy", "url": null }
2. Next, let’s look at the values in each of the $$f(x)$$ columns and determine whether the values seem to be approaching a single value as we move down each column. In our columns, we look at the sequence $$f(a−0.1),f(a−0.01),f(a−0.001).,f(a−0.0001)$$, and so on, and $$f(a+0.1),f(a+0.01),f(a+0.001),f(a+0.0001)$$, and so on. (Note: Although we have chosen the x-values $$a±0.1,a±0.01,a±0.001,a±0.0001$$, and so forth, and these values will probably work nearly every time, on very rare occasions we may need to modify our choices.) 3. If both columns approach a common y-value L, we state $$\lim_{x \to a}f(x)=L$$. We can use the following strategy to confirm the result obtained from the table or as an alternative method for estimating a limit.
{ "domain": "libretexts.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.990440598959895, "lm_q1q2_score": 0.8074393617146093, "lm_q2_score": 0.8152324960856175, "openwebmath_perplexity": 408.5510906027908, "openwebmath_score": 0.8519446849822998, "tags": null, "url": "http://math.libretexts.org/TextMaps/Calculus_Textmaps/Map%3A_Calculus_(OpenStax)/Calculus_I/Chapter_2%3A_Limits/2.2%3A_The_Limit_of_a_Function" }
newtonian-mechanics, forces, free-body-diagram, approximations, string Suppose the rope is lying from left to right, and object A is at its left end and is pulling on it leftward with 10 N of force. Suppose object B is at its right end and is pulling on it rightward with 10 N of force. Then we have $F_{AR}=-10\hat{x}$ Newtons and $F_{BR}=+10\hat{x}$ Newtons, where $\hat{x}$ is a unit vector pointing to the right. Now you can see that your initial equation is actually correct (if you erase the "T = " part): The sum of those two forces, the net force on the rope, is indeed 0. So it's not a problem that we're ignoring the mass. The net force is zero, so the acceleration is zero, regardless of the fact that the mass is really, really small.
{ "domain": "physics.stackexchange", "id": 27484, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces, free-body-diagram, approximations, string", "url": null }
# Math Help - Questions Help 1. ## Questions Help I've got two questions: 1. A mother knows that 20% of children who accept invitation to birthday parties do not come. If she invites 12 children to a party and only has 10 party hats, what is the probability that there is not a hat for every child who comes? The mother knows that there is a probability of 0.1 that a child who comes refuses to wear a hat. if this is taken into account, what is the probability that the number of hats will not be adequate? I know that the probability of a child not coming is $\frac{1}{5}$. So the probability that 11 or 12 come will be $P(not enough hats)=(\frac{4}{5})^{11}(\frac{1}{5})+(\frac{4}{5} )^{12}=0.0859$ the answer for this part is supposed to be 0.28, without the first part i don't see that the second part can be done.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307621626614, "lm_q1q2_score": 0.8249291169343809, "lm_q2_score": 0.8479677545357568, "openwebmath_perplexity": 656.9453761150505, "openwebmath_score": 0.5475988984107971, "tags": null, "url": "http://mathhelpforum.com/statistics/125683-questions-help.html" }
operators, coordinate-systems, group-theory, rotation, lie-algebra R(\Theta) & =I+ \frac{\Theta}{\theta}sin(\theta)+\frac{\Theta^2}{\theta^2}(1-cos(\theta)) \end{align} $$ This $R(\Theta)$ is the matrix for rotating any 3-vector about an arbitrary unit vector $\hat{n}$ by angle $\theta$. As an example, suppose $\hat{n}=(0,0,1)$, which is a rotation about the z-axis by theta. Then the final equation for $R$ yields the familiar rotation matrix $$ R(\Theta) = \begin{bmatrix} cos(\theta) & -sin(\theta) & 0 \\ sin(\theta) & cos(\theta) & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} $$ Notice that my $sin(\theta)$ is the opposite sign as yours because I am doing an active transformation on the object, whereas your formula is for a passive transformation on the coordinate axis (ie: $\vec{\theta}_{passive}=-\vec{\theta}_{active}$) .
{ "domain": "physics.stackexchange", "id": 73538, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "operators, coordinate-systems, group-theory, rotation, lie-algebra", "url": null }
$$\vec{N}=-F\vec{n}$$ Hence, equilibrium of forces in the tangential direction requires: $$m\omega^{2}R\sin\beta\cos\beta-mg\sin\beta=0\to\omega^{2}=\frac{g}{R\cos\beta}$$ Equilibrium in the normal direction: $$-F+mg\cos\beta+m\omega^{2}R\sin\beta\sin\beta=0\to{F}=\frac{mg}{\cos\beta}$$
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765540321749, "lm_q1q2_score": 0.8269974087948836, "lm_q2_score": 0.8438950966654774, "openwebmath_perplexity": 897.7864031494132, "openwebmath_score": 0.7543612718582153, "tags": null, "url": "https://www.physicsforums.com/threads/dynamics-problem.63212/" }
electromagnetism, magnetic-fields, units, dimensional-analysis Title: Is dimensional analysis always sufficient to establish equivalence of quantities? In dealing with the Biot-Savart law, it was argued that $$ q\frac{d\vec{s}}{dt}\equiv Id\vec{s} $$ using the fact that the units are equal. Does this kind of argument always work? It seems too simple to be true. No, it doesn't always work. Sometimes there are different quantities with the same dimensions that could go in a formula, and sometimes there are numerical constants that dimensional analysis won't give you. But in a situation where you're not dealing with many variables, dimensional analysis does help drastically narrow down the set of possible relationships between them, so it can give you useful starting points for further experimentation.
{ "domain": "physics.stackexchange", "id": 13462, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, magnetic-fields, units, dimensional-analysis", "url": null }
Hint: You have a good start in proving that the sequence $(a_n)$ is bounded. Let's reuse your trick and look at $$a_{2n}=\frac{a_n}{2^n}+\frac{b_{2n-1}}2+\frac{b_{2n-2}}4+\cdots+\frac{b_n}{2^n}.$$ All the numbers $|b_k|<\epsilon$ for $k\ge n$, if $n$ is large enough. The first term $a_n/2^n$ looks like it would be under control as well now that you know $|a_n|$ to be bounded. - Assume that $-t\leqslant b_n\leqslant t$ for a given positive $t$ and for every $n\geqslant n_t$. Then $a_n-t\leqslant\frac12(a_{n-1}-t)$ and $a_n+t\geqslant\frac12(a_{n-1}+t)$ for every $n\geqslant n_t$. Thus $\limsup (a_n-t)\leqslant0$ and $\liminf (a_n+t)\geqslant0$. Since this holds for every positive $t$, $a_n\to 0$. - @Srivatsan, exactly. Thanks. –  Did Oct 10 '11 at 17:29
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9881308768564867, "lm_q1q2_score": 0.858514559206388, "lm_q2_score": 0.8688267711434708, "openwebmath_perplexity": 127.50501798831874, "openwebmath_score": 0.9626346826553345, "tags": null, "url": "http://math.stackexchange.com/questions/71362/why-is-this-sequence-convergent" }