text
stringlengths
1
1.11k
source
dict
quantum-gate, programming, qiskit, gate-synthesis Title: How do I build a gate from a matrix on Qiskit? I'm creating a gate for a project and need to test if it has the same results as the original circuit in a simulator, how do I build this gate on Qiskit? It's a 3 qubit gate, 8x8 matrix: $$ \frac{1}{2} \begin{bmatrix} 1 & 0 & 1 & 0 & 0 & 1 & 0 & -1 \\ 0 & 1 & 0 & 1 & 1 & 0 & -1 & 0 \\ 0 & 1 & 0 & -1 & 1 & 0 & 1 & 0 \\ 1 & 0 & -1 & 0 & 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 & 0 & -1 & 0 & 1 \\ 0 & 1 & 0 & 1 & -1 & 0 & 1 & 0 \\ 0 & 1 & 0 & -1 & -1 & 0 & -1 & 0 \\ 1 & 0 & -1 & 0 & 0 & -1 & 0 & -1 \end{bmatrix} $$ I don't think Qiskit has this simulation feature. You have to decompose it indeed. However, there is another way to solve your problem. To check if a quantum circuit (that you can submit in Qiskit) corresponds to a unitary matrix, you can use the unitary_simulator backend. # Run the quantum circuit on a unitary simulator backend backend = Aer.get_backend('unitary_simulator') job = execute(circ, backend) result = job.result()
{ "domain": "quantumcomputing.stackexchange", "id": 2496, "lm_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-gate, programming, qiskit, gate-synthesis", "url": null }
homework-and-exercises, lagrangian-formalism, field-theory, scale-invariance $\phi'(x')=\lambda^{-a}\phi(x) \ \rightarrow \ \partial\phi'(x')=\lambda^{-a}\partial\phi'(x')=$ But also: $\phi'(x')=\phi'(\lambda x) \ \rightarrow \ \partial\phi'(x')=\lambda^{-1}\partial\phi'(x')$ Equating both terms gives me $a=1$. However, since this only depends on the derivative it should apply for any theory and not only $\phi^4$, so I'm guessing I'm doing something wrong. Just to close this question with the answer provided by AccidentalFourierTransform (thanks again for the help), I'll solve the example illustrated in case anyone finds it useful in the future. So starting again from the transformations: $x^\mu\rightarrow\lambda x^\mu \ \ \ \ \ \phi\rightarrow \lambda^{a}\phi$ For more clarity, these are expressed as: $x'^{\mu}=\lambda x \ \ \ \ \ \phi'(x')=\lambda^{a}\phi(\lambda x)$ Using the chain rule, the derivative is: $\partial_{\mu}\phi'(\lambda x)=\lambda\phi'(\lambda x)=\lambda^{a+1}\phi(x)$ Inserting into the action:
{ "domain": "physics.stackexchange", "id": 51959, "lm_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, lagrangian-formalism, field-theory, scale-invariance", "url": null }
exponent and using the definition of derivative to calculate the derivative of radical! Having trouble finding the derivative of a function by applying the power rule and thus its derivative is also.. Degree programs underneath the radical to an exponent and using the power rule, power,... Math knowledge with free questions in find derivatives of radical function will a. … Obtain and prove a formula for the nth derivative } yin terms of a derivative is called differentiation Statistics! Terms are multiplying, we have to use the formula given below to find the of! Re-Express y\displaystyle { y } yin terms of u\displaystyle { u }.. Below to find the first derivative of a radical number, it is important to determine. Numerator of this fraction is the derivative of a rational exponent process of a! Derived, whereas radical means a member of the most progressive wing of the x-value in the above concept the... Pre-Approval for credit transfer origin ; fundamental: a radical function 1/ ( 2
{ "domain": "cardesignnews.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9715639702485929, "lm_q1q2_score": 0.8138013791046866, "lm_q2_score": 0.8376199653600372, "openwebmath_perplexity": 750.8942168718196, "openwebmath_score": 0.6523811221122742, "tags": null, "url": "http://awards.cardesignnews.com/hmttl/d1b993-derivative-of-a-radical" }
security, rust, cryptography, aes // Step 2: Encrypting some JSON client side let payload = "[{ name: \"Secret Name\" }]"; println!("Original payload: {}", payload); let encrypted_payload = encrypt_payload(&payload, &password); let decrypted_payload = decrypt_payload(encrypted_payload, &password); println!("Decrypted payload: {}", decrypted_payload); // Step 3: Pushing encrypted payload to server // (omitted, out of scope of review) } fn encrypt_payload(payload: &str, password: &str) -> Vec<u8> { let salt = rand::thread_rng().gen::<[u8; 16]>(); let argon_config = Config::default(); let key = argon2::hash_encoded(password.as_bytes(), &salt, &argon_config).unwrap(); let iv = rand::thread_rng().gen::<[u8; 16]>(); let encrypted_bytes = encrypt(payload.as_bytes(), key.as_bytes(), &iv).ok().unwrap(); let encrypted_bytes : Vec<u8> = salt.iter().chain(&iv).chain(&encrypted_bytes).cloned().collect(); encrypted_bytes }
{ "domain": "codereview.stackexchange", "id": 37343, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "security, rust, cryptography, aes", "url": null }
homework-and-exercises, special-relativity, kinematics, momentum, conservation-laws The things that change are the expressions you can use for the various components. For free particles we have things like \begin{align} E &= \gamma m c^2 \tag{total energy} \\ K &= (\gamma -1) m c^2 \tag{kinetic energy} \\ p &= \gamma m v \tag{magnitude of momentum} \;, \end{align} and perhaps the most important relation of all the definition of mass1 $$ \left( mc^2 \right)^2 \equiv E^2 - \left(\vec{p}c\right)^2 \;. \tag{*} $$ Note that unlike classical physics you can not add the mass of the parts of the system to get the mass of the system. You must find the mass of the system from the total four-momentum of the system. I'm using the particle physics metric (+---), here. Some people reverse the signs for no good reason. The reason I like to emphasize the importance of (*) is two-fold:
{ "domain": "physics.stackexchange", "id": 48004, "lm_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, special-relativity, kinematics, momentum, conservation-laws", "url": null }
java, algorithm, object-oriented, queue, deque (Optional, Advanced) Type safety: Your Item[] a array is not actually an Item[] array. It is a Object[] array masquerading as an Item[] array, because it was cast to the desired type to force it into the desired member: a = (Item[]) new Object[size]; This is fine, as long as the array never, ever leaks out of your Deque class. For instance, don't ever add a toArray() method. You can make a correctly typed storage array, as long as you are willing to pass the real item's class to the constructor. public Deque(Class<Item> item_class) { size = 2; a = (Item[]) Array.newInstance(item_class, size); ... You'd need this item_class in your resize() code as well, so store it as a member.
{ "domain": "codereview.stackexchange", "id": 31221, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, algorithm, object-oriented, queue, deque", "url": null }
electromagnetism Title: The Significance of Electromotive Force Being Non-Conservative in Origin Taking the battery as an example. Intuitively, I understand that without the chemical forces that continuously maintains a voltage difference between the two terminals, the current will stop because, eventually, the two terminals of the battery will obtain the same voltage. However, most textbooks I have read emphasize that the source of an EMF must be non-electrostatic (or non-conservative) in origin. From my understanding, as stated above, I don't see a connection between the chemical forces that maintain a voltage difference between two battery terminals and that they must be non-electrostatic (or non-conservative). It seems to me that the mechanism of maintaining a voltage difference (in this case, the chemical forces) still works just fine without the requirement of the forces being non-conservative.
{ "domain": "physics.stackexchange", "id": 46802, "lm_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", "url": null }
All matrices are symmetric, this is really simple (you don't have to think about commutativity of the matrix products). $$A=\begin{vmatrix} M&N\\ N&M\end{vmatrix}=|M^2-N^2|$$ $$M^2=\begin{bmatrix} a^2+b^2&2ab\\ 2ab&a^2+b^2\end{bmatrix}$$ $$N^2=\begin{bmatrix} c^2+d^2&2cd\\ 2cd&c^2+d^2\end{bmatrix}$$ $$A=(a^2+b^2-c^2-d^2)^2-4(ab-cd)^2$$ The formula is correct, as can be checked by substituting some numbers. Edit A more general case of the determinant of a block matrix. (See here for example). If $$C$$ and $$D$$ commute. $$|M|= \begin{vmatrix} A & B \\C & D \end{vmatrix}=|AD-BC|$$ Edit 2 Just in case there are any more people claiming this is wrong, here's the check: Simplify[Det[{{a, b, c, d}, {b, a, d, c}, {c, d, a, b}, {d, c, b, a}}] - (a^2 + b^2 - c^2 - d^2)^2 + 4 (a b - c d)^2]
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9755769085257165, "lm_q1q2_score": 0.8171626864391197, "lm_q2_score": 0.8376199552262967, "openwebmath_perplexity": 624.1638737994946, "openwebmath_score": 0.9994449019432068, "tags": null, "url": "https://math.stackexchange.com/questions/2647193/calculate-the-determinant-left-beginsmallmatrix-abcd-badc-cdab/2647200" }
homework-and-exercises, newtonian-mechanics, lagrangian-formalism, rotational-dynamics I believe there are three generalised co-ordinates here $(x,y,\theta)$, as shown in the diagram and the constraint that $x=0$ (as there is no acceleration in the $x$-direction). We therefore have kinetic energy: $$T=\frac{1}{2}m\dot{y}^{2}+\frac{1}{2}m r^{2}\dot{\theta}^{2}y \cos(\theta)$$ And potential energy given by: $$U=-mgy$$ We therefore can define the Lagrangian: $$\mathcal{L}(y,\theta,t)=\frac{1}{2}m\dot{y}^{2}+\frac{1}{2}m r^{2}\dot{\theta}^{2}y \cos(\theta) + mgy$$ We therefore have the Euler-Lagrange equations: \begin{align} \frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\partial \mathcal{L}}{\partial \dot{y}}\right) &= \frac{\partial \mathcal{L}}{\partial y} \\ \frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\partial \mathcal{L}}{\partial \dot{\theta}}\right) &= \frac{\partial \mathcal{L}}{\partial \theta} \end{align} Expanding these we get: $$m\ddot{y}=\frac{1}{2}mr^{2}\dot{\theta}^{2}\cos(\theta) + mg$$ And:
{ "domain": "physics.stackexchange", "id": 12356, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, lagrangian-formalism, rotational-dynamics", "url": null }
c#, beginner private static string GenerateDsigLink(string urlToXmldsigFile) { try { var res = Path.ChangeExtension(urlToXmldsigFile, "xmldsig"); return res; } catch (Exception e) { Console.WriteLine(e.Message); throw; } } private static void DownloadFile(string url, string pathName) { try { var client = new WebClient(); client.DownloadFile(url, pathName); } catch (Exception e) { Console.WriteLine(e.Message); throw; } } private static void DeleteCreateOutputFolder(string serverpath) { Directory.Delete(serverpath + @"\Output\", true); }
{ "domain": "codereview.stackexchange", "id": 29162, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, beginner", "url": null }
catkin, ros-kinetic, build, compilation, build-from-source First of all, I don't quite get how a package like this one works when installed (or any ROS package). I checked its CMakeLists.txt file, it only installs headers and an example binary file. Going into cd /opt/ros/kinetic/share/serial there is only package.xml file and a cmake folder with serialConfig.cmake and serialConfig-version.cmake files. I compiled a basic ROS node using this library and it works fine, so how does ROS know where to find the src files if it only has headers and cmake configs installed? Secondly, if I try to install package from source into ROS, what's the proper way of doing it? I have tried: cd ~/catkin_ws/src git clone https://github.com/wjwwood/serial.git cd ~/catkin_ws/ && catkin_make source ~/catkin_ws/devel/setup.bash
{ "domain": "robotics.stackexchange", "id": 31097, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "catkin, ros-kinetic, build, compilation, build-from-source", "url": null }
centrifugal-force Title: Difference between Motorcycle and road bike max lean angle I've wondered why motorcycles can lean harder into turns than road bikes. I've went through the formulas and the only different variable I've found was tire traction. Is that really so? To me it does not explain the radical lean angle differences between Motorcycles and Road bikes. If the tire alone was at fault, they could make the road bike tire stickier, softer (I don't really know much about tires) and we would all lean into corners at 60 degree angles. As far as physics is concerned, there is no difference between the motorcycle and the road bike. As you suspect, the maximum lean angle $\alpha$ is set by the coefficient of friction $\mu$ : $\tan\alpha=\mu$.
{ "domain": "physics.stackexchange", "id": 40625, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "centrifugal-force", "url": null }
c++, c++14 // This is just a test run int main(int argc, char* argv[]) { if (argc != 2) { std::cerr << "Usage: " << argv[0] << " <N>" << std::endl; return EXIT_FAILURE; } int n = static_cast<int>(std::strtol(argv[1], static_cast<char**>(nullptr), 10)); assert(n > 0 && n < std::numeric_limits<int>::max()); std::random_device rd; std::mt19937 generator(rd()); std::uniform_int_distribution<> dist(1, n); std::size_t size{static_cast<std::size_t>(n + 1)}; std::vector<int> elements(size); // Fill and increment except last std::iota(elements.begin(), elements.end() - 1, 1); // Fill last with random value [1..N] elements.back() = dist(generator); // Shuffle elements std::shuffle(elements.begin(), elements.end(), generator); auto duplicate = FindOneDuplicate(elements.begin(), elements.end()); for (const auto& element : elements) { bool isduplicate = element == *duplicate; if (isduplicate) { // bold;red std::cout << "\033[1;31m"; }
{ "domain": "codereview.stackexchange", "id": 16900, "lm_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++14", "url": null }
A are computed, respectively, using the commands E = eig(A) and [V,E] = eig(A). To find the eigenvalues, we will solve the algebraic equation {eq}\displaystyle \det(A-\lambda I)=0. In MATLAB or OCTAVE the following commands give the eigenvalues of M ordered in ascending order in the column vector D, and the corresponding eigenvectors as the columns of P. linalg subpackage. In this case, we were able to find two distinct real eigenvalues. In one example the best we will be able to do is estimate the eigenvalues as that is something that will happen on a fairly regular basis with these kinds of problems. Therefore, we have In this case, the eigenvector associated to will have complex components. Some Matrix Applications. Then the transformation is repeated at time t = 2, 3, … bringing us to states u2, u3, and so on. Let's say that we want to find the eigenvectors of $\mathbf{A}=\begin{pmatrix} 3&2 \\ -1&0 \end{pmatrix}\nonumber$. The generalized eigenvalue problem is to determine the
{ "domain": "osteriarougeroma.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534392852384, "lm_q1q2_score": 0.8262126709314694, "lm_q2_score": 0.8418256412990657, "openwebmath_perplexity": 429.17433867820245, "openwebmath_score": 0.8734235167503357, "tags": null, "url": "http://lcoj.osteriarougeroma.it/how-to-find-eigenvalues-and-eigenvectors-in-matlab.html" }
homework-and-exercises, general-relativity, differential-geometry, metric-tensor, tensor-calculus I've tried proving it by just plugging in the symmetrisation operation the expressions for both the affine connections, and it's clear that the metric connection terms are by definition equal (assuming symmetry in the metric functions), so they just sum together. Instead, the part involving the torsion tensors really puzzle me, cause it seems by definition that they are antisymmetric, so they should just cancel out. I'm guessing it has something to do with the raised and lowered indexes that only allows the one with the rightmost index raised to not cancel... But I'm completely stuck. Any help will be much appreciated! So here's one way of doing it, probably a little clumsy but trying to be as explicit as possible. Also note that I use both symmetry and antisymmetry brackets at the same time, so it's just about being careful with both. Stating with $$ \Gamma^{a}{}_{bc} = \big\{{}^a_{bc}\big\} - \frac{1}{2} \big( T^{a}{}_{bc} + T_{c}{}^{a}{}_b - T_{bc}{}^{a} \big) \ , $$
{ "domain": "physics.stackexchange", "id": 76776, "lm_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, general-relativity, differential-geometry, metric-tensor, tensor-calculus", "url": null }
c#, calculator, winforms private void btn_c_Click(object sender, EventArgs e) { tbox_entry.Text = "0"; tbox_expression.Text = ""; last_number_entry = 0; } private void btn_ce_Click(object sender, EventArgs e) { tbox_entry.Text = "0"; } private void btn_backspace_Click(object sender, EventArgs e) { tbox_entry.Text = tbox_entry.Text.Remove(tbox_entry.Text.Length - 1); if (tbox_entry.Text.Length == 0) tbox_entry.Text = "0"; } private void btn_addition_Click(object sender, EventArgs e) { last_number_entry = double.Parse(tbox_entry.Text); if (equals_last_pressed == false) tbox_expression.Text += tbox_entry.Text; tbox_expression.Text = $"{Evaluate(tbox_expression.Text)} + "; tbox_entry.Text = "0"; equals_last_pressed = false; }
{ "domain": "codereview.stackexchange", "id": 42801, "lm_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#, calculator, winforms", "url": null }
ros, gazebo, ros-melodic, gazebo-ros-control </launch> With this I was able to load properly all controllers; if that does not apply to your enviroment you may want to check what is happening in your machine, cause it will be something related to that not to the launchers/description/etc. Hope that helps you. Regards. Originally posted by Weasfas with karma: 1695 on 2020-08-24 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 35420, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, gazebo, ros-melodic, gazebo-ros-control", "url": null }
reference-request, soft-question, big-list, books Introduction to the Theory of Computation by Michael Sipser This is one of the few/first textbooks that explicitly includes "Proof Idea:" between "Theorem:" and "Proof:", and is one of the best-written mathematical textbooks on any topic. On the other hand, it is only an intro to complexity, devoting only one 50-page chapter to "advanced topics" (including approximation, probabilistic algorithms, IP=PSPACE, and crypto). As a first book on complexity, or as an example of truly excellent writing, this book is great. The Nature of Computation by Cristopher Moore and Stephan Mertens Scott Aaronson writes that this book has "the fun of a popular book with the intellectual heft of a textbook." It tells stories and gives lots of entertaining examples and references (Game of Life, and lots of other examples for Turing-complete machines). It doesn't go too deep into complexity theory but has great breadth. Especially of note are its connections to statistical physics.
{ "domain": "cstheory.stackexchange", "id": 4903, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reference-request, soft-question, big-list, books", "url": null }
c#, performance, game, concurrency /** * Add this feature later with bitwise flags and other sorts of glorious sugar. */ private static void DoFullControlOptimization(List<Voxel> world) { } } } Suggestion #1; Use Parallel.ForEach loop (drops time down from 900ms to 260-300ms) using System.Threading.Tasks; using GameProject.Game.Framework.Geometry; using System.Collections.Generic; using OpenTK; namespace GameProject.Game.Framework.Generators { public enum OptimizationType { FullOptimization } public static class WorldOptimizer { public static void OptimizeVoxelWorld( List<Voxel> world , OptimizationType optimizationType ) { switch( optimizationType ) { case OptimizationType.FullOptimization: DoFullOptimization( world ); break; } }
{ "domain": "codereview.stackexchange", "id": 9533, "lm_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, game, concurrency", "url": null }
java, ai, connect-four public boolean lineOfFour(int x, int y, int i, int j) { Piece color = Boards[x][y].piece; for(int k = 1; k < 4; k++) { if(x+i*k < 0 || y+j*k < 0 || x+i*k >= Boards.length || y+j*k >= Boards[0].length) return false; if(Boards[x+i*k][y+j*k].piece != color) return false; } return true; } public Board minimax() { Tree tree = new Tree(Boards, 0); return Boards[tree.getX()][0]; } public static void main(String[] args) { new ConnectFour(false); } } A few thoughts in addition to Roland's feedback: Enum as a collection of constants in Java has the possibility to carry all its attributes. Thus, I'd rather put the color into the enum than see a switch over the enum elements: enum Piece { Red(Color.RED), Blue(Color.BLUE), None(Color.WHITE);
{ "domain": "codereview.stackexchange", "id": 23497, "lm_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, ai, connect-four", "url": null }
object-oriented, vba, classes This.InitialCalculation = Application.Calculation This.InitialScreenUpdating = Application.ScreenUpdating This.InitialDisplayAlerts = Application.DisplayAlerts End Sub Private Sub Class_Terminate() 'Default instance is stateless: If Me Is HostApplicationState Then Exit Sub 'only restore the properties that were toggled... If HasFlag(This.AppProperties, AppStateEnum.AppState_Calculation) Then Application.Calculation = This.InitialCalculation End If If HasFlag(This.AppProperties, AppStateEnum.AppState_ScreenUpdating) Then Application.ScreenUpdating = This.InitialScreenUpdating End If If HasFlag(This.AppProperties, AppStateEnum.AppState_DisplayAlerts) Then Application.DisplayAlerts = This.InitialDisplayAlerts End If End Sub Private Property Get IAppState_InitialCalculation() As XlCalculation IAppState_InitialCalculation = This.InitialCalculation End Property
{ "domain": "codereview.stackexchange", "id": 41574, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "object-oriented, vba, classes", "url": null }
c, array, memory-management | <------+ | ‘main’: events 13-14 | | 55 | struct Array *M = NewArray(2, 4); | | ^~~~~~~~~~~~~~ | | | | | (13) returning to ‘main’ from ‘NewArray’ | 56 | PrintArray(M); | | ~~~~~~~~~~~~~ | | | | | (14) calling ‘PrintArray’ from ‘main’ | +--> ‘PrintArray’: events 15-22 | | 42 | void PrintArray(const struct Array *array) { | | ^~~~~~~~~~ | | | | | (15) entry to ‘PrintArray’ | 43 | for (int i=0; i<array->rows; ++i) { | | ~~~~~~~~~~~~~ | | | | | (16) following ‘true’ branch... | 44 | for (int j=0; j<array->cols; ++j) { | | ~ ~~~~~~~~~~~~~
{ "domain": "codereview.stackexchange", "id": 44164, "lm_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, memory-management", "url": null }
optics, laser I imagine that there is a range through which the modulation transfer function can operate, it can not exceed a certain range - this step I am not clear on how it is managed physically. EDIT: some references connected seems to be Refractive index, Pockels effect & Kerr effect but how you control electric-electronically laser modulation to print correct patterns on photoreceptor belt or drum ? Most lasers used in printers and such are laser diodes, in which the energy is pumped into the semiconductor by passing a current through the depletion region. More current = more light output. It is very simple to modulate current at high frequencies, although you have to be a bit careful about the inductance of the circuit (and the nonlinear characteristics of the diode) to do this properly. This is why dithering with a simple "on-off" mechanisms is a nice way to achieve well controlled gray scales without the need to understand and characterize the nonlinearity. UPDATE
{ "domain": "physics.stackexchange", "id": 36272, "lm_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, laser", "url": null }
in that can be inside or outside the triangle as shown in the below... Or just great posters for your classroom or bulletin board 1 ) the intersection of the triangle is the of... ( circumcenter, centroid, circumcenter, it incenter, circumcenter orthocenter and centroid of a triangle be fit into the triangle a right-angled is. Interesting relationship between the centroid of a relation with different elements of the triangle geometric! Start studying geometry: incenter, Orthocenter, and Orthocenter three lines intersect is the of. The other two may be inside or outside the triangle radius of the four centers in! Roads that form a triangle and is our second type of triangle center are affected a -., do you think you can apply these properties when solving many algebraic problems dealing with these triangle combinations! The right angle ), these are the incenter is equidistant from all sides a. Past posts use if you want to open a store that is from... Classroom or bulletin board the
{ "domain": "logivan.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9811668739644686, "lm_q1q2_score": 0.8609511675530411, "lm_q2_score": 0.8774767986961401, "openwebmath_perplexity": 744.3313829522776, "openwebmath_score": 0.4381120800971985, "tags": null, "url": "https://logivan.com/nous-les-rkyjpm/93723d-incenter%2C-circumcenter-orthocenter-and-centroid-of-a-triangle" }
quantum-mechanics, quantum-information, decoherence The key insight is the following: Even if the global density matrix always remains pure for this situation, the reduced density matrices (that might have also started purely, given a pure product initial state) will become mixed by entanglement. This mixedness can experimentally be measured by what is called entanglement entropy, it is basically the von Neumann entropy of reduced density matrices, but there are other functions like the Renyi entropies that are also a good measure for entanglement. The concept one should have in mind is that information, which for a pure initial prodcut state is stored locally in each subsystem (every reduced density matrix is initially pure, all the local observables/expectation values can be determined locally) will distribute over the whole system via entanglement, so after a while all the reduced density matrices are mixed and local observables must be described by ensembles, just like in usual thermodynamics (even though this is not to be mixed
{ "domain": "physics.stackexchange", "id": 89289, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, quantum-information, decoherence", "url": null }
general-relativity, cosmology, differential-geometry, coordinate-systems Let's drop one dimension to make the illustration. Now our job is to construct coordinates on the surface of a sphere. The angles $\theta,\phi$ of the spherical polar coordinate system could be used, but they also include an initial step in which an arbitrary place on the sphere's surface is taken to act as a pole for the definition of $\theta$, and an arbitrary 'zero' direction is required for the definition of $\phi$. So they do not avoid this issue of picking a place to call 'north pole'. To learn this type of geometry it is helpful to get used to constructing coordinates directly on the surface, without reference to any other place---because, after all, those other places (inside or outside our sphere) do not have anything to do with the surface we want to discuss, and for all we know they may not even exist.
{ "domain": "physics.stackexchange", "id": 77884, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, cosmology, differential-geometry, coordinate-systems", "url": null }
slam, navigation, openni-launch Originally posted by gpsinghsandhu with karma: 231 on 2012-08-10 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 10540, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "slam, navigation, openni-launch", "url": null }
thermodynamics, statistical-mechanics, potential-energy, ideal-gas, partition-function Title: Why is potential energy zero in this calculation of partition function? In section 7.2 of Rief's "Fundamentals of Statistical and Thermal physics". While calculating the partition function for ideal gas he writes: $$ \begin{array}{l} \displaystyle{Z' = \int{ \exp{\left\{- \beta \left[\frac{1}{2m} \left({\mathbf{p}_1}^2 + \cdots + {\mathbf{p}_N}^2 \right) + U\left(\mathbf{r}_1, \dots , \mathbf{r}_N\right) \right]\right\}}} } \\ \hspace{15em} \displaystyle{\frac{d^3\mathbf{r}_1 \cdots d^3\mathbf{r}_N d^3\mathbf{p}_1 \dots d^3\mathbf{p}_N}{{h_0}^{3N}}} \end{array} $$ Then he says
{ "domain": "physics.stackexchange", "id": 52258, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, statistical-mechanics, potential-energy, ideal-gas, partition-function", "url": null }
quantum-mechanics, time, heisenberg-uncertainty-principle, si-units, metrology Ah! It's not centred at zero, but we can only tell easily because it has a narrower linewidth. In a real measurement where there's noise perturbing this curve, we could have found the centre of either to the same precision but only by taking a lot more data in the first case. As described in Alwin's answer there are also other effects which can shift the centre of a transition rather than just broadening it (often called systematic effects, or just systematics), which are usually bigger problems than the width of the line since you have to correct for them, and it's hard to know exactly how strong the perturbing effect is in the region where the atoms are. Look up co-magnetometers in neutron EDM measurements for a clever example of solving a similar problem.
{ "domain": "physics.stackexchange", "id": 82875, "lm_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, time, heisenberg-uncertainty-principle, si-units, metrology", "url": null }
particle-physics The two-doublet structure gives rise to five physical Higgs bosons via spontaneous symmetry breaking; two neutral CP-even particles h and H with mh ≤ mH , one neutral CP-odd particle A, and two charged Higgs bosons H±. In these models the ratio of the vacuum expectation values of the two Higgs doublets, tan β, and the mixing angle between h and H, α, are important free parameters. These can be tuned to the alignment limit sin(β − α) = 1 whereby h aligns with the properties of the SM Higgs boson, while the additional Higgs bosons may appear at TeV scale or below it.
{ "domain": "physics.stackexchange", "id": 87936, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "particle-physics", "url": null }
python, gui, tkinter self.Label5 = Label(top) self.Label5.place(relx=0.04, rely=0.37, height=16, width=58) self.Label5.configure(activebackground="#f9f9f9") self.Label5.configure(activeforeground="black") self.Label5.configure(background="#d9d9d9") self.Label5.configure(disabledforeground="#a3a3a3") self.Label5.configure(font=font11) self.Label5.configure(foreground="#000000") self.Label5.configure(highlightbackground="#d9d9d9") self.Label5.configure(highlightcolor="black") self.Label5.configure(text='''(DD/MM/YYYY)''')
{ "domain": "codereview.stackexchange", "id": 29118, "lm_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, gui, tkinter", "url": null }
temperature, thermal-radiation, estimation, climate-science And finally, I'd note that the mechanism of the greenhouse effect in a convective atmosphere does not change the balance of radiation at the top of the atmosphere. The effect is the result of the moist adiabatic lapse rate - which is the rate of temperature change with altitude due to compression/expansion of air as it falls and rises convectively, 6.5 K/km on Earth - and the average altitude of emission of longwave radiation to space, which for our IR-opaque atmosphere full of greenhouse gases is about 5 km above the surface. The air at 5 km altitude equilibrates at 255 K, the surface is $6.5\times 5=32.5$ K warmer due to compression of the air that descends. More greenhouse gases raises the altitude of emission to space, increasing the compressive heating from there down to the surface, but it doesn't change the energy balance at the top of the atmosphere. (Plus, if the greenhouse gas is water vapour, it reduces the moist adiabatic lapse rate, which reduces surface heating. It's
{ "domain": "physics.stackexchange", "id": 92700, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "temperature, thermal-radiation, estimation, climate-science", "url": null }
php, array Title: PHP - check if array includes value and return value if true I developed the function array_includes which checks if an array contains a value and returns it. I would like to know if there is already such a function which is more efficient or how I can make the function more efficient. <?php $params = "colorgroup-b;test;abc"; $paramsArr = explode(";", $params); var_dump(array_includes("colorgroup", $paramsArr)); //outputs: colorgroup-b
{ "domain": "codereview.stackexchange", "id": 35121, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, array", "url": null }
reinforcement-learning, q-learning, markov-decision-process, reward-functions, exploration-strategies Title: In addition to the reward function, which other functions do I need to implement Q-learning? In general, $Q$ function is defined as $$Q : S \times A \rightarrow \mathbb{R}$$ $$Q(s_t,a_t) = Q(s_t,a_t) + \alpha[r_{t+1} + \gamma \max\limits_{a} Q(s_{t+1},a) - Q(s_t,a_t)] $$ $\alpha$ and $\gamma$ are hyper-parameters. $r_{t+1}$ is the reward at next time step. $Q$ values are initialized arbitrarily.
{ "domain": "ai.stackexchange", "id": 2892, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, q-learning, markov-decision-process, reward-functions, exploration-strategies", "url": null }
special-relativity, spacetime Really appreciate any help with this question! I guess I am just looking for clarification, it's all a bit tricky to conceptualize what exactly is going on. People often speak of clocks ticking more slowly relative to your frame of reference but then also say stuff like "fast-moving clocks tick more slowly". Sorry if these questions are a bit ignorant, just trying to get a better grasp on the interpretation aspect. Disparity starts as soon as twins change frame. It is often said that single clock dilates relatively to a set of spatially separated clocks. Set of synchronized clocks will appear running faster, is single clock compares its own readings with synchronized clocks successively.
{ "domain": "physics.stackexchange", "id": 38058, "lm_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, spacetime", "url": null }
python, python-2.x, caesar-cipher Now that would change your original loop to this: decoded = '' for c in ciphertext.upper(): decoded += decode(testkey, c) Well now we can remove your initial empty string. We can just use str.join with a generator expression. Generators are like for loops collapsed into a single expression, and you can make a simple one in this case: decoded = ''.join(decode(testkey, c) for c in ciphertext.upper()) This makes a single string from each value that decode returns for every character in ciphertext. This would refactor your code like this: def decode(key, character): if not character.isalpha(): return character position = ord(character) if position + key < 90: position += key else: position -= key return chr(position)
{ "domain": "codereview.stackexchange", "id": 18233, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-2.x, caesar-cipher", "url": null }
planetary-ring, astrochemistry, saturn-rings The material flowed from the ring downpour was huge. Cassini measured 22,000 pounds (10000 kg) of material per second falling from rings. Most of the chemical slurry is being purged from the D-ring and in turn the C-ring is somehow replenishing the D ring (which is playing a role in the composition of the planet's ionosphere and atmosphere). Cassini also predicted the composition of E-rings by inspecting the ice grains ejecting from Enceladus. New kinds of organic compounds have been detected in the plumes bursting from Saturn's moon Enceladus. Powerful hydrothermal vents eject material from Enceladus' core, which mixes with water from the moon's massive subsurface ocean before it is released into space as water vapor and ice grains. The newly discovered molecules, condensed onto the ice grains, were determined to be nitrogen and oxygen-bearing compounds. The organic material found were categorized in three types: (i) Amine (ii) Carbonyl (iii) Aromatics
{ "domain": "astronomy.stackexchange", "id": 4840, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "planetary-ring, astrochemistry, saturn-rings", "url": null }
- But how ending with $00,25,50$ and $75$ implies $5y+8z$ is $0, 50, 25$ or $75$? Is it because $x<10$? – Quixotic Aug 28 '11 at 6:48 It has nothing to do with $x$. The last two digits of the number are $y$ and $z$, so you just calculate $5y+8z$: in the first case $y=z=0$, in the second, $y=2,z=5$, in the third $y=5,z=0$, and in the fourth $y=7,z=5$. – Brian M. Scott Aug 28 '11 at 8:33 From your simplified question you can see that $$8z = 25x-5y = 5 \times (5x -y)$$ Thus $z$ must be a multiple of 5 (since 8 and 5 are relatively prime) and so $z$ is either 0 or 5. From here you get two simpler equations on division by 5, when $z=0$ we have $y=5x$ and when $z=5$ it is $y= 5x - 8$. Both of these can then be solved to give the four solutions: $z=0$, $x=0$, $y=0$, the number is $0$, the trivial answer, but still an answer, technically, giving a fourth answer... $z=0$, $x=1$, $y=5$, the number is $150 = 6 \times 25$ $z=5$, $x=2$, $y=2$, the number is $225 = 9 \times 25$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126463438263, "lm_q1q2_score": 0.817698303575205, "lm_q2_score": 0.8354835371034368, "openwebmath_perplexity": 255.0332772668113, "openwebmath_score": 0.9914929270744324, "tags": null, "url": "http://math.stackexchange.com/questions/60283/how-to-efficiently-compute-the-number-of-solution-of-25x-5y8z-such-that-x" }
species-identification, data, classification So I'm wondering how biological specimens are organized in a gigantic specimen archive like at a large museum or university collection, with hundreds of thousands or millions of specimens. I'm wondering if they just give them a random number, and then place them wherever that number falls in the sequence. Or if they do like the libraries and group them by category/theme, then by number. Or something different. Biological specimens are ordered in museums phylogenetically. So all the birds are in one place, and the insects in another. Fossils are generally kept in their own place. Different museums may have their own standards, but most sort specimens phylogenetically as well. But alphabetical sorting also happens. So that all the members of a family are in one place, and then the genera within the family are organized alphabetically. So all the Trichoptera (Insecta), for example, at the Smithsonian are together on one of the floors with other insects, curated by a Trichoptera
{ "domain": "biology.stackexchange", "id": 9351, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "species-identification, data, classification", "url": null }
galaxy, astrophysics, luminosity Title: What is the Fundamental plane for Elliptical Galaxies? An alternate explanation rather than from wikipedia is preferable. I am not an expert, but it seems that the fundamental plane is a relation among characteristic quantities of the galaxy, showing a correlation that is the analogous of the Tully-Fisher relation for spiral galaxies. You can start from the virial theorem: $\frac{M}{R}\sim v^2$ ($M$ mass contained in the radius $R$, $v$ velocity dispersion of the stars, also indicated with $\sigma$ in these cases) meaning that the stars behave like an isothermal sphere. Assuming that all galaxies have the same mass-to-light ratio $L/M$, and that all galaxies have the same surface brightness $\Sigma=L/R^2$ (with $L$ luminosity), you obtain the Tully-Fisher relation: $L\sim v^4$ Of course, all galaxies do not have the same surface brightness.
{ "domain": "astronomy.stackexchange", "id": 526, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "galaxy, astrophysics, luminosity", "url": null }
electromagnetic-radiation, photons Title: Do all wavelengths of light carries heat with them? Do all wavelengths of light carries ‘heat’ (thermal radiation) with them? If yes then can you please tell me, “Which carries more heat, a single photon of gamma wave or a single photon of radio wave? Yes. All photons transfer energy, so all photons can cause an object to heat up. Energy is related to frequency by the equation $E=hf$, where $h$ is Planck's constant. This means that a higher frequency photon carries more energy, so a gamma photon carries more energy than a radiowave photon.
{ "domain": "physics.stackexchange", "id": 63010, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetic-radiation, photons", "url": null }
special-relativity, group-theory, lie-algebra, calculus, approximations The bit I don't understand is that once we impose this condition the leading infinitesimal contribution is now $\epsilon^2 X^TX$. Why do we not require $X^TX=0$? $\Lambda=1+\epsilon X$, with $X$ a generator, is only correct up to order $\epsilon$. You need a slightly more rigorous definition of the Lorentz generators to completely justify this. Suppose $q(t)$ is a smooth path through the space of Lorentz transformations that passes through $\mathbb{1}$. Specifically, for each $t\in\mathbb{R}$, $q(t)$ is a Lorentz transformation, and $q(0)=\mathbb{1}$. Then $q'(0)$ is a tangent vector to the identity $\mathbb{1}$. These tangent vectors are essentially "infinitesimal" Lorentz transformations, and any generator can be written in the form $q'(0)$ for some function $q$. I'm going to use explicit index notation to avoid ambiguities (statements like $\Lambda^T\eta\Lambda=\eta$ or $X=-X^T$ depend on whether indices are up or down). Now, since $q(t)$ is a Lorentz transformation, we know that
{ "domain": "physics.stackexchange", "id": 74760, "lm_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, group-theory, lie-algebra, calculus, approximations", "url": null }
Is this proof correct? I am asking this because the proof given by the author of my textbook is quite different from this one. Edit: Author's solution. • I really like your proof, and I think it's fine. What does the textbook have to say on this question? – астон вілла олоф мэллбэрг Oct 7 '16 at 12:34 • I've made an edit. Please check. – nls Oct 7 '16 at 12:44 • I see. His proof is very nice, but his revolves around the Chebyshev (or Cauchy Schwarz or something like that ) inequality (the second part), while yours revolves around a simpler inequality of sum of number and reciprocal being greater than $2$. Your proof I have double checked, you should be good to go. – астон вілла олоф мэллбэрг Oct 7 '16 at 12:48 • Thank you for your prompt response. – nls Oct 7 '16 at 12:49
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9648551515780318, "lm_q1q2_score": 0.8365639194474974, "lm_q2_score": 0.8670357598021707, "openwebmath_perplexity": 308.7654040100039, "openwebmath_score": 0.8704067468643188, "tags": null, "url": "https://math.stackexchange.com/questions/1957973/mathematical-olympiad-russia-1992" }
optics, visible-light Title: Why is blue ink looking as white in this video? Video Link In the video, when the presenter writes on the transparent board using a blue marker (beginning at 0:40) the text appears to be white and not blue. When he writes with the other markers, the text appears to the same colour as of the marker colour (yellow marker at 1:20, one can see the red colour at 1:40 as well). Also, notice that the tip of the marker is still blue.
{ "domain": "physics.stackexchange", "id": 58679, "lm_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", "url": null }
c++, beginner, linked-list, template-meta-programming private: Node<T>* head_; Node<T>* current_; int size_; }; //==================== // Class (Instantiation) template<class T> Node<T>::Node() {}; template<class T> Node<T>::Node(T object) { object_ = object; }; template<class T> T Node<T>::getObject() { return object_; }; template<class T> ListIterator<T>::ListIterator(Node<T>* head_node) { current_node = head_node; }; template<class T> T ListIterator<T>::next() { Node<T>* tmp_node = current_node; current_node = current_node->next_; return current_node->getObject(); }; template<class T> LinkedList<T>::LinkedList(T initialObject) { head_ = new Node<T>; current_ = new Node<T>(initialObject); head_->next_ = current_; current_->next_ = head_; size_ = 1; };
{ "domain": "codereview.stackexchange", "id": 15197, "lm_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, linked-list, template-meta-programming", "url": null }
Last edited by a moderator: #### Azzajazz Math Team Mimic skeeter's first post to solve the equation $ax^2 + bx + c = 0$. The first step is to divide both sides by $a$. #### Inflekx12 $ax^2+bx+c=0$ We subtract $c$and divide $a$ on both sides $x^2+\frac{b}{a}x=-\frac{c}{a}$ We add $(\frac{b}{2a})^2$on both sides $x^2+\frac{b}{a}x+(\frac{b}{2a})^2=(\frac{b}{2a})^2-\frac{c}{a}$ We simply left side using the first squaring binomials, and multiply $-\frac{c}{a}$ with $4a$ $(x+\frac{b}{2a})^2=(\frac{b}{2a})^2-\frac{4ac}{4a^2}$ We take the square root on both sides $x+\frac{b}{2a}=\pm\sqrt{\frac{b^2}{4a^2}-\frac{4ac}{4a^2}}$ We subtract $\frac{b}{2a}$ on both sides $x=-\frac{b}{2a}\pm\sqrt{\frac{b^2}{4a^2}-\frac{4ac}{4a^2}}$ We simplify: $x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$ Last edited: 1 person #### Monox D. I-Fly I have three ways, do you guys have any more neat tricks? Draw the graph. Although this is the least preferred way in the math fandom.:spin:
{ "domain": "mathforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773707946938299, "lm_q1q2_score": 0.8101805818416583, "lm_q2_score": 0.8289388083214155, "openwebmath_perplexity": 579.8212690283295, "openwebmath_score": 0.8687056303024292, "tags": null, "url": "https://mathforums.com/threads/number-of-ways-to-factorize-solve.333240/" }
coordinate-systems, time, hamiltonian-formalism, oscillators, phase-space full oscillation: $s_1 = s_0 + 2 \pi$, $\Delta t = \frac{2\pi}{\Omega}$, half oscillation: $s_1 = s_0 + \pi$, $\Delta t = \frac{\pi}{\Omega}$
{ "domain": "physics.stackexchange", "id": 92026, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "coordinate-systems, time, hamiltonian-formalism, oscillators, phase-space", "url": null }
algorithms, graphs, np-complete The important bit here, is that we can think of a general graph as a "combination" of such cycles and path graphs (any combination of such graphs with one or more nodes in common). Basically, an idea behind trying to find the smallest path covering is to identify the cycles and paths. Then, start by "marking" each node at those cycles. Then using the "path graphs" try to identify which nodes you don't have to include (for example, think of two cycles connected by a path. Marking any node in one cycle is the same as marking the "endpoint" of the path graph. So the minimal path covering will mark every node that isnt in the path). Always make sure that both graphs at the endpoints of a path graph are "marked" (a graph is marked if any node in it is marked), as well as any graph connected to a node in a cycle is marked.
{ "domain": "cs.stackexchange", "id": 18098, "lm_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, np-complete", "url": null }
$$f:X \to [0,\infty] , \mu-\text{ measurable}$$ and $$f : X \to [- \infty, \infty] \text{ which is integrable, i.e. } \int f(x) \mu(dx) < \infty .$$ These functions are interesting, because you can define for both the integral $\int_X f(x) \mu(dx)$, but maybe the integral is infinity in the first case. Many theorems are true for either non-negative measurable functions (e.g. monotonic convergence theorem) or integrable functions (dominant convergence theorem). Now if you have proven the monotonic convergece theorem for a general measurable space, then you don't need to prove it for integrals restricted on a set, simply because $(E, \mathcal{M}_E, \mu|_{\mathcal{M}_E})$ is again a measure space, and thus the monotonic convergence theorem is also true here. As well as all other properties and theorems that are known for integrals on a measurable space. So in your case,if you have non-negative functions $f_n(x) \nearrow f(x)$ for all $x\in E$ you immediately get
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534316905261, "lm_q1q2_score": 0.885193147620529, "lm_q2_score": 0.9019206811430763, "openwebmath_perplexity": 160.88799488823398, "openwebmath_score": 0.9362642765045166, "tags": null, "url": "https://math.stackexchange.com/questions/1845889/integrals-over-subset-of-measure-space" }
pl.programming-languages, type-theory, type-systems <T extends Comparable<T>> T min(T x, T y) { if (x.compareTo(y) < 0) return x; else return y; } On the other hand, subtyping-based interfaces naturally allow the formation of heterogeneous collections, e.g. a list of type List<C> can contain members that have various subtypes of C (although it is not possible to recover their exact type, except by using downcasts). To do the same based on type classes, you need existential types as an additional feature.
{ "domain": "cstheory.stackexchange", "id": 2334, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pl.programming-languages, type-theory, type-systems", "url": null }
turtlebot, ros-kinetic Title: Rotation of Turtlebot in Gazebo Environment When I was moving turtlebot robot in gazebo environment, I sent the publication to the topic/cmd_vel_mux/input/navi to rotate the turtlebot. My publication was like this: rostopic pub /cmd_vel_mux/input/navi geometry_msgs/Twist -- '[0, 0, 0]' '[0, 0, 3.14]' However, the robot did not rotate in 180 degree. I was expecting that it rotates around itself 180 degree. Is there anyone who knows its reason ? Originally posted by gktg1514 on ROS Answers with karma: 67 on 2019-10-06 Post score: 0 geometry_msgs/Twist encodes velocity, not position. From the documentation: This expresses velocity in free space broken into its linear and angular parts.
{ "domain": "robotics.stackexchange", "id": 33851, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turtlebot, ros-kinetic", "url": null }
ros-electric <gazebo reference="my_ir_link"> <sensor:ir name="my_ir_sensor"> <minRange>0.06</minRange> <maxRange>4.0</maxRange> <updateRate>20.0</updateRate> <controller:ir_controller_file name="my_ir_controller" plugin="libir_controller_lib.so"> <alwaysOn>true</alwaysOn> <updateRate>20.0</updateRate> <topicName>my_ir/ir</topicName> <frameName>my_ir_link</frameName> <interface:irarray name="my_ir_iface" /> </controller:ir_controller_file> </sensor:ir> <!-- <turnGravityOff>true</turnGravityOff> --> <material>Erratic/White</material> </gazebo> </macro> </robot> and tried to add it to a pioneer p3dx model simulated in gazebo. But I receive the error: > Failed to load > libir_controller_lib.so: > libir_controller_lib.so: cannot open > shared object file: No such file or > directory How can I let the simulation know where the library is? Many thanks!
{ "domain": "robotics.stackexchange", "id": 3077, "lm_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-electric", "url": null }
lambda, kotlin @Test fun test00() = testDurationPeriod(setOf(null), taxiPark(0..1, 0..10)) @Test fun test01() { // The period 30..39 is the most frequent since there are two trips (duration 30 and 35) testDurationPeriod(setOf(30..39), taxiPark(1..3, 1..5, trip(1, 1, duration = 10), trip(3, 4, duration = 30), trip(1, 2, duration = 20), trip(2, 3, duration = 35))) }
{ "domain": "codereview.stackexchange", "id": 36389, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lambda, kotlin", "url": null }
string-theory, renormalization, quantum-gravity One essential tenet of the bootstrap program is the correspondence between poles in scattering amplitudes and the particle spectrum. In field theory, as in string theory, scattering amplitudes (say $2\to 2$ for simplicity) depend on the coupling constant and the kinematical Mandelstam variables $s, t, u$. In field theory, which contains several Feynman diagrams at each loop order, each contributing to only one of the s-, t- or u-channels. But clearly there is only one string worldsheet diagram at each topological order, which means that the corresponding amplitude will have poles in all channels. Furthermore, crossing symmetry, part of the dual resonance model in pre-string theory times, and manifest in the modern calculation of amplitudes, dictates that the string amplitude corresponds to an infinite sum over field theory amplitudes in exactly one of the channels. These features, combined with unitarity, analyticity and Lorentz invariance essentially allow you to determine (the
{ "domain": "physics.stackexchange", "id": 79307, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "string-theory, renormalization, quantum-gravity", "url": null }
signal-analysis, control-systems what am I doing wrong? The transmission zeros of a MIMO system are obtained by solving \begin{align} \dot{x}^* = A\,x^* + B\,u^*, \\ y = C\,x^* + D\,u^*, \end{align} for $x^*$ and $u^*$ such that $y = 0$. By using the Laplace variable $s$ for the time derivative that system of equation can also be written as $$ \begin{bmatrix} 0 \\ 0 \end{bmatrix} = \begin{bmatrix} A - s\,I & B \\ C & D \end{bmatrix} \begin{bmatrix} x^* \\ u^* \end{bmatrix}, $$ which can be seen as the generalized eigenvalue problem $\mathcal{A}\,v = \lambda\,\mathcal{B}\,v$, with $\lambda$ equivalent to $s$, $$ \mathcal{A} = \begin{bmatrix} A & B \\ C & D \end{bmatrix}, \quad \mathcal{B} = \begin{bmatrix} I & 0 \\ 0 & 0 \end{bmatrix}, \quad v = \begin{bmatrix} x^* \\ u^* \end{bmatrix}. $$
{ "domain": "dsp.stackexchange", "id": 8391, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "signal-analysis, control-systems", "url": null }
topological-field-theory, topological-order, anyons Then $|a,b;c;1\rangle$ and $|a,b;c;2\rangle$ are not topologically degenerate since the local perturbation [$L_a U_2 U^\dagger_1L^\dagger_a$+h.c.] can open the gap, which is inconsistent with the expectation. I guess my mistake should be in the cancellation of the remote parts of $L_a$ and $L_a^\dagger$ of the paragraph (*) above since there could be a short-range obstruction in decomposition of $L_a$ into a remote part and a supp$(U_{1,2})$-nearby part which commutes with each other, though I have no lattice model in my mind. If you consider a configuration on a sphere with four anyons $a, b, c$ and $\bar{c}$, the fact that $N_{ab}^c=2$ says that there are actually two degenerate ground states, both of which have the same configuration of anyons, but are otherwise indistinguishable by any local operator. The choice here is really the operator that splits $c$ into $a$ and $b$. Of course, there should exist some non-local observables which can distinguish the two states.
{ "domain": "physics.stackexchange", "id": 82478, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "topological-field-theory, topological-order, anyons", "url": null }
hilbert-space, quantum-electrodynamics, gauge-theory, brst For the first point, note that if $|\psi\rangle$ is not BRST closed, neither is $|\psi\rangle + |\chi\rangle$ where $Q_B |\chi\rangle = 0$. In other words, you can add an arbitrary BRST-closed state to a non-closed one and the resultant is still not closed. Because of this, there's no canonical choice of a non-closed subspace. The nicest way to convince you of the second point is to write down the Hamiltonian for the Lagrangian in the question in terms of oscillators. Calling the two transverse oscilaltors at any given momentum $\vec{k}$ $a_\alpha$, the oscillator corresponding to $A_0$ $a_0$ and the oscillator corresponding to the spatial longitudinal potential $\vec{\nabla} \cdot \vec{A}$ $a_L$, the Hamiltonian is $$H = \int d^3 k \left[ \left\{ \sum_\alpha a_\alpha^\dagger a_\alpha \right\} + \left\{ \bar{c}^\dagger c + c^\dagger \bar{c} \right\} + \frac{1}{2} \left\{ (a_0 + a_L)^\dagger (a_0 - a_L) +(a_0 - a_L)^\dagger (a_0 + a_L) \right\} \right].$$
{ "domain": "physics.stackexchange", "id": 41930, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "hilbert-space, quantum-electrodynamics, gauge-theory, brst", "url": null }
homework-and-exercises, general-relativity, planets, jupiter Title: How many arcseconds the light of a star unfolds in the vicinity of jupiter? One of the main demonstrations made to test the theory of relativity were the images of the solar eclipse of May 26, 1919, (causing a shift in the positions observed in celestial coordinates of its source stars 1.7 arcsec, the amount predicted by theory). If the same experiment was carried out, but with a star on the periphery of the edge of jupiter, the same effect would occur? Few arcseconds that star would unfold? The correct simple formula that gives a VERY close approximation (in the 'weak field' approximation) is [4G/c^2][M/R] ... where M is the mass of the object, and R is the radius of closest approach of the light. Note that since the first term is a constant, the deflection varies as M/R. See here for an incorrect and correct derivation: http://home.fnal.gov/~syphers/Education/Notes/lightbend.pdf
{ "domain": "physics.stackexchange", "id": 33024, "lm_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, general-relativity, planets, jupiter", "url": null }
np-complete, graph-traversal Label each vertex of $G$ by $\mathrm{A}$ To each vertex of $G$ connect it with a hanging vertex "above" it and label this vertex by $\mathrm{F}$ For each edge $e$ of $G$, add a "middle" vertex labelled by $\mathrm{K}$, and connect each "middle" vertex to the two $\mathrm{F}$ vertices above the two $\mathrm{A}$ end points of its corresponding edge.
{ "domain": "cs.stackexchange", "id": 11993, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "np-complete, graph-traversal", "url": null }
c void testgetWinner(void) { CU_ASSERT_PTR_EQUAL(WINNER1, (int *) getWinner(tour1)); CU_ASSERT(WINNER2 == *((int *)getWinner(tour2))); CU_ASSERT(WINNER3 == *((int *)getWinner(tour3))); CU_ASSERT(WINNER4 == *((int *)getWinner(tour4))); CU_ASSERT(WINNER5 == *((int *)getWinner(tour5))); } void testgetWinner2(void) { CU_ASSERT(WINNER6 == *((int *)getWinner(tour6))); } void testgetWinner3(void) { CU_ASSERT_STRING_EQUAL(WINNER7, *((char **)getWinner(tour7))); } void testgetWinner4(void) { CU_ASSERT(usert_equals(WINNER8, *((struct userType *)getWinner(tour8)))); } void testgetNextWinner(void) { CU_ASSERT_PTR_EQUAL(NEXT_WINNER_NULL, ((int *) getNextWinner(tour1))); CU_ASSERT(NEXTWINNER2 == *((int *)getNextWinner(tour2))); CU_ASSERT_PTR_EQUAL(NEXT_WINNER_NULL, ((int *) getNextWinner(tour3))); CU_ASSERT(NEXTWINNER4 == *((int *)getNextWinner(tour4))); CU_ASSERT(NEXTWINNER5 == *((int *)getNextWinner(tour5))); }
{ "domain": "codereview.stackexchange", "id": 36648, "lm_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 }
python, performance, python-3.x, multiprocessing if __name__ == "__main__": example_keymap = { 'e': "sound file", '.': "another sound file" } soundboard(example_keymap) However, now we have come full-circle to your original implementation - the sleep call excepted, this is almost fully equivalent to your original implementation. This, however, still doesn't solve the problem that multiple keys pressed together are not all considered (only the key pressed first will work, the other pressed keys won't do anything). With a ProcessPoolExecutor, I don't know why multiple pressed keys don't trigger events - I haven't studied the keyboard package in any depth. So to fix that, we come back to a combination of Solution 1 and Solution 2: from time import sleep import keyboard as kb keymap_count = None
{ "domain": "codereview.stackexchange", "id": 42711, "lm_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, python-3.x, multiprocessing", "url": null }
html, css, html5, twitter-bootstrap However, if all of your paragraphs have the same styles, the paragraph itself should be styled rather than apply classes to each and every one: p { /* styles from the section-content class */ } Creating empty markup for styling purposes is dirty and probably one of the worst things that Twitter's Bootstrap encourages (classitis being the other). There are cleaner ways of creating this type of element: <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapsed"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> Should be something more like this: <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapsed"> <span class="sr-only">Toggle navigation</span> </button> And .navbar-toggle:before { /* styles to make it look like the ubiquitous hamburger icon */ }
{ "domain": "codereview.stackexchange", "id": 8072, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "html, css, html5, twitter-bootstrap", "url": null }
python, object-oriented, python-3.x, simulation Title: A game of automated tag This game has 4 people moving randomly, one unit in one of the four directions (up, down, left, right), with a fifth person as a designated tagger. If this fifth person tags someone, the person is out. Game ends when there is one survivor left. import random class Player: def __init__(self, name, status, speed, health, position): self.name = name self.status = status self.speed = speed self.health = health self.position = position
{ "domain": "codereview.stackexchange", "id": 31481, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, object-oriented, python-3.x, simulation", "url": null }
security, cryptography, kotlin I'm using RSA keys to encrypt a randomly generated AES key, which can be used to encrypt data that is larger than 245 bytes. The idea is that I can pass public keys around but treat everything as a Person, and then throw an error if the private key is invalid. Is this a good design? Most generic wrapper classes for crypto are used to wrap the knowledge of the user that wrote them, and this is no exception. Almost every line of cryptography in here is unfortunately below par. There is no need for the wrapper class at all, directly using the primitives is much better and will safe you from a maintainability nightmare.
{ "domain": "codereview.stackexchange", "id": 34280, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "security, cryptography, kotlin", "url": null }
navigation, turtlesim please type this "$roslaunch turtlebot_teleop keyboard_teleop.launch" in your terminal . could you move your robot with key presses? Comment by choog on 2014-06-07: Yes it does. I was able to open up the code for the keyboard_teleop.cpp file and it seems like its publishing the messages on cmd_vel topic. I just have to figure out how to tie it all in together. Thank you for your help
{ "domain": "robotics.stackexchange", "id": 18192, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, turtlesim", "url": null }
python, sympy, latex Title: Calculate general relativity-related tensors/arrays using metric tensor as input Please be gentle with me-- I just began learning to code a few weeks ago as a hobby in order to support my other hobby of learning general relativity, so this is the first bit of code I've ever written. I would love to keep getting better at coding, though, so any feedback on ways to improve my code would be much appreciated. What this code does is take as input the number of dimensions of a manifold, the coordinate labels being used, and the components of a metric, and outputs the non-zero components of the metric (exactly what was input, it just looks prettier), and also of the inverse metric, derivatives of the metric, the Christoffel symbols, the derivatives of the Christoffel symbols, the Riemann curvature tensor, the Ricci curvature tensor, the Ricci scalar, and the Einstein tensor (with 2 covariant indices, but also with 1 contravariant and 1 covariant).
{ "domain": "codereview.stackexchange", "id": 42004, "lm_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, sympy, latex", "url": null }
quantum-mechanics, wavefunction, schroedinger-equation, hamiltonian, time-evolution $$ \tau \geq \frac \pi 2 \frac \hbar {\Delta H} $$ and the Margolus-Levitin bound $$ \tau \geq \frac \pi 2 \frac \hbar {\langle H \rangle} . $$ Technical notes: $H$ is normalized so that the ground state energy is zero. $\langle H \rangle$ and $\Delta H$ are the energy expectation value and its standard deviation, which are both constant during the evolution with the constant Hamiltonian $H$. For more info, see e.g. [Deffner 2017] (arXiv link). These bounds show that, as long as the average energy and its fluctuations are bounded (thus, no rescaling allowed), you can not go arbitrarily fast from one state to another orthogonal state.
{ "domain": "physics.stackexchange", "id": 84372, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, wavefunction, schroedinger-equation, hamiltonian, time-evolution", "url": null }
optics, experimental-physics Once one has the "picture" recording it is a matter of triggering the exposure of the camera to the passing of the bullet. Since he had also experimented with spark shock waves I guess the following experimental setup: The signal from the trigger wires ( the two vertical lines in the photo you show) triggers a spark gap in a completely dark enclosure where the film is exposed and waiting. When the spark comes during the passing of the bullet the differences in the refraction index of the air from the shock wave are recorded. Actually we used the technique of triggered sparking to record cosmic rays passing through a spark chamber back in the 1960's. The film was continually exposed and was moved forward after the sparking/passing cosmic. The spark lasts nanoseconds only.
{ "domain": "physics.stackexchange", "id": 2904, "lm_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, experimental-physics", "url": null }
quantum-state, probability, random-quantum-circuit, haar-distribution The $n$-qubit pure states span the complex projective space $CP^{N-1}$ with $N=2^n$. Pure $n$-qubit states can be parametrized almost everywhere as: $$|\psi(\mathbf{\zeta}, \mathbf{\bar{\zeta}})\rangle = \frac{[1, \zeta _1,.,.,., \zeta _{N-1}]^t}{\sqrt{1+\mathbf{\zeta}^{\dagger} \mathbf{\zeta} }}$$ (The states which cannot be parametrized as above consist of a lower dimensional subspace, thus they correspond to zero probability and they do not contribute to the probabilistic calculations) The Haar volume element of $CP^{N-1}$ is given by: $$d{\mu}_{CP^{N-1}}(\mathbf{\zeta}, \mathbf{\bar{\zeta}}) = \frac{(N-1)!}{\pi^{N-1}}\frac{\prod_{k=1}^{N-1} d\zeta_k d\bar{\zeta}_k}{(1+\mathbf{\zeta}^{\dagger} \mathbf{\zeta})^N}$$ It is normalized to a unit total volume. $$\int_{CP^{N-1}} d{\mu}_{CP^{N-1}}(\mathbf{\zeta}, \mathbf{\bar{\zeta})} = 1$$
{ "domain": "quantumcomputing.stackexchange", "id": 2146, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-state, probability, random-quantum-circuit, haar-distribution", "url": null }
c#, observer-pattern Title: Observable Object Proxy As a part of my (future) MVVM framework, I need to be able to detect changes on an object. To do this, I used the RealProxy, a C# object that implements Aspect Oriented Programming to "intercept" calls to an object's method. In my scenario, I'll use the proxy to intercept calls to a _target's setter to launch an event, PropertyChanged. public delegate void PropertyChanged(PropertyChangedArgs args); /// <summary> /// Proxy that intercepts call to methods /// </summary> /// <typeparam name="T">Type of the target</typeparam> internal class ObservableObjectProxy<T> : RealProxy where T : MarshalByRefObject { private const string SetterMethodStart = "set_"; private readonly T _target; public event PropertyChanged PropertyChanged;
{ "domain": "codereview.stackexchange", "id": 17253, "lm_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#, observer-pattern", "url": null }
ros-diamondback Title: How was the "ROS Package by License" generated? There is an interesting page titled ROS Package by License still hosted on docs.ros.org, although there's no newer version than for ROS Diamondback. This was probably output by some script running on "the old" ROS buildfarm (or perhaps even by hand?), but I've not been able to find something similar so I was wondering if that script would still be around somewhere.
{ "domain": "robotics.stackexchange", "id": 32783, "lm_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-diamondback", "url": null }
distance, k-nn, manhattan Rather than rotating the line, we could also equivalently rotated our $x$ and $y$-axis instead.
{ "domain": "datascience.stackexchange", "id": 9509, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "distance, k-nn, manhattan", "url": null }
# Three Random Points on a Circle ### Solution 1 We shall reformulate the problem and then exploit an Semicircle Coveragealready solved one. For three uniformly random points on a circle the following two questions are equivalent: 1. The semicircles of which the three points are the centers cover the circle. 2. The triangle with vertices at the three points has the center of the circle in its interior. The problems are equivalent. Indeed, consider a borderline case where two of the points are collinear with the center of the circle. Denote the points $A,$ $B,$ $C$ and the center of the circle $O.$ And assume that, say, $AC$ is a diameter of the circle.
{ "domain": "cut-the-knot.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9896718483945665, "lm_q1q2_score": 0.8044719076736406, "lm_q2_score": 0.8128673246376009, "openwebmath_perplexity": 219.21247168545088, "openwebmath_score": 0.9964148998260498, "tags": null, "url": "https://www.cut-the-knot.org/m/Probability/ThreeRandomPointsOnCircle.shtml" }
lagrangian-formalism, variational-principle, action Title: Multiple classical paths from Hamilton's principle Previous posts such as this ask about types of stationary point in Hamilton's Principle. There is, however, another aspect to discuss: the question as to whether the extremal path is unique. One geometric way to envisage this is to assume that multiple paths are simultaneously extremal. I believe that this is an explanation for lenses, but I have not seen lenses explained as multiple classical solutions to Hamilton's Principle. (The multiple paths being the 360 degrees of rays between source and focus, etc also demonstrable through Fermat's principle.) One can generalise lenses, but also consider a simpler case. Let the surface of a sphere be the action (phase space) surface which is minimized in classical paths. Thus (ignore antipodals here) between two points $A$ and $B$ the geodesic is the unique classical path. In quantum form the WKB approximation would no doubt have constructive maxima on this path.
{ "domain": "physics.stackexchange", "id": 347, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lagrangian-formalism, variational-principle, action", "url": null }
optics, interferometry, photonics vary from linear to circular with a phase shift between the two arms of the interferometer. Normally we measure intensity fluctuations between the two output ports, this requires non-polarising beam splitters.
{ "domain": "physics.stackexchange", "id": 80872, "lm_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, interferometry, photonics", "url": null }
physical-chemistry, electronic-configuration, atmospheric-chemistry There are many factors that need to be considered. Once an atom or molecule is excited, it can lose the energy by collision or by emission of light. The longer the lifetime of the excited state, the higher the altitude is required to make radiation vs. collision the way energy is lost. The atomic oxygen transition with green light has a lifetime of about 1 second, while the transition for red light is 110 seconds, so a higher altitude is required for the red transition to become significant. For molecular nitrogen, radiative lifetime is only $4 \times 10^{-8}$ seconds according to Electronically excited molecular nitrogen and molecular oxygen in the high-latitude upper atmosphere Ann. Geophys., 26, 1159–1169, 2008 Also, human eyes are more sensitive to green light than red light.
{ "domain": "chemistry.stackexchange", "id": 6576, "lm_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, electronic-configuration, atmospheric-chemistry", "url": null }
inorganic-chemistry, bond, coordination-compounds settings and the "Medium" grid for generation of the atomic basins for the $\mathrm{DI}$ and $\mathrm{LI}$ calculations. All values are in atomic units: $\rho\equiv{e^-\over\mathrm{Bohr}^3}$ and $\nabla^2\rho\equiv{e^-\over\mathrm{Bohr}^5}$ ($\mathrm{DI}$ and $\mathrm{LI}$ are dimensionless).
{ "domain": "chemistry.stackexchange", "id": 5582, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, bond, coordination-compounds", "url": null }
6 Active contributors today ## Which operation should be performed first according to the order of operations of #21-5+24-:3+90xx4#? EZ as pi Featured 5 months ago There is not actually ONE single operation which should be done first in this expression. There are three possible operations which can be done in the first line of working. #### Explanation: There is not actually ONE operation which should be done first in this expression. There are 4 terms - you can work in any of the terms independently from the others. We have: $\textcolor{m a \ge n t a}{21} \textcolor{b l u e}{- 5} \textcolor{red}{+ 24 \div 3} \textcolor{g r e e n}{+ 90 \times 4}$ While the obvious calculations are in the third and the fourth terms, we could also combine the first and second terms already, as there is nothing more that can be done with them. So the next step could read as: $16 \textcolor{red}{+ 8} \textcolor{g r e e n}{+ 360}$
{ "domain": "socratic.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429634078179, "lm_q1q2_score": 0.8016531363600317, "lm_q2_score": 0.8152324938410783, "openwebmath_perplexity": 1317.8505855671285, "openwebmath_score": 0.6512759923934937, "tags": null, "url": "https://socratic.org/prealgebra" }
quantum-mechanics, electromagnetic-radiation, quantum-electrodynamics, quantum-optics Quantization means taking our observables, which used to have definite values, and making them operators on some suitable Hilbert space. For the electromagnetic field, our observable was a function of position, so what you get is an operator-valued function of position. Nothing all that mysterious, really. If you find the idea weird, though, then welcome to quantum field theory! In going forward, it's a lot easier to detach the wavefunction from its pedestal of The Description of a given quantum system. In general, you simply have a quantum state $|\psi⟩$ which lives in some abstract Hilbert space $\mathcal H$, and it doesn't need to represent a function of position. The wavefunction is simply one possible representation of the state, $⟨x|\psi⟩$, when that makes sense. When it doesn't, the state is just the state.
{ "domain": "physics.stackexchange", "id": 25589, "lm_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, electromagnetic-radiation, quantum-electrodynamics, quantum-optics", "url": null }
ros, lidar, sicklms, ros-kinetic Originally posted by yoshiros on ROS Answers with karma: 69 on 2018-07-18 Post score: 0 Original comments Comment by mgruhler on 2018-07-19: as there are some lms drivers around, maybe at least link to the code you used? Also, please post any error output, e.g. the "some kind of memory error"... Comment by PeteBlackerThe3rd on 2018-07-19: Just changing 5000 to 2500 to try and fix this is probably not a good idea. There is probably a good reason why the driver checks the frequency if 5000. Also the flashing LEDs you describe sound like a sensor error. I recommend using the SICK software to check the lidar is working at this speed. Comment by yoshiros on 2018-07-19: Thank you for your comments. I updated information as above. Please let me know if you need more information. Thanks. I have found a solution! Just clone and build the source below. Thanks to muhrix. https://github.com/muhrix/lms1xx Thank you
{ "domain": "robotics.stackexchange", "id": 31298, "lm_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, lidar, sicklms, ros-kinetic", "url": null }
So: ##E(n) = (r-1)\sum_{n = k}^{\infty} F_{n}## Where ##F_k = 1, \ F_n = \frac{n-r}{n-1}F_{n-1}## Not that far from a formula now! PeroK Homework Helper Gold Member 2021 Award It also appears that: ##\sum_{n = k}^{\infty} F_{n} = \frac{k}{r-2}## So: ##E(n) = \frac{k(r-1)}{r-2}## E.g. ##k = 213, r = 5, E(n) = 284## Staff Emeritus Homework Helper How did you find these formulas? PeroK Homework Helper Gold Member 2021 Award How did you find these formulas? Just computationally. Looking at them analytically now. For number two (coinflips): Pick a random family of correlation functions e.g. ##\langle x_n, x_n+2 ,x_n+10\rangle##, with 'family' I mean n goes through all coinflips, where periodic boundary conditions are assumed. The 'family' with the highest shannon-entropy will be the real one.
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9518632247867715, "lm_q1q2_score": 0.8013028734124329, "lm_q2_score": 0.8418256452674008, "openwebmath_perplexity": 1992.8113524658233, "openwebmath_score": 0.8128238916397095, "tags": null, "url": "https://www.physicsforums.com/threads/micromass-big-statistics-challenge.872581/" }
of dispersion historical data a! Of that investment much your data set can use mean deviation formula is given here in terms of,... Each observation and the x correspond to the other average amount of spread a... Themselves were added up, the mean is basically the average amount spread! In one set compared to the other applications, the method that each metric uses is different the NAMES! And companies apply these terms for the valuation of stock price over a long of. Key differences with infographics and comparison table group of data from the mean absolute deviation this message, means. Their sum would be zero of the PDF is the simplest form mean. Units of measure of the numbers in your field leaves us with a or... The CERTIFICATION NAMES are the most commonly used measures of dispersion to be much larger than the and. This message, it will always be equal to or larger than the mean absolute deviation squares of the of. Σ is unknown whenever desired, without having to recalculate the
{ "domain": "bifi.es", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.95598134762883, "lm_q1q2_score": 0.802770013899282, "lm_q2_score": 0.8397339716830605, "openwebmath_perplexity": 480.8660382443618, "openwebmath_score": 0.7592572569847107, "tags": null, "url": "http://contagion14.bifi.es/p91re/viewtopic.php?page=fc42fb-mean-deviation-and-standard-deviation" }
(This exercise is offered as a modernization of Euclid’s theorem on the infinitude of primes.) Prove that an infinite integral domain with with a finite number of units has an infinite number of maximal ideals. I highly recommend Kap’s classic textbook to everyone interested in mastering commutative ring theory. In fact I highly recommend everything by Kaplansky – it is almost always very insightful and elegant. Learn from the masters! For more about Kaplansky see this interesting NAMS paper which includes quotes from many eminent mathematicians (Bass, Eisenbud, Kadison, Lam, Rotman, Swan, etc). I liked the algebraic way of looking at things. I’m additionally fascinated when the algebraic method is applied to infinite objects. $\$–Irving Kaplansky NOTE $\$ The reader familiar with the Jacobson radical may note that it may be employed to describe the relationship between the units in $\rm R$ and $\rm R/J\:$ used in the above proof. Namely
{ "domain": "bootmath.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9875683513421314, "lm_q1q2_score": 0.8186337343841973, "lm_q2_score": 0.8289388104343892, "openwebmath_perplexity": 473.1220255717864, "openwebmath_score": 0.8989055156707764, "tags": null, "url": "http://bootmath.com/is-there-possibly-a-largest-prime-number.html" }
homework-and-exercises, angular-momentum, notation, tensor-calculus, commutator So, for the component $x\equiv 1$ of $L$ we have $L_1=\varepsilon_{123}r_2p_3+ \varepsilon_{132}r_3p_2=r_2p_3-r_3p_2$ Analysing the commutation between $r_l$ and $L_i$: $$[r_l, L_i]=\varepsilon_{ijk}\left(r_j[r_l,p_k]+[r_l,r_j]p_k \right)=i\hbar \varepsilon_{ijk}r_j\delta_{lk}$$ If $\varepsilon_{ijk}\delta_{lk}=\varepsilon_{ilk}$, then: $$[r_l, L_i]=i\hbar \varepsilon_{ilk}r_j$$ Now, consider: $$[r_l^2,L_i]=r_l[r_l,L_i]+[r_l,L_i]r_l=2i\hbar\varepsilon_{ijl}r_jr_l$$
{ "domain": "physics.stackexchange", "id": 26573, "lm_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, angular-momentum, notation, tensor-calculus, commutator", "url": null }
standard-model, quantum-chromodynamics, symmetry-breaking Thus in particle physics there are two SU(3) discussed often. The SU(3) of colors represents the exact, unbroken symmetry. Then there is the SU(3) of flavours, which mixes $u$, $d$, $s$ quarks in strong interactions. It is very rough and it is broken by the masses of quarks ($m_s$ is about 150 MeV, that is dozen percent of the QCD scale of about 1 GeV). After breaking it leaves the flavour SU(2) of only $u$, $d$ quarks, and that is much more accurate ($m_d-m_u$ in the order of unities of MeV), though still approximate. Nevertheless, these symmetries are used to classify hadron states, and to descibe physics on the hadron level (which is the effective theory with respect to SM). It may be credited for the close masses of hadron multiplets, but this is (almost) another way to say "hadrons have close masses because quarks inside them have close masses". Also, $SU(3)_C$ is a gauge (local) symmetry, while $SU(3)_F$ is a global symmetry.
{ "domain": "physics.stackexchange", "id": 78438, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "standard-model, quantum-chromodynamics, symmetry-breaking", "url": null }
differentiate function exponential online, it is possible to use the derivative calculator which allows the calculation of the derivative of the exponential function. True Note that the t values are equally spaced and the ratios 3 0 0 1 4 7 = 1 4 7 7 2. Exponential FUNctions - Graphing; Exponential FUNctions - Growth and Decay; Puzzle Pizzazz: Volume 1; Exponential Function FUN with The Money Project! February (3) January (3) 2017 (7) December (1) November (6) 2013 (1) February (1) 2012 (10). We will begin by drawing up a curve for y = 10 x. it Game PIN: 9834669 Type here to search a hyperbolic parabaloid a discrete function. 01) to the 12𝘵 power, 𝘺 = (1. Exponential Functions. Creating Exponential Functions to Match Given Behaviors-Part 1 2. Exponential growth is a convenient cover for the core problem with current idle games. 3 Integrals of trigonometric functions and applications: Online: Proofs of some trigonometric limits: Online: New functions from old: Scaled and shifted
{ "domain": "umood.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.981735720045014, "lm_q1q2_score": 0.8511999843866641, "lm_q2_score": 0.8670357683915538, "openwebmath_perplexity": 944.1857117142524, "openwebmath_score": 0.4596410393714905, "tags": null, "url": "http://pziq.umood.it/exponential-functions-game.html" }
pcr, dna-replication Title: Performing PCR on samples whose DNA concentration is nul Is it vain to perform a PCR on samples whose DNA concentration was measured as nul by a NanoDrop? Nope, you could get amplification from samples that are orders of magnitude below the nanodrop detection limit (~2 ng/uL). To compare: most manuals for polymerases recommend 1 ng of plasmid template, and will probably work with much less, especially if you use a few more cycles. But if you expected to see something on the nanodrop, and you get nothing, something else might be completely wrong.
{ "domain": "biology.stackexchange", "id": 6284, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pcr, dna-replication", "url": null }
performance, python-3.x, programming-challenge, comparative-review, dart Pair(this.first, this.second); bool operator==(Object other) => other is Pair && first == other.first && second == other.second; int get hashCode => Object.hash(first, second); } Alternatively, you could compute a key to use with the cache, given the range of inputs in the problem description: class Solution { int findTargetSumWays(List<int> nums, int target) { Map<int, int> dp = {}; int calculate(int i, int sum) { if (i == nums.length) { return sum == target ? 1 : 0; } final k = key(i, sum); return dp[k] ?? (dp[k] = calculate(i + 1, sum + nums[i]) + calculate(i + 1, sum - nums[i])); } return calculate(0, 0); } int key(int index, int sum) { return sum * 1001 + index; } }
{ "domain": "codereview.stackexchange", "id": 43894, "lm_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, python-3.x, programming-challenge, comparative-review, dart", "url": null }
python, tic-tac-toe, pyqt self.btn5 = QtGui.QPushButton('', self) self.btn5.clicked.connect(lambda: self.clicked(5, self.playerCoin)) self.btn5.resize(100,100) self.btn5.move(240,170) self.btn6 = QtGui.QPushButton('', self) self.btn6.clicked.connect(lambda: self.clicked(6, self.playerCoin)) self.btn6.resize(100,100) self.btn6.move(20,60) self.btn7 = QtGui.QPushButton('', self) self.btn7.clicked.connect(lambda: self.clicked(7, self.playerCoin)) self.btn7.resize(100,100) self.btn7.move(130,60) self.btn8 = QtGui.QPushButton('', self) self.btn8.clicked.connect(lambda: self.clicked(8, self.playerCoin)) self.btn8.resize(100,100) self.btn8.move(240,60) # list of taken move positions self.taken = [0, 0, 0, 0, 0, 0, 0, 0, 0] self.takenBy = [0, 0, 0, 0, 0, 0, 0, 0, 0]
{ "domain": "codereview.stackexchange", "id": 22842, "lm_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, tic-tac-toe, pyqt", "url": null }
black-holes, astrophysics, stars, stellar-evolution Title: What prevents a star from collapsing after stellar death? When the star stops burning because heavier elements like Iron are formed in its core. Then the gas pressure stops and as you know the gas pressure helps keep a star in equilibrium because it provides pressure against the force of gravity. So Iron does not give off energy. So what stops the star from collapsing? So when the core starts becoming dense due to gravity it stops becoming dense due to Pauli's Exclusion principle. Fermions (a class of particle including Protons, Neutrons and electrons) of the same type obey the Pauli exclusion principle . In layman's terms, it says that such particles cannot occupy the same, small volume of space. Thus, if you try to force them into a small volume of space, they "push back". This "pushing" creates a pressure called "degeneracy pressure", and is what keeps white dwarfs from collapsing into black holes.
{ "domain": "physics.stackexchange", "id": 16949, "lm_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, astrophysics, stars, stellar-evolution", "url": null }
virology, pathology, breathing No, there isn't going to be any benefit to an infected person by allowing them to breathe out virus particles freely. The number of viral particles breathed out is tiny relative to the number captured in a diagnostic swab, which itself is tiny relative to the virus contained in the entire rest of the respiratory tract. Simple exhalation is just not an effective manner of removing virus. Longer answer Fabian et al 2008 measured exhaled virus from subjects with influenza.
{ "domain": "biology.stackexchange", "id": 11557, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "virology, pathology, breathing", "url": null }
We basically define it (or fail to define it) in whichever way it is most useful and natural to do so for the context in question. For Discrete Mathematics, there is no question what that "useful and natural" way should be, so we define it that way.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9603611631680358, "lm_q1q2_score": 0.850526081031177, "lm_q2_score": 0.8856314828740729, "openwebmath_perplexity": 295.7275950296971, "openwebmath_score": 0.8990147709846497, "tags": null, "url": "http://math.stackexchange.com/questions/11150/zero-to-the-zero-power-is-00-1/11211" }
python, pandas, dataframe 'Rapes': [0, 0, 3, 0, 0, 1, 1, 0, 1] , 'Robberies': [0, 0, 0, 0, 0, 0, 0, 1, 0] , 'Thefts': [23, 49, 35, 39, 28, 37, 54, 35, 10] }, 'Years': [2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2014] },
{ "domain": "datascience.stackexchange", "id": 2936, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, pandas, dataframe", "url": null }
The way you started and since $\left(a_n\right)_{n\in\mathbb{N}}$ and $\left(b_n\right)_{n\in\mathbb{N}}$ are positive then for partial sums we have $$0\leq\sum\limits_{n=1}^{k} a_nb_n\leq \left(\sum\limits_{n=1}^{k} a_n\right)\left(\sum\limits_{n=1}^{k} b_n\right)$$ The limit has the property to preserve the inequality (number 7 down the list), then $$0\leq\lim\limits_{k\rightarrow\infty}\sum\limits_{n=1}^{k} a_nb_n\leq \lim\limits_{k\rightarrow\infty}\left(\sum\limits_{n=1}^{k} a_n\right)\left(\sum\limits_{n=1}^{k} b_n\right) =\lim\limits_{k\rightarrow\infty} \left(\sum\limits_{n=1}^{k} a_n\right)\cdot \lim\limits_{k\rightarrow\infty} \left(\sum\limits_{n=1}^{k} b_n\right)$$ which is $$0\leq \sum\limits_{n=1} a_nb_n\leq \left(\sum\limits_{n=1} a_n\right)\cdot \left(\sum\limits_{n=1}b_n\right)$$ Since we know that $0\leq\sum\limits_{n=1}a_n < \infty$ and $0\leq\sum\limits_{n=1}b_n < \infty$, thus we have $0\leq \sum\limits_{n=1} a_nb_n <\infty$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.977022625406662, "lm_q1q2_score": 0.8162863249081883, "lm_q2_score": 0.8354835432479661, "openwebmath_perplexity": 229.93216651891987, "openwebmath_score": 0.9516198039054871, "tags": null, "url": "https://math.stackexchange.com/questions/2613213/sum-a-n-and-sum-b-n-converges-prove-sum-a-nb-n-converges" }
javascript, array, canvas I have a feeling that I could be storing the coordinates more efficiently, rather than just add them to an ever-increasing Array. Is this the right approach, or is there a more efficient way of handling this sort of storage? Firstly, I want to give you a thumbs up for a clear description of your code. It really helps with reading. And another before-we-begin thing: you've got a missing . in your longest line of the code, near the end: - thisoffsetTop };. Main changes Indeed, as you do not need to store all the coordinates, it's not efficient to save them all. To draw a line between the current and previous point, all you need are those two points. So, the first thing we can do with the code is to refactor that away: use prevCoord instead of an array. Get rid of the array First, we remove the coords declaration and replace it with a prevCoord. Without adding initialization, it'll stay at undefined for the first round. We're fine with that. // old var coords = [];
{ "domain": "codereview.stackexchange", "id": 31807, "lm_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, array, canvas", "url": null }
scala, tree, breadth-first-search bfs_visit(aQueue += node,List[T]()).reverse } As pointed out by @Bob Dalgleish, you mix mutable/immutable. You also mix pattern matching (enQueueNext) with if/else (bfs_visit). You also mix camel case notation (enQueueNext) with underscore notation (bfs_visit). trait would be more appropriate for Tree than abstract class. You don't really need Tree, as I show in my example, but that is debatable. You don't really need a queue either. You can make very succinct code with Scala. In my example below, the recursive BFS algorithm is basically a single line: bfsLoop(nextLayer.map(_.value) :: accum, nextLayer.flatMap(_.childrenLeftRight)). object TreeTraversal extends App {
{ "domain": "codereview.stackexchange", "id": 9549, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "scala, tree, breadth-first-search", "url": null }
and generalized transforms. Sum[a[n] (n w)^6 Cos[n w t], {n, 1, 5, 2}]^3] - Sum[a[n] Cos[n w t], {n, 1, 5, 2}] == 0. Common periodic signals include the square wave, pulse train, […]. Fourier Transform. Outreach to and recruitment of participants into population-based studies are important features of these platforms. "Transition" is the appropriate word, for in the approach we'll take the Fourier transform emerges as we pass from periodic to nonperiodic functions. Fourier series are used in applied. 2) which has frequency components at. Fourier Series and Their Applications Rui Niu May 12, 2006 Abstract Fourier series are of great importance in both theoretical and ap­ plied mathematics. As a physicist, I use Fourier series almost every day (mostly in infinite period limit, i. A Fourier series represents the functions in the frequency domain (change of coordinates) in an infinite dimensional orthogonal function space. Buckland ST. Moving forward. It further states that periodic
{ "domain": "psicologicamenteonlus.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9793540704659681, "lm_q1q2_score": 0.8006948933458974, "lm_q2_score": 0.817574478416099, "openwebmath_perplexity": 771.7534024236097, "openwebmath_score": 0.8521015048027039, "tags": null, "url": "http://psicologicamenteonlus.it/fourier-series-notes.html" }
javascript, jquery, css .toggle-site-nav:hover { background:rgba(0,0,0,0.5); /* mouseover color of menu button when resized */ } .toggle-sub-menu { display:none; } .js .toggle-sub-menu { display:flex; position:absolute; align-content: center; right:0em; top:1.05em; /* hight of the borders */ background:#817e81; /* backgound of annoying squares when resized */ height: 15px; width: 15px; cursor:pointer; z-index: 11; } .js .toggle-sub-menu.active { background: #DCDCDC; /* color of annoying square after clicking on it when resized */ } .toggle-sub-menu:hover, .toggle-sub-menu.active:hover { background-color: rgba(0,0,0,0.4); /* mouseover of annoying squares when resized */ } @media screen and (min-width:900px) { .logo { width:auto; float:left; } .site-nav { width:auto; display: flex !important; } .site-nav a { border:none; } .site-nav li { width:auto; padding:0; }
{ "domain": "codereview.stackexchange", "id": 28330, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, css", "url": null }
machine-learning, statistics, cross-validation Title: cross validation issues I have come here from this great answer. I have come across many approaches for using cross validation and the answer to the attached question is by far explaining it the best to me. My dilemma is that now that I m not able to figure out what to use Kfold cross validation for:- Testing overfitting? Hyperparam tuning? Any other use case? and that too how? I am unable to figure out what to do with the average score that comes after kfold cross val, what to do with the folds and what to do with a model trained on k-1 folds of train data? Answering the "what to do" point, if you use the scikit-learn GridSearchCV class (from sklearn.model_selection), you can get from it the following:
{ "domain": "datascience.stackexchange", "id": 6226, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, statistics, cross-validation", "url": null }
java, canvas, javafx public void setOriginalIntensityColor(Color originalIntensityColor) { this.originalIntensityColor = Objects.requireNonNull( originalIntensityColor, "The input color is null."); } public void setAngleOffset(double angleOffset) { checkAngleOffset(angleOffset); angleOffset %= 360.0; if (angleOffset < 0.0) { angleOffset += 360.0; } this.angleOffset = angleOffset; } public PieChart3DEntry get(int index) { return entries.get(index); } public void set(int index, PieChart3DEntry entry) { entries.set(index, Objects.requireNonNull(entry, "The entry is null.")); } public int size() { return entries.size(); } public void add(PieChart3DEntry entry) { entries.add(Objects.requireNonNull(entry, "The entry is null.")); }
{ "domain": "codereview.stackexchange", "id": 45335, "lm_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, canvas, javafx", "url": null }