text
stringlengths
1
1.11k
source
dict
quantum-mechanics, operators, commutator Title: Operator on Function of Momentum (QM) I have exactly 0 clue on how to start this problem, but I would be forever grateful for a hint in the right direction. Given the operators $\hat x=x$ and $\hat p=-i\hbar \frac{d}{dx}$, prove the following relation: $$ [\hat x, g(\hat p)]=i\hbar\frac{dg}{d\hat p}. $$ Like Prahar had said, the problem reduces fairly simply in momentum-space. We note that, in such space: $\hat x = i\hbar\frac{\partial}{\partial p}$ and $\hat p=p$, thus, using some auxiliary function $f$: $$ [\hat x,\hat g(\hat p)]f=i\hbar\frac{\partial (\hat gf)}{\partial p}-i\hbar\, \hat g\frac{\partial f}{\partial p}=i\hbar\frac{\partial \hat g}{\partial p}f $$ By applying the product rule and reducing, this yields the correct result.
{ "domain": "physics.stackexchange", "id": 8820, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, operators, commutator", "url": null }
angle of rotation of the axis. Figure 1: Typical cantilever beam studied. In a simply supported beam with udl or symmetrically located point loads, both the maximum moment and max deflection are at the center of the span and the minimum moments and minimum deflections. The beam is supported at each end, and the load is distributed along its length. A simply supported beam is the most simple arrangement of the structure. Max Deflection Of A Simply Supported Beam Posted on September 27, 2019 by Sandra Design of simply supported beam decrease deflection at the cantilever deflection of a simply supported beam puter aided deflection and slope determine the maximum deflection. Deflection Of Simply Supported Beam With Uniformly Varying Load Posted on May 4, 2020 by Sandra Uniformly varying load 37 review bending moment and shear force moment area theorems civil er uniformly varying load 37 review deflection on a cantilever beam. In this example we take a beam with the UDL of 20 kN/m applied
{ "domain": "autismart.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9825575116884779, "lm_q1q2_score": 0.8501324267518535, "lm_q2_score": 0.8652240877899775, "openwebmath_perplexity": 1316.018877203321, "openwebmath_score": 0.556337833404541, "tags": null, "url": "http://urgd.autismart.it/deflection-of-simply-supported-beam-with-udl.html" }
this step is called an inverse is easy to follow, especially the. From there, apply the +- matrix and its inverse will give a identity. Triple product emails according to our Cookie Policy you enter the inverse of a: it 4! A random 3x3 matrix a, there 's only one inverse for a square matrix B is called inverse... ) of the matrix of cofactors using the functions on a scientific calculator, keep reading the article has... When a is non-singular i.e., determinant should not be 0 operation is always written a = IA elementary! Review matrices Studying for a, the multiplication would n't work. ) matrix results in the we. Number is denoted with a contribution to wikiHow the sample matrix shown in the concept of Cipher! Line will be discussed in a different page ( click here ) will! Of in the formula of M^-1 were a great help to understand it first we have to review matrices ainv... Then Frac, and which way may be shared with YouTube property that it extremely... Singular matrix is written A-1
{ "domain": "riseandhustle.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9473810436809826, "lm_q1q2_score": 0.8196969026008184, "lm_q2_score": 0.865224091265267, "openwebmath_perplexity": 653.394062053295, "openwebmath_score": 0.6587470769882202, "tags": null, "url": "https://riseandhustle.com/b6u1741l/93c9e4-invertible-matrix-example-3x3" }
machine-learning, quantum-enhanced-machine-learning $$\tag{1} f(x_i) = \text{sign} \left[ \text{Tr} \left(\rho(x_i) M(\theta) \right)\right] $$ and then training the quantum circuit will consist of finding $\theta$ such that that $\text{Pr}(f(x_i)=y_i)$ is maximized over some training set. Evaluating (1) is usually an irreversible process because it requires setting up a circuit with measurements that estimate $\langle M(\theta) \rangle$, and each of these measurements will end up "collapsing" $\rho(x_i)$. A very different take on this question is to think about reversing the learning task itself. If we think of each training pattern and label $(x_i, y_i)$ as being a pair of random variables $(X, Y)$ drawn from a distribution $\text{Pr}(X, Y)$, then the goal of the above algorithm was to learn the conditional distribution $$\tag{2} \text{Pr}(Y=y_i | X=x_i) $$
{ "domain": "quantumcomputing.stackexchange", "id": 2675, "lm_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, quantum-enhanced-machine-learning", "url": null }
up a system of linear equations, and solve the system. HIDE SOLUTIONS. 1. Systems of 2 linear equations - problems with solutions Test. System of Linear Equations - Problem Solving on Brilliant, the largest community of math and science problem solvers. Section 8.1, Example 4(a) Solve graphically: Linear systems are usually expressed in the form Ax + By = C, where A, B, and C are real numbers. In your studies, however, you will generally be faced with much simpler problems. When it comes to using linear systems to solve word problems, the biggest problem is recognizing the important elements and setting up the equations. For example, the sets in the image below are systems of linear equations. This premium worksheet bundle contains a printable fact file and 10 fun and engaging worksheets to challenge your students and help them learn about Solving Word Problems Involving Linear Equations and Linear Inequalities. Substitution Method. Problem 1 Two of the following systems of equations
{ "domain": "com.br", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464471055738, "lm_q1q2_score": 0.8802262727546012, "lm_q2_score": 0.9019206692796967, "openwebmath_perplexity": 666.4782717917759, "openwebmath_score": 0.7244647741317749, "tags": null, "url": "https://mundogeografico.com.br/79wyw/axxtibs.php?page=2e1b59-system-of-linear-equations-problems" }
python, queue Use heapq rather than Queue.PriorityQueue. The latter does synchronization stuff that you don't need, so heapq will be faster. Don't add neighbor to done in your inner loop. This will find incorrect routes on any graphs where some subpath A->B->C is shorter than A->C. Instead, you want to be be putting item[1] into done when you pop it off the queue. Since this means you will get some duplicated nodes in your queue, you'll also need to check if the newly popped node was already done before processing it. You might be able to save a little processing time by storing the cost of the path to the node in a dictionary, and only adding a new path if it's less than the previous one (but I don't think the improvement is very large). This is a readability improvement (not a performance or correctness fix), but I suggest unpacking item into several values, rather than indexing it. cost, node, first_step = queue.get(), or something similar.
{ "domain": "codereview.stackexchange", "id": 3515, "lm_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, queue", "url": null }
deep-learning, cnn Make sure your validation and training data are preprocessed identically. If you applied certain transformations/preprocessing steps to your training data, do the same to your validation data. This is extremely important, and, if I had to guess, this may be what went wrong in your training. If you normalized your training data, for example, but you didn't normalize your validation data (for example), then your training loss will be several orders of magnitude smaller than the validation loss. Once you check that your training and validation data are consistent before input, make sure to add in regularization (a dropout layer is typical for neural networks) so that your model is not exposed to all of the training data at every layer. A dropout of 0.1-0.3 is pretty typical but a reasonable amount should be ok.
{ "domain": "datascience.stackexchange", "id": 10737, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "deep-learning, cnn", "url": null }
To access all the questions: Question of the Week: Consolidated List _________________ Number Properties | Algebra |Quant Workshop Success Stories Guillermo's Success Story | Carrie's Success Story Ace GMAT quant Articles and Question to reach Q51 | Question of the week Number Properties – Even Odd | LCM GCD | Statistics-1 | Statistics-2 | Remainders-1 | Remainders-2 Word Problems – Percentage 1 | Percentage 2 | Time and Work 1 | Time and Work 2 | Time, Speed and Distance 1 | Time, Speed and Distance 2 Advanced Topics- Permutation and Combination 1 | Permutation and Combination 2 | Permutation and Combination 3 | Probability Geometry- Triangles 1 | Triangles 2 | Triangles 3 | Common Mistakes in Geometry Algebra- Wavy line | Inequalities Practice Questions Number Properties 1 | Number Properties 2 | Algebra 1 | Geometry | Prime Numbers | Absolute value equations | Sets | '4 out of Top 5' Instructors on gmatclub | 70 point improvement guarantee | www.e-gmat.com
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 1, "lm_q1q2_score": 0.8175744761936437, "lm_q2_score": 0.8175744761936437, "openwebmath_perplexity": 3511.0024869135514, "openwebmath_score": 0.7216206789016724, "tags": null, "url": "https://gmatclub.com/forum/question-of-the-week-7-three-pipes-p-q-and-r-are-attached-to-a-270484.html" }
c++, sfml MovePlayer(direction); // Move Left } else if(event.key.code == sf::Keyboard::Left) { direction = 3; MovePlayer(direction); //Move Right } } } window.clear(sf::Color::White); // Drawing of the map int posX = 0; int posY = 0; sf::Sprite obj; for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { if (sokobanMap[i][j] == '#') { // Draw Wall //obj.setFillColor(sf::Color::Red); obj.setTexture(wall); obj.setPosition(posX,posY); window.draw(obj); } else if (sokobanMap[i][j] == '.') { // Draw Road ::TO DO:: maybe a sprite in the future }
{ "domain": "codereview.stackexchange", "id": 30956, "lm_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++, sfml", "url": null }
astronomy, astrophysics, nuclear-physics, elements Many elemental abundances can be measured with extraordinary accuracy in meteorites that have fallen to Earth (usually with respect to Silicon), having formed from the protostellar nebula. This is usually taken as the best method, but there are many chemical elements that are not properly represented in meteories - for instance volatile elements H, C, N, O and the noble gases. For these elements the solar spectrum can yield less precise abundances from a detailed knowledge of atomic line transition strengths and the structure of the solar photosphere. In the case of Li, it is the other way around. The Sun is Li-depleted and the abundance comes from meteorites. The solar and meteorite abundances are put on the same scale by matching the Si abundance (and sometimes additional elements).
{ "domain": "physics.stackexchange", "id": 17719, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "astronomy, astrophysics, nuclear-physics, elements", "url": null }
computational-chemistry, orbitals Title: Why rotate orbitals in a CASSCF calculation? I'm trying to get the rate constant for the reaction of propene to give propenyl (radical) and H. Using Molpro, I calculated the energy for the optimized geometry of the reactant using CASSCF. It is required at one point to rotate two orbitals (the one with energy just below the HOMO and one in the valence shell).
{ "domain": "chemistry.stackexchange", "id": 8368, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computational-chemistry, orbitals", "url": null }
gazebo Original comments Comment by azeey on 2018-11-28: Not really frameworks, but the ServerFixture and RenderFixture classes might be useful. They are used in Gazebo for testing. http://osrf-distributions.s3.amazonaws.com/gazebo/api/dev/classgazebo_1_1ServerFixture.html, http://osrf-distributions.s3.amazonaws.com/gazebo/api/dev/classgazebo_1_1RenderingFixture.html Comment by Eisenhorn on 2018-11-29: Thanks for your reply @azeey. Is there maybe a tutorial or demo implementation on how this classes are used best? Comment by tahsinkose on 2019-06-21: I wonder, whether the OP have found a solution for this. I have the exact same use case and don't want to reinvent the wheel. In the end I wrote a pyhton test script using the actionlib.SimpleActionClient (http://wiki.ros.org/actionlib_tutorials/Tutorials/Writing%20a%20Simple%20Action%20Client%20%28Python%29) interface. You can then create a json file with all your goals/actions.
{ "domain": "robotics.stackexchange", "id": 4353, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo", "url": null }
if $|x| = |-x|$ what can this mean for $|x-2| = |-x-2|$ or $|x+2|$ or $|-x+2|$ ? Thank you - I added the tag intuition to the question because it seems like you're looking for an intuitive way to understand the formula. –  Git Gud Jul 12 '13 at 16:48 Correction to: "Somewhere less that 1 or greater than -1" or between -1 and 1. The second part is correct. The part in quotes should have AND as the conjunction. Otherwise, one could use 4 which is "greater than -1" yet isn't less than 1. –  JB King Jul 12 '13 at 16:59 It means that $x$ is less than 1 away from 2 in either direction on the number line, or any direction on the complex plane. –  Kaz Jul 12 '13 at 19:01 The geometric interpretation, in $\Bbb R$, for $|x-a|<b$ is '$x$ is at a distance smaller than $b$ from $a$'. In your particular example, $|x-2|<1$, it means that $x$ is at a distance of at most $1$ from $2$ and it (the distance) never reaches $1$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9796676508127574, "lm_q1q2_score": 0.8751463168433056, "lm_q2_score": 0.8933093954028816, "openwebmath_perplexity": 183.16324154476547, "openwebmath_score": 0.9113469123840332, "tags": null, "url": "http://math.stackexchange.com/questions/442173/what-does-x-2-1-mean" }
javascript, jquery, dom, chat Title: Simulated chat bot I am creating a very basic simulated chat bot/dialogue tree. I have the whole conversation mapped based on what a user selects. However, I am doing this by storing all of the conversation in append() functions in javascript. Which, no doubt makes this a pretty clunky experience. In each 'question' the bot asks, I need to: Append the value of the button a user clicks (to simulate chat) Remove the chat controls Append the bot's response Append a follow up question Append the new question's chat controls Which, is undoubtably a little much. This is what an average question/response function looks like: $(".chat-controls").on("click", ".options.one", function() { input2 = $(this).text(); $(".one").remove();
{ "domain": "codereview.stackexchange", "id": 25581, "lm_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, dom, chat", "url": null }
# Function holomorphic in the units disk with different bound Suppose $$f$$ is continuous in the closed unit disk $$\bar{D}(0,1)$$ and holomorphic over its interior $$D(0,1)$$. Moreover suppose that for $$|z|=1$$ we have: $$\Re(z)\leq0\Rightarrow |f(z)|\leq\ 1$$ $$\Re(z)>0\Rightarrow |f(z)|\leq 2$$ and I Need to prove $$|f(0)|\leq \sqrt{2}$$ I know from the maximum modulus principle we have that: $$1\leq \max_{|z|=1}|f|=\max_{\bar{D}(0,1)}|f|\leq 2$$ but I can't really see where the square root come from so I cannot go any further. • out of curiosity, is the bound tight? – AccidentalFourierTransform Dec 10 '18 at 18:11 • @AccidentalFourierTransform As far as the text of my exercises says no – Renato Faraone Dec 11 '18 at 10:04
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9559813526452772, "lm_q1q2_score": 0.8388514431486764, "lm_q2_score": 0.8774767842777551, "openwebmath_perplexity": 113.7854250164868, "openwebmath_score": 0.9350861310958862, "tags": null, "url": "https://math.stackexchange.com/questions/3033715/function-holomorphic-in-the-units-disk-with-different-bound" }
ros, p2os-driver, p2os, p3dx SUMMARY ======== PARAMETERS * /rosdistro * /rosversion NODES / p2os_driver (p2os_driver/p2os_driver) ROS_MASTER_URI=http://localhost:11311 core service [/rosout] found process[p2os_driver-1]: started with pid [29935] [ERROR] [1437702514.232441287]: P2OS::Setup():open(): [p2os_driver-1] process has died [pid 29935, exit code -11, cmd /home/robotics/catkin_ws/devel/lib/p2os_driver/p2os_driver __name:=p2os_driver __log:=/home/robotics/.ros/log/1a8aae94-31a5-11e5-879a-1093e908a012/p2os_driver-1.log]. log file: /home/robotics/.ros/log/1a8aae94-31a5-11e5-879a-1093e908a012/p2os_driver-1*.log all processes on machine have died, roslaunch will exit shutting down processing monitor... ... shutting down processing monitor complete done Do you have an idea what could cause this issue? Thanks in advance for your help.
{ "domain": "robotics.stackexchange", "id": 22275, "lm_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, p2os-driver, p2os, p3dx", "url": null }
• anything unclear ? – reuns Jan 3 '17 at 12:54 • @user1952009: Many thank for the answer. May I seek your patient, let us see other opinions/answers/votes. – Hazem Orabi Jan 3 '17 at 13:02 • What do you want more ? If you are not sure of what is happening here, you need to study a complex analysis and a Fourier/Laplace transform course. The first thing is to see why $\frac{z}{e^z-1}$ is analytic at $z= 0$ – reuns Jan 3 '17 at 13:16 • @user1952009: Thanks for been always interested in my posts, you definitely deserve a bounty for your skills. Regarding this question, appreciating if you could respond to my comment below, I think the answer is still uncompleted! – Hazem Orabi Jan 10 '17 at 20:40
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9664104924150547, "lm_q1q2_score": 0.8053336324970687, "lm_q2_score": 0.8333245953120233, "openwebmath_perplexity": 921.3921235955052, "openwebmath_score": 0.9986697435379028, "tags": null, "url": "https://math.stackexchange.com/questions/2080363/integral-representation-of-gamma-zeta-functions-inside-the-critical-strip" }
quantum-mechanics, history, schroedinger-equation He then adds that it will be an interesting topic for students of history of science which does not answer my question. Could you please try answering this question (or is this question really useless) ? Thanks for your time Schrodinger was following Hamilton, deBroglie and Einstein. DeBroglie had noted that matter waves obeyed a relation between momentum and wavenumber, and energy and frequency, $$ E = \hbar \omega $$ $$ p = \hbar k $$ For plane waves of the form $\psi(x) = e^{ikx - i \omega t}$, you learn that the $\omega$ and the $k$ of the wave are the energy and the momentum, up to a unit-conversion factor of $\hbar$. Einstein then noted that the DeBrodlie waves will obey the Hamilton Jacobi equation in a semi-classical approximation, and Schrodinger just went about looking for a real wave equation which would reproduce the Hamilton Jacobi equation when you use phases.
{ "domain": "physics.stackexchange", "id": 51983, "lm_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, history, schroedinger-equation", "url": null }
cubic equations was a natural step, taken by Tartaglia and Cardano and others. Mathematically, a cycloid in the xy plane can be described by the following equations where "wt" is a parameter, which can be interpreted as the angle that the sphere has made as it rolls to time "t" from the above construction. 2 t S b) Show that () 2 v S lies on the tangent line. Comment on. This is not an easy task and requires some effort of thought. Teaching Discrete Mathematics and Computer Science (and now More!) via Primary Historical Sources. Accordingly, the cycloid model, modeled by parametric equations rather than Cartesian, because, this GeoGebra with its algebraic capabilities, has constructed vertical cycloid is not actually a function y or x. I want it to show 5 e^3x. Reference shows that the total meshing force of y axis is zero, but the total meshing force of x axis exists. Some early observers thought that perhaps the cycloid was another circle of a larger radius than the wheel which
{ "domain": "crashmobile24.de", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692325496973, "lm_q1q2_score": 0.8095990297539375, "lm_q2_score": 0.8289388083214155, "openwebmath_perplexity": 737.7284894527172, "openwebmath_score": 0.7113257050514221, "tags": null, "url": "http://hhdg.crashmobile24.de/cycloid-mathematical-equation.html" }
machine-learning, python, nlp Title: Features used by MAUI key phrase extraction tool I have been trying out keyphrase extraction for a while and I want to know what are all the features that MAUI MAUI github uses for training the keyphrase extraction? Having read this its hard for me to understand every feature that she uses can someone help me give a brief about the features that she is using? and some references for the same if any. The references are in the link that you give: here you can find references to two papers which describe the method: Domain-Specic Keyphrase Extraction KEA: Practical Automatic Keyphrase Extraction Fyi it seems there's no neural nets involved (the question is tagged with neural-network)
{ "domain": "datascience.stackexchange", "id": 5380, "lm_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, python, nlp", "url": null }
#4806 #### Heather Macbeth (Oct 28 2020 at 23:13): @Gihan Marasingha #4806 is now merged and your lemma can be entirely automated: import analysis.special_functions.trigonometric noncomputable theory open real -- Aim to show u = u₂ def θ := - (pi / 4) def u := (10:ℂ) * (cos θ + (sin θ) * complex.I) def u₂ : ℂ := 5 * (sqrt 2) * (1 + (-1) * complex.I) example : u = u₂ := by ext; { simp [u, u₂, θ], norm_cast, ring } #### Gihan Marasingha (Oct 28 2020 at 23:17): @Heather Macbeth amazing! Thanks so much. Last updated: May 18 2021 at 07:19 UTC
{ "domain": "github.io", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9585377290652477, "lm_q1q2_score": 0.8049166865469748, "lm_q2_score": 0.839733963661418, "openwebmath_perplexity": 12886.784148277555, "openwebmath_score": 0.48956528306007385, "tags": null, "url": "https://leanprover-community.github.io/archive/stream/116395-maths/topic/Exponential.20form.20of.20a.20complex.20number.html" }
c++, c++11, pointers void SetX(int x) { this->x = x; } void SetY(int y) { this->y = y; } void SetZ(int z) { this->z = z; } }; #endif Vector.cpp #include <memory> #include <iostream> #include "Vector.h" Vector::Vector(int x, int y, int z) : x(x), y(y), z(z) { std::cout << "Constructed a Vector instance with elements ( " << x << ", " << y << "," << z << " )." << std::endl; }; Vector::~Vector() { std::cout << "Destructed a Vector instance with elements ( " << x << ", " << y << "," << z << " )." << std::endl; } std::unique_ptr<Vector> Vector::operator + (Vector* vector) { std::unique_ptr<Vector> result = std::make_unique<Vector>(0, 0, 0); result->SetX(this->x + vector->GetX()); result->SetY(this->y + vector->GetY()); result->SetZ(this->z + vector->GetZ()); return result; }; Usage #include <iostream> #include <memory> #include "Vector.h"
{ "domain": "codereview.stackexchange", "id": 11790, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++11, pointers", "url": null }
sdformat How to fix it? Thank you~ ==================================================== My nestle_cereal_box.dae: <?xml version="1.0" encoding="utf-8"?> <COLLADA version="1.4.0" xmlns="http://www.collada.org/2005/11/COLLADASchema"> <asset> <contributor> <author>Illusoft Collada 1.4.0 plugin for Blender - http://colladablender.illusoft.com</author> <authoring_tool>Blender v:249 - Illusoft Collada Exporter v:0.3.162</authoring_tool> <comments></comments> <copyright></copyright> <source_data>file://</source_data> </contributor> <created>2010-10-31T20:18:28.191759</created> <modified>2010-10-31T20:18:28.191776</modified> <unit meter="0.01" name="centimeter"/> <up_axis>Z_UP</up_axis> </asset> <library_effects> <effect id="tex_png-fx" name="tex_png-fx"> <profile_COMMON> <newparam sid="tex_png-surface"> <surface type="2D">
{ "domain": "robotics.stackexchange", "id": 2825, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sdformat", "url": null }
reinforcement-learning, q-learning, temporal-difference-methods, value-functions Underlying the temporal-difference update and many other reinforcement learning updates is the notion of policy iteration in which the estimated value function is updated to match the true value function of the current policy and the current policy is updated to be greedy with respect to the estimated value function. This process proceeds iteratively and gradually until convergence to the optimal policy and optimal value function is achieved. Gradual changes such as setting a small learning rate (e.g. $\alpha = 0.1$) aim to speed up convergence by lessening the frequency of the phenomenon in the above paragraph. Sutton and Barto make comments on convergence throughout their book, with the remarks surrounding line 2.7 in Section 2.5 providing a summary.
{ "domain": "ai.stackexchange", "id": 2125, "lm_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, temporal-difference-methods, value-functions", "url": null }
newtonian-mechanics, momentum Title: In a seesaw, is it possible to consider either of the ends as the fulcrum? Clasically, we learn the pivot point of the see saw as the fulcrum, and the moments are calculated as F*D, where D is the distance from the fulcrum. However, is it possible to mentally consider one end as the fulcrum (and point of reference), and the pivot as exerting an upward force on the stick? If so, can we calculate the upward force as (F1 + F2), and the moment as D1 * (F1 + F2)? If so, can we calculate the upward force as (F1 + F2), and the moment as D1 * (F1 + F2)?
{ "domain": "physics.stackexchange", "id": 87375, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, momentum", "url": null }
c#, asp.net-web-api Title: Building a custom response body based on API consumer's need I've been researching ways to reduce response size on requests in my rest API without adding lots of calls to get back just the ID and single properties. What I've ended up attempting is creating the ability for the API consumer to specify the fields they want back from a default response model and have the response body send back only those fields out of the default model. This way, ideally, they get only exactly what they need. An example request would look like: api/characters/2?fields=id,displayname,mainImageUrl
{ "domain": "codereview.stackexchange", "id": 21315, "lm_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#, asp.net-web-api", "url": null }
fourier-transform, image-segmentation, color Title: FFT of color images incorporated into an Object Recognition method? Is there any instance where Fourier transforms of color images have been used in conjunction with other object recognition method? Any instance of usage of Fourier transforms in color images? I think there is great potential in the usage of Fourier transforms of color images. Okay I found some ideas about using Fourier Transforms in Object Recognition. What I am unable to understand is however, its downsides. Why was the method discarded. For those who are interested in reading about how Fourier Transforms were applied in Object Recognition , look for Fourier Mellin Transforms.
{ "domain": "dsp.stackexchange", "id": 588, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fourier-transform, image-segmentation, color", "url": null }
c++, beginner, io, c++14, calculator //process the tokens for(std::string tok : tokens){ auto check = std::isdigit(static_cast<unsigned char>(tok[0])); //if token is a number if(check){ stack.push(tok); } else{ //empty check if(stack.empty()){ std::cout << "not enough operands for this operation" << std::endl; break; } if(tok == "add"){ add(stack); continue; } if(tok == "sub"){ sub(stack); continue; } if(tok == "mult"){ mult(stack); continue; } if(tok == "div"){ div(stack); continue; } if(tok == "pop"){ stack.pop(); continue; } if(tok == "sqrt"){ calcsqrt(stack); continue;
{ "domain": "codereview.stackexchange", "id": 26998, "lm_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, io, c++14, calculator", "url": null }
python, beginner, python-3.x It is generally better to pass arguments into a function than to use the global keyword. It will make it more explicit about where values are being changed. And can make the code more testable as there is less global state to be concerned with. Replace most of the hard coded number and strings with named constants. Using a constant will make it clearer what a value represents and when the same value means the same thing. Every instance of 6 might mean the same thing, but without a named constant telling you that, you have to check each case when 6 needs to change to 7.
{ "domain": "codereview.stackexchange", "id": 14985, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-3.x", "url": null }
ros, moveit, ros-melodic, ros-controllers With a bit of research, I found out that this problem is linked to some missing Moveit controller packages. I tried to install them sudo apt install ros-melodic-ros-controllers and sudo apt install ros-melodic-joint-state-controller but it looks like I already have them. Anyone has any ideas why the Moveit config package cannot recognize any controller types? Originally posted by Gates on ROS Answers with karma: 68 on 2021-08-18 Post score: 0
{ "domain": "robotics.stackexchange", "id": 36810, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, moveit, ros-melodic, ros-controllers", "url": null }
Only top voted, non community-wiki answers of a minimum length are eligible
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9825575178175919, "lm_q1q2_score": 0.8554118993133387, "lm_q2_score": 0.8705972768020108, "openwebmath_perplexity": 618.7862224429809, "openwebmath_score": 0.5858034491539001, "tags": null, "url": "https://matheducators.stackexchange.com/tags/number-theory/hot" }
plate-tectonics Title: Fissure Energy/Force Equation For this, I am trying to understand if it is a measure of force (Newtons) or energy (Joules ) of when fissures are created, Fissures are where the ground is being torn up either by volcanic ventilation, or otherwise. So whether it is measured in force or energy, I wish to know what is the best equation for this phenomenon to occur. So the information I have that would further this is the area is 20.58 m^2, the depth is 30,000 m. and it happened in just a second. I thought it would be used for Tensile Strength with Silicon with the yield strength of 180 MPa. Force is used to (try to) move objects apart. Energy is expended as the objects move and thereby separate. In a pure physics sense, until an object moves, absolutely no work energy is expended. You can push on a wall all you want with as much force as you want but, unless the wall moves, you do no work.
{ "domain": "earthscience.stackexchange", "id": 1632, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "plate-tectonics", "url": null }
Press, Oxford University Press 2002. Each other straight forward to prove that complete convergence implies almost sure convergence of probability Measures, John &! Oxford Studies in probability probability of a sequence that converges almost surely implies convergence probability! Takes place on all sets E2F does not converge almost surely implies convergence from MTH at! Hence X n →p µ sufficient form the space which Lafuerza-Guill é and! Since this convergence takes place on all sets E2F 1 ) almost sure convergence result is! The space which Lafuerza-Guill é n and Sempi introduced means assume X n →p µ 2, University! N ) n2N, which in turn implies convergence from MTH 664 at Oregon University! Were almost sure convergence this convergence takes place on all sets E2F Sempi introduced means assume X n µ. Mth 664 at Oregon State University will list three key types of convergence based on taking limits 1! Necessary and sufficient form to know some sufficient conditions for almost
{ "domain": "gianpaologonzalez.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9615338057771058, "lm_q1q2_score": 0.8354063281477462, "lm_q2_score": 0.8688267881258485, "openwebmath_perplexity": 601.656100288283, "openwebmath_score": 0.9190282225608826, "tags": null, "url": "http://gianpaologonzalez.com/vlt5j98m/47c220-convergence-almost-surely-implies-convergence-in-probability" }
python, django def __unicode__(self): return ('%s - %s') % (self.name, self.state.state) #=================================================================================# class Phone(models.Model): PHONES_TYPE_CHOICES = ( ('R', u'Residencial'), ('M', u'Celular'), ('C', u'Comercial'), ) user = models.ForeignKey(User, verbose_name='Usuário') type = models.CharField(max_length=1, choices=PHONES_TYPE_CHOICES, verbose_name='Tipo') number = models.CharField('Número', max_length=15) class Meta: verbose_name = "Telefone" verbose_name_plural = "Telefones" def __unicode__(self): return self.number #=================================================================================#
{ "domain": "codereview.stackexchange", "id": 1726, "lm_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, django", "url": null }
• Yes, just do A+B=4, 5A+6B=23, from this we deduce $a=1,b=3$, so the generating function is simply $x_n=5^n+3*6^n$ – Kai Jun 13, 2019 at 0:16
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471632833944, "lm_q1q2_score": 0.804368333549136, "lm_q2_score": 0.8175744806385542, "openwebmath_perplexity": 265.3600695022496, "openwebmath_score": 0.969549298286438, "tags": null, "url": "https://math.stackexchange.com/questions/58502/closed-form-solution-of-recurrence-relation" }
ros, robot, camera Comment by NEngelhard on 2017-03-28: Pilz has a certified camera: https://www.youtube.com/watch?v=7UCD77s1qvI Comment by gvdhoorn on 2017-03-28: The Pilz system that @NEngelhard mentions would indeed be an option. But that would be a completely different approach, as you would basically be integrating some existing systems. I had the impression that you wanted to do 'everything' yourself. Comment by gvdhoorn on 2017-03-28:\
{ "domain": "robotics.stackexchange", "id": 27447, "lm_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, robot, camera", "url": null }
javascript, beginner, game, node.js /* Load *.js file */ else if(req.url.startsWith('/compatibility/') && req.url.endsWith('.js')) { var file = req.url.replace(/\/compatibility\//, ''); fs.readFile(file, 'utf8', (err, data) => { if(err) { res.statusCode = 500; console.log('Unable to read ' + file); res.end('Server error'); } else { res.statusCode = 200; res.end(data); } }); } /* Load *.img file */ else if(req.url.startsWith('/compatibility/img/') && req.url.endsWith('.jpg')) { var file = req.url.replace(/\/compatibility\//, ''); fs.readFile(file, (err, data) => { if(err) { res.statusCode = 500; console.log('Unable to read ' + file); res.end('Server error'); } else { res.statusCode = 200; res.end(data); }
{ "domain": "codereview.stackexchange", "id": 40357, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, beginner, game, node.js", "url": null }
c#, javascript, html, asp.net-mvc, cross-browser var isOutdated = false; switch (browser) { case "Chrome": if (version < 57) { isOutdated = true; } break; case "Edge": if (version < 16) { isOutdated = true; } break; case "Safari": if (version < 12) { isOutdated = true; } break; case "Mobile Safari": if (version < 11) { isOutdated = true; } break; case "Firefox": if (version < 62) { isOutdated = true; } break; case "Opera": if (version < 50) { isOutdated = true; } break; case "Vivaldi": if (version < 1) { isOutdated = true; } break; case "Yandex": if (version < 17) { isOutdated = false; } break; case "IE": isOutdated = true; break; } if (isOutdated) { alert("Your browser is not supported:" + browser + version); } </script>
{ "domain": "codereview.stackexchange", "id": 41915, "lm_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#, javascript, html, asp.net-mvc, cross-browser", "url": null }
of the sine wave. 27 [163,175]. How to perform sine generation (in C)? so that running the returns from many calls together is an undistorted sine wave? \$\endgroup time in Sine Wave equation. 8) Recall that the eigenvalues and eigenfunctions of (18) are λ 2 n = (nπ) , Xn (x) = bn sin(nπx), n = 1, 2, 3, The function T (t) satisfies T′′ + λ = 0 and hence each eigenvalue λn corresponds to a solution Tn (t) Tn (t) = αn cos(nπt)+βn sin(nπt). Set the controls of the function generator to produce a sine wave of about 1000 Hz frequency and a few volts amplitude. An unstable infinite impulse response (IIR) filter can be used as a sine wave generator. Online 2D and 3D plotter with root and intersection finding, easy scrolling, and exporting features. Create harmonics using varying test tones and patterns with ToneGen. Parameters and Dialog Box. Variable Duty Cycle Square Wave Generator -+-+-. You will hear a pure tone sine wave sampled at a rate of 44. You should be able to get a wave form in
{ "domain": "keduku.fr", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9559813476288301, "lm_q1q2_score": 0.8047696224185478, "lm_q2_score": 0.8418256532040708, "openwebmath_perplexity": 940.2265415389599, "openwebmath_score": 0.6763566732406616, "tags": null, "url": "http://hzpj.keduku.fr/sine-wave-equation-generator.html" }
cardiology, fat-metabolism Title: Can fats clog veins or capillaries? I know that so much fats running in the bloodstream could deposit in arteries, harden forming a plaque and cause atherosclerosis. But what about veins (which are formed from same types of layers as arteries) and capillaries? I googled a bit but everything was regarding arteries. Is it because veins have a much wider diameter than arteries that even if some fats deposit they won't clog it? And for capillaries, they are much smaller so shouldn't they be more vulnerable to this? In addition, I guess since one of the lymphatic vessels functions are to transport fats from capillaries in villi to bloodstream, how are they adapted to prevent deposit of fats as they carry out the transportation? N:B I'm just an OL biology student, and also horrible at chemistry
{ "domain": "biology.stackexchange", "id": 10493, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cardiology, fat-metabolism", "url": null }
photons, relativity, big-bang The velocity of the light ray of photons is c for all observers. At the same time, the spacetime interval of all lightlike phenomena such as photons is zero. That implies that the point of emission and the point of absorption are adjacent in spacetime! If both points are adjacent, there is no place for a particle between them! As there is no particle, there can be no frame of reference.
{ "domain": "physics.stackexchange", "id": 56455, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "photons, relativity, big-bang", "url": null }
java, algorithm, game, libgdx Now that it is clear what the arguments are, we can name them more appropriately. private WallPattern(TileSpecification topLeftNeighbor, TileSpecification topCenterNeighbor, TileSpecification topRightNeighbor, TileSpecification centerLeftNeighbor, TileSpecification home, TileSpecification centerRightNeighbor, TileSpecification bottomLeftNeighbor, TileSpecification bottomCenterNeighbor, TileSpecification bottomRightNeighbor) { Well, I suppose that's clearer, but it's wordy wordy wordy. Is there anything we can do about that? One answer might be to create a constructor that accepts a pre-populated map private WallPattern(Map<RelativePosition, TileSpecification> pattern) { this.pattern = pattern; } You still need to map the assignments, but you've got options for how to do that (static initializers, fluent builders, whatever you think makes sense). public boolean patternMatches(List<TownTileType> tilePattern) {
{ "domain": "codereview.stackexchange", "id": 16125, "lm_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, game, libgdx", "url": null }
Equation MAT 518 Fall 2017, by Dr. Z dy y +1 = Z dx. To solve a homogeneous differential equation by the method of separation of variables, use the following change of variables theorem. If you have a separable first order ODE it is a good strategy to separate the variables. Chapter VIII PDE VIII. Question: Any function of more than one variablee, say {eq}g(x,y) {/eq}, if it satisfies a linear homogeneous PDE can be solved by the method of separation of variables. As usual, solving X00= 0 gives X = c 1x + c 2. Separation-of-Variables Solution to the Finite Vibrating String We solve problem 14-1 by breaking it into several steps: Step 1. (1) Using the Method of Separation of Variables, we let u. Step 1 | Change of Variables: Before doing separation of variables, we begin by using a change of variables to reduce our problem to the case with symmetric homogeneous angular boundary conditions. Adding these two solutions together. is called homogeneous equation, if the right side satisfies
{ "domain": "quadri-canvas.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9811668695588647, "lm_q1q2_score": 0.8089347294893187, "lm_q2_score": 0.8244619285331332, "openwebmath_perplexity": 442.1441670526314, "openwebmath_score": 0.8055364489555359, "tags": null, "url": "http://quadri-canvas.it/cfuz/separation-of-variables-homogeneous-boundary-conditions.html" }
special-relativity, speed-of-light, computational-physics, approximations, software Is such behavior expected for the special relativity addition formula? I use this code: #include <stdio.h> #include <stdint.h> void relative_speed(uint32_t iters_count, long double v_delta, uint64_t c) { long double v_sum = 0.0; long double u = 0.0; long double v = 0.0; long double u_quoted = v_delta; unsigned int i = 1; for( ; i <= iters_count ; ++i) { v_sum += v_delta; u = (v + u_quoted) / ((long double)1.0 + v * u_quoted / (c*c)); v = u; } printf("v =%.20Lf v_delta=%.10Lf v_sum=%Lf iterations=%u\n", v, v_delta, v_sum, i-1); } int main() { relative_speed(2, 0.5, 1); relative_speed(5, 0.2, 1); relative_speed(10, 0.1, 1); relative_speed(100, 0.01, 1); relative_speed(1000, 0.001, 1); relative_speed(10*1000*1000, 0.0000001, 1);
{ "domain": "physics.stackexchange", "id": 99356, "lm_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, speed-of-light, computational-physics, approximations, software", "url": null }
c#, casting public string AccountName { get; } public string RoutingNumber { get; } public string BankAccount { get; } public DirectDebitAccountTypeEnum AccountType { get; } } [Flags] public enum PaymentMethodEnum { [Description("NONE")] None = 0, [Description("Credit Card")] CreditCard = 1 << 0, [Description("Direct Debit")] DirectDebit = 1 << 1, [Description("Check")] Cheque = 1 << 2, [Description("Invoice")] Invoice = 1 << 3, [Description("Money Order")] MoneyOrder = 1 << 4, [Description("Paper Invoice")] PaperInvoice = 1 << 5 } public enum PaymentCardTypeEnum { [Description("Unknown")] Unknown, [Description("AMEX")] Amex, [Description("MASTERCARD")] MasterCard, [Description("DISCOVER")] Discover, [Description("VISA")] Visa } public enum BillingFrequencyEnum { [Description("Unknown")] Unknown, [Description("Annual")] Annual,
{ "domain": "codereview.stackexchange", "id": 34266, "lm_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#, casting", "url": null }
c++, c++11, thread-safety, locking void write_lock() { std::unique_lock<std::mutex> lk(rw_mutex); std::cout << "\nWriter Lock Writers are " << writers << " Readers are " << readers << std::flush; if (readers == 0 && writers == 0) { std::cout << "\nWriter Lock Writers are " << writers << std::flush; } else { rw_cv.wait( lk, [this]() { return (this->writers == 0 && this->readers == 0); }); } writers++; lk.unlock(); } void write_unlock() { std::lock_guard<std::mutex> lk(rw_mutex); writers--; rw_cv.notify_all(); } void read_unlock() { std::lock_guard<std::mutex> lk(rw_mutex); if (readers == 1) { // I am the last one. rw_cv.notify_all(); } readers--; } explicit MySharedLock() {}
{ "domain": "codereview.stackexchange", "id": 31589, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++11, thread-safety, locking", "url": null }
computer-architecture And if translation is not in the TLB, it is recreated by table walk. TLB misses (and table walk) are very expensive. If all the page tables are already copied to cache memory, it will require some tens of cycles. But if the TLB miss also implies cache misses, the time will be measured by hundreds of cycles. There are several good tutorials on these problems. Look for instance at the wikepedia page that give good graphical illustrations of table walk. https://en.wikipedia.org/wiki/Page_table
{ "domain": "cs.stackexchange", "id": 13010, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computer-architecture", "url": null }
Let $x(t)$ be the position function for the body. Acceleration is the derivative of the velocity: . $a(t) \:=\:v'(t)\:=\:10$ . . Integrate: . $v(t)\:=\:10t + C_1$ Velocity is the derivative of the position: . $v(t) \:= \:x'(t)\:=\:5t^2 + C_1$ . . Integrate: . $x(t)\:=\:5t^2 + C_1t + C_2$ We are told that: $x(2) = 0$ . . $5\cdot2^2 + C_1\cdot2 + C_2\:=\:0\quad\Rightarrow\quad 2C_1 + C_2\:=\:-20$ . [1] We are told that: $x(3) = 25$ . . $5\cdot3^2 + C_1\cdot3 + C_2\:=\:25\quad\Rightarrow\quad 3C_1 + C_2 \:=\:-20$ . [2] Subtract [1] from [2]: . $C_1 = 0$ Substitute into [1]: . $2\cdot0 + C_2 \:=\:-20\quad\Rightarrow\quad C_2 = -20$ Hence, the position function is: . $x(t)\:=\:5t^2 - 20$ Therefore, at $t = 0,\;x(0) = -20$ . . Initially, the body was 20 meters "behind" $O.$ 6. Originally Posted by chancey Originally Posted by CaptainBlack The displacement as a function of time is: $ s=5t^2+v_0t+s_0 $ where $v_0$ is the initial velocity, and $s_0$ is the initial displacement.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307708274402, "lm_q1q2_score": 0.8189539010390886, "lm_q2_score": 0.8418256551882382, "openwebmath_perplexity": 630.5288645293039, "openwebmath_score": 0.8364307284355164, "tags": null, "url": "http://mathhelpforum.com/advanced-applied-math/5347-body.html" }
ros, gazebo, rviz, urdf print "InertialCaluclator Quit...Thank you" def select_action(self, selection): if selection == "1": mass = float(raw_input("mass>>")) width = float(raw_input("width>>")) depth = float(raw_input("depth>>")) height = float(raw_input("height>>")) self.calculate_box_inertia(m=mass, w=width, d=depth, h=height) elif selection == "2": mass = float(raw_input("mass>>")) radius = float(raw_input("radius>>")) self.calculate_sphere_inertia(m=mass, r=radius) elif selection == "3": mass = float(raw_input("mass>>")) radius = float(raw_input("radius>>")) height = float(raw_input("height>>")) self.calculate_cylinder_inertia(m=mass, r=radius, h=height) elif selection == "Q": print "Selected Quit" else: print "Usage: Select one of the give options"
{ "domain": "robotics.stackexchange", "id": 29674, "lm_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, rviz, urdf", "url": null }
statistical-mechanics, fermions, partition-function, bosons, identical-particles $$Z_2=1+4e^{-\beta\Delta}+e^{-2\beta\Delta}$$ So which is it? What is going on here? Does the formula for $Z_2$ in terms of $Z_1$ for indistinguishable particles not hold for fermions? What about Bosons? Bosons don't have any spin so for $1$ boson the two level partition function should be: $$Z_{1b}=1+e^{-\beta\Delta}$$ And then using the same formula for indistinguishable particles we have that: $$Z_{2b}=\frac{1}{2}Z_{1b}^2=\frac{1}{2}\left(1+e^{-\beta\Delta}\right)=\frac{1}{2}+e^{-\beta\Delta}+\frac{1}{2}$$ But actually counting the states for $2$ bosons in a $2$ level system I get that there is $1$ possible way for both bosons to occupy the ground state or excited state, and $1$ way for one particle to occupy the ground state while one particle to occupies the excited state thus the partition function should be: $$Z_2=1+e^{-\beta\Delta}+e^{-2\beta\Delta}$$
{ "domain": "physics.stackexchange", "id": 77472, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics, fermions, partition-function, bosons, identical-particles", "url": null }
optics, laser The waist is the thinnest point of the beam. Usually this point is inside the laser cavity, or outside the laser if there are focusing optics involved, which there often are. So still, the answer to your question is no. You are not missing the definition of $\lambda$; rather, you are comparing your minimum waist radius to the value of $2\lambda/\pi^2$ that I said was "impossible". I called it impossible, because to make a beam converging that strongly, you would need a lens with a focal length of zero!
{ "domain": "physics.stackexchange", "id": 1462, "lm_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 }
reference-request, books To better prepare us for quantum mechanics, my (chemistry) faculty offered a two-semester lecture for "freshmen" where the professor derived the Schroedinger equation with us from first principles. The lecture was basically self-contained, both mathematically (introducing analysis) and chemically (first-years do basic chemistry and qualitative inorganic analytics, there is hardly any overlap with QM). With students that are better in math than we were, this could work very well, and faster. :-) I'm afraid I have no english book for this. The regular physical chemistry books don't dive into the actual mathematical derivation so much. We used "Wedler, Lehrbuch der physikalische Chemie". Btw.: Students that are good in math AND chemistry are very valuable. Be prepared for your colleagues from the chemistry department to be after them. ;-)
{ "domain": "chemistry.stackexchange", "id": 5579, "lm_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, books", "url": null }
ros, can, ros-canopen Title: ros_canopen PDO mapping (Schneider Motor CiA 402) Hey guys, I'm at a dead-end so in need of some help from the community, please. This question follows on from a closed GitHub issue on ros_canopen. My problem is as follows: I'm unable to do a PDO re-map procedure using ros_canopen_master. If I don't do the PDO re-map procedure the Schneider Lexium 28 controller does enable voltage but halts due to an error message: "PDO packet too long". Some background data:
{ "domain": "robotics.stackexchange", "id": 36367, "lm_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, can, ros-canopen", "url": null }
machine-learning, scikit-learn, cross-validation, parallel, elastic-net I also include the numpy, mkl and scipy dependencies that were installed. intel-openmp 2020.1 216 joblib 0.14.1 py_0 mkl 2020.1 216 mkl-service 2.3.0 py36hb782905_0 mkl_fft 1.0.15 py36h14836fe_0 mkl_random 1.1.0 py36h675688f_0 numpy 1.18.1 py36h93ca92e_0 numpy-base 1.18.1 py36hc3f5095_1 python 3.6.10 h9f7ef89_2 scikit-learn 0.22.1 py36h6288b17_0 scipy 1.4.1 py36h9439919_0
{ "domain": "datascience.stackexchange", "id": 7539, "lm_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, scikit-learn, cross-validation, parallel, elastic-net", "url": null }
quantum-field-theory, lagrangian-formalism, dirac-equation, charge-conjugation, cpt-symmetry $$ Note that to prove both I had to use the anticommutator: $$ \{\Psi_a(t,\vec{x}),\bar\Psi_b(t,\vec{y})\}=\delta(\vec x-\vec y)\gamma^0_{ab} $$ The Lagrangian density is: $$ \mathcal{L}=\bar\Psi(i\gamma^\mu\partial_\mu-m)\Psi=i\bar\Psi\gamma^\mu\partial_\mu\Psi -m\bar\Psi\Psi $$ Now as far as I can see to calculate $C\bar\Psi\gamma^\mu\partial_\mu\Psi C$ I can't use the same steps used to prove $C(\bar\Psi \gamma^\mu \Psi)C=-\bar\Psi\gamma^\mu\Psi$ cause I don't know what is $\{\partial_\mu\Psi_a(t,\vec{x}),\bar\Psi_b(t,\vec{y})\}$. So I am really confused about what I am misunderstanding and what I am doing wrong or unnecessary complicated Charge conjugation leaves spacetime coordinates and Dirac matrices alone, and acts only on the spinor structure of $\Psi$, meaning that $$ {\cal{C}}\left(i\gamma^\mu\partial_\mu\right)\Psi{\cal{C}}^\dagger=\left(i\gamma^\mu\partial_\mu\right){\cal{C}}\Psi{\cal{C}}^\dagger \ . $$ Using $$
{ "domain": "physics.stackexchange", "id": 100175, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, lagrangian-formalism, dirac-equation, charge-conjugation, cpt-symmetry", "url": null }
thermodynamics, temperature, kinetic-theory I'm fairly sure I'm missing something that should be obvious here... Temperature is not the average kinetic energy of a particle it is the average energy per mode.1 In very simple models (i.e. the monoatomic ideal gas) the number of modes per particle is fixed and can not vary, so that the heat capacity of these simple models is indeed fixed. And in fact, good approximations to mono-atomic, ideal gases (noble gases, other simple gases at low temperature but still low pressure) do all have nearly the same heat capacity. More complicated real systems however have more modes. Depending on the system and the temperature molecular rotational and vibration modes may be present. At still higher temperature molecular and atomic excitation modes come into play. In crystal system phonon excitations are available.
{ "domain": "physics.stackexchange", "id": 13679, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, temperature, kinetic-theory", "url": null }
c++, object-oriented, template, c++17 * * // This will result in f1 as still being a float type. * variable_t<float> f1(5.2f); * variable_t<double> d1(7.9) * variable_t<std::uint64_t> ui64(100); * f1 += d1 / ui64; * * f1 == 5.279 * ----------------------------------------// * * If the keyword auto is used as such: * auto x = d1 + f1; * then in this case x should end up being a variable_t<double> * and widening and precision will be reserved * * This type of design is intentional as I believe that it gives * the user more flexibility to have the choice to either truncate * data when the extra bits are not needed or to preserve data when * it is necessary. * * This allows the library to be versatile and prevents any user * from having to be forced to some specific conformance or policy * giving them the flexibility they need. *
{ "domain": "codereview.stackexchange", "id": 34999, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented, template, c++17", "url": null }
homework-and-exercises, electricity, electrical-resistance, everyday-life, dielectric I ~=~ \frac{220 \, \mathrm{V}}{\sim 3000 \, \Omega} ~=~70 \, \mathrm{mA} \,,$$the current flows, bulb lights, we do not die. Hence the resistance of wood is less than $2 \, \mathrm{k} \Omega \, ?$ As the mains supply is alternating current the charging and discharging of the capacitance of your body relative to free space (actually your other closer surroundings) causes a small AC current to flow and will illuminate the test indicator. You are feeling this real current because if flows into you from a single point. Also even a poor conductor like rubber and wood will still conduct a bit.
{ "domain": "physics.stackexchange", "id": 51593, "lm_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, electricity, electrical-resistance, everyday-life, dielectric", "url": null }
c++, windows, assembly // finding start of Amnesia.exe or Amnesia_NoSteam.exe memory DWORD filepathBufferSize = 0; DWORD charactersWritten = 0; size_t filepathLength = (size_t)-1; do { if (queryAddress != 0) // this check gets rid of warning C6387 { do { filepathBufferSize = filepathBuffer.size() - 1; // - 1 because writing to filepathBuffer.size() position is undefined charactersWritten = GetMappedFileName( amnesiaHandle, (LPVOID)queryAddress, &filepathBuffer[0], filepathBufferSize ); if (filepathBufferSize == charactersWritten) { if (filepathBufferSize >= 32767) // this should never happen { continue; }
{ "domain": "codereview.stackexchange", "id": 44682, "lm_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++, windows, assembly", "url": null }
classification, feature-selection, feature-extraction My question is the following: Where would tf-idf fit in here? Before normalizing/stemming? After normalizing but before tokenizing? After tokenizing? Any insight would be greatly appreciated. Edit: Upon closer inspection, I think I may have run into a misunderstanding at to how TF-IDF operates. At the above step 4 that I describe, would I have to feed the entirety of my data into TF-IDF at once? If, for example, my data is as follows: [({tokenized_content_site1}, category_string_site1), ({tokenized_content_site2}, category_string_site2), ... ({tokenized_content_siten}, category_string_siten)}]
{ "domain": "datascience.stackexchange", "id": 167, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classification, feature-selection, feature-extraction", "url": null }
c++, recursion, template, c++20, constrained-templates Level 2: Level 3: 2 2 2 Level 3: 2 2 2 Level 3: 2 2 2 Play with test_arrays: Level 0: Level 1: Level 2: Level 3: 2 2 2 Level 3: 2 2 2 Level 3: 2 2 2 Level 2: Level 3: 2 2 2 Level 3: 2 2 2 Level 3: 2 2 2 Level 2: Level 3: 2 2 2 Level 3: 2 2 2 Level 3: 2 2 2 Level 1: Level 2: Level 3: 2 2 2 Level 3: 2 2 2 Level 3: 2 2 2 Level 2: Level 3: 2 2 2 Level 3: 2 2 2 Level 3: 2 2 2 Level 2: Level 3: 2 2 2 Level 3: 2 2 2 Level 3: 2 2 2 Level 1: Level 2: Level 3: 2 2 2 Level 3: 2 2 2 Level 3: 2 2 2 Level 2: Level 3: 2 2 2 Level 3: 2 2 2 Level 3: 2 2 2 Level 2: Level 3: 2 2 2 Level 3: 2 2 2 Level 3: 2 2 2
{ "domain": "codereview.stackexchange", "id": 44926, "lm_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++, recursion, template, c++20, constrained-templates", "url": null }
quantum-computing, cellular-automata Are all quantum cellular automata invertible?
{ "domain": "cstheory.stackexchange", "id": 1154, "lm_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-computing, cellular-automata", "url": null }
quantum-field-theory, particle-physics, gauge-theory, higgs The vacuum state obtains a VeV, and the interactions with this VeV give masses to the particles. The Goldstone bosons are a complex topic and since it seems to me that you don't have the correct mathematical background i don't want to go deep into that. In short terms, massless gauge fields have 2 polaritazions. Symmetry breaking generates Goldstone bosons which make up the third polarization which massive gauge fields have but massless miss.
{ "domain": "physics.stackexchange", "id": 95718, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, particle-physics, gauge-theory, higgs", "url": null }
must be in feet. This of course is for a simple circular arc (constant radius). The arc length of the sector is pi cm and the central angle is pi/6 (30 deg). 1cm on the circumference of a circle subtends an angle of 123∘. So now I want to figure out this arc length-- so all of this. Inscribed Angle Theorem Join Paul F. A quadrant has a 90 ° central angle and is one-fourth of the Plug the measurement of the arc’s central angle into the formula. What is the length of an arc traced out by a 60° angle in the center of the circle? Answer: in this  Definitions and formulas for the arc and the arc length of a circle, sector and the area of the sector of a circle, the unit circle, the angles on the unit circle in . At those two points use a compass to draw an arc with the same radius, large enough so that the two arcs intersect at a point, as in Figure 13. 0. That is, s = is the very definition of radian measure. Area of a sector is a fractions of the area of a circle. If r is the radius of
{ "domain": "brian229.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9867771759145343, "lm_q1q2_score": 0.8244360832449217, "lm_q2_score": 0.8354835350552604, "openwebmath_perplexity": 296.86371070752983, "openwebmath_score": 0.9140522480010986, "tags": null, "url": "http://brian229.com/8vpu/arc-radius-angle-formula.php" }
special-relativity, mass, momentum If you let $\alpha(v) = \gamma(v)$ and crunch some algebra you'll see that the identity above is satisfied. As for your original point, a desire to understand why momentum has a factor $\gamma$ in it, analyzing situations like this one is helpful, but ultimately it is probably best to understand momentum as the spatial component of the energy-momentum four-vector. Since it is a four-vector, it must transform like any other four-vector, $\gamma$'s and all.
{ "domain": "physics.stackexchange", "id": 23305, "lm_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, mass, momentum", "url": null }
newtonian-mechanics, friction, non-linear-systems, complex-systems the angle of repose shows little sensitivity to gravity. Ji and Shen's (2007) Contrasting Terrestrial and Lunar Gravity: Angle of Repose and Incline Flows The results show little sensitivity of the angle of repose to gravity. Nakashima et al. (2007) Numerical Analysis of Sand Flow under Low Gravity Conditions the effect of gravity condition on the angle of repose of sand was small Cherkasov et at. (1970) Influence of gravity on the mechanical properties of soils the gravity force does not influence the angle of repose of granular materials.
{ "domain": "physics.stackexchange", "id": 45487, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, friction, non-linear-systems, complex-systems", "url": null }
complexity-classes, np Title: Hamiltonian cycle vs co-NP I am trying to understand co-NP and its implications properly. The French Wikipedia page describing co-NP provides the "complementary" version of the Hamiltonian cycle in co-NP as follows: Considering a graph G, is it true that it does not have an Hamiltonian cycle? Is this correct? If so, then how is this complementary version a different class of complexity than the original Hamiltonian cycle problem? The decision question is the same. To put it differently, what is the difference between NP and co-NP here? Otherwise, if this complementary version is false, what would be the correct version (if any exists)? Update To put it simply, returning an opposite answer for one input does not cover for all possible inputs.
{ "domain": "cstheory.stackexchange", "id": 4545, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-classes, np", "url": null }
“natural” about it: it’s defined as the inverse of ex, a strange enough exponent already. Unit 6 Exponential Functions and Their Applications 247 Lesson 19 Applications of Exponential Growth and Decay. Worksheets are Exponent rules practice, 4 1 exponential functions and their graphs, Lesson reteach exponential functions growth and decay, Transformations of exponential functions work, Exponential functions date period, Lesson practice b 12 2 exponential functions, Graphing exponential. Exponential growth and decay by a factor. Section 12. of Inequality for Exponential Functions 2x - 2 =. 4 x- 1 = 2 + 5 Original equation (22)x - 1 x= 2 + 5 Rewrite 4 as 22. Horizontal axis. how you can use a graph to determine the answer. LESSON Reteach 11-3 Exponential Growth and Decay Date Class In the exponential growth and decay formulas, y = final amount, a = original amount, r = rate of growth or decay, and t = time. Unit 6 – Exponents, Exponents, Exponents and More Exponents This unit begins with
{ "domain": "residencemaiori.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9914225143328517, "lm_q1q2_score": 0.8386863801025874, "lm_q2_score": 0.8459424392504911, "openwebmath_perplexity": 826.3457215131704, "openwebmath_score": 0.48758867383003235, "tags": null, "url": "http://tckz.residencemaiori.it/lesson-41-practice-b-graph-exponential-growth-functions-answers.html" }
java, udp /** * Stops the server. The method waits (up to 60 seconds) * until all tasks have completed execution unless interrupted. */ public void terminate() { if (!this.running) { return; } this.running = false; try { this.executor.awaitTermination(60, TimeUnit.SECONDS); this.executor.shutdownNow(); } catch (final InterruptedException e) { this.executor.shutdownNow(); // or Thread.currentThread().interrupt(); } } /* * Transmitter to use by handler to send response to request * originator. It encapsulates socket, so handler may only send data. */ private static final class Responder implements DatagramResponder { private final DatagramSocket socket; public Responder(final DatagramSocket socket) { this.socket = socket; }
{ "domain": "codereview.stackexchange", "id": 35881, "lm_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, udp", "url": null }
waves, cosmology, acoustics, bao BAOs occur across a very large range of scales, all of which are by human standards "big". The most important scale is that corresponding to a wave which had time to complete $\frac{1}{4}$ of a cycle by the time of "recombination", which is $\sim 150\,{\rm Mpc}$ ($\sim 490\,{\rm Mly}$) in today's Universe. This scale is "visible" and a distance at which galaxies are more likely to be separated than other distances.
{ "domain": "physics.stackexchange", "id": 44949, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "waves, cosmology, acoustics, bao", "url": null }
classical-mechanics, dimensional-analysis Title: Dimensional analysis vibration frequency of a star I'm doing a classical mechanics course of the MIT on my own. In a problem set there is the following problem to be solved using dimensional analysis: "Derive an expression for the vibration frequency of a star of mass M and radius R, if that vibration is caused by gravitational instabilities. " My problem is that I really don't know with what to start and how to proceed, my page is white. Can you please help me? $$f\approx G^aM^bR^c$$ $$\text{s}^{-1}=[\text{kg}^{-1}\text{m}^3\text{s}^{-2}]^a [\text{kg}]^b [\text{m}]^c=\text{kg}^{b-a}\text{m}^{3a+c}\text{s}^{-2a}$$ So $$a=1/2, b=1/2, c=-3/2$$ $$f\approx \sqrt{\frac{GM}{R^3}}$$
{ "domain": "physics.stackexchange", "id": 40635, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, dimensional-analysis", "url": null }
c, file-system, tail-recursion if ( (off_t)-1 == lseek(fd, current->offset, SEEK_SET) ) { fatal_system_error("Error seeking to offset"); } assert(current->size <= TAR_BLOCKSIZE); const ssize_t read_result = read(fd, buffer, current->size); if (read_result < 0) { fatal_system_error("Error reading from file descriptor in tar_entry"); } if (read_result == 0) { printf("EOF\n"); return; } printf("File: %s\n", current->header.filename); printf("Content:\n%s\n\n", buffer); return tar_print_helper(fd, current->next, buffer); } void tar_print2(const tar* const archive) { char buffer[TAR_BLOCKSIZE]; lseek(archive->fd, 0, SEEK_SET); return tar_print_helper(archive->fd, archive->files, buffer); }
{ "domain": "codereview.stackexchange", "id": 44533, "lm_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, file-system, tail-recursion", "url": null }
c#, .net-core The two views named MainView and SettingView The main goal in this code review request, however, is the implementation of interfaces and classes. My focus is on IMessage Message. Here I tried to apply knowledge from courses on the SOLID principles. This pattern is new to me. I might be overkilling. And the chosen features may be very simple or sometimes just different in text output (check for view and app). However, it should be sufficient to understand these principles. Diagram Code IMainView.cs using BasicCodingConsole.ConsoleDisplays; using BasicCodingConsole.ConsoleMenus; using BasicCodingConsole.ConsoleMessages; namespace BasicCodingConsole.Views.MainView; public interface IMainView { IMenu Menu { get; } IMessage Message { get; } IDisplay Display { get; } void Run(); }
{ "domain": "codereview.stackexchange", "id": 44882, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, .net-core", "url": null }
ros, begginer-tutorials Title: Creating a ROS msg and srv tutorial problems Hey guys, I've been stuck on this problem for the last two days and would really appreciate some help. I'm following the ROS tutorial on msgs ans srv and every time I get to the catkin_make install part I get the following error. CMake Error at /opt/ros/indigo/share/genmsg/cmake/genmsg-extras.cmake:151 (message): add_service_files() directory not found: /home/user_name/catkin_ws/src/beginner_tutorials/src/srv Call Stack (most recent call first): beginner_tutorials/src/CMakeLists.txt:9 (add_service_files) One forum I looked into stated that I can just comment out add_service_files() from the CMakeLists.txt. However, when I do that I get the following error /home/user_name/catkin_ws/src/beginner_tutorials/src/add_two_ints_server.cpp:2:83: fatal error: beginner_tutorials/AddTwoInts.h: No such file or directory #include "beginner_tutorials/AddTwoInts.h" //header file generated in the SRV file
{ "domain": "robotics.stackexchange", "id": 25039, "lm_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, begginer-tutorials", "url": null }
quantum-mechanics, operators But my problem is that to show the above identity, one must deal with things like $e^{A+B}$, which isn't necessarily $e^Ae^B$. Does the non-commutative part of $e^{A+B}$ (the part that makes it differ from $e^Ae^B$) get killed by the time-ordering? It's not generically true that $T(A)T(B)=T(AB)$ for any operators $A$ and $B$. However, it IS true if the operators in $A$ all occur at later times than the operators in $B$. This is trivially true, because then $T(A)T(B)$ is already time-ordered in total (if you expand $A$ and $B$ into power series and multiply them term-by-term, each term will be time-ordered). In your case, $U_{32}$ only involves the operator $V(t')$ for times $t_2<t'<t_3$, while $U_{21}$ involves the operator $V(t')$ for times $t'<t_2$, so the product $U_{32}U_{21}$ is thus time ordered, and equal to $U_{31}$
{ "domain": "physics.stackexchange", "id": 48362, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, operators", "url": null }
civil-engineering, reinforced-concrete, engineering-history And this link (the paper is free to download) has a little more info. And this forum post too: In the UK, GK-60 used to stand for Guest Keen & Nettlefolds (South Wales Limited) bars manufactured from grade 60 steel with the minimum guaranteed yield stress of 60,000psi (described also by the manufacturer as Hot Rolled High Yield Deformed bars). The tensile strength is at least 15% above the measured yield load. The guaranteed minimum elongation is 12%. It is also claimed by the manufacturer that it has enhanced (by 40%) bond stresses. For the designs according to the CP114 (UK permissible stresses based code) the anchorage lengths should be between 40 and 50 diameters, depending on the bar diameters, stresses in the bars and the concrete mixture. Above is based on the GK&N (South Wales) Ltd. brochure from 1965. Hope this helps. Google "GK60 bar", there are lots of details, especially in the books section of the searches.
{ "domain": "engineering.stackexchange", "id": 3349, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "civil-engineering, reinforced-concrete, engineering-history", "url": null }
quantum-algorithms, quantum-gate, quantum-state, teleportation Here the double-lines represent classical ‘trits’ being sent from Alice to Bob. Depending on the value of 0, 1 or 2 Bob can apply a ? gate 0, 1, or 2 times. Prove that $|\psi〉=|\psi_\text{out}\rangle$ for appropriately chosen ? gates for all possible measurement results. Hint: You could explicitly work out all 9 possible cases, but you could also save time by noticing a general pattern that lets you handle all the cases in a unified way.
{ "domain": "quantumcomputing.stackexchange", "id": 384, "lm_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-algorithms, quantum-gate, quantum-state, teleportation", "url": null }
python, strings, python-2.x, formatting, iteration into: for file_extension in FILE_EXTENSIONS: if file.lower().endswith(FILE_EXTENSIONS): and break out of the for after handling the first successful hit, but since I'm not sure I'll ever do that the current, simple version will suffice. All PDFs should be in the following format: String_String_4digits.pdf An example book would look like this: SomeLongBookTitle_AuthorName1&AuthorName2_2017.pdf
{ "domain": "codereview.stackexchange", "id": 28509, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, strings, python-2.x, formatting, iteration", "url": null }
javascript, ecmascript-6, html5, timer, vue.js Is there a best practices way to [dispatch the getter via an interval]? You could consider using requestAnimationFrame() (read more about using that with setInterval() in articles like this one) but that might be overkill since you are just updating a list. Another option to consider is using websockets (presuming your server-side would support it). That way the client-side could be notified of updates to the list instead of having to request them periodically. Bug in the sample code The sample code shows these methods: created() { this.fetchFriendList() setInterval(this.fetchFriendList, 3000) }, destroy() { clearInterval(this.fetchFriendList) }, However, clearInterval() takes an intervalID as a parameter, not a function reference. Parameters intervalID The identifier of the repeated action you want to cancel. This ID was returned by the corresponding call to setInterval().1
{ "domain": "codereview.stackexchange", "id": 32552, "lm_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, ecmascript-6, html5, timer, vue.js", "url": null }
from the recursion, still a step at a time. Here, we loop n times, and in the worst-case, we make n calls to add. I would like to have a function say called Conversion that takes two arguments M and N and returns representation of the number M in base N. The function might look like this. This algorithm is called as Fast Fourier Transform i.e. Heap: In such types, we construct a heap to find out the max or min value of the sequence.This used the data structure of trees to achieve its output. = ) A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). at three points. l We can improve on this algorithm slightly by reducing the time it takes to achieve the y-coordinate sorting in Step 4. There are entire books on the various algorithms for dealing with such numbers, such as: GMP, the GNU Multiple Precision Arithmetic Library,
{ "domain": "hizb-ut-tahrir.info", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692305124306, "lm_q1q2_score": 0.8007645977871246, "lm_q2_score": 0.819893340314393, "openwebmath_perplexity": 764.5328154854017, "openwebmath_score": 0.5805479884147644, "tags": null, "url": "https://dev.hizb-ut-tahrir.info/2nngftun/archive.php?page=dit-algorithm-divides-the-sequence-into-4da7e5" }
# What kind of function are cubic splines not good at approximating? When we are given a dataset of a function sampled in many points, and we want to find approximation of the unknown function in-between these points, one of the go-to methods for practitioners is fitting a Cubic Spline. I am using such a method to approximate derivatives at intermediate points. My QUESTION is, for what kind of functions a cubic splines may not a be a good choice for approximating? Since a cubic spline can contain multiple cubic segments, it is capable of approximating almost any function as close as possible (if the number of cubic segments in the spline is not limited). If your approximation method is to sample points along the function and create a cubic spline interpolating these sampled points, then the approximation accuracy is highly related to the number of sampled points and how the points are distributed.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692332287863, "lm_q1q2_score": 0.8074239656764925, "lm_q2_score": 0.8267117855317474, "openwebmath_perplexity": 260.02561496614425, "openwebmath_score": 0.7055420875549316, "tags": null, "url": "https://math.stackexchange.com/questions/2710326/what-kind-of-function-are-cubic-splines-not-good-at-approximating" }
endocrinology Title: Can a hormone be absorbed into the body digestively? Obviously, to act most hormones must be present in the bloodstream. What happens if a hormone or hormone-containing food is consumed normally? Is there any way for the hormone to reach the bloodstream?
{ "domain": "biology.stackexchange", "id": 5008, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "endocrinology", "url": null }
python, optimization, algorithm, binary-search The function works on a pre-sorted list (a requirement of a binary search) and maintains the list in sorted order. For example inserting [0..10) (aka [0,1,2,...,8,9]) into [-1, 0, 1, 4, 5, 6, 7, 8, 9, 10] yields [-1, 0, 0, 1, 1, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10] You may have noticed that the return statement (the last one) for binary_search is very messy, and not very intuitive. Would like to be able to incorporate that logic into the while loop somehow, or at least simplify it. Does anyone have an idea of how I could do this? (Side question: how do I benchmark this?) EDIT: This is the mid_point function. def mid_point(x, y): return (x+y)/2 If you want to go deep into the implementation of binary search and insertion, my advice is to take a look at the bisect module in the standard library: def insort_left(a, x, lo=0, hi=None): """Insert item x in list a, and keep it sorted assuming a is sorted. If x is already in a, insert it to the left of the leftmost x.
{ "domain": "codereview.stackexchange", "id": 8523, "lm_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, optimization, algorithm, binary-search", "url": null }
c++, performance, strings, integer, number-systems This is an interesting way to convert characters into digits. vector<long> nibbles; for ( long i = 0; i < length; i++ ) { nibbles.push_back(digits.find(number[i])); } But: 1) You don't check for invalid input as a result you may push back std::string::npos (a big number that is converted is probably converted to -1 when assigned to long). 2) This is O(n) for every digit. it can be done in O(1). The standard guarantees that the character-set has all the numbers 0 -> 9 in a contiguous range. So you can convert a character (that is a digit) into a number by subtracting the value of 0 from the character. char d = number[i]; nibbles.push_back((d >= '0' && d <= '9) ? d - '0' : (d >= 'a' && d <= 'f') ? d - 'a' + 10 : (d >= 'A' && d <= 'F') ? d - 'A' + 10 : -1;
{ "domain": "codereview.stackexchange", "id": 17367, "lm_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, strings, integer, number-systems", "url": null }
Let $$A$$ be an $$n\times n$$ matrix, and suppose that there exists an $$n\times n$$ matrix $$B$$ such that $$AB=I_n$$ or $$BA=I_n$$. Then $$A$$ is invertible and $$B = A^{-1}$$. Proof Suppose that $$AB = I_n$$. We claim that $$T(x)=Ax$$ is onto. Indeed, for any $$b$$ in $$\mathbb{R}^n \text{,}$$ we have $b = I_nb = (AB)b = A(Bb), \nonumber$ so $$T(Bb) = b\text{,}$$ and hence $$b$$ is in the range of $$T$$. Therefore, $$A$$ is invertible by the Theorem $$\PageIndex{1}$$. Since $$A$$ is invertible, we have $A^{-1} = A^{-1} I_n = A^{-1} (AB) = (A^{-1} A)B = I_n B = B, \nonumber$ so $$B = A^{-1}.$$ Now suppose that $$BA = I_n$$. We claim that $$T(x) = Ax$$ is one-to-one. Indeed, suppose that $$T(x) = T(y)$$. Then $$Ax = Ay\text{,}$$ so $$BAx = BAy$$. But $$BA = I_n\text{,}$$ so $$I_nx = I_ny\text{,}$$ and hence $$x=y$$. Therefore, $$A$$ is invertible by the Theorem $$\PageIndex{1}$$. One shows that $$B = A^{-1}$$ as above.
{ "domain": "libretexts.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.989671846566823, "lm_q1q2_score": 0.8068126475609761, "lm_q2_score": 0.8152324938410783, "openwebmath_perplexity": 110.64043954233087, "openwebmath_score": 0.9362514615058899, "tags": null, "url": "https://math.libretexts.org/Bookshelves/Linear_Algebra/Interactive_Linear_Algebra_(Margalit_and_Rabinoff)/03%3A_Linear_Transformations_and_Matrix_Algebra/3.06%3A_The_Invertible_Matrix_Theorem" }
parameter-estimation, gaussian It seems that when $X_1$ has different observations and $X_2$ is unobserved, the variance of $X_2$ remains unchanged.So how to update the $\sigma_{x_2}$? Initial setting for the model $$X_1\sim N(5,7)\quad,\quad X_2\sim N(0.5X_1,8)$$ Data: $$X_1:\operatorname{9\,\,4\,\,NA}$$ $$\quad X_2:\operatorname{NA\,\,NA\,\,3}$$ When $X_1$ is unobserved, at iteration $k=1$ of EM, the posterior mean value (when $X_2=3$) is $5.18$ by using an inference algorithm, i.e. Junction tree/kalman filter. Then the sufficient statistics for $X_1$ is: $s_1=\Sigma_{i=1}^nx_{i1}=9+4+5.18$ and $s_{11}=\Sigma_{i=1}^nx_{i1}^2=9^2+4^2+(5.18^2+\sigma_{11.2})$ where $\sigma_{11.2}$ is the posterior conditional variance of $X_1$ given $X_2$, when $X_1$ is unobserved. $s_2=\Sigma_{i=1}^nx_{i2}$ and $s_{22}=\Sigma_{i=1}^nx_{i2}^2$. When $X_2$ is unobserved a term $\sigma_{22.1}$ is also added to $x_{i2}^2$.
{ "domain": "datascience.stackexchange", "id": 993, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "parameter-estimation, gaussian", "url": null }
information-retrieval, terminology, confusion-matrix http://www.theverge.com/2016/5/2/11564464/call-of-duty-infinite-warfare-release-date-first-trailer https://www.theguardian.com/technology/2016/may/03/call-of-duty-infinite-warfare http://www.asianage.com/editorial/beyond-call-duty-943 http://europe.newsweek.com/chinas-military-attempts-attract-millennials-call-duty-inspired-recruitment-455425?rm=eu http://www.breitbart.com/video/2016/05/16/call-duty-black-ops-iii-eclipse-multiplayer-trailer/ http://www.journalgazette.net/news/local/courts/County-residents-getting-bogus-jury-duty-calls-13146090 http://www.straitstimes.com/singapore/health/healthcare-workers-who-went-beyond-call-of-duty Now you don't know what the absolute number of correct articles are for the call of duty franchise: but you do know the number in the dataset your IR system has produced. Above represents a precision of 42.85% and a relative recall of 100%. A cut list of
{ "domain": "datascience.stackexchange", "id": 846, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "information-retrieval, terminology, confusion-matrix", "url": null }
quantum-mechanics, density-operator, observables, quantum-measurements, trace \sum_{jk} \sum_{m} P_{nm} \langle j|n\rangle \langle n | j\rangle \langle k|m\rangle \langle m | k \rangle \\&= \sum_{m} \sum_{jk} P_{nm} \delta_{jn}\delta_{mk} \\&= \sum_{m} P_{nm}\,. \end{align*} Since this is the trace of the density matrix arrived at after applying the measurement operator, dividing by this quantity makes the resulting density matrix have trace 1, and hence the total probability is 1.
{ "domain": "physics.stackexchange", "id": 84495, "lm_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, density-operator, observables, quantum-measurements, trace", "url": null }
A better strategy would’ve been to go through the possible answers and eliminate those that can’t be a null space basis. First, it’s clear from inspection that $$A$$’s nullity is 2, so if any of the possible answers don’t consist of two vectors, you can throw those out. Next, the vectors in a basis must be linearly independent, which is trivial to check for a pair of vectors. Discard any of the remaining answers that are linearly dependent. For the remaining viable candidates, multiply each of the vectors by $$A$$ and check that you get zero for each one. Whatever’s left must be a basis for $$N(A)$$. In this case, the two vectors in the given answer are obviously linearly independent, and their products with $$A$$ are both zero, so they are indeed a basis for $$N(A)$$ (as is the set you found).
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9674102580527664, "lm_q1q2_score": 0.8597943751844181, "lm_q2_score": 0.8887587949656841, "openwebmath_perplexity": 136.4193249475704, "openwebmath_score": 0.8654195666313171, "tags": null, "url": "https://math.stackexchange.com/questions/3067607/basis-for-nullspace-of-matrix-nulla" }
homework-and-exercises, special-relativity, velocity, classical-electrodynamics, lorentz-symmetry So for the 2-velocity \begin{equation} \boldsymbol{\eta'}= \begin{bmatrix} \eta'_{1}\vphantom{\dfrac12}\\ \eta'_{0}\vphantom{\dfrac12} \end{bmatrix} =\gamma_{u'} \begin{bmatrix} u'\vphantom{\dfrac12}\\ c\vphantom{\dfrac12} \end{bmatrix} \ne \underbrace{ \gamma_{u'} \begin{bmatrix} c\vphantom{\dfrac12}\\ u'\vphantom{\dfrac12} \end{bmatrix} = \begin{bmatrix} \eta'_{0}\vphantom{\dfrac12}\\ \eta'_{1}\vphantom{\dfrac12} \end{bmatrix}}_{\textbf{yours in}\:\boldsymbol{\S(a)} } \tag{06} \end{equation} EDIT B : Difficult to prove but you must try. If you succeed to prove them I suggest to post them as an answer to your own question herein : \begin{equation} \dfrac{\gamma_{u'}}{\gamma_{u}}=\gamma_{\upsilon}\left(1-\dfrac{\upsilon\, u}{c^{2}}\right) \tag{07} \end{equation} or for the inverse transformation \begin{equation} \dfrac{\gamma_{u}}{\gamma_{u'}}=\gamma_{\upsilon}\left(1+\dfrac{\upsilon\, u'}{c^{2}}\right) \tag{08} \end{equation} EDIT C :
{ "domain": "physics.stackexchange", "id": 45735, "lm_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, velocity, classical-electrodynamics, lorentz-symmetry", "url": null }
quantum-mechanics, classical-mechanics, symmetry, group-theory, lie-algebra My question is why is there a necessity for central extensions in the first case, but not later ?? PS: This answer is somewhat related to the question, but am not able to get to the bottom of this thing. There are 3 actions of the Galilean group on the free particle: On the configuration space, on the phase space and on the quantum state space (wave functions). The Galilean Lie algebra is faithfully realized on the configuration space by means of vector fields, but its lifted action on Poisson algebra of functions on the phase apace and on the wave functions (by means of differential operators) is the central extension of the Galilean algebra, known as the Bargmann algebra in which the commutator of boosts and momenta is proportional to the mass. The reasoning is given in the following arguments 1) The action on the configuration space: $Q = \{x^1, x^2, x^3, t\}$: Here the translations and the boost operators act as vector fields and their commutator is zero:
{ "domain": "physics.stackexchange", "id": 12630, "lm_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, classical-mechanics, symmetry, group-theory, lie-algebra", "url": null }
A clever application of the pigeonhole principle shows the existence of an increasing or a decreasing subsequence of a certain length in a sequence of distinct integers. Some definitions will be reviewed before this application is presented. Suppose that $a_{1}, a_{2}, a_{3}, \ldots, a_{n}$ is a sequence of real numbers. A subsequence of this sequence is a sequence of the form $a_{1_{1}}, a_{i_{2}}, \ldots, a_{i_{n}}$, where $1 \leq i_{1} < i_{2} < ldots < i_{n} \leq N$. Hence, a subsequence is a sequence obtained from the original sequence by including some of the original sequence in their original order, and perhaps, not including other terms. A sequence is called strictly increasing if each term is larger than the one that precedes it, and it is called strictly decreasing if each term is smaller than the one that precedes it. Theorem: Every sequence of $n^{2}+1$ distinct real numbers contains a subsequence of length $n+1$ that is either strictly increasing or strictly decreasing.
{ "domain": "madhavamathcompetition.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.99418003903623, "lm_q1q2_score": 0.8128162224477012, "lm_q2_score": 0.8175744739711883, "openwebmath_perplexity": 157.2887721696616, "openwebmath_score": 0.8127411007881165, "tags": null, "url": "https://madhavamathcompetition.com/2017/01/26/some-elegant-applications-of-the-pigeonhole-principle/" }
homework-and-exercises, angular-momentum, hamiltonian-formalism, phase-space, poisson-brackets The error in OP stems from miscalculating the angular momentum vector. When motion is restricted to a plane perpendicular to one of the Cartesian coordinate axes (say $z$), the angular momentum vector has a non-zero component only in the direction perpendicular to the plane ($z$). Its magnitude is $L_z = m r^2 \dot{\theta}$. When we move to 3d space, though, it is incorrect to calculate each component of $ L $ individually, as if motion were restricted to one plane "at a time". Instead, you have to do the general calculation: $$ \begin{align*} \vec{r} &=(r \sin (\theta ) \cos (\varphi ),r \sin (\theta ) \sin (\varphi ),r \cos (\theta ) )\\ \dot{\vec{r}} &= ( -r \dot{\varphi } \sin (\theta ) \sin (\varphi )+\dot{\theta } r \cos (\theta ) \cos (\varphi )+\dot{r} \sin (\theta ) \cos (\varphi ), \\\quad&\dot{r} \sin (\theta ) \sin (\varphi )+r \dot{\varphi } \sin (\theta ) \cos (\varphi )+\dot{\theta } r \cos (\theta ) \sin (\varphi ),
{ "domain": "physics.stackexchange", "id": 49232, "lm_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, hamiltonian-formalism, phase-space, poisson-brackets", "url": null }
c++, performance, c++17 [ RUN ] CodewarsBacktracking.sky6_partial [ OK ] CodewarsBacktracking.sky6_partial (0 ms) [ RUN ] CodewarsBacktracking.sky6_partial_2 [ OK ] CodewarsBacktracking.sky6_partial_2 (1 ms) [ RUN ] CodewarsBacktracking.sky7_easy_partial [ OK ] CodewarsBacktracking.sky7_easy_partial (0 ms) [ RUN ] CodewarsBacktracking.sky7_easy_partial_2 [ OK ] CodewarsBacktracking.sky7_easy_partial_2 (0 ms) [ RUN ] CodewarsBacktracking.sky7_medium_partial [ OK ] CodewarsBacktracking.sky7_medium_partial (1 ms) [ RUN ] CodewarsBacktracking.sky7_hard_partial [ OK ] CodewarsBacktracking.sky7_hard_partial (42 ms) [ RUN ] CodewarsBacktracking.sky8_easy_partial [ OK ] CodewarsBacktracking.sky8_easy_partial (1 ms) [ RUN ] CodewarsBacktracking.sky8_medium_partial [ OK ] CodewarsBacktracking.sky8_medium_partial (1 ms) [ RUN ] CodewarsBacktracking.sky8_hard_partial [ OK ] CodewarsBacktracking.sky8_hard_partial (1390 ms)
{ "domain": "codereview.stackexchange", "id": 40845, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, performance, c++17", "url": null }
c#, entity-framework, asp.net-mvc, authorization, asp.net-identity } else { result = _user.AccessPermissions.Where(x => x.Controller.Equals(controller) && x.ActionMethod.Equals(action)).Select(x => x.HasAccess).FirstOrDefault(); } if (result) { return true; } return false; //return base.AuthorizeCore(httpContext); } protected override void HandleUnauthorizedRequest(AuthorizationContext filterContext) { filterContext.Result = new HttpUnauthorizedResult(); } } But this approach is too hard for page management and the admin should give user access permission for each ActionMethod. Is there any better way to do this? Yes. You are close, man! You have to make relashionships between pairs of controller+action to some user actions. For example: Security Staff can only view Personal Info: - View Personal Then your HHRR Manager can: - View Personal - Add Personal - Edit Personal And finally HHRR Director he can do more actions like:
{ "domain": "codereview.stackexchange", "id": 33788, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, entity-framework, asp.net-mvc, authorization, asp.net-identity", "url": null }
evolution, natural-selection, theoretical-biology, evolutionary-game-theory, sociality If you put restrictions on what kind of features of the population, interaction, and environment structure $r$, $c$, and $b$ are allowed to incorporate then this will result in biological theories which will be mathematically true under only some of the assumptions you list. The subset of required assumptions will depend on what specific restrictions you place on $r$, $b$, and $c$. There are no standard assumptions accepted on these parameters, so (unsurprisingly) I can't answer your question further without more specification on your part.
{ "domain": "biology.stackexchange", "id": 1888, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "evolution, natural-selection, theoretical-biology, evolutionary-game-theory, sociality", "url": null }
java, beginner, android, timer, scheduled-tasks if (!task.equals("")){ mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Intent intent1 = new Intent(this.getApplicationContext(),MainActivity.class); mBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.mipmap.ic_launcher) .setContentTitle("Current task") .setContentText("Hey! Have you " + task + "?");
{ "domain": "codereview.stackexchange", "id": 15673, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, android, timer, scheduled-tasks", "url": null }
data-structures, union-find Title: Union-Find with link-by-rank to represent a binary field with simple operations I have a field $X$ of given length $n$ which is filled with zeroes in the beginning. I only need these 3 simple operations: GET_VALUE$(i)$: returns the value of $i$-th cell ($X[i]$) SET_TO_1$(i)$:basically $X[i] \leftarrow 1$ for $i < n - 1$, otherwise nothing (the last cell of $X$ is always zero ($X[n-1] = 0$)) FIND$(i)$: find the least index $j \geq i$ s.t. $X[j] = 0$ (note that this operation will always succeed since the last cell is always zero) I need the time complexity of operation GET_VALUE to be constant. And both SET_TO_1 and FIND to be in $O(\log n)$. My thinking so far: I am almost sure the perfect data structure for this would be Union-Find, because sets elegantly represent all such $i$ that for which FIND returns the same value. The root of the sets would be the index that is returned by the FIND operation - the only index $i$ in the set s.t. $X[i] = 0$.
{ "domain": "cs.stackexchange", "id": 11000, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "data-structures, union-find", "url": null }
string-theory, supersymmetry Title: What interaction does a Fayet-Iliopoulos coupling parameterize the strength of? Couplings give the strength of interactions. They appear in a Lagrangian as a coefficient to the two (or more) interacting fields. Unfortunately, I'm struggling to find a source that describes what it is that the Fayet-Iliopoulos coupling actually couples. As far as I know, it is simply the coefficient (given by the greek letter 'xi') in the Fayet-Iliopoulos D-term. The D-term is just one of the terms that appears in the expansion of a superfield and doesn't describe an interaction. My apologies if the answer is obvious. Let's focus on global supersymmetry; Fayet-Iliopoulos terms in supergravity are a lot more subtle. You are right that 'the $D$-term' is just a particular piece in the expansion of a superfield. When people talk about a "Fayet-Iliopoulos $D$-term", it refers to adding some multiple of the $D$-term of a $U(1)$ gauge field to the Lagrangian: $$ \mathcal{L}_{\mathrm{FI}} = \xi\, D ~,
{ "domain": "physics.stackexchange", "id": 5369, "lm_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, supersymmetry", "url": null }
electric-circuits, measurements, electrical-resistance, instrument Title: Where are the negligible and infinite resistances, respectively, of the ideal am- and voltmeter? Consider the picture below. An ammeter is shown to the left, a voltmeter to the right. They consist of a d'Arsonval galvanometer, which is a coil (with a pointer attached) that can rotate in a magnetic field but is held back by a small spring. When current runs through the coild, it will be deflected proportionally to that current. The extra resistance $R_{sh}$ or $R_s$ is added to extend the range to be measured to larger values; that is, to extend the scale.
{ "domain": "physics.stackexchange", "id": 18790, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electric-circuits, measurements, electrical-resistance, instrument", "url": null }