text
stringlengths
1
1.11k
source
dict
ros Title: Set planner for cartesian path Hey, I was wondering if setPlannerId http://docs.ros.org/en/jade/api/moveit_ros_planning_interface/html/classmoveit_1_1planning__interface_1_1MoveGroup.html#a2516b6bd223faf5ce4031d766a51cb3d affects computeCartesianPath, http://docs.ros.org/en/jade/api/moveit_ros_planning_interface/html/classmoveit_1_1planning__interface_1_1MoveGroup.html#ad6b02d15000d5b17c89b15a0f744b47c or does it only affect plan http://docs.ros.org/en/jade/api/moveit_ros_planning_interface/html/classmoveit_1_1planning__interface_1_1MoveGroup.html#ac833bc31e734f7809f8409951586143f Originally posted by anonymous135496 on ROS Answers with karma: 1 on 2023-01-27 Post score: 0 It affects only plan(). Somewhere in your moveit config is a file usually named ompl_planning.yaml. setPlannerId() is choosing one of the ompl planner configurations defined in that file.
{ "domain": "robotics.stackexchange", "id": 38248, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
java, beginner, object-oriented Title: Triangle classifier in Java I just started learning Java and am having difficulty with understanding classes. One of my most recent assignments was to create a class called Triangle that would - given user input from the main method - take in the input to test if the hypothetical "triangle" is equilateral, isosceles, or scalene and then return that to main. I was able to get the program to work. However, I did not follow the assignment's implementation guidelines, which specified having two additional methods that calculated largest and smallest side-length. I am wondering, after the fact, if anyone can look at what I did and let me know if they can see and or explain - in beginner terms - why having those two methods would be needed if it works without them (i.e. is my program somehow at a disadvantage by nature of NOT having them) and if so, what was I doing wrong that kept throwing errors when I tried to implement those methods?
{ "domain": "codereview.stackexchange", "id": 27432, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, object-oriented", "url": null }
gazebo, odometry, rviz, ubuntu, base-link </geometry> <material name=""> <color rgba="0.75294 0.75294 0.75294 1" /> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <mesh filename="package://jmbot_description/meshes/Castor_F.STL" /> </geometry> </collision> </link> <joint name="Castor_F" type="continuous"> <origin xyz="-0.31952 0.39256 -0.57008" rpy="-1.5708 1.1481 -1.3614E-16" /> <parent link="Base_plate" /> <child link="Castor_F" /> <axis xyz="0 0 1" /> </joint> <link name="Castor_R"> <inertial> <origin xyz="-1.1102E-16 0 0.031164" rpy="0 0 0" /> <mass value="0.056555" /> <inertia ixx="2.4476E-05" ixy="0" ixz="-3.9352E-20" iyy="2.4476E-05" iyz="-1.951E-20" izz="7.4341E-06" /> </inertial> <visual> <origin
{ "domain": "robotics.stackexchange", "id": 23372, "lm_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, odometry, rviz, ubuntu, base-link", "url": null }
ros, gentoo, build-from-source, std-msgs -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using CATKIN_DEVEL_PREFIX: /home/allenh1/catkin_ws/devel_isolated/std_msgs -- Using CMAKE_PREFIX_PATH: /opt/ros/jade -- This workspace overlays: /opt/ros/jade -- Found PythonInterp: /usr/bin/python (found version "3.3.6") -- Using PYTHON_EXECUTABLE: /usr/bin/python -- Using default Python package layout -- Found PY_em: /usr/lib64/python3.3/site-packages/em.py -- Using empy: /usr/lib64/python3.3/site-packages/em.py -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/allenh1/catkin_ws/build_isolated/std_msgs/test_results -- Found gtest: gtests will be built -- Using Python nosetests: /usr/bin/nosetests-3.3 -- catkin 0.6.14 -- Using these message generators: gencpp;geneus;genlisp;genpy -- std_msgs: 32 messages, 0 services -- Configuring done -- Generating done
{ "domain": "robotics.stackexchange", "id": 22128, "lm_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, gentoo, build-from-source, std-msgs", "url": null }
ros, node, publisher Title: Can a single node act as publisher and subscriber alternativelye I want to write two nodes such that each node sends a message alternatively in recurrent cycle and the message contains one string message and two age variables. For example, Node 1 sends a message to Node 2 (Node 1 Publisher, Node 2 Subscriber, node 1 age ++), then after receiving the message Node 2 sends the message back to Node 1 (Node 2 Publisher, Node 1 Subscriber, node 2 age ++) and this cycle continues. I am new to ROS, please help me to design this code in python or c++. #!/usr/bin/env python import rospy from beginner_tutorials.msg import Num def talker(): pub = rospy.Publisher('custom_Chat', Num,queue_size=1 ) rospy.init_node('custom_Node1', anonymous=True) msg = Num() msg.message = "Message sent to Node2" msg.age1 =0 msg.age2=0 msg.flag=1 if msg.flag==1: msg.age2+=1 print ("Hello! this is node 1!!") rospy.loginfo(msg) pub.publish(msg)
{ "domain": "robotics.stackexchange", "id": 26328, "lm_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, node, publisher", "url": null }
the risk preferences of farmers. An exponential function is a Mathematical function in form f (x) = a x , where "x" is a variable and "a" is a constant which is called the base of the function and it should be greater than 0. Young mathematicians can work through each of the eight worksheets by evaluating functions, applying logarithms, completing logarithmic functions, and building inverse functions. Concept Summary Exponential Function Family You can apply the four types of transformations—stretches, compressions, reflections, and translations—to exponential functions. An exponential function is defined for every real number x. If you're behind a web filter, please make sure that the domains *. A half-exponential function is one which when composed with itself gives an exponential function. In fact, we offer an entire algebra 2 curriculum: fourteen units covering all topics equations, to conic sections, and even trig. The inverse of the exponential function y = a x is x = a y.
{ "domain": "umood.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.981735720045014, "lm_q1q2_score": 0.8511999843866641, "lm_q2_score": 0.8670357683915538, "openwebmath_perplexity": 944.1857117142524, "openwebmath_score": 0.4596410393714905, "tags": null, "url": "http://pziq.umood.it/exponential-functions-game.html" }
mathematics, error-correction, google-sycamore The way this basic model would work is to assume 1- and 2-qubit gate errors are Markovian (time-independent) and also occur independently of other qubits' behavior and then take the product of all the fidelities of gates acting on a single qubit as its total error at measurement time. So if I have the circuit $X(q_0) CNOT(q_0, q_1) X(q_0)$ with an X-gate fidelity of 95% and a CNOT fidelity of 90%, I might say the total error (before applying measurement error) on $q_0$ is $.95 \times .90 \times .95 = 82\%$ and the error on $q_1$ is $90\%$. This probably isn't the exact way they implemented this but it captures how you can might predict the fidelity of the full circuit assuming that qubit errors occur independently.
{ "domain": "quantumcomputing.stackexchange", "id": 1043, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mathematics, error-correction, google-sycamore", "url": null }
ros, rgbdslam-v2, rgbd 14:52:42 Finished processing rgbd_dataset_freiburg1_desk mv: cannot stat ‘rgbd_dataset_freiburg1_desk.bag?’: No such file or directory cp: cannot stat ‘rgbd_dataset_freiburg1_desk-groundtruth.txt’: No such file or directory cp: cannot stat ‘/test/test_settings.launch’: No such file or directory [rospack] Error: package 'rgbdslam' not found 14:52:42 Results for rgbd_dataset_freiburg1_xyz are stored in /home/elizeu/rgbdslam_catkin_ws/src/rgbdslam_v2-indigo/test/[rgbd_dataset_freiburg1_xyz.bag]/emm__0.00/CANDIDATES_4/RANSAC_100/OPT_SKIP_10/ORB/600_Features/rgbd_dataset_freiburg1_xyz 14:52:42 Finished processing rgbd_dataset_freiburg1_xyz mv: cannot stat ‘rgbd_dataset_freiburg1_xyz.bag?’: No such file or directory cp: cannot stat ‘rgbd_dataset_freiburg1_xyz-groundtruth.txt’: No such file or directory cp: cannot stat ‘/test/test_settings.launch’: No such file or directory [rospack] Error: package 'rgbdslam' not found rgbd_dataset_freiburg1_desk ... No estimate at level 0
{ "domain": "robotics.stackexchange", "id": 26247, "lm_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, rgbdslam-v2, rgbd", "url": null }
java, animation, javafx Exception in thread "Timer-0" java.lang.IllegalStateException: Not on FX application thread; currentThread = Timer-0 at com.sun.javafx.tk.Toolkit.checkFxUserThread(Unknown Source) at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(Unknown Source) at javafx.scene.Scene.addToDirtyList(Unknown Source) at javafx.scene.Node.addToSceneDirtyList(Unknown Source) at javafx.scene.Node.impl_markDirty(Unknown Source) at javafx.scene.shape.Shape.impl_markDirty(Unknown Source) at javafx.scene.Node.impl_transformsChanged(Unknown Source) at javafx.scene.Node$13.invalidated(Unknown Source) at javafx.beans.property.DoublePropertyBase.markInvalid(Unknown Source) at javafx.beans.property.DoublePropertyBase.set(Unknown Source) at javafx.scene.Node.setLayoutX(Unknown Source) One I fixed that problem to make it run on the JavaFX thread, the rectangle still did not move an inch pixel. About the cleaniness of your code: public class RectangleMover extends Timer
{ "domain": "codereview.stackexchange", "id": 8386, "lm_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, animation, javafx", "url": null }
$$=\dfrac 34 \sum_{n=1}^{\infty} \dfrac 1n$$ Since the harmonic series diverges, so does $\dfrac 34$ times it. • I stared at that line many, many times before I finally saw where the $+$ turned into a $-$. – Yakk Oct 21 '16 at 10:55 • @Yakk I suggested an edit to make it more obvious – null Oct 21 '16 at 16:46 • I've made it red. Don't know if there's a better way. – asmeurer Oct 21 '16 at 20:11 • @asmeurer Is it better now? – Ovi Oct 22 '16 at 1:57 • That helps. At first I thought you meant repeat the terms shown, which obviously diverges. – asmeurer Oct 22 '16 at 1:59 ## 4 Answers Your idea is a good one, but, as you suspected, you need to be more careful about this sort of manipulation of conditionally convergent series. One way to carry out your argument correctly, but with only minor changes, is by looking at partial sums:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773707986486797, "lm_q1q2_score": 0.8526068583973462, "lm_q2_score": 0.8723473829749844, "openwebmath_perplexity": 529.7691013679157, "openwebmath_score": 0.9799054861068726, "tags": null, "url": "https://math.stackexchange.com/questions/1978171/is-this-a-valid-way-to-prove-this-modified-harmonic-series-diverges" }
newtonian-mechanics, newtonian-gravity, history, singularities So, not to put words in the mouths of the likes of Newton and Euler, but it would appear as though the talk of point masses going as far back as the beginning is much in line with the quote of Landau's I opened with. It was considered a useful simplification of problems where the extent of the body was small compared to its motion more generally. For gravity in particular, Newton (and Euler) spent great efforts demonstrating that for an extended body, one could replace its individual pieces with a point at the centre of mass, without affecting the analysis. And while at the time there was not a precise theory of any forces that could be keeping those bodies together, preventing their collapse under gravity alone, they had no difficulty imagining those forces as infinite elastic forces between the individual pieces.
{ "domain": "physics.stackexchange", "id": 15537, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, newtonian-gravity, history, singularities", "url": null }
python, algorithm, strings, mathematics, machine-learning Title: Design an algorithm to predict words based on a skeleton from a given dictionary The model I'm building first selects a secret word at random from a list. The model which uses an API then returns a row of underscores (space separated)—one for each letter in the secret word—and asks the user to guess a letter. If the user guesses a letter that is in the word, the word is redisplayed with all instances of that letter shown in the correct positions, along with any letters correctly guessed on previous turns. If the letter does not appear in the word, the user is charged with an incorrect guess. The user keeps guessing letters until either (1) the user has correctly guessed all the letters in the word or (2) the user has made six incorrect guesses. I'm working on an algorithm which is permitted to use a training set of approximately 250,000 dictionary words.
{ "domain": "codereview.stackexchange", "id": 44892, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, algorithm, strings, mathematics, machine-learning", "url": null }
the behavior of a function for big inputs. The Big O notation is useful when we only have upper bound on time complexity of an algorithm. Interview question for SummerEngineering Program in Dublin, Co. The study of the performance of algorithms – or algorithmic complexity – falls into the field of algorithm analysis. The Intuition of Big O Notation We often hear the performance of an algorithm described using Big O Notation. For example, an algorithm that runs in time. Big-O Analysis Order of magnitude analysis requires a number of mathematical definitions and theorems. Ask Question Asked 8 years, 2 months ago. Iff isO(g)andg isO(h),thenf isO(h). Big O notation treats two functions as being roughly the same if one is c times the other where c is a constant (something that doesn't depend on n). • For example, we say that thearrayMax algorithm runs in O(n) time. Ο Notation; Ω Notation; θ Notation; Big Oh Notation, Ο. For example, lets take a look at the following code. Big-O Notation.
{ "domain": "umood.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471680195557, "lm_q1q2_score": 0.8133580552645486, "lm_q2_score": 0.8267117919359419, "openwebmath_perplexity": 693.9736876701378, "openwebmath_score": 0.7371540665626526, "tags": null, "url": "http://mron.umood.it/big-o-notation-calculator.html" }
pressure Title: Aside from carbon, what materials change structure under intense pressure? I was thinking the other day about what sort of exotic materials one would find in the depths of a planet. I have heard theories about how an enormous diamond might be found in the centre of gas giants. Current theories have a ball of iron at Earth's core - would that be like the iron up here on the surface or does the pressure change its structure? So here's the question: Aside from a carbon becoming diamond, what materials change structure under intense pressure? theories about how an enormous diamond might be found in the centre of gas giants.
{ "domain": "physics.stackexchange", "id": 494, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pressure", "url": null }
everyday-chemistry, experimental-chemistry, water, home-experiment, melting-point I'm not sure I can find yarn or kite string in the stationery or nearby so please suggest alternatives expected to be found in the average household, supermarket, grocery store or convenience store. Also how long should we wait? The above video takes only 10 seconds while this video takes about 2 minutes (off screen). What factors influence waiting time? Amount of salt? Type of string? This resource has an explaination of the behavior, which relies on the salt-dissolved water wicking into the string. This would mean that you need a type of string which will absorb water. It's surprising to me that your nylon string doesn't work (as long as it's thick/low-density enough to absorb water, probably unlike fishing line), is it possible it has a hydrophobic coating? I would recommend any cotton-based string or twine. Cooking twine and sewing thread is often cotton, if you have access to that. I've had no problems with these.
{ "domain": "chemistry.stackexchange", "id": 7025, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "everyday-chemistry, experimental-chemistry, water, home-experiment, melting-point", "url": null }
image-processing, matlab, python, deconvolution, inverse-problem $$ \arg \min_{\boldsymbol{a}} \frac{1}{2} {\left\| K \boldsymbol{a} - \boldsymbol{b} \right\|}_{2}^{2} + \lambda r \left( \boldsymbol{a} \right) $$ Where $ r \left( \boldsymbol{a} \right) $ is the regularization term. In the optimal case the regularization should match the prior knowledge on the problem. For instance, in Image Processing we can assume a Piece Wise Smooth / Constant Model which matches the Total Variation regularization. Since we have no knowledge here, we will use the classic regularization to handle the Condition Number - Tikhonov Regularization: $$ \arg \min_{\boldsymbol{a}} \frac{1}{2} {\left\| K \boldsymbol{a} - \boldsymbol{b} \right\|}_{2}^{2} + \frac{\lambda}{2} {\left\| \boldsymbol{a} \right\|}_{2}^{2} = {\left( {K}^{T} K + \lambda I \right)}^{-1} {K}^{T} \boldsymbol{b} $$ The output is given by (For $ \lambda = 0.005 $):
{ "domain": "dsp.stackexchange", "id": 8293, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "image-processing, matlab, python, deconvolution, inverse-problem", "url": null }
Excluding the numbers divisible by 100, which were counted already, there are $9$ numbers in every hundred numbers that have a tens digit of 0 (this is true from 100 to 900), totaling $9 \cdot 9 = 81$ such numbers; considering $b$ also and we have $81 \cdot 2 = 162$. Therefore, there are $999 - (99 + 162) = \boxed{738}$ such ordered pairs. ### Solution 2 Let $a = \overline{cde}$ and $b = \overline{fgh}$ be 3 digit numbers: cde +fgh ---- 1000 $e$ and $h$ must add up to $10$, $d$ and $g$ must add up to $9$, and $c$ and $f$ must add up to $9$. Since none of the digits can be 0, there are $9 \times 8 \times 8=576$ possibilites if both numbers are three digits.
{ "domain": "artofproblemsolving.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.986151391819461, "lm_q1q2_score": 0.8217842095043408, "lm_q2_score": 0.8333245953120233, "openwebmath_perplexity": 164.5101229538741, "openwebmath_score": 0.9356498122215271, "tags": null, "url": "https://artofproblemsolving.com/wiki/index.php?title=2006_AIME_II_Problems/Problem_7&diff=cur&oldid=37286" }
quantum-mechanics, schroedinger-equation, harmonic-oscillator, eigenvalue, ground-state You can slowly reproduce the terms in the expansion of $\lambda$ around $q \rightarrow \infty$ if you use perturbation theory breaking your Schrödinger equation in the form \begin{equation} 0 = \left[ - \frac{\hbar^2}{2 I} \frac{\partial^2}{\partial \phi^2} + \frac{1}{2}I \omega^2 \phi^2 - E \right] \psi\left( \phi \right) + \Delta H \psi\left( \phi \right) \, \end{equation} where we see the order-$0$ Hamiltonian is of the harmonic oscillator kind, and $\Delta H$ contains all the $\mathcal{O}(\phi^k)$, $k \geq 4$ terms of the expansion of the potential term around $\phi = 0$. The energies of the order-$0$ Hamiltonian are the well known \begin{equation} E^{(HO)}_k = \frac{1}{2} \left( 2k + 1 \right) \hbar \omega \, , \end{equation}
{ "domain": "physics.stackexchange", "id": 69584, "lm_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, schroedinger-equation, harmonic-oscillator, eigenvalue, ground-state", "url": null }
path-integral, superconductivity Therefore, simply applying the formula $\int d(\bar{\phi}\phi)\exp(-\bar{\phi}^T A \phi) = \det(A)$, the integral over the $\Psi$ degrees of freedoms simply gives $\det(-\mathcal{G}^{-1})$. In fact, it should actually be $\det(-\beta \mathcal{G}^{-1})$, so that the argument of the determinant is unitless. In many papers (and even Altland and Simons' textbook when they evaluate the $\Psi$ integral later on!), you don't see the minus sign or the factor of $\beta$, since it (surprisingly) doesn't affect much. In many calculations, this factor of $-\beta$ just cancels.
{ "domain": "physics.stackexchange", "id": 89740, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "path-integral, superconductivity", "url": null }
navigation, pose, turtlebot, turtlebot-navigation, topics or rosrun tf view_frames /map /base_link If you're trying to do this in code, you can perform this lookup in code as well. // Look up transform between base link and the map frame. tf::StampedTransform xform; try { // The waypoint frame is the source frame tf_.lookupTransform("/map", "/base_link", ros::Time(0), xform); } catch (tf::TransformException ex) { ROS_ERROR("%s", ex.what()); } Originally posted by DimitriProsser with karma: 11163 on 2012-03-28 This answer was ACCEPTED on the original site Post score: 3
{ "domain": "robotics.stackexchange", "id": 8762, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, pose, turtlebot, turtlebot-navigation, topics", "url": null }
arithmetic Title: Division modulo a prime in modular arithmetic I am looking for a way to implement division in modular arithmetic using modulo prime. The method I found in math books is to try $u$ such that $au \equiv 1 \pmod{p}$ $b/a \equiv bu \pmod{p}$ where $a, b, u \in Z_p$ (remainder class modulo a prime $p$). But trying things is probably not a good and fast approach (as it seems to me it has linear complexity and my $p$ can be big, up to $10^9$). What is the right way to do division in modulo prime? To divide $b$ by $a$, you follow two steps: first you find $u$ such that $au \equiv 1 \pmod{p}$, and then you compute $bu \pmod{p}$. To find $u$, you run the extended GCD algorithm on $a$ and $p$. If it is indeed the case that $a \not\equiv 0 \pmod{p}$, then since $p$ is prime $(a,p) = 1$. So the GCD algorithm will come up with numbers $u,v$ such that $$ au + pv = 1. $$ In other words, $au \equiv 1 \pmod{p}$.
{ "domain": "cs.stackexchange", "id": 1157, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "arithmetic", "url": null }
homework-and-exercises, newtonian-mechanics, forces, free-body-diagram, string $m_B a=m_Bg - m_Aa$ $a=\frac{m_B}{m_A+m_B}g\ \ $ which is the acceleration of the entire system from the POV of Box B. $\\$ The Problem Clearly, the acceleration from Box A and the acceleration from Box B don't agree. My only assumption that the tension in the string is the same in both directions $F_T=m_Aa=m_Bg $. Where is my mistake? Why doesn't this work? If $F_T=m_Bg$ as you claim, then box B would never accelerate.
{ "domain": "physics.stackexchange", "id": 83909, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, forces, free-body-diagram, string", "url": null }
newtonian-mechanics, angular-momentum, rotational-dynamics, collision, torque But why must the mass rotate around its center of mass? Why couldn't the stick simply move horizontally to the right (along with the ball) and not spin at all since the stick's center of mass isn't pinned to anything? It seems like there exists an imaginary pin at the center of mass causing it to rotate around that point regardless of where the ball hit.
{ "domain": "physics.stackexchange", "id": 65058, "lm_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, angular-momentum, rotational-dynamics, collision, torque", "url": null }
python, python-3.x, calculator, gui, tkinter if __name__ == "__main__": root = tk.Tk() Calculator(root) root.mainloop()
{ "domain": "codereview.stackexchange", "id": 25402, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, calculator, gui, tkinter", "url": null }
entomology Title: Can butterflies still fly after their wings are touched? When I was a kid, I was told not to ever touch a butterflies wing, as it would lose its ability to fly. This was because of some dust which was supposed to be in place on the wings and when disturbed it had the described consequences. I doubt at least the story about the dust, which sounds a bit too much like "fairy dust", but am I right? What damage will be done by touching a butterfly? Both the Forewing as well as the Hindwing of Butterflies are made of thin chitin structures which are pretty thin and sensitive. If you touch the wing with to much force, it may break. Then the upper side of the butterfly wing is covered with small scales - what you called the "dust". This can be seen in this figure (from here): and also in this electron microscopy image (from the Wikipedia):
{ "domain": "biology.stackexchange", "id": 2575, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "entomology", "url": null }
design, plastic, 3d-printing Title: What should the size difference be between a lid and a container? I am designing a box and lid (for a home-made micro computer). Using Autodesk Inventor (Student Version), I've created my box which looks something like this: I plan on 3D printing (ABS Plastic) the box and lid in the end.
{ "domain": "engineering.stackexchange", "id": 551, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "design, plastic, 3d-printing", "url": null }
reference-request, information-theory 1) Entropy- It is desired that the entropy of the system be maximized. Maximizing entropy means no symbol is better than the others or we do not know what the next symbol / outcome would be. However, the formula states a negative sign before the summation of the probability logarithms. Thus, it means we are maximizing a negative value!! No, the values of the logarithms themselves are negative, so the negative sign makes them positive. All probabilities are a real number from 0 to 1, inclusive. The log of 1 is zero, and the log of anything less than 1 is negative. This may seem problematic since the log of 0 is $-\infty$, but we are really trying to maximize the expected value of these logs, so when we multiply by the probability itself the entire value approaches 0, not $\infty$. Entropy peaks when the probability is $1/2$.
{ "domain": "dsp.stackexchange", "id": 375, "lm_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, information-theory", "url": null }
special-relativity, classical-mechanics, reference-frames, symmetry, group-theory Finally, he adds the following discussion: Note that only the distance between simultaneous events is relevant. A simple example should make this clear. Consider a train travelling with uniform velocity v between two stations A and B. In the frame of an observer who stays at A the distance between the (non-simultaneous) events E1 = ‘train leaving A’ and E2 = ‘train arriving at B’ is clearly $d = vt$, where t is the time of the journey. However, in the rest frame of the train it hasn’t moved at all and the distance between these two events is zero! Assuming no accelerations at the start and end of the journey, both frames are equally valid Galilean frames of reference.
{ "domain": "physics.stackexchange", "id": 95506, "lm_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, classical-mechanics, reference-frames, symmetry, group-theory", "url": null }
quantum-mechanics, special-relativity, quantum-entanglement, measurements Can this experiment be performed and confirmed? Without disagreeing with anything in Eric's answer and comment, I will add a bit to hoping to clarify the situation. The issue of simultaneity of measurement does not enter into the equation at all. Strictly speaking, most would say that it is not even possible to determine that two entangled particles were measured at the same time. That is simply because the detections cannot be resolved well enough using today's technology - even with the incredible advances that have bee made in recent years. But even if you could measure simultaneously, theory says that nothing special happens at that point. Simultaneous or not, the results appear the same for entangled systems.
{ "domain": "physics.stackexchange", "id": 99960, "lm_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, special-relativity, quantum-entanglement, measurements", "url": null }
Some arithmetic systems do allow some division by zero. For example, in the projective numbers, $1/0=\infty$. You're probably not doing arithmetic with those, though. One of the many uses of the word "singularity" is to refer to a point where partial function is undefined. (There may be restrictions on the kind of partial function) For example, 0 is a singularity of the partial function f defined by f(x)=1/x. So it seems like the term might be situation specific then. Maybe undefined could be catch all statement since that seems to be more general. Consider the following integral, which involves division by zero. $$\int\limits_0^a {\frac{1}{{{r^2}}}} dr$$ This is known as an improper integral because it becomes infinite (a la Hurkyl) for the lower limit. This integral appears in physics and has been discussed in recent threads about potential.
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9546474207360066, "lm_q1q2_score": 0.8151856053643747, "lm_q2_score": 0.8539127510928477, "openwebmath_perplexity": 511.5254237624037, "openwebmath_score": 0.7740909457206726, "tags": null, "url": "https://www.physicsforums.com/threads/dividing-by-zero.492801/" }
- Note that (i^2+3i+1) = (i+2)(i+1)-1 –  Foo Bah Sep 10 '11 at 0:08 @Foo Bah: Indeed. Similarly $(n+2)!+(n+1)! = (n+3)\times(n+1)!$ –  Henry Sep 10 '11 at 0:16 As André Nicolas notes, the essence of the identity is showing that $$\sum_{k=1}^n k \cdot k! = (n+1)! - 1.$$ There's a nice combinatorial proof of this. (See Benjamin and Quinn, Proofs that Really Count, Identity 181 on p. 92.) I'll give it in its $\sum_{k=1}^{n-1} k \cdot k! = n! - 1$ form. Both sides count the number of permutations of $1, 2, \ldots, n$ that exclude the identity permutation. The right side is straightforward. For the left side, how many permutations have $n-k$ as the first number that does not get mapped to itself? There are $k$ choices ($n-k+1, n-k+2, \ldots, n$) for the number that appears in position $n-k$, and then there are $k!$ ways to choose the remaining $k$ numbers to complete the permutation. Adding up over all possible values of $k$ yields the left-hand side.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806546550656, "lm_q1q2_score": 0.8192589977832223, "lm_q2_score": 0.8354835411997897, "openwebmath_perplexity": 422.8405560533645, "openwebmath_score": 0.9353767037391663, "tags": null, "url": "http://math.stackexchange.com/questions/63177/for-any-natural-n-how-could-we-prove-that-sum-limits-i-1-n-i23i1-i" }
newtonian-mechanics, rotational-dynamics, angular-momentum, friction Add) Here are the derivation I did. (A): The energy of the ball conserves. Let $v$ be the velocity of the ball at the lowest point (with friction). $ mgh=\frac{1}{2}\beta m r^2\omega^2+\frac{1}{2}mv^2=mgh_f+\frac{1}{2}\beta m r^2\omega^2 $ with the fact that $v=rw$, $h_f=\frac{h}{1+\beta}$. For those of you who are confused about the situation, Starting from the frictionless area, no torque applies to the ball so the ball spins with a certain angular velocity. That's why the $h_f$ is smaller than $h$. It's because part of the initial energy turns into rotational energy.
{ "domain": "physics.stackexchange", "id": 91466, "lm_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, rotational-dynamics, angular-momentum, friction", "url": null }
ros, ros-kinetic Setting our offboard computer as ROS Master seems not to be a good solution, because it would send all of the topics, and this may cause serious network delay. I think the ROS Master is only responsible for setting up the initial peer-to-peer connection between a publisher/subscriber when calls are made to advertise/subscribe, then the communicating nodes send and receive messages directly over TCP. Therefore, you should only have to think about topics published by nodes on the Raspberry Pi and subscribed to by nodes on the offboard computer or vice-versa, not all of the topics in your whole system. Originally posted by JamesGiller with karma: 229 on 2018-03-14 This answer was ACCEPTED on the original site Post score: 3
{ "domain": "robotics.stackexchange", "id": 30307, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-kinetic", "url": null }
we define the within. Such as ordered lists or arrays consists of elements which are not in set is. Where Uis A universal set these operators may generally be applied also data.: Part 1 Page 5 Basic properties of set operations include set union, Intersection and.! But implicit based on the problem we 're working with and Intersection ) 47 mins Video Lesson possible! Wolfram Alpha widgets ( many thanks to the developers ) was used for the set C++! But the complement is denoted as A ' or AC then we denote U \ x by x and. In x × Y probably \ ( U\ ), 2, 3 and ). A set A ( denoted by, is A universal set and is the set of which... The data structure for sets and we 're going to talk A lot more about complements in the amssymb.. A be A set own special name and symbol these programming languages have operators or for! Quiz Solving Absolute Value Equations Quiz Order of operations Quiz Types of angles Quiz the symbol ∪ is to. Be applied also to data structures that are not really mathematical
{ "domain": "bettinaguisa.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.970687770944576, "lm_q1q2_score": 0.821145984473582, "lm_q2_score": 0.8459424431344438, "openwebmath_perplexity": 478.71060939455475, "openwebmath_score": 0.75237637758255, "tags": null, "url": "http://bettinaguisa.com/carolina-boots-vgk/4c2d33-set-operations-complement" }
ros2, sensor-msgs The 4th line fails, namely: from sensor_msgs import point_cloud2 Any insights on how to do this in ROS2 Foxy? Originally posted by Morris on ROS Answers with karma: 35 on 2020-07-24 Post score: 0 https://github.com/ros2/common_interfaces/tree/master/sensor_msgs Not ported yet. https://github.com/ros/common_msgs/tree/noetic-devel/sensor_msgs/src/sensor_msgs looks pretty trivial to port though if you need it. Submit a PR! Originally posted by stevemacenski with karma: 8272 on 2020-07-24 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 35320, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2, sensor-msgs", "url": null }
The motivation here is that it is usually easier to check whether covariance is zero, compared to check whether independence holds. So if, given the theoretical distribution, by checking covariance you are also checking independence (as is the case with the Bernoulli or normal case), then this would be a useful thing to know. If we are given two samples from two r.v’s that have normal marginals, we know that if we can statistically conclude from the samples that their covariance is zero, we can also say that they are independent (but only because they have normal marginals). It would be useful to know whether we could conclude likewise in cases where the two rv’s had marginals that belonged to some other distribution.
{ "domain": "grindskills.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9910145715128204, "lm_q1q2_score": 0.836312349296007, "lm_q2_score": 0.8438951084436077, "openwebmath_perplexity": 365.47784294615906, "openwebmath_score": 0.9254751205444336, "tags": null, "url": "https://grindskills.com/for-which-distributions-does-uncorrelatedness-imply-independence/" }
of overlap between adjoining sections and evaluate the spectrum at ⌊ 1 0 0 / 2 + 1 ⌋ = 5 1 frequencies. Examples Fourier. Fourier Transform Applications. Fourier series are used in many cases to analyze and interpret a function which would otherwise be hard to decode. transform, discrete-time Fourier transform (DTFT), discrete Fourier series (DFS) and discrete Fourier transform (DFT) (ii) Understanding the characteristics and properties of DFS and DFT (iii) Ability to perform discrete-time signal conversion between the time and frequency domains using DFS and D FT and their inverse transforms. Convolution Theorems. m computes the fast fractional Fourier transform following the algorithm of [5] (see also [6] for details) The m-file frft22d. FFT is the method to calculate fourier transform. Here, the workflow for Fourier transforms is demonstrated by calculating the deflection of a beam due to a force. I don't fully understand what the piece of code you copied is about, here is an
{ "domain": "vicommunication.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464443071381, "lm_q1q2_score": 0.8153871933099816, "lm_q2_score": 0.8354835432479661, "openwebmath_perplexity": 567.2721390969662, "openwebmath_score": 0.7845139503479004, "tags": null, "url": "http://ccwn.vicommunication.it/fourier-transform-calculator-matlab.html" }
ros this solution still doesn't provide exact solutions (which in odometer it is very important to get PRECISE results). any suggestions? ideas? help? how about getting another controller?
{ "domain": "robotics.stackexchange", "id": 21332, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
energy, biophysics, food For example, doing a google search brings up this study which studies aerobic weight lifting exercises (so presumably the weight is much less than 100 kilograms, though distance is about the same). The measured total aerobic energy consumption (from carbon dioxide content of the exhaled breath) is around 10 kilojoules mer minute. For that exercise, your 100 grams of chocolate can sustain you for around 4 hours. (If you were to do 4800 reps in 4 hours, that would require sustaining 20 reps a minute, a truly fearsome rate...) If you look at the basal metabolic rate for humans, say we have a typical male standing at 170 centimeters, 75 kilograms, and 30 years of age, he would burn about 1600 kilocalories per day doing absolutely nothing. So a 100g chocolate bar gets him through about a third of the day.
{ "domain": "physics.stackexchange", "id": 1266, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "energy, biophysics, food", "url": null }
Solution 4 SIMULTANEOUS SOLUTION/COLLISION OF BALL AND FOOT 1. let X=X 2t+1=3t-10 t=11 2. let Y=Y t-4=-t+3 t= $$\frac{7}{2}$$ 3. t: $$11\neq \frac{7}{2}$$ NON-SIMULTANEOUS SOLUTION Since the two paths intersect at different times, there is no collision and the paths cross at a non-silmultaneous solution. But where? 1. ball: $$y=\frac{1}{2}x-\frac{9}{2}$$ 2. foot: $$y=-\frac{1}{3}x-\frac{1}{3}$$ 3. $$\frac{1}{2}x-\frac{9}{2}=-\frac{1}{3}x-\frac{1}{3}$$ 4. x=5 and y=-2 non-simlutaneous solution occurs at (5, -2) Error Explanation 4 a. After solving for a simultaneous solution,only a non-simultaneous solution was found. $$11\neq \frac{7}{2}$$ so there are no simultaneous solutions. b. After solving for a simultaneous solution,only a non-simultaneous solution was found. $$11\neq \frac{7}{2}$$ so there are no simultaneous solutions.
{ "domain": "wikispaces.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9845754497285467, "lm_q1q2_score": 0.8426500243059822, "lm_q2_score": 0.855851143290548, "openwebmath_perplexity": 1454.733835652903, "openwebmath_score": 0.6757130026817322, "tags": null, "url": "http://pch-wiki.wikispaces.com/10.4+OFSA+Solutions?responseToken=004bbe007d7cd8b5a6b1266ce34c7f6c9" }
c++, programming-challenge Title: Jollo - 2 Player high card game I solved an online judge problem named Jollo. The full description of the problem can be found here: https://www.urionlinejudge.com.br/judge/en/problems/view/1321 It's a card game between 2 players. Each player is given 3 cards. Each round a player shows one card and removes it from hand. The player who shows the highest card wins the round. Prince and Princess play but Prince is really bad and cries loudly so the servant who deals the cards, after dealing Princess her 3 cards, and dealing Prince 2 cards, he deals Prince the lowest higher card available that no matter how badly he plays he ends up winning. If there is none return -1. My logical approach is that: If Princess wins first 2 rounds, there's nothing to be done return -1 If Prince wins first 2 rounds, return the lowest available card on deck If each wins 1 of the first 2 rounds, if there is an available card on deck higher than princess' remaining card return it, if not return -1
{ "domain": "codereview.stackexchange", "id": 36402, "lm_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++, programming-challenge", "url": null }
python, algorithm, numpy matches = np.logical_and(events_1[np.newaxis, :], events_2[:, np.newaxis]) matches_u = np.ma.array(matches, mask=upper_mask) matches_l = np.ma.array(matches, mask=lower_mask) n_matches = np.trace(matches) c_ij = c_ji = n_matches / 2 c_ij += np.sum(matches_u) c_ji += np.sum(matches_l) den = math.sqrt(n1 * n2) Q_tau = (c_ij + c_ji) / den q_tau = (c_ij - c_ji) / den return Q_tau, q_tau def trace_eps(ts_1: np.ndarray, ts_2: np.ndarray, tau: int) -> Tuple[Real, Real]: if ts_1.shape != ts_2.shape or len(ts_1.shape) != 1: raise ValueError('Vectors must be flat and of the same length') events_1 = ts_1 == 0 events_2 = ts_2 == 0 n1 = np.sum(events_1) n2 = np.sum(events_2) if n1 == 0 or n2 == 0: return 0, 0 matches = np.logical_and(events_1[np.newaxis, :], events_2[:, np.newaxis]) n_matches = np.trace(matches) c_ij = c_ji = n_matches / 2
{ "domain": "codereview.stackexchange", "id": 41900, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, algorithm, numpy", "url": null }
c++, performance, matrix, sse, simd The actual code looks pretty good, apart from the fact that it uses short vectors: $LL4@transform_: lea rcx, QWORD PTR [rdx+rax] lea rax, QWORD PTR [rax+16] vmovups xmm0, xmm7 vfmadd231ps xmm0, xmm4, XMMWORD PTR [rax-16] vfmadd231ps xmm0, xmm5, XMMWORD PTR [r10+rax-16] vfmadd231ps xmm0, xmm6, XMMWORD PTR [r11+rax-16] vmovups XMMWORD PTR [rcx+rbx], xmm0 vmovups xmm0, xmm3 vfmadd231ps xmm0, xmm8, XMMWORD PTR [rax-16] vfmadd231ps xmm0, xmm9, XMMWORD PTR [r10+rax-16] vfmadd231ps xmm0, xmm10, XMMWORD PTR [r11+rax-16] vmovups XMMWORD PTR [rcx], xmm0 vmovups xmm0, xmm1 vfmadd231ps xmm0, xmm11, XMMWORD PTR [rax-16] vfmadd231ps xmm0, xmm12, XMMWORD PTR [r10+rax-16] vfmadd231ps xmm0, xmm13, XMMWORD PTR [r11+rax-16] vmovups XMMWORD PTR [r9+rax-16], xmm0 sub r8, 1 jne SHORT $LL4@transform_
{ "domain": "codereview.stackexchange", "id": 28370, "lm_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, matrix, sse, simd", "url": null }
python, animation, pygame, physics toggleBoundsFont = pg.font.SysFont("geneva", 20) TOGGLEBOUNDSCOLOR = Colors.RED resistMultiplierFont = pg.font.SysFont("courier new", 13) RESISTMULTIPLIERCOLOR = Colors.RED powerMultiplierFont = pg.font.SysFont("courier new", 13) POWERMULTIPLIERCOLOR = Colors.RED class Ball(object): def __init__(self, x, y, dx = 0, dy = 0, bounce = .8, radius = 10, color=Colors.SMOKE, outlinecolor=Colors.RED, density=1): self.color = color self.outlinecolor = outlinecolor self.x = x self.y = y self.dx = dx self.dy = dy self.ax = 0 self.ay = Constants.GRAVITY self.dt = Constants.GAME_SPEED self.bounce = bounce self.radius = radius self.mass = 4/3 * math.pi * self.radius**3 * density
{ "domain": "codereview.stackexchange", "id": 34256, "lm_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, animation, pygame, physics", "url": null }
complexity-theory, vqe, pauli-gates then decomposing this into Pauli basis will scale exponentially, $2^n$ elements! However, if you use another basis set, says $S = \{I, \sigma_+, \sigma_- \}$ then one can show that you only need $O(n)$ elements. To be exact, using the basis set $S$, you can decompose the above matrix $A$ in $2m+1$ elements. To see how to do this, see Variational quantum algorithm for the Poisson equation. The gist is see how $A_n$ grow recursively.
{ "domain": "quantumcomputing.stackexchange", "id": 4242, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, vqe, pauli-gates", "url": null }
special-relativity, spacetime, inertial-frames Now we have the result that $\Delta \tau'=\gamma(v) \Delta \tau$ I don't exactly follow what you're doing. If observer 2 sends light signals to observer 1 when they pass points A and B respectively, then the time between observer 1 receiving those two light signals is equal to $\gamma(v) \Delta \tau(1+ v/c) = \Delta \tau \sqrt{\frac{1+v/c}{1-v/c}}$. This calculation arises e.g. when computing the relativistic Doppler effect.
{ "domain": "physics.stackexchange", "id": 99000, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, spacetime, inertial-frames", "url": null }
operating-systems, process-scheduling The disk scheduling then consist in send to disk the processes that are not being used right now, but someday they will. The process scheduling allows you to use many programs and apps in a "paralell" way (you see that everything is executing at the same time, but is just an illusion). In fact as you mention, some algorithms are used for both functions, and I think it's because in both case you have to decide what are you going to use and bring it. So the goal is sightly different, but uses the same ideas.
{ "domain": "cs.stackexchange", "id": 1371, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "operating-systems, process-scheduling", "url": null }
terminology, history In contrast, science is about laws of nature, and more generally about natural phenomena. The phenomena involved in computer science are man-made. Some aspects of computer science can be viewed as experimental in this sense, for example the empirical study of social networks, the empirical study of computer networks, the empirical study of viruses and their spread, and computer education (both teaching computer science and using computers to teach other subjects). Most of these examples are border-line computer science, and are more properly multidisciplinary. The closest one gets to the scientific method in computer science is perhaps the study of networks and other hardware devices, which is mainstream in the subarea known unofficially as "systems". These examples notwithstanding, most of the core of computer science is not science at all. Computer science is just a name - it doesn't need to make sense.
{ "domain": "cs.stackexchange", "id": 1937, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "terminology, history", "url": null }
2 ˆ 3 2 1 π π = + r; y a x a b ˆ 2 ˆ 3 2 2 π π =− + r; z c b ˆ 2 3 π = r, so that the lattice is its own reciprocal, but with a rotation of axes. This is illustrated in Fig. where the vectors k0 (=CO) and k1 (=CG1) are the wavevectors of the incident and reflected beams and g1 (=OG1) is the reciprocal lattice vector of the (hkl) 1 planes. •Previously, we noted all crystal structures could be specified by a set of Bravais lattice vectors, when describing a lattice you must either use the primitive vectors or add a set of basis vectors (e. It is di cult to prove that a given lattice is a Bravais lattice (existence of a set of primitive vectors) Discrete set of vectors R, not all in a plane,closedunder addition and. For this reason it is not recommended to use ibrav=0 in the pw. The lattice is constructed by placing a point at every possible combination of the three vectors and any multiples of them (positive or negative). Consider a rectangular lattice in two dimensions with primitive
{ "domain": "iaex.pw", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924785827002, "lm_q1q2_score": 0.8261655842103213, "lm_q2_score": 0.8499711699569787, "openwebmath_perplexity": 736.3193313327315, "openwebmath_score": 0.7105481624603271, "tags": null, "url": "http://fieu.iaex.pw/primitive-lattice-vectors.html" }
in a vector. Andre Lukas Oxford, 2013 3. Notes in analysis on metric and Banach spaces with a twist of topology. : In V3, 3 non-coplanar vectors are linearly independent; i. Five lectures for undergraduates on general relativity, by Jorge. MACLACHLAN MURPHY, IAN S. When applied to a function defined on a one-dimensional domain, it denotes its standard derivative as defined in calculus. Multiple Integrals and Vector Calculus - Lecture Notes. Course Description. It is useful to think. pdf file) viewer can be obtained from Adobe Once the Acrobat plugin has been downloaded and installed, file can be view simply by clicking on the corresponding link. Scalar multiplication: If c2R and ~ua vector, then we may form a new vector c~ucalled the scalar product of ~uwith c. are expected to attend all of the lectures. Here is an unordered list of online mathematics books, textbooks, monographs, lecture notes, and other mathematics related documents freely available on the web. Precise Definition of
{ "domain": "whynotimmobiliare.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9904405989598949, "lm_q1q2_score": 0.8533024166545724, "lm_q2_score": 0.8615382058759129, "openwebmath_perplexity": 1537.547176542796, "openwebmath_score": 0.6118573546409607, "tags": null, "url": "http://dzdb.whynotimmobiliare.it/cambridge-vector-calculus-lecture-notes.html" }
## marked as duplicate by Ross Millikan, Douglas S. Stones, Henry T. Horton, ncmathsadist, NorbertOct 24 '12 at 7:35 Let's say the first $100$ balls are colored red. You just need to count the number of configurations that satisfy the given constraint (exactly $P$ of the red balls are on the left), then divide by the total number of configurations ($1000!$). We choose $P$ slots on the left to hold red balls, which can be done in ${500}\choose{P}$ ways; we choose $100-P$ slots on the right to hold red balls, which can be done in ${500}\choose{100-P}$ ways; finally, we distribute the $100$ red balls among their chosen slots ($100!$ ways) and the non-red balls among the remaining slots ($900!$ ways). The total number of configurations is $${{500}\choose{P}}{{500}\choose{100-P}}(100!)(900!).$$ Dividing this by $1000!$ gives the desired probability: $$p=\frac{{{500}\choose{P}}{{500}\choose{100-P}}}{{1000}\choose{100}}.$$ -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713831229044, "lm_q1q2_score": 0.8055327349652953, "lm_q2_score": 0.8175744761936437, "openwebmath_perplexity": 242.01667434964023, "openwebmath_score": 0.8652077913284302, "tags": null, "url": "http://math.stackexchange.com/questions/219607/probability-of-finding-balls-on-one-side-of-a-box" }
c#, reflection, expression-trees var x = new InstanceClass(config); CollectionAssert.AreEqual(new[] { "a", "b", "c", "d", "e", "f" }, x.GetValues().ToList()); } [TestMethod] public void Load_StaticMembers_Loaded() { var config = new Configuration(new Memory { { "PublicProperty", "a" }, { "PrivateProperty", "b" }, { "PublicField", "c" }, { "PrivateField", "d" }, { "PrivateReadOnlyField", "e" }, { "PublicReadOnlyProperty", "f" }, }); config.SetValue(() => StaticClass.PublicProperty); config.SetValue(() => StaticClass.PublicField); config.SetValue(() => StaticClass.PublicReadOnlyProperty); CollectionAssert.AreEqual(new[] { "a", null, "c", null, null, "f" }, StaticClass.GetValues().ToList()); } public class InstanceClass { public InstanceClass() { }
{ "domain": "codereview.stackexchange", "id": 26648, "lm_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#, reflection, expression-trees", "url": null }
$$T_1w = S^*T_2Sw = S^*T_2e_3 = 5S^*e_3 = 5w.$$ Therefore $w \in E(T_1, 5) = \operatorname{span}(e_3)$. But this is a contradiction, because we can’t have a linearly independent list of length $2$, $v, w$, in a $1$-dimensional vector space, $\operatorname{span}(e_3)$. Hence, there does not exist such $S$. Notice that it wasn’t necessary to require $S$ to be an isometry, we just needed to suppose, by contradiction, the existence of an invertible $S$ such that $T_1 = S^{-1}T_2S$. This $S$ does not exist. Since the desired isometry must satisfy the same property (because the adjoint of an isometry equals its inverse), it follows that there cannot exist such isometry. The key idea here is that the eigenspaces of $T_1$ and $T_2$ don’t fit.
{ "domain": "linearalgebras.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9859363754361599, "lm_q1q2_score": 0.8060764113250789, "lm_q2_score": 0.817574471748733, "openwebmath_perplexity": 280.0290386114009, "openwebmath_score": 0.9965819120407104, "tags": null, "url": "https://linearalgebras.com/7c.html" }
raspberrypi, kobuki I have no idea how I can solve the error. Can you please give me information on that? Originally posted by NKCT on ROS Answers with karma: 11 on 2016-12-12 Post score: 0 You will need to compile the Kobkui source from scratch. There isn't a precompiled binary Mark Originally posted by MarkyMark2012 with karma: 1834 on 2017-02-03 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 26466, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "raspberrypi, kobuki", "url": null }
python, beginner, parsing, python-2.x, xml <DataType>RealExtended</DataType> <NormalSource>Telemetered</NormalSource> </Ldv> <Ldv> <Name>Osiris_Local_Data_0010</Name> <DataType>RealQTimeTagExtended</DataType> <NormalSource>Telemetered</NormalSource> </Ldv> <Ldv> <Name>Osiris_Local_Data_0011</Name> <DataType>Discrete</DataType> <NormalSource>Telemetered</NormalSource> </Ldv> <Ldv> <Name>Osiris_Local_Data_0012</Name> <DataType>DiscreteQ</DataType> <NormalSource>Telemetered</NormalSource> </Ldv> <Ldv> <Name>Osiris_Local_Data_0013</Name> <DataType>DiscreteQTimeTag</DataType> <NormalSource>Telemetered</NormalSource> </Ldv> <Ldv> <Name>Osiris_Local_Data_0014</Name>
{ "domain": "codereview.stackexchange", "id": 20819, "lm_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, parsing, python-2.x, xml", "url": null }
java, performance, strings alwaysCapitalize.add("ii"); alwaysCapitalize.add("iii"); alwaysCapitalize.add("iv"); alwaysCapitalize.add("v"); alwaysCapitalize.add("vi"); alwaysCapitalize.add("vii"); alwaysCapitalize.add("viii"); alwaysCapitalize.add("ix"); alwaysCapitalize.add("x"); alwaysCapitalize.add("xi"); alwaysCapitalize.add("xii"); alwaysCapitalize.add("xiii"); alwaysCapitalize.add("xiv"); alwaysCapitalize.add("xv"); alwaysCapitalize.add("xvi"); alwaysCapitalize.add("xvii"); alwaysCapitalize.add("xviii"); alwaysCapitalize.add("xix"); alwaysCapitalize.add("xx"); alwaysCapitalize.add("xxi"); alwaysCapitalize.add("od"); alwaysCapitalize.add("id"); alwaysCapitalize.add("ph"); alwaysCapitalize.add("xh"); alwaysCapitalize.add("uv"); alwaysCapitalize.add("dom"); alwaysCapitalize.add("gs");
{ "domain": "codereview.stackexchange", "id": 30407, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, strings", "url": null }
visible-light, electromagnetic-radiation, photons, visualization How a radio wave is created To recognise this is important, because this type of EM radiation often is called an EM wave. In reality it happens something that is in the result similar to the lasers emission of photons. A lot of electron get accelerated in the antenna rod and by this more or less synchronous emit photons, but this time in a broad range of wavelengths. Since the electrons get accelerated for- and backwards in the rod the intensity of the emission is swelling and the electric as well as the magnetic component of the EM radiation has the properties of a wave. It is well understood that in the nearfield of the antenna the electric component is perpendicular to the magnetic component and both are perpendicular to the direction of propagation of the emitted photons. It has to be underlined that the two components are shifted by 90° to each other. What is a photon
{ "domain": "physics.stackexchange", "id": 37816, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "visible-light, electromagnetic-radiation, photons, visualization", "url": null }
time-complexity Title: Time complexity of function int q(int n) { if (n <= 0) return 0; return 1-q(q(n-1)); }
{ "domain": "cs.stackexchange", "id": 21427, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "time-complexity", "url": null }
- To be clear are we talking about (infinite) lines, or line segments here? –  Mr.Wizard Aug 29 at 1:52 The question is really about (full) lines, though of course we can only ever plot portions of them. This is why I enclosed inverse in scary quotes -- you can't really get back to the particular specified endpoints, only back to the line itself. –  bill s Aug 29 at 1:53 No time to get into this today but it seems like a variation of a relatively common rectangular to polar conversion. I presume you've already looked at such things; wherein lies the difference and difficulty? –  Mr.Wizard Aug 29 at 1:58 Here's a decent reference I believe: mathforum.org/dr.math/faq/formulas/faq.polar.html –  Mr.Wizard Aug 29 at 2:01
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9669140216112959, "lm_q1q2_score": 0.8275344797473486, "lm_q2_score": 0.8558511524823263, "openwebmath_perplexity": 996.4383970096366, "openwebmath_score": 0.6766654253005981, "tags": null, "url": "http://mathematica.stackexchange.com/questions/31319/alternate-parameterization-of-a-line" }
quantum-field-theory, special-relativity, lorentz-symmetry, poincare-symmetry, helicity The infinite-dimensional ones, also called "continuous spin representations", have the components of $W$ not parallel to $P$ not vanish and hence non-trivially represented on the space of states. These representations do not seem to appear ordinarily in nature - like the tachyonic representations with $P^2 < 0$ - because they do not lead to consistent causal quantum field theories, though it is hard to find texts that unambiguously state this in modern parlance (see Hirata, "Quantization of Massless Particles with Continuous Spin", Progress of Theoretical Physics 58 (2), 1977). Therefore, the common assumption that $W^2 = 0$ for massless particles is justified by $W^2 \neq 0$ producing unphysical representations, but it would be nice if this was stated a bit more explicitly in many cases.
{ "domain": "physics.stackexchange", "id": 62865, "lm_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, special-relativity, lorentz-symmetry, poincare-symmetry, helicity", "url": null }
ros, gazebo-1.9, gazebo-plugin Title: tag (gazebo::physics::Gripper) doesn't create the fixed joint between the gripper and the object within it I have been trying to use the <gripper> tag in my urdf robot like this: <gazebo> <gripper name="grasping"> <grasp_check> <attach_steps>20</attach_steps> <detach_steps>40</detach_steps> <min_contact_count>1</min_contact_count> </grasp_check> <gripper_link>r_finger_link</gripper_link> <gripper_link>l_finger_link</gripper_link> <palm_link>gripper_base</palm_link> </gripper> </gazebo>
{ "domain": "robotics.stackexchange", "id": 3454, "lm_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-1.9, gazebo-plugin", "url": null }
reinforcement-learning Scaling to fit in ranges with zero mean and limited max absolute values. It could be engineered so that features include domain knowledge of the problem to be solved. The first part is optional for you, but I think that the bearing values benefit a little from being scaled and centred. In a more general case, even if the state description was complete, you may still want a step that re-scales it. The second part is tricky - yes you could find better features, but part of the challenge is to create an agent that learns to do this itself. In this case, you may want to gain experience training agents where it is less easy to engineer "golden" features, and focus on RL methods. Are there rules of thumb for how to design states? Conceptually, the problem of state representation can break down into three parts:
{ "domain": "datascience.stackexchange", "id": 3881, "lm_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", "url": null }
java, algorithm, game, pathfinding MapPoint is a simple point class with X and Y as integer values. I have overridden the equals and hashCode() methods so that two map points will be equal if they have the same X and Y values, even if they are not actually the same object. MapDirection is pretty simple as well. For each direction, getPointForDirection(point) will return the delta of the input point and the direction X and Y values. Let me know if I need to post this class as well for you to review the code. PriorityQueue For openList, you could use a PriorityQueue instead of an ArrayList for better performance. With the ArrayList, every time you insert new elements, you need to sort the whole list, taking \$O(n\log n)\$ time. With the PriorityQueue, inserting a new element should only take \$O(\log n)\$ time. If you need to change an existing element, you should remove, modify, and reinsert the element to make sure that the element is correctly updated in the PriorityQueue. HashSet
{ "domain": "codereview.stackexchange", "id": 15229, "lm_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, pathfinding", "url": null }
Using: $$\cos(2z) = 1-2\sin^2(z)$$ we can write: $$\frac{\sin^2(z)}{z^2}=\frac{1-\cos(2z)}{2 z^2} = 2\sum_{k=0}^{\infty}(-1)^k 2^{2k}\frac{z^{2k}}{(2k+2)!}$$ • @ Count Iblis: thanks for your post.However, my question refers to the above-mentioned integrals and their solutions... – justik Oct 5 '17 at 7:42 I spent some time solving the integrals. For anyone interested in the solution: Suppose the disc $C=\left\Vert z\right\Vert =1$ and the substitution $$z=e^{i\theta},\qquad\mathrm{dz}=ie^{i\theta}\mathrm{d\theta.}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9777138151101525, "lm_q1q2_score": 0.8230645652319044, "lm_q2_score": 0.8418256472515684, "openwebmath_perplexity": 837.6778170556477, "openwebmath_score": 0.9599109888076782, "tags": null, "url": "https://math.stackexchange.com/questions/2457178/laurent-series-of-the-function-at-z-0/2457932" }
quantum-algorithms, quantum-state Create the state you're interested in. Measure it. Repeat. If at least once you get different results (and if we don't consider noise that may affect the state), then you know that this quantum state is in a superposition. Of course, this is a very bad algorithm: Creating the state can be computationally hard. Noise can induce inaccuracies in the measurement. You're never sure that a state really is not in a superposed state.
{ "domain": "quantumcomputing.stackexchange", "id": 1530, "lm_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-state", "url": null }
artificial-intelligence, search-trees, search-problem Title: Search on Conformant Problem: solution for subset of a belief state I am having trouble understanding the following statement. I have understood why in a sensorless/conformant problem, if there exists a solution (a sequence of actions) for a belief state $b$, then it is also a solution for any $b'$ that is a subset $b$. Next claim is what is confusing me. Then in a standard graph search, we can save time by pruning some branches from the search tree. Example from the Sensorless Vacuum World problem in Russel Norvig. When we have a successor $\{1,3,5,7\}$ generated during graph search, we do not add it to the frontier if we have already expanded the belief state $\{5, 7\}$ which is a subset.
{ "domain": "cs.stackexchange", "id": 13154, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "artificial-intelligence, search-trees, search-problem", "url": null }
The proof of this theorem for 2-4 trees uses the potential method of amortized analysis.17See the proofs of Lemma 2.2 and Lemma 3.1 for other applications of the potential method. Define the potential of an internal node u in a 2-4 tree as \begin{equation*} \Phi(\texttt{u}) = \begin{cases} 1 & \text{if \texttt{u} has 2 children} \\ 0 & \text{if \texttt{u} has 3 children} \\ 3 & \text{if \texttt{u} has 4 children} \end{cases} \end{equation*} and the potential of a 2-4 tree as the sum of the potentials of its nodes. When a split occurs, it is because a node with four children becomes two nodes, with two and three children. This means that the overall potential drops by $3-1-0 = 2$. When a merge occurs, two nodes that used to have two children are replaced by one node with three children. The result is a drop in potential of $2-0=2$. Therefore, for every split or merge, the potential decreases by two.
{ "domain": "opendatastructures.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692271169855, "lm_q1q2_score": 0.8242063699108626, "lm_q2_score": 0.8438950947024556, "openwebmath_perplexity": 919.554630843675, "openwebmath_score": 0.5605720281600952, "tags": null, "url": "https://opendatastructures.org/newhtml/ods/latex/redblack.html" }
wavelet Title: Can a wavelet transform give time dependent phase of sinusoids in signal I have a signal which contains sinusoidal components that oscillate at different frequencies. I think the phase of the sinusoids is changing with time. I could do a Fourier transform on small chunks of the signal and the phase of the sinusoids from that, but is there a better way to do this with a wavelet transform? I'm new to the concept of wavelets. From what I understand, it's good at doing what an FFT does but with time resolution. Could you get the phase of a sinusoid as a function of time from a wavelet transform ? It is indeed possible (up to a period), with complex "continuous" wavelet transforms, provide your mother wavelet ooscillate sufficiently. You can look at the scalogram modulus and its phase at the appropriate scales, as illustrated from Matlab: Wavelet coherence:
{ "domain": "dsp.stackexchange", "id": 3554, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "wavelet", "url": null }
machine-learning, generative-adversarial-networks It appears that access to a student population is planned or already negotiated, which is also good. Although the drawing, as it is being drawn, is seen through each student's eyes, the primary features correlated with drawing skill development is motor control, shape formation, and color choice. If the sheet of paper is placed over a drawing tablet, the tablet's incoming USB stream events are captured to a file, and the color selection is somehow recorded or automatically determined by having students hold the pencil or crayon up to the computer's camera before using it, a much better in natura input stream can be developed. Pre-processing can lead to an expression of each drawing experience as a sequence of events arranged in temporal order with the following dimensions for each event.
{ "domain": "ai.stackexchange", "id": 730, "lm_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, generative-adversarial-networks", "url": null }
as shown in Problem 1.Starting with the raw data of matrix X, you can create a variance-covariance matrix to show the variance within each column and the covariance between columns. deviation score In this tutorial we will learn how to create covariance matrix in Excel or covariance table in Excel. A is an 5 x 3 matrix Starting with the raw data of matrix X, So we can say that The Cholesky factor is an upper triangular matrix which is the "square root" of the covariance matrix. The variance–covariance matrix and coefficient vector are available to you after any estimation command as e(V) and e(b). or corr. $\begingroup$ @Brad S. I have a slightly different problem. yi is the ith deviation score in the second set of How can I generate data which are multivariate normal and have a covariance or correlation matrix that I specify? We use the following formula to compute population covariance. you can create a variance-covariance matrix to A short video on how to make the
{ "domain": "kpi.ua", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9465966702001758, "lm_q1q2_score": 0.8007662961755292, "lm_q2_score": 0.845942439250491, "openwebmath_perplexity": 630.5306069118313, "openwebmath_score": 0.5929288864135742, "tags": null, "url": "http://cad.kpi.ua/bhu9qiz3/2c6df3-generate-covariance-matrix" }
============================================== $$E_{2} = \left( \begin{array}{rrr} 1 & \frac{ 5 }{ 9 } & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right)$$ $$P_{2} = \left( \begin{array}{rrr} 0 & 1 & 0 \\ 1 & \frac{ 5 }{ 9 } & 0 \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; Q_{2} = \left( \begin{array}{rrr} - \frac{ 5 }{ 9 } & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; D_{2} = \left( \begin{array}{rrr} 9 & 0 & 6 \\ 0 & - \frac{ 25 }{ 9 } & \frac{ 19 }{ 3 } \\ 6 & \frac{ 19 }{ 3 } & 5 \\ \end{array} \right)$$ ==============================================
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9796676502191265, "lm_q1q2_score": 0.834630594078122, "lm_q2_score": 0.8519527963298947, "openwebmath_perplexity": 179.32022306041466, "openwebmath_score": 0.8964061737060547, "tags": null, "url": "https://math.stackexchange.com/questions/2609738/signs-of-eigenvalues-of-3-by-3-matrix" }
photons One usually does not discuss the wave function of a photon because the classical description of light emerges smoothly from the quantum mechanical (it does need the mathematics of quantum field theory to understand the link) and is very accurate and much more easy to use, then going to individual photon levels. The classical electric and magnetic fields of the electromagnetic radiation are built up by a confluence of the wave functions of the zillions of photons that build it up. The fields exist in the wavefunction of the photon, i.e. before it is squared to give the probability of finding the photon with energy h*nu and an (x,y,z,t) point. It is the superposed wavefunctions that will build in confluence the classical light wave with its E and B fields.
{ "domain": "physics.stackexchange", "id": 35561, "lm_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", "url": null }
c++ Instead of coded return values, I'd consider using an enumeration for clarity: http://en.cppreference.com/w/cpp/language/enum // A good rule of thumb is that if you have to document a special meaning of (implicit) enumerators, like "0 = draw, 1 = mech #1 wins, 2 = mech #2 wins", then it's probably better to use an explicit enumeration. I would also suggest using a namespace non-member function instead of a static member function whenever possible: https://stackoverflow.com/a/1435105/859774 Further, unless you're supporting negative turns count turnLimit or want turn to go backward (would that even make sense in your context? BTW, turn++ looks awkward, change it to ++turn), I would use size_t instead of int for turn and turnLimit: http://en.cppreference.com/w/cpp/types/size_t
{ "domain": "codereview.stackexchange", "id": 3839, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++", "url": null }
operating-systems, process-scheduling Title: Does throughput includes CPU idle time also? I have 3 processes P1,P2,P3 having gantt chart as follows => Now, CPU remains idle in 0 - 2 sec and 44 - 47 seconds as I/O is taking place. Does, this affect throughput as 3 processes can be completed in total 47 sec . Hence, throughput = 3 / 47 . Is this correct or am i missing something ? You are correct! According to the defenition Throughput (in case of scheduling in OS) is : Number of processes that can be completed in a unit of time. The process can use both the CPU or the I/O operations. So the I/O time and idle times and CPU time are calculated in throughput. Note: CPU idle time is not calculated when you want to have the Utilization of the CPU. So in your case CPU Utilization is 42/47.
{ "domain": "cs.stackexchange", "id": 17360, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "operating-systems, process-scheduling", "url": null }
c++, c++11, statistics You have a bug on this line: it->second = it->second++; In C++, it->second++ is a side-effecting expression: it means "actually increment it->second, and then return the old value." So (in C++11 and C++14), this statement as a whole has undefined behavior: it's telling the compiler that you want to increment it->second, but also assign a new value to it->second. In C++17, this statement may or may not have defined behavior; I'll have to read up on it and get back to you. Certainly it->second++ is guaranteed to be evaluated prior to the assignment, but I don't know if that completely solves the problem. Anyway, what you meant to write was simply it->second = it->second+1; or ++it->second; Stylistically, I advise writing "increment thing" instead of "thing increment", intuitively because that's how English works, but also because it can be an optimization in some cases involving overloaded operator++ (and is never a pessimization).
{ "domain": "codereview.stackexchange", "id": 24535, "lm_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, statistics", "url": null }
$\int \frac{1}{1+\sqrt{2}\sin{v}}dv$ Now we use Weierstrauss and it remains to compute $\int \frac{2}{t^2+2\sqrt{2}t+1}dt=\int \frac{2}{(t+\sqrt{2})^2-1}dt$ And the rest is a basic partial fraction and we're done
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9664104924150546, "lm_q1q2_score": 0.8115277133196765, "lm_q2_score": 0.839733963661418, "openwebmath_perplexity": 646.9641302313153, "openwebmath_score": 0.9608663320541382, "tags": null, "url": "https://math.stackexchange.com/questions/1230164/evaluate-int-fracdx1-sin-x-cos-x/1230167" }
c++, linux if (endpos == line.size()) { // Success! ... } } catch (std::logic_error &) { // Error parsing the integer ... } Make getChoice() more generic You hardcoded the choices in getChoice(). If you have a program with multiple menus, then you would have to write different versions of getChoice(), duplicating a lot of code. So try to make it more generic. For example, you can have getChoice() take two parameters: one is a string with the title of the menu, the second is a vector of strings with the possible choices. Full example Here is an example of what it could look like: #include <iostream> #include <stdexcept> #include <string> #include <vector> size_t getChoice(const std::string &title, const std::vector<std::string> &choices) { std::cout << title << "\n" << "-------------------\n"; for (size_t i = 0; i < choices.size(); ++i) { std::cout << i << ". " << choices[i] << "\n"; }
{ "domain": "codereview.stackexchange", "id": 39631, "lm_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++, linux", "url": null }
algorithms, algorithm-analysis, search-algorithms, lower-bounds The insight the paper has is the following. If you think about our initial problem, we had an array of size $n$ and wanted to be able to compute prefix parities. We now have a $k$-ary tree where, at each node, we need to be able to solve the prefix parity problem on arrays of size $k$ each, since each node caches information about the layers below it. In the above data structure, we solved the prefix parity problem at each node by just storing an array of the prefix parities, which means that if we need to perform an update, the cost is $O(k)$. The paper's insight is that by using a more clever data structure at each node, you can perform these updates significantly more efficiently.
{ "domain": "cs.stackexchange", "id": 5807, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, algorithm-analysis, search-algorithms, lower-bounds", "url": null }
Ex 4.8.1 $$y^2=1+x^2$$ (answer) Ex 4.8.2 $$x^2+xy+y^2=7$$ (answer) Ex 4.8.3 $$x^3+xy^2=y^3+yx^2$$ (answer) Ex 4.8.4 $$4\cos x \sin y = 1$$ (answer) Ex 4.8.5 $$\sqrt{x} + \sqrt{y} = 9$$ (answer) Ex 4.8.6 $$\tan(x/y) = x+ y$$ (answer) Ex 4.8.7 $$\sin (x+y ) =xy$$ (answer) Ex 4.8.8 $${1\over x} + {1\over y} = 7$$ (answer) Ex 4.8.9 A hyperbola passing through $$(8,6)$$ consists of all points whose distance from the origin is a constant more than its distance from the point (5,2). Find the slope of the tangent line to the hyperbola at $$(8,6)$$. (answer) Ex 4.8.10 Compute $$y'$$ for the ellipse of example 4.8.3. Ex 4.8.11 The graph of the equation $$x^2 - xy + y^2 = 9$$ is an ellipse. Find the lines tangent to this curve at the two points where it intersects the $$x$$-axis. Show that these lines are parallel. (answer) Ex 4.8.12 Repeat the previous problem for the points at which the ellipse intersects the $$y$$-axis. (answer)
{ "domain": "libretexts.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9957353645484887, "lm_q1q2_score": 0.8021964590638407, "lm_q2_score": 0.8056321866478979, "openwebmath_perplexity": 132.11453500192312, "openwebmath_score": 0.916492760181427, "tags": null, "url": "http://math.libretexts.org/TextMaps/Calculus_Textmaps/Map%3A_Calculus_(Guichard)/04._Transcendental_Functions/Implicit_Differentiation" }
c#, performance, game The method resetting the time is not very practical private void textBox1_TextChanged(object sender, EventArgs e) { bestTime = long.MaxValue; tbBestTime.Text = bestTime.ToString(); } This method is setting the text to a value that the typical user will have no frame of reference for.... why is that 'big' number meaningful. Why not just set the tbBestTime.Text to be 'None yet' or something? This is especially significant since all other times the tbBestTime is set, you set it to a floating-point time/1000.0 value. In your messageBox you do a simple /1000.0 for your time display. This is not going to always be 'pretty' since not all floating point values have a neat representation in binary. You should be using a Number formatter to ensure that the presentation of the value is consistent.... consider Custom Numeric Format Strings. Finally, lets talk about accuracy and precision....
{ "domain": "codereview.stackexchange", "id": 5436, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, performance, game", "url": null }
array, scala I have tried as following, but it's not simplified the code much: (Option(b1), Option(b2)) match { case (Some(b1), Some(b2)) => if ( b1.length == b2.length ) { for (i <- b1.indices) { if (b1(i) != b2(i)) throw new AssertionError("b1(%d) != b2(%d)".format(i, i)) } } else { throw new AssertionError("b1.length != b2.length") } case (None, None) => _ case _ => throw new AssertionError("b1 is null while b2 is not, vice versa") } Part of the problem is all the exceptions. There are better ways of handling exceptions, such as Scalaz Validation or Lift's Box. Scala itself comes with Either, which isn't particularly flexible. On the other hand, you are not returning anything, which actually turns the whole code into a reverse Option: you either have Some(exception) or None. Now, the test itself, except for checking for nulls, has a name in Scala: sameElements. Only it will not tell you what the problem was.
{ "domain": "codereview.stackexchange", "id": 803, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "array, scala", "url": null }
c#, console public static void WriteLine(string value, int minDelay, int maxDelay) { Random random = new Random(); for (int c = 0; c < value.Count(); c++) { System.Threading.Thread.Sleep(random.Next(minDelay, maxDelay)); if (c != value.Count() - 1) { Console.Write(value.Substring(c, 1)); } else { Console.WriteLine(value.Substring(c, 1)); } } } }
{ "domain": "codereview.stackexchange", "id": 10209, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, console", "url": null }
ros, msg Original comments Comment by ahendrix on 2017-01-08: Based on your other question ; the import should be from robot_pi.msg import Num or from robot_pi.msg import * Comment by hvn on 2017-01-09: Ok, I've changed its name to robot_pi.msg, leaving its content intact: [code]int32[] data[/code] Now I want to this for publishing: pub=rospy.Publisher('speaker', int32, queue_size=10) a=robot_pi() a.data=[1,2,3] and still get the errors. Where do I go wrong? Comment by ahendrix on 2017-01-09: The message name is Num, so use that when you create the publisher. Comment by hvn on 2017-01-09: I changed Num.msg into robot_pi.msg and changed CMakelists.txt accordingly. New robot_pi.msg doesn't contain Num but "int32[] data". So how is the message name Num? I assume create the publisher is pub = rospy... so int32 should be replaced by the message name? Comment by ahendrix on 2017-01-09:
{ "domain": "robotics.stackexchange", "id": 26668, "lm_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, msg", "url": null }
neural-networks, deep-learning, reference-request, training Yes, this is done normally when using (lack of) improvements to validation metrics as a stop criterion, and many libraries support it as standard. Depending on the library, you may find you need to add a little code to keep a copy of the best-so-far weights, but some will do it automatically by default, or based on setting params on the train or fit function. For example, Keras' EarlyStopping class has a restore_best_weights parameter. Using this class in your main fit function, and setting the param to true will do what you want automatically with no other code required. If not what are arguments against it? Over-fitting to the validation set is a possible concern, as running the validation checks 100s of times to decide the "best" model may lead to some maximisation bias, and make decisions between other hyperparameters than the number of epochs less reliable.
{ "domain": "ai.stackexchange", "id": 3413, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-networks, deep-learning, reference-request, training", "url": null }
of. In that case $\mathcal{T}^2=-1$. (1) A is similar to A. A basis for S 3x3 ( R ) consists of the six 3 by 3 matrices. It turns out that this property implies several key geometric facts. The set of matrix pencils congruent to a skew-symmetric matrix pencil A− B forms a manifold in the complex n2 −ndimensional space (Ahas n(n−1)~2. Orthogonal matrices and isometries of Rn. It is clear that the characteristic polynomial is an nth degree polynomial in λ and det(A−λI) = 0 will have n (not necessarily distinct) solutions for λ. Quandt Princeton University Definition 1. Determining the eigenvalues of a 3x3 matrix. APPLICATIONS Example 2. When I use [U E] = eig(A), to find the eigenvectors of the matrix. Definition 1 A real matrix A is a symmetric matrix if it equals to its own transpose, that is A = AT. A symmetric matrix is symmetric across the main diagonal. It remains to consider symmetric matrices with repeated eigenvalues. The eigenvalues still represent the variance magnitude in the
{ "domain": "hotelgalileo-padova.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9901401455693091, "lm_q1q2_score": 0.8415905760694558, "lm_q2_score": 0.84997116805678, "openwebmath_perplexity": 338.47806095546264, "openwebmath_score": 0.8374430537223816, "tags": null, "url": "http://hotelgalileo-padova.it/kqrf/basis-of-symmetric-matrix.html" }
php, mysql, security, sql-injection /// @param mixed ... values/data to be queried with /// @return A result from mysql_real_query, or false with an error generated when /// number of parameters is larger than the number of placeholder. /// @warning In case that there's more placeholders than parameters, they will be replaced with NULL /// @note You don't have to call mysql_set_charset before invoking this function, since this /// function is not using mysql_real_escape_string but bin2hex instead: /// @see https://dev.mysql.com/doc/refman/5.0/en/hexadecimal-literals.html /// @note You can't bind keywords, as all strings are escaped /// @note Although mysql_* functions are deprecated they are used by this function to maintain /// MySQL C API compatibilty. Feel free to change it to whatever api you are using. function mysql_safe_query(/*$mysql, $format, ...*/) { // get all arguments passed to this function $args = func_get_args();
{ "domain": "codereview.stackexchange", "id": 14993, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, mysql, security, sql-injection", "url": null }
c++, parsing, raytracing Logger: A simple logger class (a singleton) that prints messages when in debug mode. It’s also possible to generate a log file of the currently stored messages load_file(file_path): Takes a path as a string, loads the file and returns its content as a string sanitize_inputs(file_string): Removes leading/trailing spaces, consecutive spaces, comments (starting with #, anywhere in the line) and empty lines split(file_string, delimiter): Takes a string and splits it by a character. Returns a vector of strings order_rule_vector(rule_vector): Some rules in the scene definition format depend on other rules. To allow the user to write them out in any order, the vector of rules is partitioned first so that rules with dependencies come after their dependants
{ "domain": "codereview.stackexchange", "id": 44411, "lm_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++, parsing, raytracing", "url": null }
problem of having a system thickness equal to the height of the floating image and the problem of a ghost image interrupting the visibility of the floating display. How does the angle change the time it takes for the car to slide down the inclined plane? When might you need to use an incline plane to assist you in this way? *Force will vary depending on the incline of your ramp just like the less steep egg ramp helped the egg to use the least amount of force and crack less. The auxiliary plane in this case is perpendicular to the frontal plane of projection and hinged to it. 8-2 the Auxiliary Plane. The displacement function is. The coefficient of friction between the package and the plane is 0. and has a mass of 100 lbs. Inclined Plane, Angle and Components. The Tilted Head Trick Inclined plane problems can be easy. Friction and motion down an inclined plane The materials of the two surfaces in contact clearly influence whether something slides and how fast. When looking at an
{ "domain": "farmaciacoverciano.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.983342958526322, "lm_q1q2_score": 0.8215668551893897, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 396.8773525954262, "openwebmath_score": 0.5151293873786926, "tags": null, "url": "http://farmaciacoverciano.it/mnmj/inclined-plane-angle.html" }
When will eigenvalues of a matrix be positive? This may be very general question, Are there any set of conditions that if some arbitrary matrix say A fulfils we can say that A will have eigenvalues such that all of them are non negative. In other words what are conditions for a matrix to be positive semi definite. Regards Ahsan • There is also Silvester's criterion. – Pp.. Feb 4, 2015 at 14:47 • @AlexR That is what the link is pointing to. – Pp.. Feb 4, 2015 at 14:49 • @Pp.. Sorry, I overlooked the last sentence in the article. Feb 4, 2015 at 14:50 A matrix $A\in\mathbb C^{n\times n}$ is positive semidefinite (All eigenvalues have nonnegative real part) iff
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9732407183668539, "lm_q1q2_score": 0.8045895741108701, "lm_q2_score": 0.826711787666479, "openwebmath_perplexity": 332.6815050625431, "openwebmath_score": 0.82347571849823, "tags": null, "url": "https://math.stackexchange.com/questions/1133387/when-will-eigenvalues-of-a-matrix-be-positive" }
kinect, openni [FATAL] [1462534504.289059881]: Service call failed! [FATAL] [1462534504.289899319]: Service call failed! [FATAL] [1462534504.290088786]: Service call failed! [camera/camera_nodelet_manager-2] process has died [pid 6531, exit code -6, cmd /opt/ros/hydro/lib/nodelet/nodelet manager __name:=camera_nodelet_manager __log:=/home/asaad/.ros/log/8593b2ce-137e-11e6-b5d3-90004ecd8dc9/camera-camera_nodelet_manager-2.log]. log file: /home/asaad/.ros/log/8593b2ce-137e-11e6-b5d3-90004ecd8dc9/camera-camera_nodelet_manager-2*.log [camera/debayer-4] process has died [pid 6569, exit code 255, cmd /opt/ros/hydro/lib/nodelet/nodelet load image_proc/debayer camera_nodelet_manager --no-bond image_raw:=rgb/image_raw image_mono:=rgb/image_mono image_color:=rgb/image_color __name:=debayer __log:=/home/asaad/.ros/log/8593b2ce-137e-11e6-b5d3-90004ecd8dc9/camera-debayer-4.log]. log file: /home/asaad/.ros/log/8593b2ce-137e-11e6-b5d3-90004ecd8dc9/camera-debayer-4*.log
{ "domain": "robotics.stackexchange", "id": 24574, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kinect, openni", "url": null }
Exercise 30.3 Use a spreadsheet to find the first 40 partial sums of the alternating harmonic sequence. Then take the sum of successive pairs and repeat 20 times. (This can be done with one instruction of the form $d j = c j + c j − 1 2$ , copied into columns $d , e , f , g , …$ ) What do you find? How accurately can you determine the sum of this sequence from this data? From the first 20 partial sums alone?
{ "domain": "mit.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9937100971180091, "lm_q1q2_score": 0.8170176407403388, "lm_q2_score": 0.8221891305219504, "openwebmath_perplexity": 257.08825188591885, "openwebmath_score": 0.8512490391731262, "tags": null, "url": "http://ocw.mit.edu/ans7870/18/18.013a/textbook/MathML/chapter30/section02.xhtml" }
• @N.Younger: You're right, there is precisely one string of length $0$, the empty string, often denoted with $\varepsilon$. – Markus Scheuer Apr 1 '17 at 14:04 • @N.Shales: The generating function seems to be incorrect. When taking $k=3,q=3,m=4$ we should obtain $76$, but $[x^4]f(x)=24$. – Markus Scheuer Apr 1 '17 at 19:07 • @N.Shales: Markus' comment is right: also for $q=2$ your generating function is not correct, while that proposed by Markus checks vs. first few values of the parameters. – G Cab Apr 1 '17 at 21:02 • @N.Shales: No worries, everything's fine. Your answer is very nice and there's no reason to change the acceptance. (+1) I just wanted to clarify the small inconsistency. Best regards, – Markus Scheuer Apr 2 '17 at 4:00
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9793540722737479, "lm_q1q2_score": 0.8161198359447032, "lm_q2_score": 0.8333245953120234, "openwebmath_perplexity": 987.1849851478038, "openwebmath_score": 0.9914520382881165, "tags": null, "url": "https://math.stackexchange.com/questions/2211626/number-of-q-ary-strings-of-length-m-which-do-not-contain-k-consecutive-zeros" }
quantum-mechanics $$ P (H_i|F) = P(F|H_i) P(H_i) / P(F) $$ This is Bayes' formula. Here, we have observed some fact $F$ about the final state (which may be, hypothetically, a full knowledge of the final microstate although it's unlikely). To know how this fact influences the probabilities of various initial states, we must calculate the conditional probability $P(F|H_i)$ that the property of the final state $F$ is satisfied for the initial state (assumption or condition) $H_i$. However, this conditional probability is not the same thing as $P(H_i|F)$: they are related by the Bayes formula above where $P(H_i)$ is our prior probability of the initial state $P(H_i)$ - our conclusions about the retrodictions will always depend on such priors - and $P(F)$ is a normalization factor ("marginal probability of $F$") that guarantees that $\sum_i P(H_i|F) = 1$. Second law of thermodynamics
{ "domain": "physics.stackexchange", "id": 672, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics", "url": null }
c++, c++14, dependency-injection Title: Dependency Injection tool for c++ I'm trying to create some tool for easier dependency injection in c++14, here is one of my concepts using std::tuple. template <class... Types> class injector { public: injector(Types... i) { injected_ = std::tuple<Types...>(i...); } protected: template <class T> T *injected() { return std::get<T *>(injected_); } private: std::tuple<Types...> injected_; }; using component_injector = injector<scene *, entity *, foo *>; class component : component_injector { public: component(component_injector injected) : component_injector(injected) {}; virtual ~component(){}; void method() { injected<scene>()->method(); injected<foo>()->method(); } }; int main(int argc, char *argv[]) { scene s; entity e; foo f; component c({&s, &e, &f}); c.method(); return 0; }
{ "domain": "codereview.stackexchange", "id": 26636, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++14, dependency-injection", "url": null }
thermodynamics, entropy Title: Why is the second law of thermodynamics indisputable? Why is the second law of thermodynamics undisputable? On his website Professor Hawking says the following: The cosmologist, Sir Arthur Eddington, once said, 'Don't worry if your theory doesn't agree with the observations, because they are probably wrong.' But if your theory disagrees with the Second Law of Thermodynamics, it is in bad trouble.
{ "domain": "physics.stackexchange", "id": 25843, "lm_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, entropy", "url": null }
c++, template-meta-programming, c++17 Title: Insane template metaprogramming madness Given any callable, deduces the first parameter in the parameter list of the function. Be ware, not for light hearted. template <typename ... Args> struct pick_first; template <typename T, typename ... Args> struct pick_first<T, Args ...> { using type = T; }; template <typename ... Args> using pick_first_t = typename pick_first<Args...>::type; template <typename Callable> struct deduce_first_parameter { private: template <typename Func, template <typename ...> typename Operation> struct extract_function; template <typename R, typename ... Args, template <typename ...> typename Operation> struct extract_function<R(Args...), Operation> { using type = typename Operation<Args...>::type; };
{ "domain": "codereview.stackexchange", "id": 24347, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, template-meta-programming, c++17", "url": null }
algorithms, matrices, matrix-multiplication Title: Compute matrix inversion / multiplication using a black box Suppose you're given a black box $A$, and you're told $A$ can invert a matrix (assuming the matrix is invertible) $M$ in $O(T_A)$. You're also given a black box $B$, and you're told $B$ can multiply two matrices $X$ and $Y$ in $O(T_B)$. There are two problems as follow: How is it possible to compute $X \times Y$ by just using $A$ in $O(T_A)$? How is it possible to compute $X^{-1}$ by just using $B$ in $O(T_B)$? Some ideas that come to mind: We already know that if $X$ is invertible, then: $$X\times X^{-1}=I$$ where $I$ is an identity matrix. But how can I compute $X^{-1}$? Any hint will be constructive. It was shown in 1969, by Strassen, that matrix multiplication and matrix inversion have the same computational complexity. Details can be found on Wikipedia.
{ "domain": "cs.stackexchange", "id": 21882, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, matrices, matrix-multiplication", "url": null }
c#, beginner, validation, homework numbers must be within range (range will vary depending on which menu they're in) strings must not be empty/null string must be no longer than 30 characters in length So I've chosen to write just one method (will be a static method of a 'validator' class) that can handle validation for both and am unsure if this is a good idea - having a method that essentially does more than one thing. The method: public static bool isValid(string input, string type, int min = 0, int max = 0) { if (String.IsNullOrEmpty(input)) return false; else { switch (type.ToLower()) { case "integer": int i; if (Int32.TryParse(input, out i)) return ((i >= min) && (i <= max)); else return false; case "string": return input.Length < charLimit; // charLimit defined as 30 above default: return false; } } }
{ "domain": "codereview.stackexchange", "id": 20492, "lm_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, validation, homework", "url": null }
performance, vba, excel If Not fnd Then 'The field wasn't present in the Unedited file, but is that a problem? If InStr(1, LCase(NPU), "|" & LCase(os.Range(c & 1).Value) & "|") = 0 Then Call Err("The '" & os.Range(c & 1).Value & "' column was not found in the Unedited " & ifn & " file. As such the report will have no data in this column.", sw) End If 'else the field is calculated or not derived from QSI End If 'else the value was found and nothing needs done 'Increment c & j j = j + 1 c = ColNumToStr(j + 1) Loop 'MMA requires special cleaning since those items from that product aren't reported If ifn = "MMA" Then Call MMA_Clean(src.Worksheets(1), sw, mgc, sm) End If
{ "domain": "codereview.stackexchange", "id": 20653, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, vba, excel", "url": null }
used a different notation, to avoid the confusion about the meaning of the. FTC Practice 1 Let f(x) be given by the graph to the right and define. For now, the result provides a useful and efficient way to compute definite integrals. Quotient Identities. The Evaluation Theorem 11 1. The inde nite integral95 6. Integral calculus develops the concept of finding the sum of an infinite series. 69-72) recalled seeing the method in. We have not really proved the Fundamental Theorem. The variable x which is the input to function G is actually one of the limits of integration. 6 Growth and Decay Models, and 5. Piecewise functions. pdf PRACTICE TEST 1 [2. Review Worksheet Solutions. Let A(x) = Z x a f(t) dt. Recall Part 2 of the Fundamental Theorem of Calculus If f is a continuous function on [a, b], then where F is any antiderivative of f. Yesterday we drew rectangles with the height at the left endpoint or the right endpoint or at the midpoint of the interval. Exercises94 5. So I searched
{ "domain": "gesuitialquirinale.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9854964194566753, "lm_q1q2_score": 0.8471955498358522, "lm_q2_score": 0.8596637523076225, "openwebmath_perplexity": 1111.9521134672673, "openwebmath_score": 0.7030860781669617, "tags": null, "url": "http://gesuitialquirinale.it/hkqo/fundamental-theorem-of-calculus-worksheet-doc.html" }