text
stringlengths
1
1.11k
source
dict
neural-networks, activation-functions, perceptron, xor-problem Now, suppose that we use the following activation function \begin{align} f(x)= \begin{cases} 1, \text{ if }x =1\\ 0, \text{ otherwise} \end{cases} \end{align} The output is then summarised as: \begin{array}{|c|c|c|c|} \hline x_0 & x_1 & w_0x_0 + w_1x_1 & f( \cdot )\\ \hline 0 & 0 & 0 & 0 \\ \hline 0 & 1 & 1 & 1 \\ \hline 1 & 0 & 1 & 1 \\ \hline 1 & 1 & 2 & 0 \\ \hline \end{array} Is there something wrong with the way I've defined the activation function? It can be done. The activation function of a neuron does not have to be monotonic. The activation that Rahul suggested can be implemented via a continuously differentiable function, for example $ f(s) = exp(-k(1-s)^2) $ which has a nice derivative $f'(s) = 2k~(1-s)f(s)$. Here, $s=w_0~x_0+w_1~x_1$. Therefore, standard gradient-based learning algorithms are applicable. The neuron's error is $ E = \frac{1}{2}(v-v_d)^2$,
{ "domain": "ai.stackexchange", "id": 862, "lm_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, activation-functions, perceptron, xor-problem", "url": null }
programming-languages, lambda-calculus, functional-programming, programming-paradigms, logic-programming active object programming / object-capability programming ADT functional programming ADT imperative programming concurrent constraint programming concurrent object-oriented programming / shared-state concurrent programming constraint (logic) programming continuation programming descriptive declarative programming deterministic logic programming event-loop programming first-oder functional programming functional programming functional reactive programming (FRP) / weak synchronous programming imperative programming imperative search programming lazy concurrent constraint programming lazy dataflow programming / lazy declarative concurrent programming lazy functional programming monotonic dataflow programming / declarative concurrent programming multi-agent dataflow programming multi-agent programming / message-passing concurrent programming nonmonotonic dataflow programming / concurrent logic programming relational & logic programming
{ "domain": "cs.stackexchange", "id": 19398, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "programming-languages, lambda-calculus, functional-programming, programming-paradigms, logic-programming", "url": null }
polar coordinate plot of the angle theta versus the radius rho. This will give a way to visualize how r changes with θ. Tools for progress. I made the rectangular perspective grid below using Filter > Vanishing. Svenska: Diagram över koordinatsystemet Universal Polar Stereographic (UPS) vars två plana koordinatsystem täcker Arktis och Antarktis. Top 10 most endangered species in the world The tiger has topped the World Wide Fund for Nature's list of species most at threat of extinction. Buy Today!. Graphing Polar Coordinates. is instead of drawing individual circles it would be much easier to draw a polar grid to avoid drawing circles with extremely large radii. Polar grids enable you to more easily design non-rectangular features and boards. This setting can also be turned on and off with the Snap button on the Status bar. The PRG is a grid-based ballasted flat roof system. ID #17350733. Facility; Established Helmholtz-Zentrum für Polar- und. js code below. Search more similar
{ "domain": "paginepets.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765557865636, "lm_q1q2_score": 0.801203825813113, "lm_q2_score": 0.8175744828610095, "openwebmath_perplexity": 1954.5736140711267, "openwebmath_score": 0.5762432217597961, "tags": null, "url": "http://mgdf.paginepets.it/polar-grid.html" }
c# /// <summary> /// Calls Dispose()</summary> /// <param name="disposing"><c>disposing</c> argument</param> protected virtual void Dispose(bool disposing) { if (disposing) { // free managed resources if (this.writer != null) { this.writer.Dispose(); this.writer = null; } } } /// <summary> /// The internal <c>OnClientMessage</c> Handler.</summary> /// <param name="sender">Client who fired the event</param> /// <param name="e"><c>InternalClientEventArgs</c> include the received message</param> public delegate void InternalOnClientMessageHandler(object sender, InternalClientMessageEventArgs e);
{ "domain": "codereview.stackexchange", "id": 6955, "lm_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 }
ros, ik Originally posted by shuai on ROS Answers with karma: 46 on 2012-11-05 Post score: 0 -33 means IK_LINK_IN_COLLISION. so make sure that at your goal pose your robot does not collide with other objects. To check the detailed collision information, use the following code: assuming that you have a variable planning_environment::CollisionModels* cm_, then you can use: std::vector<arm_navigation_msgs::ContactInformation> contacts; cm_->getAllCollisionsForState(*state,contacts); for(int i=0;i<contacts.size();i++) { std::cout<<contacts[i].contact_body_1<<" and "<<contacts[i].contact_body_2 <<" in collision"<<std::endl; } Originally posted by yangyangcv with karma: 741 on 2012-11-05 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 11634, "lm_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, ik", "url": null }
homework-and-exercises, electromagnetism, differential-geometry, tensor-calculus (b) What is the 2-from $F$ equal to. Here applying the dual one more time we have $\star \star F=- F$ and so $F_{\mu\nu}=-\star \star F= -\frac{1}{\sqrt{-|g|}} \epsilon^{23}\phantom{}_{\mu\nu} q\sin\theta$. This is non-zero only in the $tr$ component so $F_{tr}=-\frac{q}{r^2}$. But this is equal to the Electric field in the $r$ direction so $\vec{E}= -\frac{q}{r^2} \hat{e}_r $. My problem is that this is the field of a point charge at the origin, so I should have found $J^0=\rho=q\;\delta(r-0)$. My answer shows that there is a field but no source, and I can't pinpoint where my mistake lies. For completion (c) said to find the Electric and Magnetic fields $B$ is zero, E is mentioned above. (d) Calculate $\int_V \mathrm{d} \star F$. Using Stokes theorem this is $\int_S \star F=\int\limits_0^{2\pi}\int\limits_0^\pi q\sin\theta d\theta d\phi=4\pi\;q$. As expected by a point charge.
{ "domain": "physics.stackexchange", "id": 100037, "lm_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, electromagnetism, differential-geometry, tensor-calculus", "url": null }
special-relativity, time-dilation Title: How can two identical clocks show different time (in case of time dilation) Pardon my ignorance, if we have two identical clocks and we use them to measure time dilation. Suppose we have two identical clocks one in a Satellite around the earth and one on the ground. Now the clocks are mechanical and consist of moving parts. Does the clock in the satellite run faster because it's parts are turning slowly? Or does this have to do with the observer on the ground seeing the clock turning faster due to the amount of time it takes from the clock to reach the observer on ground. Time dilation is not a result of the time light rays take to reach us from the dilated objects.
{ "domain": "physics.stackexchange", "id": 36154, "lm_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, time-dilation", "url": null }
inorganic-chemistry, bond, hydrogen However, according to the difference in the electronegativities, you would expect a predominant covalent character. The maximum is $1.3$ for $\ce{CaH2}$ and the minimum $1.0$ for $\ce{MgH2}$, which translates to a maximum $30\%$ and minimum $18\%$ ionic contribution. Maybe this is where the statement of the question originates from. Experimental findings rather support the more ionic nature of the compounds though, i.e. the found lattice energies were supported by calculations assuming a purely ionic structure. The conclusion of this according to Holleman and Wiberg is that the elements are fused by ionic bonds with covalent contributions. The latter increases from $\ce{CsH}$ to $\ce{LiH}$ and from $\ce{BaH2}$ to $\ce{MgH2}$. The magnesium hydride is already borderline covalent.
{ "domain": "chemistry.stackexchange", "id": 3498, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, bond, hydrogen", "url": null }
catkin-make Originally posted by DPK27 on ROS Answers with karma: 5 on 2014-04-07 Post score: 0 Original comments Comment by Dirk Thomas on 2014-04-08: First of all if you don't use the "REQUIRED" keyword you can't even be sure that the package has been found. And second you should output the content of the variable ImageMagick_INCLUDES to check what it actually contains. It might just be empty because either the package was not found or the variable name is actually wrong and should be different. I'm whether a catkin expert nor have I ever used ImageMagick but after a short search I found this CMakeLists.txt. They do find_package(ImageMagick COMPONENTS Magick++ REQUIRED) This might help you. Originally posted by BennyRe with karma: 2949 on 2014-04-07 This answer was ACCEPTED on the original site Post score: 0 Original comments Comment by DPK27 on 2014-04-07: CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
{ "domain": "robotics.stackexchange", "id": 17569, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "catkin-make", "url": null }
quantum-mechanics, hilbert-space, symmetry, group-representations, eigenvalue Well, I guess some problem to it is that $S^*$ is not even a normed space, and therefore I can't even ask whether there exists a Schauder-basis to it along the same line as I would do for a Hilbert space(?) Yet I think in the framework of rigged Hilbert spaces $S^*$ comes with some induced topology and therefore one can at least address the question of whether $S^*$ (or some $V_E$ subspace if it) is topologically separable. Independent of $S^*$ (or some $V_E$ subspace if it) being separable, there is an uncountable Hamel-basis to the eigenspaces $V_E$ but then any state can be represented as linear combination of a finite subset of that Hamel-basis. So not knowing whether the $V_E$ are separable, a more well-defined question one might ask is whether there exists a Hamel-basis $\{\varphi_i \}_{i\in I}$ of $V_E$ such that each $\varphi_i$ is eigenvector of all translations. Edit 2:
{ "domain": "physics.stackexchange", "id": 54675, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, hilbert-space, symmetry, group-representations, eigenvalue", "url": null }
# Sorting n weight disks with decision tree I was refreshing some old tests about sorting algorithms, there was a question as follow: Question: we have n weight disks with different weights and we want to sort them pair by pair, How many times we have to weight in worst case (maximum comparisons) to sort the whole disks? the answer was $$\lceil \log n! \rceil$$. My issue is that I could not get to the answer and could anyone elaborate on how the answer is working? Also one of the options was $$\lceil n\log n \rceil$$, and as we know, the order of $$\log n!$$ and $$n\log n$$ are same, So why shouldn't the ceilings be equal too? and How does having an ordered and distinct set of size n, matter in decision tree?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9830850857421197, "lm_q1q2_score": 0.8060249190887845, "lm_q2_score": 0.8198933447152497, "openwebmath_perplexity": 254.07745252916126, "openwebmath_score": 0.5754922032356262, "tags": null, "url": "https://cs.stackexchange.com/questions/138305/sorting-n-weight-disks-with-decision-tree/138312" }
a desired signal frequency, the moving average filter is a more direct approach to simply “smoothing out” a signal. Given a series of numbers and a fixed subset size, the first element of the moving average is obtained by taking the average of the initial fixed subset of the number series. The "simple" average or mean of all past observations is only trend into account. According to Hull, the HMA “almost eliminates lag altogether and manages to improve smoothing at the same time.” The HMA is fairly complex to calculate so you can read more about the method here. A moving average is a technical analysis indicator that helps smooth out price action by filtering out the “noise” from random price fluctuations. Daniels Trading, its principals, brokers and employees may trade in derivatives for their own accounts or for the accounts of others. more Simple Moving Average (SMA) Definition It is a simple a n d common type of smoothing used in time series analysis and forecasting. Another way of
{ "domain": "inside-science.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9664104953173166, "lm_q1q2_score": 0.8447174169513181, "lm_q2_score": 0.8740772384450967, "openwebmath_perplexity": 1510.8730050310744, "openwebmath_score": 0.5109207630157471, "tags": null, "url": "http://inside-science.com/kasoor-prateek-ppvcw/moving-average-smoothing-7812f3" }
navigation, ekf, odometry, robot-pose-ekf, encoder Can the error be from parameters in move_base? I checked the frames, looks fine too. Here is the husky_ekf.yaml : freq: 10.0 output_frame: "odom" sensor_timeout: 1.0 publish_tf: true odom_used: true imu_used: true The gps is disabled And here is the launch file: <launch> <node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf" output="screen"> <rosparam command="load" file="$(find clearpath_tec_bringup)/config/husky_ekf.yaml"/> <remap from="gps" to="gps/fix"/> <remap from="imu_data" to="imu/data"/> <remap from="odom" to="encoder"/> </node> </launch>
{ "domain": "robotics.stackexchange", "id": 20796, "lm_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, ekf, odometry, robot-pose-ekf, encoder", "url": null }
signal-analysis, continuous-signals, signal-synthesis Title: How to prove: high-slope/more change is high freq part of signal Generally, everyone knows that "the part of signal with high-slope is the high frequency part." What is the definition or theory behind it? How to prove this well-known thing? perhaps, I miss something apparent. The Fourier transform of the derivative of a signal $x(t)$ is given by $$\dot{x}(t)\Longleftrightarrow j\omega X(\omega)\tag{1}$$ where $\dot{x}(t)$ denotes the derivative of $x(t)$, and $X(\omega)$ is the Fourier transform of $x(t)$. From (1) we have $$\dot{x}(t)=\frac{j}{2\pi}\int_{-\infty}^{\infty}\omega X(\omega)e^{j\omega t}\,d\omega\tag{2}$$ If we now assume that $x(t)$ is band-limited with cut-off frequency $\omega_c$ (in radians), then (2) becomes $$\dot{x}(t)=\frac{j}{2\pi}\int_{-\omega_c}^{\omega_c}\omega X(\omega)e^{j\omega t}\,d\omega\tag{3}$$ From (3) we can determine an upper bound for $|\dot{x}(t)|$: $$|\dot{x}(t)|\le \frac{1}{2\pi}\int_{-\omega_c}^{\omega_c}|\omega| |X(\omega)|\,d\omega
{ "domain": "dsp.stackexchange", "id": 2571, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "signal-analysis, continuous-signals, signal-synthesis", "url": null }
ros, ros2, logger Title: Is it possible to change the logger without building ROS packages (ROS2) Is it possible to change the logger, spdlog to log4cxx, without having to rebuild individual ros packages? Originally posted by MHx on ROS Answers with karma: 45 on 2020-11-25 Post score: 2 Unfortunately you'll need to rebuild rcl. rcl picks the logger to use at compile time, which by default is rcl_logging_spdlog. Add rcl_logging_log4cxx and rcl to your workspace, then choose the logging implementation by setting the environment variable RCL_LOGGING_IMPLEMENTATION. export RCL_LOGGING_IMPLEMENTATION=rcl_logging_log4cxx colcon build --cmake-clean-cache --packages-select rcl_logging_log4cxx rcl There may be more relevant info in this thread: https://discourse.ros.org/t/ros2-logging/6469/24 Originally posted by sloretz with karma: 3061 on 2020-12-18 This answer was ACCEPTED on the original site Post score: 2
{ "domain": "robotics.stackexchange", "id": 35797, "lm_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, ros2, logger", "url": null }
rqt Resizing the svg (your point 1) Setting max_icon_size in my setup (your point 2) Not calling setFixedSize in the widget. Thanks for your help!
{ "domain": "robotics.stackexchange", "id": 22518, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rqt", "url": null }
vision, cognition, cat Title: How do big cats perceive objects, specifically vehicles? Right so we have been on safari in South Africa recently and before encountering big cats (lions) we have been told to hold still and not reach out beyond the boundaries of our safari vehicle because the cats would see it as uninteresting "object", unless something sticks out or moves.
{ "domain": "biology.stackexchange", "id": 11248, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vision, cognition, cat", "url": null }
regex, bash, sed Always put double quotes around variable and command substitutions. Exception: when you understand why you need to leave the double quotes off and why it's safe to do so. When the shell sees a variable substitution ($foo or ${foo}) or a command substitution (`foo` or $(foo)) outside double quotes, the result of the substitution undergoes word splitting and globbing (filename generation). That was one of the problems with $(ls -1 ./*) earlier. This should be echo "$filename". In fact, it would be better printf "%s" "$filename", because echo itself performs expansions. In bash, unless you've set non-default options to enable backslash expansion, the only problem is that a few arguments beginning with a - look like option, and in this specific case the filename will begin with ./.
{ "domain": "codereview.stackexchange", "id": 915, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "regex, bash, sed", "url": null }
organic-chemistry, biochemistry Title: Do acetyl-CoA, acetyl-CoA carboxylase and acetyl-glutamate carry any charge? Do the following compounds have any charge? If not, then why? If yes, is there any database that would give me this information if the compound is negatively or positively charged? The compounds are as follows: Acetyl-CoA Acetyl-CoA carboxylase Acetyl-glutamate I have searched and somehow I am getting more confused. chemicalize.org is a good utility for predicting many molecular properties such as pKa, pI and charge. The Human Metabolome Database uses the same underlying software but tabulates some of the data (eg charge is explicitly stated). Acetyl-CoA, for example, has a pI of 1.32 and charge of -4 at pH=7.4. Your second link is to a portion of an enzyme (a serine residue that gets phosphorylated). Prediction of protein properties can be done with ProtParam. Human Acetyl-CoA Carboxylase 1, for example, has a pI of 5.95 and charge of -39.
{ "domain": "biology.stackexchange", "id": 3816, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, biochemistry", "url": null }
# jacobiSymbol ## Description example J = jacobiSymbol(a,n) returns the value of the Jacobi symbol for integer a and positive odd integer n. ## Examples collapse all Find the Jacobi symbol for $a=1,2,\dots ,9$ and $n=3$. a = 1:9; n = 3; J = jacobiSymbol(a,n) J = 1×9 1 -1 0 1 -1 0 1 -1 0 The Jacobi symbol is periodic with respect to its first argument, where $\left(\frac{a}{n}\right)=\left(\frac{b}{n}\right)$ if $a\equiv b\phantom{\rule{0.2222222222222222em}{0ex}}\left(mod\phantom{\rule{0.2222222222222222em}{0ex}}n\right)$. Find the Jacobi symbol for $a=28$ and $n=9$. J = jacobiSymbol(28,9) J = 1 The Jacobi symbol is a completely multiplicative function, where the Jacobi symbol satisfies the relation $\left(\frac{a}{n}\right)=\left(\frac{{a}_{1}}{n}\right)×\left(\frac{{a}_{2}}{n}\right)×\dots \left(\frac{{a}_{r}}{n}\right)$ for $a={a}_{1}×{a}_{2}×\dots {a}_{r}$. Show that the Jacobi symbol follows this relation for $a=28=2×2×7$.
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.98504291340685, "lm_q1q2_score": 0.8098915786466663, "lm_q2_score": 0.8221891327004133, "openwebmath_perplexity": 987.2364195937823, "openwebmath_score": 0.9013099670410156, "tags": null, "url": "https://in.mathworks.com/help/symbolic/jacobisymbol.html" }
interval, rust All together, this now looks like use std::{cmp, fmt}; use std::iter::FromIterator; #[derive(Debug, Copy, Clone)] struct Range { start: i32, end: i32, } impl Range { fn new(start: i32, end: i32) -> Range { Range { start: start, end: end, } } fn overlaps(&self, other: &Range) -> bool { (other.start >= self.start && other.start <= self.end) || (other.end >= self.start && other.end <= self.end) } fn merge(&mut self, other: &Range) { self.start = cmp::min(self.start, other.start); self.end = cmp::max(self.end, other.end); } } impl fmt::Display for Range { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "[{},{}]", self.start, self.end) } } #[derive(Debug, Clone)] struct RangeStack { ranges: Vec<Range>, }
{ "domain": "codereview.stackexchange", "id": 15569, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "interval, rust", "url": null }
c++, algorithm, image, error-handling, c++20 dictionaryBasedNonlocalMean template function implementation: template<class ExPo, class ElementT = double> requires (std::is_execution_policy_v<std::remove_cvref_t<ExPo>>) constexpr static auto dictionaryBasedNonlocalMean( ExPo execution_policy, const std::tuple< std::vector<std::vector<TinyDIP::Image<ElementT>>>, std::vector<std::vector<TinyDIP::Image<ElementT>>> >& dictionary, const std::vector<TinyDIP::Image<ElementT>>& input, const double gaussian_sigma = 3.0, const double gaussian_mean = 0, const double threshold = 1e-160) noexcept {
{ "domain": "codereview.stackexchange", "id": 42578, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, algorithm, image, error-handling, c++20", "url": null }
Your proof essentially repeats the proof that the functions $$e^{a_j x}$$ are linearly independent. The “$$y$$-terms” have “no effect” because they occur as (non-zero) factors $$e^{b_j y^2}$$ which are constant with respect to $$x$$. What you observed is this: If $$g_1, \ldots, g_n : A \to \Bbb R$$ and $$h_1, \ldots, h_n : B \to \Bbb R$$ are functions such that • $$g_1, \ldots, g_n$$ are linearly independent, and • there is a $$y_0 \in B$$ such that $$h_j(y_0) \ne 0$$ for all $$j$$, then the functions $$f_j : A \times B \to \Bbb R$$, $$f_j(x, y) = g_j(x) h_j(y)$$, $$j=1, \ldots, n$$, are linearly independent.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9817357259231532, "lm_q1q2_score": 0.842101595010954, "lm_q2_score": 0.8577681068080748, "openwebmath_perplexity": 305.62483752007046, "openwebmath_score": 0.9506980776786804, "tags": null, "url": "https://math.stackexchange.com/questions/3245485/why-can-linear-independence-of-eax-by2-be-proven-without-considering-y" }
newtonian-mechanics, classical-mechanics, aerodynamics, centripetal-force, aircraft Title: Turning an Airplane. What actually causes the circular motion in a banked (roll) turn? Basically I'm wondering if this is correct. Which essentially says that you need a torque to get the nose of the craft to turn and that this is provided by the rear tail surfaces. After trying to simulate airplane flight in a game engine, I'm thinking that link is correct. Although airplane flight is rarely described like that. If you just apply force in the direction of lift (and thrust), then during a roll, the horizontal component of lift causes the plane to get a velocity with a horizontal component. But the plane does not turn. The plane slips to the side while going forward. The horizontal component of lift does not stay perpendicular to the velocity vector so it doesn't move in a circle.
{ "domain": "physics.stackexchange", "id": 66887, "lm_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, classical-mechanics, aerodynamics, centripetal-force, aircraft", "url": null }
java, beginner, array, game-of-life // ... public void start() { task = new TimerTask() { @SuppressWarnings("synthetic-access") @Override public void run() { currentGeneration = progressGeneration(currentGeneration); view.drawGeneration(currentGeneration); } }; new Timer().schedule(task, 0, 15); } public void stop() { if (task == null) { return; } task.cancel(); } } Now we can start/stop the simulation from the app level and the code isn't stuck in an infinite loop! Full Code GameOfLifeApp.java public class GameOfLifeApp {
{ "domain": "codereview.stackexchange", "id": 20053, "lm_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, array, game-of-life", "url": null }
physical-chemistry, thermodynamics To derive $\mathrm{d}A$: What you're looking for is a Legendre transform. You know $$ \mathrm{d}U = T\mathrm{d}S - p\mathrm{d}V $$ from the First Law of thermodynamics. Hence the natural variables for $U$ are $S$ and $V$, not $T$ and $V$ (which is desired). So instead of $U(S,V)$ you want $?(T,V)$ where $?$ happens to be the Helmholtz free energy $A$, sometimes denoted $F$ by physicists. To do the transform, you take your original function - the exchange variable times its differential form, i.e. $$ A(T,V) = U(S,V) - S\left(\frac{\partial U}{\partial S}\right)_{V}$$ You know also that $$\left(\frac{\partial U}{\partial S}\right)_{V} = T$$ because $$\mathrm{d}U(S,V) = \left(\frac{\partial U}{\partial S}\right)_{V}\mathrm{d}S + \left(\frac{\partial U}{\partial V}\right)_{S}\mathrm{d}V = T\mathrm{d}S - p\mathrm{d}V$$ by total derivative formula for a function, in this case $U$.
{ "domain": "chemistry.stackexchange", "id": 4960, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "physical-chemistry, thermodynamics", "url": null }
simulation, applications A real example of a difficult problem for classical computers, is the calculation of the energies of the iron-molybdenum complex (FeMoco), which is the active site of the nitrogenase enzyme, which is able to make ammonia from N2 and H2. Currently this reaction is accomplished by the Haber-Bosch process, which consumes 1-2% of the world's energy supply because it has to be done at 300–500°C and 60-180 atm pressure, and because it produces the fertilizers that are used by farmers that feed something like 80% of the world's population. The nitrogenase enzyme exists in nitrogen-fixing bacteria that accomplish the nitrogen-fixing task at basically room temperature and ambient pressure, so if we could figure out how that enzyme works, then we may be able to get it to work on a larger industrial scale (i.e. chemical engineering). It has been estimated that a quantum computer would need millions of qubits to solve just one small part of this problem after including the qubits used in error
{ "domain": "quantumcomputing.stackexchange", "id": 5112, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "simulation, applications", "url": null }
During a 6·day local trade show, the least number of people registered in a single day was 80. Was the average (arithmetic mean) number of people registered per day for the 6 days greater than 90 ? Statement 1: For the 4 days with the greatest number of people registered, the average (arithmetic mean) number registered per day was 100. Statement 2: For the 3 days with the smallest number of people registered, the average (arithmetic mean) number registered per day was 85. Statement 1: For the 4 days with the greatest number of people registered, the average (arithmetic mean) number registered per day was 100. the average number of people registered for 4 days is 100 i.e. total number of people registered on those 4 days = 4*100 = 400 Minimum number of people registered = 80 for minimum possible average assume that the other two days has 80 registrations mean = (400 + 80*2)/6 = 560/6 = 93.33 > 90 so the mean will be greater than 90. hence the statement is sufficient.
{ "domain": "qsleap.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9777138118632621, "lm_q1q2_score": 0.8038656731349836, "lm_q2_score": 0.822189134878876, "openwebmath_perplexity": 1138.940708778082, "openwebmath_score": 0.2839490473270416, "tags": null, "url": "https://www.qsleap.com/gmat/qna/t/data-sufficiency/statistics" }
multiplication for square matrices is not a commutative operation, but still satisfies the associative and distributive properties. 10 (+) Understand that the zero and identity matrices play a role in matrix addition and multiplication similar to the role of 0 and 1 in the real numbers. It does not matter what the dimension is, just multiply the scalar by every element in the matrix. Eigenvalues and Eigenvectors of symmetric matrix with Jacobi algorithm. a) Compute BC and CB: b) An operation is said to be commutative if order does not matter. Mastering Matrices For CSEC 7 - Operations Involving Matrices (Scalar Multiplication) 8 - Knowing When Two Matrices Can Be Multiplied Together 11 - Mixed Matrix Operations Worksheet With Solutions 3 Chapter 2: Finding The Inverse of A Matrix. State your result. In the case of multiplying two matrices, such as C = AB, where neither A nor B are scalars, it must be the case that. Worksheet 01/ Matrix Theory: De nitions & Basic Operations 6 Model 2:
{ "domain": "delleparoleguerriere.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9890130583409235, "lm_q1q2_score": 0.8198313101749608, "lm_q2_score": 0.8289388125473629, "openwebmath_perplexity": 668.8630721038613, "openwebmath_score": 0.7847918272018433, "tags": null, "url": "http://delleparoleguerriere.it/jfte/scalar-multiplication-of-matrices-worksheet.html" }
pcl, catkin, ros-groovy <!-- The export tag contains other, unspecified, tags --> <export> <!-- You can specify that this package is a metapackage here: --> <!-- <metapackage/> --> <!-- Other tools can request additional information be placed here --> </export> </package>
{ "domain": "robotics.stackexchange", "id": 16245, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pcl, catkin, ros-groovy", "url": null }
reinforcement-learning, papers, trust-region-policy-optimization, action-spaces Title: Why does each component of the tuple that represents an action have a categorical distribution in the TRPO paper? I was going through the TRPO paper, and there was a line under Appendix D "Approximating Factored Policies with Neural Networks" in the last paragraph which I am unable to understand The action consists of a tuple $(a_1, a_2..... , a_K)$ of integers $a_k\in\{1, 2,......,N_k\} $ and each of these components is assumed to have a categorical distribution.
{ "domain": "ai.stackexchange", "id": 2465, "lm_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, papers, trust-region-policy-optimization, action-spaces", "url": null }
#ut.plotPoint3d(ax,0,0,0,'b') fig.ax.view_init(azim=85,elev=-10) fig.hideAxes() fig.set_title(r'$\mathbf{b}$ is not in Col $A$ ($A$ is $3 \times 2$)', 'b is not in Col A', size = 16) fig.save(); Now our assumption is that the reason that $$\mathbf{b}$$ does not lie in $$\operatorname{Col}\,A$$ is due to measurement error. ### Finding a Good Approximate Solution¶ If we make the assumption that measurement errors are small, then we should be quite satisfied to find an $$\mathbf{x}$$ that makes $$A\mathbf{x}$$ as close as possible to $$\mathbf{b}.$$ In other words, we are looking for an $$\mathbf{x}$$ such that $$A\mathbf{x}$$ makes a good approximation to $$\mathbf{b}.$$
{ "domain": "bu.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9835969670030071, "lm_q1q2_score": 0.8196555505851443, "lm_q2_score": 0.8333246015211008, "openwebmath_perplexity": 3395.04396576232, "openwebmath_score": 0.7953481078147888, "tags": null, "url": "https://www.cs.bu.edu/fac/crovella/cs132-book/L22LeastSquares.html" }
javascript, optimization, design-patterns, timer pauseTimer = function () { window.clearInterval(timerId); timerId = -1; }, startTimer = function () { if (timerId === -1) { timerId = window.setInterval(updateTimer, interval); } }, resetTimer = function () { pauseTimer(); millis = 0; seconds = 0; minutes = 0; displayTimer(); }; return function (startButton, pauseButton, resetButton) { addClickHandlerToButton(startButton, startTimer) addClickHandlerToButton(pauseButton, pauseTimer) addClickHandlerToButton(resetButton, stopTimer) displayTimer(); }; })(); // PhoneGap, jQuery & device is ready now -> initialize $(document).on('deviceready', function() { stopwatch('startStopwatch', 'pauseStopwatch', 'resetStopwatch'); }); }(window.MyApp = window.MyApp || {}, jQuery));
{ "domain": "codereview.stackexchange", "id": 2272, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, optimization, design-patterns, timer", "url": null }
electricity, electric-current, electrical-engineering Now, the real question begins: What if we used the relation $P=I^2 R$, assuming supply to be current limited? Then the answer would be: The heat generated would be halved. Why such a contradiction arise? Is my assumption correct or is there some mistake that just somehow lead to a right answer ? You just answered your question yourself: if the supply is voltage-limited, the first answer is correct. Under the assumption of constant voltage, what the expression $P = I^2 R$ really means is $$P = I(R)^2 R.$$ That is, current is a function of the resistance. Since $I(R) = V/R$ by Ohm's law, you get back $P = V^2/R$ by substitution. Of course, the conceptual opposite occurs if the supply is current-limited instead -- all your expressions in that case would reduce to $P = I^2 R$ with voltage being a function of the resistance.
{ "domain": "physics.stackexchange", "id": 77717, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electricity, electric-current, electrical-engineering", "url": null }
cc.complexity-theory, linear-programming is there any known relation between the complexity of a problem and it's expressibility in the form of (integer) Linear Programming (except the obvious facts stated in the previous paragraph)? This is essentially asking which special cases of ILP can be solved in polynomial time. One of the fairly large classes of ILP which can be solved in polynomial time is ILP with totally unimodular constraint matrices; see Wikipedia. But if you want a very general result, it is unlikely that you get anything more than tautological statements such as “the optimization problem is in P if there is a polynomial-time algorithm to solve it.” Indeed, your question is formally equivalent to asking which problems in NP are in P, and obviously we do not know any necessary and sufficient characterization which is easy to check.
{ "domain": "cstheory.stackexchange", "id": 1565, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cc.complexity-theory, linear-programming", "url": null }
experimental-physics, material-science, home-experiment Is there a simple explanation for this phenomenon? (I apologise if this is an ill fitted question; my motivation for asking is really only curiosity because I found this quite surprising). When you cut the plastic film using the prong of a fork, it probably slightly stretched the film as it was being cut. The stretching, though, was only along the edge. The only way the stretched portion can be stretched but remain attached to the unstretched portion is for it to deform into a curve that lets the edge be longer than the straight edge that would have resulted if the cut were done with an extremely sharp knife. Because the stretched portion is very narrow, the curve of the edge can't depart much (in distance) from a straight line. The amount of stretch appears to be over 2x, so a lot of extra length needs to be packed into a short space. The most efficient way to do that is something resembling a sine curve. If you make a similar cut with a fresh razor blade, I'd guess that you will just
{ "domain": "physics.stackexchange", "id": 63457, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "experimental-physics, material-science, home-experiment", "url": null }
window-functions, optimization Title: Compute Hann window without cos function In an environment with limited memory and computing power it is interesting to be able to generate a Hann window without using a cache or repetitive calling of expensive functions such as sine and cosine functions. The following document demonstrate the use of an alternative approach in order to compute a pure tone by storing only a coefficient and the two last results: http://ww1.microchip.com/downloads/en/appnotes/00543c.pdf Rewrite using python code: import math import matplotlib.pyplot as plt tone = [0.0] * 50 tone_freq = 1720.0 sample_rate = 44100.0 ffs = tone_freq / sample_rate; k1 = math.cos(2 * math.pi * ffs) k2 = math.sin(2 * math.pi * ffs) tone[1] = k2 for i in range(2, len(tone)): tone[i] = 2 * k1 * tone[i-1] - tone[i-2] plt.plot(tone) plt.show()
{ "domain": "dsp.stackexchange", "id": 9035, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "window-functions, optimization", "url": null }
ros2 Title: How can I communicate with a ros1 service from ros2 humble? I can get things to work if I stick with galactic, but there does not appear to be a build of ros1_bridge for humble and the build instructions on github don't work on ubuntu jammy (cannot install the required versions of boost). Here is a demonstration of the problem. First, start a ros1 master and the demo service: $ docker network create ros 724602ee919cae9c9decc71cfabcc098ecdf07d428df70a789059ea5303ef6d5 $ docker run -it --rm --net ros --name rosmaster osrf/ros:noetic-desktop roscore ...output ommitted... $ docker run -it --rm --net ros --name server \ -e ROS_MASTER_URI=http://rosmaster:11311/ \ -e ROS_HOSTNAME=server \ osrf/ros:noetic-desktop \ rosrun roscpp_tutorials add_two_ints_server
{ "domain": "robotics.stackexchange", "id": 38936, "lm_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", "url": null }
for all $x$. We will now use the inequality in $(3)$ to evaluate the limit of interest. We substitute $x\to \frac{f(x)}{x+g(x)}$ into $(3)$ and write $$\left|\frac{\frac{xf(x)}{x+g(x)}}{\sqrt{1+\left(\frac{f(x)}{x+g(x)}\right)^2}}\right| \le \left|x\arctan\left(\frac{f(x)}{x+g(x)}\right)\right|\le \left|\frac{xf(x)}{x+g(x)}\right| \tag 4$$ whereupon applying the squeeze theorem to $(4)$ reveals that $$\bbox[5px,border:2px solid #C0A000]{\lim_{x\to \infty} x\arctan\left(\frac{f(x)}{x+g(x)}\right)=0}$$ Note that $$\lim_{y\to0}{\arctan y\over y}=\lim_{y\to0}{\arctan y-\arctan0\over y-0}=\arctan{\,’}(0)=1\ .$$ It follows that under the given assumptions $$\lim_{x\to\infty}\left( x\arctan{f(x)\over x+g(x)}\right)=\lim_{x\to\infty}\left({\arctan{f(x)\over x+g(x)}\over{f(x)\over x+g(x)}}\cdot{ f(x)\over 1+{g(x)\over x}}\right)=\lim_{x\to\infty} f(x)=0\ .$$
{ "domain": "bootmath.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.967899295134923, "lm_q1q2_score": 0.8187870925549051, "lm_q2_score": 0.8459424411924673, "openwebmath_perplexity": 127.04949287767617, "openwebmath_score": 0.9735392928123474, "tags": null, "url": "http://bootmath.com/limit-lim_xtoinftyxtan-1fx-xgx.html" }
torque, moment Title: Wheelie physics part 2 Okay, so I got some really great advice from the community here but I am still hung up on some conceptual problems. I posted earlier trying to determine the axis that a bicycle rotates about when doing a wheelie. Since then I have realized that there is not any unique axis in rotational motion, rather axes are better chosen for the convenience of calculation. Here is the diagram of the object of interest:
{ "domain": "physics.stackexchange", "id": 21669, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "torque, moment", "url": null }
python, performance, signal-processing can be replaced with convenient max function call, like req_angles = max(round(req_angles), 1) Primary "peak" and "value" indices: peak_inds, valley_inds = [], []. Instead of declaring and accumulating separate lists which then will be feed to Counter - we can define and accumulate them as counters at once peak_counts, valley_counts = Counter(), Counter() Substitute Algorithm (Substitute Algorithm) for "stepping through overlapping windows": the initial looping scheme: ind = 0 while ind + window_size <= len(arr): flattened = detrend(arr[ind:ind + window_size]) ... ind += window_step has more flexible equivalent: arr_size = len(arr) # getting list size at once for i in range(0, arr_size, window_step): flattened = detrend(arr[ind:ind + window_size]) ...
{ "domain": "codereview.stackexchange", "id": 36347, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, signal-processing", "url": null }
c++, thread-safety, concurrency, c++20 //! Move Asignment thread_pool& operator = (thread_pool&& other) noexcept; //! Get the concurency of the thread pool. size_t get_concurency() const; //! Join each thread in the pool. //! //! Calling join ensures that each thread function terminates and //! the coresponsing memory is freed. void join(); //! //! Swap thread pool. void swap(thread_pool& other) noexcept; private: std::vector<std::thread> threads; thread_pool(const thread_pool&) = delete; thread_pool& operator = (const thread_pool&) = delete; }; } #endif thread_pool.cpp: #include "thread_pool.h" namespace c9y { thread_pool::thread_pool() noexcept {} thread_pool::thread_pool(std::function<void()> thread_func, size_t concurency) { for (size_t i = 0; i < concurency; i++) { threads.emplace_back(std::thread(thread_func)); } }
{ "domain": "codereview.stackexchange", "id": 44139, "lm_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++, thread-safety, concurrency, c++20", "url": null }
beginner, rust fn find(query: &String, start: &OsString) -> io::Result<Vec<PathBuf>> { let start = PathBuf::from(start); let mut dirs = VecDeque::from(vec![start]); let mut result = Vec::new();
{ "domain": "codereview.stackexchange", "id": 31487, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, rust", "url": null }
javascript, strings, combinatorics return anagrams; } With some sample timings to count the anagrams of "codereview": $ time node anagrams-heap-iterative.js 3628800 real 0m0.855s user 0m0.000s sys 0m0.015s $ time node anagrams-megawac.js 3628800 real 0m2.286s user 0m0.000s sys 0m0.000s
{ "domain": "codereview.stackexchange", "id": 23030, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, strings, combinatorics", "url": null }
Here we can let $x=t\text{.}$ Then $y=t^2\text{.}$ What does $z$ equal (as a function of $t$)? Then the vector-valued function we obtain that traces out the intersection of these surfaces is: \begin{equation*} \vec{\textbf{r}}(t) = t \hat{\textbf{i}} + t^2 \hat{\textbf{j}} + (t^2 + t^4) \hat{\textbf{k}} \end{equation*} This represents the same curve as specified by the parametric functions: \begin{align*} x &= t\\ y &=t^2\\ z &=t^2 + t^4 \end{align*} Now let’s verify this in CalcPlot3D visually! a. Open the CalcPlot3D app. b. Once the app is loaded and active, enter the first function listed above ($z =$ x^2 + y^2) in the default function object on the left and press Enter (or click on the Graph button). The surface plot of this paraboloid should appear in the plot window.
{ "domain": "monroecc.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429604789206, "lm_q1q2_score": 0.8578166483503693, "lm_q2_score": 0.8723473730188542, "openwebmath_perplexity": 809.9650212303267, "openwebmath_score": 0.7889100313186646, "tags": null, "url": "https://www.monroecc.edu/faculty/paulseeburger/calcnsf/CalcPlot3D/CalcPlot3D-Help/section-31.html" }
machine-learning Title: why use a perceptron when it seems multiple IF staments do the same thing If we are to stick with an X and Y axis, the X axis being Time and the Y axis being test scores. Where more time equates to High test scores. You can use a binary classifcation algorithm to predict success. Wouldn't 2 if statements do the same thing If (time > someValue) User will probably pass Another Scenario Is I have papayas, and they have two labels, squishness and color. If the squishness is greater then 7 //on a scale of 1-10 AND the color is green Then it is a good papaya Else It isn't ripe.
{ "domain": "datascience.stackexchange", "id": 2029, "lm_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", "url": null }
java, image, libgdx Array<Vector2> spots = new Array<>(); boolean next; for (int i = 0; i < spotCount; i++) { next = false; while (!next) { Vector2 v = new Vector2(MathUtils.random(width), MathUtils.random(height)); if (!spots.contains(v, false)) { spots.add(v); next = true; } } } Vector2 v = new Vector2(); Color c = new Color(spotColor); for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { v.set(x, y); if (spots.contains(v, false)) { c.a = 1; p.drawPixel(x, y, Color.rgba8888(c)); continue; } c.a = calcAlpha(v, spots); p.drawPixel(x, y, Color.rgba8888(c)); } } return new Texture(p); }
{ "domain": "codereview.stackexchange", "id": 14879, "lm_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, image, libgdx", "url": null }
statistical-mechanics, many-body, glass, disorder, spin-models First, creating a realization of the system with a certain (fixed) disorder $J$, and calculating the corresponding free energy. Then, averaging over all the free energies obtained this way with respect to the disorder $J$. The variables $J$ and $\sigma$ are not anymore on equal footing: $J$ is fixed when you average over $\sigma$, and this is the crucial point. References T. Castellani, A. Cavagna, Spin-Glass Theory for Pedestrians (2005)
{ "domain": "physics.stackexchange", "id": 47039, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics, many-body, glass, disorder, spin-models", "url": null }
ros, ros2, std-msgs Title: std_msgs/Float32.h not found Hi, I am relatively new to trying to do anything with c++ in ros, so I'm sorry if this is a stupid question. I am trying to get AMCL to publish max weight. The plan is to publish it to a float 32 message for now when it's publishing amcl_pose, as amcl_pose checks for the particle with the maximum weight anyway. To do that, I need a float 32 message working, which is where I'm stuck. Error message: Starting >>> nav2_amcl_1 --- stderr: nav2_amcl_1 /home/_/Projects/nav2_amcl_1/src/amcl_node.cpp:45:10: fatal error: std_msgs/Float32.h: No such file or directory 45 | #include <std_msgs/Float32.h> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. gmake[2]: *** [CMakeFiles/amcl_1_core.dir/build.make:76: CMakeFiles/amcl_1_core.dir/src/amcl_node.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:241: CMakeFiles/amcl_1_core.dir/all] Error 2 gmake: *** [Makefile:146: all] Error 2 ---
{ "domain": "robotics.stackexchange", "id": 38383, "lm_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, ros2, std-msgs", "url": null }
metallurgy, finite-element-method, structural-analysis, software, welds I am unaware of any professional phase field modeling packages, as there are drawbacks limiting their usefulness outside academia and early-stage research. One limitation is that, depending on the model, the specific variables may not have a clear relationship with physical values that can be experimentally determined. Thus, sometimes the model parameters need to be adjusted systematically until the results "look right." Additionally, getting useful information out of the model is another issue due to the same discrepancies between model parameter values and physical values. It is also possible to produce non-physical results quite easily without careful tailoring of governing equations to the specific model. Validation is another issue as performing the experiments is at best an expensive and time consuming process, and at worst virtually impossible depending on the specific parameters involved. Research is of course focused on reducing these issues, but because phase field models are
{ "domain": "engineering.stackexchange", "id": 752, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "metallurgy, finite-element-method, structural-analysis, software, welds", "url": null }
information-theory, coding-theory, encoding-scheme The Morse code The Morse code is described in the standard at three levels: 3 . it is intended to provide an encoding of natural language text, using 57 characters (27 letters, 10 digits, 20 synbols and ponctuations) and an inter-word space to cut the character string into words. The inter-word space is used like a special character, that can be mixed with the others, which I shall note SEP. 2 . all of these characters are to be encoded as successions of dash and dot, using an inter-letter space, which I shall note sep, to separate the dash and dot of one letter from those of the next letter. 1 . The dash and dot, as well as sep are to be encoded as signal or absence of signal (called spacing) with length precisely defined in terms of some accepted unit. In particular, the dash and dot encoding a letter must be separated by an inter-element space, that I shall note σ.
{ "domain": "cs.stackexchange", "id": 4234, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "information-theory, coding-theory, encoding-scheme", "url": null }
These eigenvalues follow a cosine function $$\lambda_i = 2 + 2 \cos(\frac{i}{n}\pi)$$ for $$1\leq i\leq n+1$$. Which can be derived from the general description of eigenvalues of triadagonal Toeplitz matrices (as mentioned by Aksakal in the comments, you can see previous edits of this post for an alternative derivation of that relation with cosines)
{ "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.8250879060291956, "lm_q2_score": 0.8438951084436077, "openwebmath_perplexity": 530.738534973962, "openwebmath_score": 0.9995334148406982, "tags": null, "url": "https://stats.stackexchange.com/questions/470165/variance-and-asymptotic-normality-of-frac1n-1-sum-i-1n-1x-i1-x-i" }
gravity, black-holes, astrophysics, pauli-exclusion-principle, neutron-stars If the mass increases even more the Coulomb repulsive force cannot balance the increased gravitational attractive force and the atom collapses with protons and electrons combining to form neutrons. You then have an entity composed of neutrons - a neutron star. There is still the gravitational attractive force between neutrons but now the repulsive force is provided by the strong nuclear force between the neutrons - neutrons do not like to be "squashed". Increase the mass even more and the gravitational attractive force increases and so does the repulsive force between neutrons by the neutrons coming closer together. Eventually if you increase the mass even more the repulsive force between the neutrons is not sufficient to balance the gravitational attractive force between the neutrons and so you get a further collapse into a black hole.
{ "domain": "physics.stackexchange", "id": 35427, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gravity, black-holes, astrophysics, pauli-exclusion-principle, neutron-stars", "url": null }
and Eigenvectors. Note that in this case the eigenfunction is itself a function of its associated eigenvalue λ, which can take any real or complex value. Eigenvalues and Eigenvectors 6. ities of all of the distinct eigenvalues. where k is a constant called the eigenvalue. SPECTRAL APPROXIMATION TO A TRANSMISSION EIGENVALUE PROBLEM AND ITS APPLICATIONS TO AN INVERSE PROBLEM JING AN1 JIE SHEN 2;3 Abstract. ca January 25, 2017 Abstract If replace the Hermiticity from conventional quantum mechanics with the physi-. Suppose an eigenvalue λ of Γ has an eigenfunction f which is non-zero on internal vertices of Γ. The value of the observable for the system is the eigenvalue, and the system is said to be in an eigenstate. Abstract - The article describes the eigenvalue and eigenfunction problems. In the last lecture, we established that:. IVANOV AND D. A vector which is "flipped" to point in the opposite direction is also considered an eigenvector. Hermitian matrices Hermitian matrices satisfy
{ "domain": "yiey.pw", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9939024381686516, "lm_q1q2_score": 0.8325125197869129, "lm_q2_score": 0.8376199592797929, "openwebmath_perplexity": 671.162678118703, "openwebmath_score": 0.9039983153343201, "tags": null, "url": "http://hajq.yiey.pw/eigenvalue-and-eigenfunction-pdf.html" }
python, python-3.x, linux error = error + 1 print("Error") if error == 0: print("Success") else: print("Error") GPIO.output(21, True) notify = subprocess.Popen(["notify-run", "send", '"Error during Backup"'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
{ "domain": "codereview.stackexchange", "id": 36748, "lm_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, linux", "url": null }
ros, jointtrajectory, trajectory-filters Moreover, I am not able to get the difference between trajectory_filter and joint_trajectory_generator. It appears to me that both servers almost the same purpose. But I guess joint_trajectory_generator onny smoothens the trajectory and doesn't do any kind of trajectory shortening. Any help would be appreciated!!! Thanks!!!
{ "domain": "robotics.stackexchange", "id": 13207, "lm_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, jointtrajectory, trajectory-filters", "url": null }
homework-and-exercises, kinematics, acceleration, velocity, vectors There's a clip art of a rocket, but it only has one engine, so I'm not quite sure how the propulsion is supposed to work. So here's what I know: if the rocket is going around in a circle, it's constantly accelerating towards the center. But it's not actually going towards the center, so I assume it's not pointed towards the center. Would it be pointed tangent to the circle? Or would it be aimed inwards slightly? It is undergoing uniform circular motion, so its linear velocity is tangential to the circle, and its acceleration is towards the centre of the circle. You can easily prove that it is tangential using calculus on complex numbers; Let $z=Re^{i \theta}=x+iy$ Differentiating both sides with respect to time, $\frac{dz}{dt}=Ri e^{i \theta}*\omega=i \omega z$, where $\omega$ is the angular velocity. This means that the linear velocity is tangential to any point on the locus given by $|z|=R$.
{ "domain": "physics.stackexchange", "id": 16836, "lm_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, kinematics, acceleration, velocity, vectors", "url": null }
quantum-mechanics, operators, terminology, heisenberg-uncertainty-principle, observables There is a caveat to this. Mathematically you can conceive of a state that has a definite momentum, and this state is very useful in quantum mechanics. But there are reasons to believe that such a state would never exist physically: you could get states which approximate this state very well, but you'd never quite get there. So if you like, you can think of the definite momentum state as an almost definite momentum state. A state with almost definite momentum has almost a 100% chance to give a momentum very close to $p$, and that chance is so close to 100% that you can just consider it exactly 100% for most purposes.
{ "domain": "physics.stackexchange", "id": 54484, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, operators, terminology, heisenberg-uncertainty-principle, observables", "url": null }
evolution In summary, it is possible for a mutation to change a shape by changing the spatial distribution of a transcription factor during embryo development. What's more, by changing the distribution of two mutually dependent factors, formation of any shape is possible if the distributions overlap. Such transcription factors are highly conserved in evolution and the most important cause of the endless forms we see.
{ "domain": "biology.stackexchange", "id": 472, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "evolution", "url": null }
Then $$\lfrac{dy}{dx} = \lfrac{dx}{dy} = 1$$ when $$t = 0$$ despite the curve having no local bijection between the values of $$x$$ and the values of $$y$$ in any open ball around the origin! Notice that the conventional framework for real analysis cannot even state this fact that the curve has gradient $$1$$ at the origin! This is one kind of situation where the framework I am using is superior; another kind involves path integrals. ### Notes
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399060540358, "lm_q1q2_score": 0.816772842678595, "lm_q2_score": 0.8418256532040708, "openwebmath_perplexity": 184.89961468617682, "openwebmath_score": 0.9146476984024048, "tags": null, "url": "https://math.stackexchange.com/questions/2117928/when-is-the-derivative-of-an-inverse-function-equal-to-the-reciprocal-of-the-der?noredirect=1" }
javascript, functional-programming, ecmascript-6 console.info(new MoveableBuilder().at(1,1).facing(2,1).build()); console.info(new ParticleBuilder().at(1, 1).build()); What I had trouble with is how to reuse the at and facing methods within the ParticleBuilder. Granted, since the signatures of both builders is different, it might not be the correct thing to do. However, I figured I could elicit the community for feedback on this. Found a solution and I think this is elegant, but I'm unsure if this is something that should be avoided or not since I'm fairly new to ES6. Here are the following things I did to refactor it: Unify the Builder signatures to use a single parameter product Invoke the parent constructor within the child constructor with the same arguments on the instance. Move the defaults into the build step of the Builder. Use Object.assign to merge new properties.
{ "domain": "codereview.stackexchange", "id": 21241, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, functional-programming, ecmascript-6", "url": null }
5 red and 10 black balls in a bowl, with replacement Problem A bowl contains $5$ red and $10$ black balls. A ball is picked randomly and the colour is noted. After every pick the ball is placed back, and an extra ball of the same color is added to the bowl. Determine the following: (i) Given that the first $n$ balls are all black, what is the probability (say $\alpha_n$) that the ($n+1$)-st ball is also black? What is $\lim_{n \to \infty} \alpha_n$ ? (ii) Given that the second until the $(n+1)$-st ball are all black, what is the probability (say $\beta_n$) that the first drawn ball is black. What is $\lim_{n \to \infty} \beta_n$?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9905874120796498, "lm_q1q2_score": 0.8477953709786455, "lm_q2_score": 0.8558511451289037, "openwebmath_perplexity": 501.72947480718653, "openwebmath_score": 0.7893528938293457, "tags": null, "url": "https://math.stackexchange.com/questions/1803309/5-red-and-10-black-balls-in-a-bowl-with-replacement" }
javascript Title: Javascript function to return an array that needs to be in a specific order, depending on the order of a different array I have an array of objects, reviews which I get from an API endpoint. This object looks like this: [ { name: "Facebook", count: 50 }, { name: "Google", count: 43 }, { name: "TripAdvisor", count: 67 }, { name: "Other", count: 130 } ]
{ "domain": "codereview.stackexchange", "id": 40386, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript", "url": null }
thermodynamics, thermal-conductivity Title: Thermal Heat Transfer I work for a large plant bakery and we have recently coated the inside steel walls of our very large oven with a reflective coating. I have taken temperature readings inside the insulation void and there is a noticeable decrease. What I am trying to do is quantify the theoretical energy savings in LPG usage from this. It's been quite some years since I ever tried to calculate anything like this and I am in dire need of some guidance. Is Fourier's Law the right direction to be taking with this? E.G $\dfrac{Q}{T}= \dfrac{KA(T1-T2)}{D}$ $=\text{Thermal conductivity of oven wall} \times \text{surface area of walls}\left(\frac{\text{temp before painting-temp after painting}}{\text{thickness of wall}}\right)$. Some more background information:
{ "domain": "physics.stackexchange", "id": 68150, "lm_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, thermal-conductivity", "url": null }
python, algorithm, programming-challenge, tree So in the example above we have 10 elements with two different types (0 and 1). The input specifies the type of each element. Each object has it's own type (in this example - 0 or 1) object_type and the order index initial_position. The output format: 0 3 1 4 2 6 5 The goal is to find the sublist with maximum value of given utility function (_list_relevance). This output shows the list of element's initial_position. Also the object_type of the adjusted elements in this list are different. The element with initial_position == 0 has object_type == 1 The element with initial_position == 3 has object_type == 0 The element with initial_position == 1 has object_type == 1 The element with initial_position == 4 has object_type == 0 The element with initial_position == 2 has object_type == 1 The element with initial_position == 6 has object_type == 0 The element with initial_position == 5 has object_type == 1
{ "domain": "codereview.stackexchange", "id": 34645, "lm_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, programming-challenge, tree", "url": null }
c++, array, template template <class T> std::ostream& operator<< (std::ostream& out, const Array<T>& self) { out << "[ "; for (int i = 0; i < self.size-1; ++i) { out << self.arr[i] << ", "; } out << self.arr[self.size-1] << " ]"; return out; } In the constructor that just takes a size. I would initialize all members to their default value even if POD. template <class T> Array<T>::Array(const int& init_size) { arr = new T[init_size](); // ^^^^^ Add braces. on types it makes no difference. // On POD it will force zero initialization. size = init_size; } Use the initializer lists in your constructors. template <class T> Array<T>::Array(const int& init_size) : arr(new T[init_size]()) , size(init_size) {}
{ "domain": "codereview.stackexchange", "id": 577, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, array, template", "url": null }
electromagnetism, electrostatics, electric-fields, stress-energy-momentum-tensor Title: Q: Field of charged object exerts force on itself? We know a charge particle under the influence of external fields to be: $$\vec{F}=q(\vec{E}+\vec{v}\times\vec{B}), $$ where $E$ and $B$ fields are from external fields not the field by the charge itself. Then, if we applied to the case of localized charged distribution, the formula looks like: $$\vec{F}=\iiint_V\rho(\vec{E} +\vec{v}\times\vec{B}) dV,$$ $E$ and $B$ fields should have the same character as the point charge case, and we can derive out the Maxwell Tensor. However, in Griffith's books(Introduction of Electrodynamics 4ed, Chapter 8 Ex8.2), the problem is: Determine the net force on the "northern" hemisphere of a uniformly charged solid sphere of radius $R$ and charge $Q$. He substituted the electric field of the charged sphere $$\vec{E}= \begin{cases} {1\over4\pi\epsilon_0 }{Q\over R^2}{\hat{r}},&\text{on the bowl}\\{1\over4\pi\epsilon_0 }{Q\over R^3}{\vec{r}},&\text{inside the disk} \end{cases}$$
{ "domain": "physics.stackexchange", "id": 64558, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, electrostatics, electric-fields, stress-energy-momentum-tensor", "url": null }
neural-networks, image-recognition Title: Real time image processing for object recognition using security cameras I was thinking, what if we could combine Artificial Intelligence (Neural network for image recognition), computer hardware and a security camera for identify any breaking into our backyard at 12:00am - 8:00am? Of course my current knowledge leads me to only a simple question. So, in order to have a general idea: ¿Have been this already solved using a commercial or free software? ¿Can this be done using TensorFlow? ¿Is there any free set of images with millions of them to teach any AI distinguish between a man and another moving object? ¿Approximate hardware requirements for doing this?
{ "domain": "ai.stackexchange", "id": 381, "lm_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, image-recognition", "url": null }
_________________ Scott Woodbury-Stewart Founder and CEO GMAT Quant Self-Study Course 500+ lessons 3000+ practice problems 800+ HD solutions Re: Ten disks are each numbered with one of the integers 1 through 10 &nbs [#permalink] 15 Mar 2017, 16:50 Display posts from previous: Sort by # Events & Promotions Powered by phpBB © phpBB Group | Emoji artwork provided by EmojiOne Kindly note that the GMAT® test is a registered trademark of the Graduate Management Admission Council®, and this site has neither been reviewed nor endorsed by GMAC®.
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9572778000158575, "lm_q1q2_score": 0.8038586851718684, "lm_q2_score": 0.8397339676722393, "openwebmath_perplexity": 3114.7142217234878, "openwebmath_score": 0.694878339767456, "tags": null, "url": "https://gmatclub.com/forum/ten-disks-are-each-numbered-with-one-of-the-integers-1-through-235860.html" }
performance, algorithm, c, trie if (misspelled) { printf("%s\n", word); bm_data->misspellings++; } index = 0; } } check(ferror(in) == 0, "File stream error(s) occured.");
{ "domain": "codereview.stackexchange", "id": 21525, "lm_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, algorithm, c, trie", "url": null }
c# if (a.Count != b.Count) return false; return a.SequenceEqual(b); } If you take a look at its implementation, you'll notice that it's very similar to yours. It might be just a tiny bit less efficient - so if performance is an issue here, measure both approaches, and then weigh readability/maintainability vs performance gains. On a different note, I would rename the method to SequenceEqual and consider it a "specialization" of Enumerable.SequenceEqual for lists. I would also consider throwing an exception if either argument is null. This would be consistent with the BCL's own extension methods (Select, Where, ToList, SequenceEqual, Any, All, etc).
{ "domain": "codereview.stackexchange", "id": 15718, "lm_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 }
gazebo Originally posted by littleghost with karma: 38 on 2018-10-14 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by VansFannel on 2018-10-15: Thanks. If I want to control the robot with arrow keys? How can I do it? Thanks. Comment by littleghost on 2018-10-15: If you use ROS, that will be quite easy. But if you don't want to use ROS, then you can check Gazebo API to see if there has keyboard related functions. Comment by chapulina on 2018-10-15: You write a plugin like KeyboardGUIPlugin which publishes velocity commands. Here's a demo world: https://bitbucket.org/osrf/gazebo/src/f4e51e8f64001beda70615ab8982a7d5a4e65b18/worlds/simple_arm_teleop.world?at=default&fileviewer=file-view-default Comment by littleghost on 2018-10-16: This world is appropriate. In fact, there are many places where gazebo is very similar to ROS.
{ "domain": "robotics.stackexchange", "id": 4329, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo", "url": null }
navigation, ekf, odometry, ros-melodic, robot-localization 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-9, 0, 0, # x acc 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-9, 0, # y acc 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-9] # z acc
{ "domain": "robotics.stackexchange", "id": 35180, "lm_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, ekf, odometry, ros-melodic, robot-localization", "url": null }
c, parsing, serial-port //Get the length of data if ((_rx_index == 6) && (_rx_data.msg_length > 0)) { for (int j = 0; j < _rx_data.msg_length; j++) { _rx_data.data[j] = _rawData[6 + j]; } } //Get the last 2 byte if (_rx_index == (_rx_data.msg_length + 6 + 1)) { _rx_data.footer_DLE = _rawData[6 + _rx_data.msg_length]; _rx_data.footer_BCC = _rawData[6 + _rx_data.msg_length + 1]; //Complete parsing //Callback to other function } _rx_index++; }
{ "domain": "codereview.stackexchange", "id": 13874, "lm_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, serial-port", "url": null }
13. 242863 669674Thanks for the post. I like your writing style – Im trying to start a weblog myself, I believe I may well read thru all your posts for some suggestions! Thanks once a lot more. 465803 14. Hurrah, that’s what I was looking for, what a material! present here at this weblog, thanks admin of this website. 15. This design is steller! You definitely know how to keep a reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Fantastic job. I really enjoyed what you had to say, and more than that, how you presented it. Too cool! 16. Gabriele says: amazing. It seems that you’re doing any unique trick. Also, The contents are masterwork. you’ve performed a fantastic process in this matter! 17. lie says:
{ "domain": "techiemathteacher.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9925393567567455, "lm_q1q2_score": 0.8044322124047666, "lm_q2_score": 0.8104789063814617, "openwebmath_perplexity": 1851.3099196501164, "openwebmath_score": 0.3466041386127472, "tags": null, "url": "http://techiemathteacher.com/2013/12/05/equation-of-a-circle/" }
spacetime-dimensions, popular-science, visualization What could we see a 4d pyramid comes to our 3d universe? is it correct that Firstly we would see small cube and it would enlarge and then suddenly disappears? Dark matter and Dark energy is related with such ideas? http://map.gsfc.nasa.gov/universe/uni_matter.html I know we do not observe such strange events till now but maybe scientists can get some results during micro experiments. Is there any such experimental results at least in micro universe (atomic level experiments in quantum mechanics)?
{ "domain": "physics.stackexchange", "id": 15236, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spacetime-dimensions, popular-science, visualization", "url": null }
celestial-mechanics, n-body-simulations I assume $m$ is a dimensionless mass parameter, in the range $0 \le m \le 1$. Here's a typical plot, created using SageMath, a mathematics software system based on Python. It uses Matplotlib for 2D plotting. This plot is for $m=0.3, x_1= 1.2, x_2=0.8$. The SageMath contour_plot function is quite versatile, you can read about it here. Here's the plotting script running on the SageMathCell server. You can see the available colormaps here.
{ "domain": "astronomy.stackexchange", "id": 6821, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "celestial-mechanics, n-body-simulations", "url": null }
homework-and-exercises, newtonian-mechanics $$T-m_1g=m_1g$$ $$T=2m_1g$$ $$T=2W_1$$ $$W_1=\frac{T}{2}$$ Similarly, $$W_2=\frac{T}{2}$$ now $$\frac{4W_1W_2}{W_1+W_2}=\frac{(4)(\frac{T}{2})(\frac{T}{2})}{\frac{T}{2}+\frac{T}{2}}=T$$ Hence option (a) comes out to be tension T. But the answer section says the option (b) Whats going on here is the following. Imagine that the pulley is fixed. With unequal weights, there should be an acceleration of the weights because they don't balance. Therefore, when the pulley is accelerated up at $g$, you can't assume that the weights are also accelerating up at $g$ as well. The weights are moving with respect to the pulley if the weights are unequal. Think about this and try the problem again.
{ "domain": "physics.stackexchange", "id": 25803, "lm_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", "url": null }
formal-languages, regular-languages, kleene-star Title: Will $L = \{a^* b^*\}$ be classified as a regular language? Will $L = \{a^* b^*\}$ be classified as a regular language? I am confused because I know that $L = \{a^n b^n\}$ is not regular. What difference does the kleene star make? A language is regular, by definition, if it is accepted by some DFA. (This is at least one common definition.) Can you think of a DFA accepting the language? A well-known result (that is proved in many textbooks) states that the language of a regular expression is regular. Since $a^* b^*$ is a regular expression, its language must be regular (if you believe this result). Finally, to answer your question (what difference does the Kleene star make): in the language $\{a^n b^n : n \geq 0\}$, we need to count the number of $a$s and $b$s; in the language $a^*b^*$ we don't.
{ "domain": "cs.stackexchange", "id": 6835, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "formal-languages, regular-languages, kleene-star", "url": null }
electrostatics, electric-fields, potential-energy, dipole $$ U = -\mathbf p\cdot\mathbf E = -|\mathbf p||\mathbf E|\cos\theta $$ This expression is minimized when $\cos\theta = 1$, which is when the angle between the dipole moment vector (which for a physical dipole points from the negative to the positive charge) and the field is $0$. This is precisely the condition for the dipole to be aligned with the electric field as you described. If the dipole is not aligned with the field, then it will experience a torque that tends to align it with the field. You can see why this happens in the physical dipole; the positive charge feels a force in the direction of the field, while the negative charge feels a force in the direction opposite the field, and these both tend to rotate the dipole to align in with the field.
{ "domain": "physics.stackexchange", "id": 77551, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics, electric-fields, potential-energy, dipole", "url": null }
gazebo, simulation, rviz, librviz, 3d-visualization Originally posted by Metalzero2 on ROS Answers with karma: 293 on 2015-06-20 Post score: 0 For the robot arm part, you can make an autocad/google sketchup/ drawing which can be exported as an stl or dae file. Use the stl file in a urdf file - and gazebo will be able to visualize it for you. This urdf tutorial has a section on how to use meshes (which is what you want) at the end. You could also make a custom geometry based arm using bars, and so on - but it'd be a bit more complicated. You don't need a physical arm to do any of this. To do the inverse kinematics part, MoveIt is the most popular that I've seen - but I've never used it - so, I can't coment about it much. have a look at it here : http://moveit.ros.org/wiki/Kinematics Originally posted by AbdealiJK with karma: 98 on 2015-06-20 This answer was ACCEPTED on the original site Post score: 2
{ "domain": "robotics.stackexchange", "id": 21970, "lm_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, simulation, rviz, librviz, 3d-visualization", "url": null }
Consider again the two matrices from Example PTM. \begin{align*} A= \begin{bmatrix} 1 & 2 & -1 & 4 & 6\\ 0 & -4 & 1 & 2 & 3\\ -5 & 1 & 2 & -3 & 4 \end{bmatrix} && B= \begin{bmatrix} 1 & 6 & 2 & 1\\ -1 & 4 & 3 & 2\\ 1 & 1 & 2 & 3\\ 6 & 4 & -1 & 2\\ 1 & -2 & 3 & 0 \end{bmatrix} & \end{align*} Then suppose we just wanted the entry of $$AB$$ in the second row, third column. \begin{align*} \matrixentry{AB}{23}=& \matrixentry{A}{21}\matrixentry{B}{13}+ \matrixentry{A}{22}\matrixentry{B}{23}+ \matrixentry{A}{23}\matrixentry{B}{33}+ \matrixentry{A}{24}\matrixentry{B}{43}+ \matrixentry{A}{25}\matrixentry{B}{53}\\ =&(0)(2)+(-4)(3)+(1)(2)+(2)(-1)+(3)(3)=-3 \end{align*} Notice how there are 5 terms in the sum, since 5 is the common dimension of the two matrices (column count for $$A\text{,}$$ row count for $$B$$). In the conclusion of Theorem EMP, it would be the index $$k$$ that would run from 1 to 5 in this computation. Here is a bit more practice. The entry of third row, first column.
{ "domain": "runestone.academy", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9886682441314384, "lm_q1q2_score": 0.80129475275188, "lm_q2_score": 0.8104789018037399, "openwebmath_perplexity": 552.7782355881624, "openwebmath_score": 0.9809508919715881, "tags": null, "url": "https://runestone.academy/ns/books/published/fcla/section-MM.html" }
algorithms, graphs, network-flow, minimum-cuts We can clearly see that the capacity of the minimum cut is 2. One possible way to get this is to take edges 0-2 and 1-3 (This cut set has size 2). Another possible way to do this is to take edge 3-4 instead (This cut set has size 1) which is the optimal answer. I have researched about this question and some people are saying that we need to transform the edge capacity, C, of every edge to C * (|E| + 1) - 1, where |E| is the number of edges in the graph. One such discussion here: https://codeforces.com/blog/entry/51748 Another such discussion here: https://stackoverflow.com/questions/38408852/finding-the-lowest-amount-of-edges-in-all-minimum-cuts-in-flow-network The problem is, I don't understand why this formula works. In particular, why do we need to multiply by (|E| + 1) and not some other number? I cannot see how multiplying by any other number would "change" the augmenting paths in the graph as stated in the cited links. Could someone please advise me?
{ "domain": "cs.stackexchange", "id": 14673, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, graphs, network-flow, minimum-cuts", "url": null }
gazebo, ros-melodic this->rosSub = this->rosNode->subscribe(so); this->rosQueueThread = std::thread(std::bind(&LifeBuoyPlugin::QueueThread, this)); } void OnRosMsg(const gazebo_msgs::ModelStatesConstPtr &_msg){ for (size_t i = 0; i < _msg->name.size(); i++) { if(_msg->name.at(i).compare(0, 6,"victim") == 0){ geometry_msgs::Pose victimPose = _msg->pose.at(i); ignition::math::Pose3d buoyPose = model->WorldPose(); double distance = euclideanDistance(victimPose, buoyPose); if(distance < 2.5 & ros::ok()){ std_msgs::Bool pubMsg; pubMsg.data = false; ros::Publisher victimPub; victimPub = rosNode->advertise<std_msgs::Bool>("/victim/"+_msg->name.at(i), 1); victimPub.publish(pubMsg); i = _msg->name.size(); } } } } }; GZ_REGISTER_MODEL_PLUGIN(LifeBuoyPlugin) }
{ "domain": "robotics.stackexchange", "id": 35278, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo, ros-melodic", "url": null }
java, android allWidgetIds = intent.getIntArrayExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS); // get external directory and put the file in there. ext = Environment.getExternalStorageDirectory(); file = new File(ext, "avalancheconditionsreport/sac/dangerrose.png"); // parse xml and get the rose xml_ajax(); stopSelf(); super.onStart(intent, startId); } @Override public IBinder onBind(Intent intent) { return null; } public void xml_ajax() { aq.ajax(roseXML, XmlDom.class, this, "sacCb"); } public void sacCb(String url, XmlDom xml, AjaxStatus status) { XmlDom r = xml.tag("reportrose"); roseUrl = r.tag("img").attr("src").trim(); File ext = Environment.getExternalStorageDirectory(); File target = new File(ext, "avalancheconditionsreport/sac/dangerrose.png");
{ "domain": "codereview.stackexchange", "id": 6520, "lm_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, android", "url": null }
general-relativity, black-holes, singularities More generally, if you are not worried about realistic situations but want to understand theoretically how these singularities are handled, then you are in good company. This is still largely an open problem and has no good answer. The best suggestion is that once we get down to small scales close enough to the singularity, quantum effects become significant and this may somehow resolve the singularity. Certainly to have a clear answer to this question requires a quantum theory of gravity of which the only example currently is string theory. In string theory this sort of resolution does indeed happen in some cases so that space-time still ends up being smooth.
{ "domain": "physics.stackexchange", "id": 42133, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, black-holes, singularities", "url": null }
quantum-field-theory, symmetry-breaking, higgs, unified-theories Title: Spontaneous symmetry breaking in $SU(5)$ GUT? At the end of this video lecture about grand unified theories, Prof. Susskind explains that there should be some kind of an additional Higgs mechanism at work, to break the symmetry between the $SU(2)$ and $SU(3)$ contained in a $SU(5)$ grand unified theory. How is this additional Higgs mechanism assumed to work exactly and where do/does the additional Higgs come from? To avoid a too speedy proton decay in this theory, the $X$ and $Y$ gauge bosons of processes mixing the leptons and quarks must be huge (3 orders of magnitude smaller than the Planck mass).
{ "domain": "physics.stackexchange", "id": 97268, "lm_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, symmetry-breaking, higgs, unified-theories", "url": null }
organic-chemistry, carbonyl-compounds, reactivity, carbohydrates, protecting-groups Title: Reaction of glucose acetal with acetic anhydride The following problem was asked in JEE Mains 2020 (Sept 2, Shift 1), Consider the following reactions: $\ce{ (i) Glucose + ROH ->[dry HCl] Acetal ->[$x$ eq. of (CH3CO)2O] acetyl derivative }$ $\ce{ (ii) Glucose ->[Ni/H2] A ->[$y$ eq. of (CH3CO)2O] acetyl derivative }$ $\ce{ (iii) Glucose ->[$z$ eq. of (CH3CO)2O] acetyl derivative }$ What are $x, y,$ and $z$ in these reactions, respectively? I know that the reaction in (i) is acetal formation (used to protect aldehyde), and that alcohol reacts with anhydrides to form acids. As, there are only 5 hydroxyl group in acetyl deriv. of (i), so $x=5$. In (ii), carbonyl part of glucose reduces to hydroxyl group, so $y=6$. And, in (iii), glucose directly reacts with anhydride, so $z=5$. But, my answer was wrong (x only), as per the key. What am I doing wrong? The answer given is,
{ "domain": "chemistry.stackexchange", "id": 14447, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, carbonyl-compounds, reactivity, carbohydrates, protecting-groups", "url": null }
Use vpa to approximate this expression with the 10-digit accuracy: vpa(B, 10) ans = -2854.225191 Now, call the Bessel function with the floating-point parameter. Significant difference between these two approximations indicates that one or both results are incorrect: besselj(53/2, pi) ans = 6.9001e-23 Increase the numeric working precision to obtain a more accurate approximation for B: vpa(B, 50) ans = 0.000000000000000000000069001456069172842068862232841396473796597233761161 ### Plot the Function or Expression Plotting the results can help you recognize incorrect approximations. For example, the numeric approximation of the following Bessel function returns: B = besselj(53/2, sym(pi)); vpa(B, 10) ans = -2854.225191 Plot this Bessel function for the values of x around 53/2. The function plot shows that the approximation is incorrect: syms x fplot(besselj(x, sym(pi)), [26 27]) ## Support #### Mathematical Modeling with Symbolic Math Toolbox Get examples and videos
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773708026035286, "lm_q1q2_score": 0.8101805904634732, "lm_q2_score": 0.8289388104343892, "openwebmath_perplexity": 2588.2135751421547, "openwebmath_score": 0.8048481941223145, "tags": null, "url": "https://nl.mathworks.com/help/symbolic/recognize-and-avoid-roundoff-errors.html" }
data, preprocessing, research The best way to estimate the generality of each method when the literature has so far failed to do so is to implement each yourself and do a fair comparative evaluation. You would evaluate all methods on the same dataset with the same pre-processing steps and hyperparameter tuning procedure and, if possible, introduce additional evaluation datasets. It can also be very enlightening to perform an ablation analysis in which you iteratively remove certain components of the methods and re-evaluate to see how much of a performance hit you take. Doing the above and communicating it (via a publication, blog post, or whatever) will not only help you, but everyone else working in the area.
{ "domain": "datascience.stackexchange", "id": 8584, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "data, preprocessing, research", "url": null }
$\sqrt{\mathit{r}}\mathrm{=}\frac{\mathit{m}}{\mathit{n}}$ Squaring both sides gives: $\mathit{r}\mathrm{ }\mathrm{=}\frac{{\mathit{m}}^{\mathrm{2}}}{{\mathit{n}}^{\mathrm{2}}}$ Since ${\mathit{m}}^{\mathrm{2}}$ and ${\mathit{n}}^{\mathrm{2}}$ are integers, $\mathit{r}$ is also rational. $\mathrm{\blacksquare }$ 1.6 Proving an ""If and Only If“ Many mathematical theorems assert that two statements are logically equivalent; that is, one holds if and only if the other does. Here is an example that has been known for several thousand years: Two triangles have the same side lengths if and only if two side lengths and the angle between those sides are the same. The phrase ""if and only if“ comes up so often that it is often abbreviated ""iff.“
{ "domain": "inftyreader.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9820137858267907, "lm_q1q2_score": 0.8204563532782415, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 370.60393643482234, "openwebmath_score": 0.9268322587013245, "tags": null, "url": "http://inftyreader.org/inftyreader-examples/Mathematics%20for%20Computer%20Science-3.xhtml" }
sql, sql-server, database, t-sql BEGIN TRY -- Generate divide-by-zero error. SELECT 1/0; END TRY BEGIN CATCH -- Execute the error retrieval routine. EXECUTE usp_GetErrorInfo; END CATCH; Nitpick on casing One last little nitpick, while your casing of SQL keywords is consistent, it's quite rare that you see Select Foo From Bar Order By Baz Asc, and for a few reasons. Besides the fact that it looks like VB, it mostly makes it a bit more tiring to look at keywords vs. symbols if the casing is the same. The most common casing for SQL is SHOUT CASE, followed by lower case keywords.
{ "domain": "codereview.stackexchange", "id": 16880, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sql, sql-server, database, t-sql", "url": null }
quantum-field-theory, lagrangian-formalism, quantum-electrodynamics, perturbation-theory, dirac-matrices Title: One-loop diagram calculation: Wick rotation and gamma matrices I have a question about a calculation which is performed in David Tong's lecture notes on Gauge Theory (page 400, chapter 8). At the bottom (see below for a screenshot), we want to calculate the one-loop diagram. He Wick rotated to Euclidean space. I don't understand how to obtain the second line from the first? When he rewrites the trace? Also, given that $\left\{ \gamma^{\mu}, \gamma^{\nu} \right\} = 2 \eta^{\mu \nu}$ with $\eta^{\mu \nu} = (+1, -1, -1)$ (we are in $(2+1)$-dimensions), what does this become after Wick rotation? Does it become $\left\{ \gamma^{\mu}, \gamma^{\nu} \right\} = 2 \delta^{\mu \nu}$ with the standard Euclidean metric?
{ "domain": "physics.stackexchange", "id": 82511, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, lagrangian-formalism, quantum-electrodynamics, perturbation-theory, dirac-matrices", "url": null }
• I'm not that experienced with calibration matrices, but perhaps you could use $[p_1, p_2, ap_3+p_4]$ as a $3\times3$ matrix you can invert. – MvG Jan 25 '17 at 14:39 • @MvG Your suggestion works. Thanks for the insight. – Andrew H Jan 25 '17 at 22:36 You can just change coordinates so that your parallel plane becomes the plane $Z=0$. $P\begin{bmatrix}X\\Y\\Z\\1\end{bmatrix}=PA^{-1}\begin{bmatrix}X\\Y\\Z-h\\1\end{bmatrix}$ where $A=\begin{bmatrix}1&0&0&0\\0&1&0&0\\0&0&1&-h\\0&0&0&1\\\end{bmatrix}$. I think then you can proceed as normal with $PA^{-1}$ by continuing with $Z-h=0$ (i.e. $Z=h$.) That's the argument that first occurs to me anyway: change world coordinates to make your plane coincide with the $Z$ plane. I have not seen it written down, and I have not applied it, but that seems reasonable.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9674102542943773, "lm_q1q2_score": 0.80616675465608, "lm_q2_score": 0.8333245911726382, "openwebmath_perplexity": 195.41343390584126, "openwebmath_score": 0.7655608057975769, "tags": null, "url": "https://math.stackexchange.com/questions/2113370/find-the-homography-matrix-that-maps-a-2d-image-point-to-a-3d-world-point-on-a-k" }
standard-model, group-representations, electroweak, leptons $$ q_{L}=\binom{u_{L}}{d_{L}} : (2,\frac{1}{3})\\ u_{R}:(1,\frac{4}{3})\\ d_{R}:(1,-\frac{2}{3})\\ \psi_{L}=\binom{\nu_{eL}}{e_{L}} : (2,-1)\\ e_{R}:(1,-2)\\ \tag{2.10} $$ I don't understand where the terms $(2,\frac{1}{3}),(1,\frac{4}{3}),(1,-\frac{2}{3}),(2,-1),(1,-2)$ come from and what they represent. Also, it would be nice if anyone can tell me why left handed particles form doublets and right handed particles are singlets. To answer first to your last question, it is an experimental fact that only left-handed fermions are affected by weak interactions. The couplings of the fermions to the $W$ bosons is proportional to their weak isospin $T_3$. Therefore, right-handed fermions must have $T_3=0$. Left-handed fermions are observed to have the same isospin (charged currents universality), and charged currents only connect two types of fermions. The conclusion is that left-handed fermions must come in doublets of weak isospin, with $T= \frac{1}{2}$, $T_3 = \pm \frac{1}{2}$.
{ "domain": "physics.stackexchange", "id": 32079, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "standard-model, group-representations, electroweak, leptons", "url": null }
proof-techniques, correctness-proof, greedy-algorithms Title: Optimality of a Greedy Algorithm If you designed a greedy algorithm to obtain an optimal solution and the algorithm can produce different combinations of values but still, any of theses combination is an optimal solution. How you prove it is optimality? For example you have a set of numbers $\mathcal{M}=\{1,2,3,4\}$ and you want to design an algorithm to obtain the minimum number of integers required to obtain a sum 5. In this case, $1,4$ or $2,3$ can produce 5 and both are optimal solutions as the minimum number required is two. How to prove the optimality of the algorithm ?
{ "domain": "cs.stackexchange", "id": 15325, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "proof-techniques, correctness-proof, greedy-algorithms", "url": null }
ros, can, ros-kinetic, ros-canopen Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<canopen::TimeoutException> > std::exception::what: SDO [canopen::tag_objectdict_key*] = 6061sub0
{ "domain": "robotics.stackexchange", "id": 30227, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, can, ros-kinetic, ros-canopen", "url": null }
matlab, digital-filters freqInput_3db = 53.405e3; % frequency of input signal -3db deltaT = 1/fsDataIn; % time interval between two samples amplitude = 2000; Length = 100; t = 0:deltaT:Length; sine_dataIn_6db=amplitude*sin(2*pi*freqInput_6db*t); sine_dataIn_6db = sine_dataIn_6db(1:10000)'; sine_dataIn_3db=amplitude*sin(2*pi*freqInput_3db*t); sine_dataIn_3db = sine_dataIn_3db(1:10000)';
{ "domain": "dsp.stackexchange", "id": 11500, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "matlab, digital-filters", "url": null }
c, embedded void drawdecimal_line() { os_SetCursorPos(9, 0); os_PutStrFull(buffer); os_PutStrFull("."); } void draw_stack_clear(uint8_t row, bool clear) { if (row >= 9) { os_SetCursorPos(8, 0); os_PutStrFull("... "); real_t len = os_Int24ToReal((int24_t) idx); os_RealToStr(buffer, &len, 0, 1, -1); os_SetCursorPos(8, 4); os_PutStrFull(buffer); } else { if (scimode) { os_RealToStr(buffer, &stack[row], 0, 2, 2); } else { os_RealToStr(buffer, &stack[row], 0, 1, -1); } if (clear) { os_SetCursorPos(row, 0); os_PutStrFull(" "); } os_SetCursorPos(row, 0); os_PutStrFull(buffer); } } void draw_stack(uint8_t row) { draw_stack_clear(row, false); } void draw_full_stack() { for (uint8_t row = 0; row < idx && row <= 9; row++) draw_stack_clear(row, true); }
{ "domain": "codereview.stackexchange", "id": 40999, "lm_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, embedded", "url": null }
c++, game, snake-game, fltk // Grows snake in length, that is, adds one cell to its tail void Snake::grow_length() { const Point tail = body[body.size() - 1].point(0); // Tail's coordinate move_forward(); // Add new cell into body at previous tail's location body.push_back(new Rectangle{ tail, body[head_ind].width(), body[head_ind].height() }); // Set same parameters for new tail as for all body body[body.size() - 1].set_color(color()); body[body.size() - 1].set_fill_color(fill_color()); body[body.size() - 1].set_style(style()); }
{ "domain": "codereview.stackexchange", "id": 39152, "lm_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++, game, snake-game, fltk", "url": null }