text
stringlengths
1
1.11k
source
dict
### Definition 3 The $l_p$ norms are defined by $\|\mathbf{x}\|_p=\left( \sum_{k=1}^n|x_k|^p \right)^{\frac{1}{p}},\ 1\leq p\leq \infty$ In the limit as $p\to\infty$ , $\|\mathbf{x}\|_{\infty} = \max_k|x_k|.$ Similar to vectors, matrices can also have norms. ### Definition 4 A function $f: \mathbb{R}^{m\times n} \to \mathbb{R}$ is a matrix norm if $f(A) \geq 0 \quad f(A) = 0 \Leftrightarrow A = 0 \quad f(\alpha A) = |\alpha| f(A) \quad f(A+B) \leq f(A) + f(B)$ ### Definition 5 The Froebenius norm is the $l_2$ norm applied to all elements of the matrix. $\|A\|_F = \sqrt{\text{trace} AA^T} = \sqrt{\sum_{i=1}^m \sum_{j=1}^n |a_{ij}|^2}$ One useful way to characterize matrices is by measuring their “gain” relative to some $l_p$ norm. ### Definition 6
{ "domain": "gitbook.io", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9914225130656699, "lm_q1q2_score": 0.8035270409591088, "lm_q2_score": 0.810478913248044, "openwebmath_perplexity": 1097.6932268415198, "openwebmath_score": 0.8799571394920349, "tags": null, "url": "https://aparande.gitbook.io/berkeley-notes/eecs127-0/eecs127-1" }
Remark 2 We can use the resulting integral expressions to derive rational approximations of $$\pi$$ and $$\log 2$$. On the interval $$[0, 1]$$, $$\frac{1}{2^k} \leq \frac{1}{(1 + t^2)^k} \leq 1$$, giving the bounds $$\frac{1}{2^k} E_k < I_k < E_k, \\ \textrm{where} \quad E_k = 2 \int_0^1 u^k (1 - u^2)^k du = \frac{\Gamma(k) \Gamma\left(\frac{1}{2} k + \frac{1}{2}\right)}{\Gamma\left(\frac{3}{2} k + \frac{1}{2}\right)} \sim \frac{\sqrt{2 \pi}}{\sqrt{k}} \left(\frac{2}{3 \sqrt{3}}\right)^k ,$$ so for any particular $$k$$, rearranging gives rational bounds for $$\pi$$ or $$\log 2$$. (For odd $$k = 2 l + 1$$, by the way, we have $$E_{2 l + 1} = \frac{(2 l)! l!}{(3 l + 1)!}$$.) For example, taking $$k = 2$$ gives $$I_2 = \pi - 3$$ and $$L_2 = \frac{16}{105}$$, and rearranging gives $$\frac{319}{105} < \pi < \frac{331}{105} .$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806535200601, "lm_q1q2_score": 0.8411108089598593, "lm_q2_score": 0.8577681049901037, "openwebmath_perplexity": 183.98384211447132, "openwebmath_score": 0.9821396470069885, "tags": null, "url": "https://math.stackexchange.com/questions/3337634/approximating-pi-and-ln-2-with-i-k-int-0-infty-left-textsechx-tanh" }
physical-chemistry, everyday-chemistry, equilibrium, molecules, home-experiment Edit: However, after thinking this for a while, I have to add that in practice the difference might be too small to be detected. The solubility (~ saturation point) of caffeine in water is 20 g/l at 20°C while the concentration of caffeine in tea is 0.1 - 0.4 g/l – huge difference. It might be that from caffeine's point of view, the "free space" is more or less the same in both cups.
{ "domain": "chemistry.stackexchange", "id": 882, "lm_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, everyday-chemistry, equilibrium, molecules, home-experiment", "url": null }
statistical-mechanics, entropy, phase-space and for every possible choice of the couple $E_1,E_2$, the total volume will be given by $$\Gamma^{tot}_{\Delta} =\Gamma^{2}_{\Delta}(E_2) \cdot \Gamma^{1}_{\Delta}(E_1) \tag{3}$$ Now, I'd like it if someone could explain to me how to obtain the last inequality in $(1)$ and its physical meaning. More importantly, I'd like to understand why volumes in the phase space wouldn't simply add up ($\Gamma^{2}_{\Delta}(E_2) + \Gamma^{1}_{\Delta}(E_1)$) but needs to be multiplied. It honestly does not make any sense, especially if you see it from a purely visual standpoint. Maybe there's some non trivial physical meaning behind $(3)$ that I'm missing, or maybe I'm just not grasping the whole concept of volume of an ensemble as defined in (1). Any help is much appreciated. OP asked: More importantly, I'd like to understand why volumes in the phase space wouldn't simply add up (Γ2Δ(2)+Γ1Δ(1) ) but needs to be multiplied
{ "domain": "physics.stackexchange", "id": 97670, "lm_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, entropy, phase-space", "url": null }
c++, state-machine, sfml, entity-component-system, pong #pragma once #include "State/Base.hpp" #include "State/End_Round.hpp" #include "State/Begin_Round.hpp" #include "EnTT/Registry.hpp" #include "EnTT/Handle.hpp" #include "SFML/Window.hpp" #include "Box2D/Body.hpp" #include "Box2D/Shape.hpp" #include "Box2D/Body_Builder.hpp" #include "Box2D/Fixture_Builder.hpp" #include "System/Physics.hpp" #include "Event/Push_State.hpp" #include "Event/Pop_State.hpp" #include "Event/Key_Pressed.hpp" #include "Event/Key_Released.hpp" #include "Event/Scored.hpp" #include "Event/Reset.hpp" #include "User_Data.hpp" #include "Vector_2.hpp" #include "Component/Score.hpp" #include <iostream> namespace State { class Play : public State::Base { public: Play(State::Machine& state_machine) : Base {state_machine} { };
{ "domain": "codereview.stackexchange", "id": 42092, "lm_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++, state-machine, sfml, entity-component-system, pong", "url": null }
particle-physics, collision, protons, large-hadron-collider physics analysis. Any insight is appreciated. Thanks. Just some terminology: Elastic scattering refers to processes in which both the projectile and the target stay intact, and no extra particles are produced. Inelastic scattering is everything else.
{ "domain": "physics.stackexchange", "id": 75576, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "particle-physics, collision, protons, large-hadron-collider", "url": null }
# Maximum and minimum of of $f(x)=|x-1|+|x-2|+|x-3|$ I am trying to find the maximums or minimums of $$f(x)=|x-1|+|x-2|+|x-3|$$ (if there exist). My attempt: First I compute the derivative and tried to find critical point, i.e, $f'(x) = \frac{x-1}{|x-1|} + \frac{x-2}{|x-2|} + \frac{x-3}{|x-3|}=0$, first I noted that this derivative doesn't exist in 1,2,3 for the absolute value. And the are no critic point (Is that correct?) Then I stuck here because I don't know if there is a maximum, I think that it is not exist but how can I justified and I believe that there is a global minimum, but this occurs only if I found a critical point, some help pls.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357573468176, "lm_q1q2_score": 0.8071777107164056, "lm_q2_score": 0.8244619306896956, "openwebmath_perplexity": 230.38172696594552, "openwebmath_score": 0.8116179704666138, "tags": null, "url": "https://math.stackexchange.com/questions/1758610/maximum-and-minimum-of-of-fx-x-1x-2x-3" }
pcl, ros-groovy, debian GNU C++ (Debian 4.7.2-5) version 4.7.2 (x86_64-linux-gnu) compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version 3.1.0-p10, MPC version 0.9 GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128329 ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../x86_64-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /opt/ros/groovy/include /usr/include/qt4 /usr/include/qt4/QtGui /usr/include/qt4/QtCore /media/hd160/robot/ros/catkin_workspace/build_isolated/pcl/install/include /media/hd160/robot/ros/catkin_workspace/src/pcl/common/include /media/hd160/robot/ros/catkin_workspace/src/pcl/search/include /media/hd160/robot/ros/catkin_workspace/src/pcl/sample_consensus/include /usr/include/eigen3 /usr/lib/openmpi/include /usr/lib/openmpi/include/openmpi /usr/include/c++/4.7 /usr/include/c++/4.7/x86_64-linux-gnu
{ "domain": "robotics.stackexchange", "id": 15867, "lm_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, ros-groovy, debian", "url": null }
java, beginner, game, swing, awt OOP Inheritance In OOP we inherit from a super class if we extend its behavior. This is: we override a method to do something more and/or something different then the same method in the super class. Your class extends JFrame but does not change a JFrame's behavior. You only configure its content. So your class should rather use a JFrame instead of extending it: public class CookieClicker { // non graphical variables // ... public CookieClicker(JFrame theFrame) { container = theFrame.getContentPane(); // ... public static void main(String[] args) { JFrame theFrame = new JFrame(); CookieClicker cookieClicker = new CookieClicker(theFrame); theFrame.setTitle("Cookie Clicker"); theFrame.setSize(210, 200); theFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); theFrame.setVisible(true); } }
{ "domain": "codereview.stackexchange", "id": 35688, "lm_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, game, swing, awt", "url": null }
From these two lemmas, I think it is pretty clear how one ought to use the given fact: if $H \le S_n$ were a subgroup of index $2$, then it would consist of all $3$-cycles, since they have odd order. But by closure this means that $A_n \le H$. Since they have the same index, they must also have the same order, implying that they are equal because we are dealing with finite sets. • How do 3-cycles have an odd order? Or were you referring to something else? – Tomás Palamás Oct 30 '18 at 20:14 The quotient map for $$A_n$$ is a surjective homomorphism to $$C_2$$. Any other index two subgroup $$H$$ of $$A_n$$ gives you a distinct surjective homomorphism to $$C_2$$. Therefore taking the product of these we obtain a surjective homomorphism $$S_n$$ to $$C_2 \times C_2$$. But then this has kernel of order $$\frac{n!}{4}$$, by the first iso theorem, and thus the image of $$A_n$$ cannot be 1 or $$C_2 \times C_2$$, so must be of order 2.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9674102589923635, "lm_q1q2_score": 0.8061667585710274, "lm_q2_score": 0.8333245911726382, "openwebmath_perplexity": 212.24612107488997, "openwebmath_score": 0.9277147054672241, "tags": null, "url": "https://math.stackexchange.com/questions/27024/a-n-is-the-only-subgroup-of-s-n-of-index-2/27049" }
3, 9, 5, 4, 1, 3, 9, $\ldots$ The first power of 3 which is equivalent to 1 is $3^{5}$, so the order of $3 \pmod {11}$ is 5. It will be found that the order of 4 is again 5, and so also is that of 5. It will be seen that the successive powers of x are periodic; when we have reached the first number l for which $x^{l} \equiv 1$, then $x^{l+1} \equiv x$ and the previous cycle is repeated. It is plain that $x^{n} \equiv 1 {\pmod m}$ if and only if n is a multiple of the order of x. In the last example, $3^{n} \equiv 1 {\pmod 11}$ if and only if n is a multiple of 5. This remains valid if n is 0 (since 3^{0} = 1), and it remains valid also for negative exponents, provided $3^{-n}$, is interpreted as a fraction (mod 11) in the way explained earlier (an earlier blog article). In fact, the negative powers of 3 (mod 11) are obtained by prolonging the series backwards, and the table of powers of 3 to the modulus 11 is:
{ "domain": "madhavamathcompetition.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587239874877, "lm_q1q2_score": 0.8294545484351575, "lm_q2_score": 0.839733963661418, "openwebmath_perplexity": 2365.4697105927003, "openwebmath_score": 0.8478932976722717, "tags": null, "url": "https://madhavamathcompetition.com/category/nature-of-mathematics/" }
performance, c, primes A combined approach Something which would give you some gain, but not a lot would be to build a temporary array of primes, and use this to eliminate most of the lower cases. I.e. if you have a table of the first 1000 primes, you can avoid checking higher number for all those not being in that list. Which would falsify higher candidate numbers somewhat sooner. The flip side is that when you get to higher candidate numbers the primes are further apart, so it will get slow very fast, even with such a combined approach.
{ "domain": "codereview.stackexchange", "id": 17229, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, c, primes", "url": null }
1/4. The basic difference between permutation and combination is of order Permutation is basically called as a arrangement. To win the Ohio Super Lotto Plus lottery, you must correctly pick which six balls are chosen out of a collection of forty-nine numbered balls. Each of the 6 sectors of the prize wheel are equal sizes. (a) (probability that the total after rolling 4 fair dice is 21. What is the probability that the three pieces can be assembled into a triangle?. Both are distinguishable. Thursday is the 4th of July here are a few problems relating to Independence Day!! While walking around at their town's Independence Day Festival, Latrease and Hannah decide to buy lunch. The function f(x) is called a probability density function for the continuous random variable X where the total area under the curve bounded by the x-axis is equal to 1. Exercise 1. A Short Introduction to Probability Prof. Tossing a Coin. I take out a pen and lay it on the desk; each pen has the same chance of
{ "domain": "com.tw", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9830850827686585, "lm_q1q2_score": 0.8523699284437792, "lm_q2_score": 0.8670357666736772, "openwebmath_perplexity": 571.372607393667, "openwebmath_score": 0.6983087658882141, "tags": null, "url": "http://www.lidea.com.tw/yx58gj/e3002.php?xvx=probability-problems-on-balls-with-solutions-pdf" }
digital-communications, ofdm Title: How to demonstrate the orthogonality of OFDM subcarriers? Assume if we have $N$ OFDM subcarriers represented by results of the inverse FFT of $N$ data symbols $\mathbf x$. As I know, the subcarriers of OFDM should be orthogonal. It means that $$X(n)X(n+1) = 0\quad\text{where}\quad n = 0,\ldots,N-1$$ My question is that I can't get that right when doing it in MATLAB. For example suppose that $N=4$ and $$\mathbf x = \begin{bmatrix} 0.7+0.7i\\ 0.7-0.7i\\ -0.7+0.7i\\ 0.7+0.7i\end{bmatrix}$$ is a data symbols gotten after QAM modulation. The OFDM $N\times 1$ subcarriers are gotten by iFFT of the data symbol as below: X = ifft(x)*sqrt(4);
{ "domain": "dsp.stackexchange", "id": 9396, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "digital-communications, ofdm", "url": null }
acoustics, material-science, shock-waves Title: Moving faster than speed of sound in material Throughout my schooling this year, one thing that came up was that materials have a speed of sound. That concept makes sense to me. To my understanding it's the speed at which force can propagate through a material. My question is what happens when you exceed that speed while traveling through air say on a hypersonic plane or similar. Specifically, when the equivalent speed of sound in a material exposed to high airspeeds, is passed by fast airspeeds. I've attached a list of materials here and it can be seen that many directly exposed aircraft materials, would likely not have ever reached the speed in the atmosphere since many are at or above Mach 20. My intuition says that the air would rip apart the material because it would be unable to keep up with the force propagation. However, this seems wrong. What is the actual answer? The speed of sound tells us how fast a changing force will travel through something: materials with high
{ "domain": "physics.stackexchange", "id": 49546, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "acoustics, material-science, shock-waves", "url": null }
python, beginner, python-3.x, object-oriented, wrapper def my_add_arg(self, short, long, help): """Add an optional named argument of string type. If it isn't set on the commandline, it defaults to None. Args: short: the short name, i.e. '-ld' long: the long name, i.e. '--logdir' help: description printed out on '-h' """ self.add_argument(short, long, help=help, action="store") def my_add_required_arg(self, short, long, help): """Add an required named argument of string Type. Args: short: the short name, i.e. '-ld' long: the long name, i.e. '--logdir' help: description printed out on '-h' """ self.myRequired.add_argument( short, long, help=help, action="store", required=True ) def my_get_args(self): """Return the arguments depending on the configured and set arguments.
{ "domain": "codereview.stackexchange", "id": 35984, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-3.x, object-oriented, wrapper", "url": null }
functional-programming, clojure Title: Sorting texts by similarity in Clojure This is my first attempt with a lisp language. I'd like your review to address the following points, already listed in order of relevance: Is my code making good use of standard library? Is my code using the right data structures? Is my code well formated and organized? Is my code computationally efficient? Code: (ns clojure-first-try.core) (use '[clojure.string :only [split]]) (use '[clojure.set :only [intersection]]) (defn sum [arr] (reduce + 0.0 arr)) (defn squares [arr] (map #(* % %) arr)) (defn words-frequency [text] (as-> text $ (split $ #"\s+") (filter (complement empty?) $) (frequencies $))) (defn cos-numerator [map-1 map-2] (def common-keys (intersection (set (keys map-1)) (set (keys map-2)))) (sum (map #(* (map-1 %) (map-2 %)) common-keys))) (defn cos-denominator [map-1 map-2] (def p-1 (sum (squares (vals map-1)))) (def p-2 (sum (squares (vals map-2)))) (* (Math/sqrt p-1) (Math/sqrt p-2)))
{ "domain": "codereview.stackexchange", "id": 30433, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "functional-programming, clojure", "url": null }
Triangle Calculator. 1st moment of area is area multiplied by the perpendicular distance from the point of line of action. ” or ” A quantity expressing the body’s tendency to resist angular acceleration, it is equal to sum of product of mass of particles to the square of distances from the axis of rotation. Conclusion. The moment of inertia of a triangle with respect to an axis perpendicular to its base, can be found, considering that axis y'-y' in the figure below, divides the original triangle into two right ones, A and B. Physics - KE/Inertia. How do I calculate the moment of inertia of a right angled triangle about one side? Moment of inertia about a side other than the hypotenuse. Thus, the moment of inertia of a 2D shape is the moment of inertia of the shape about the Z-axis passing through the origin. How to calculate polar moment of inertia using Inventor 2014 Hello, I have a problem with calculating polar moment of inertia of a cranshaft with cooperating parts (which I've
{ "domain": "comprensivobovalino.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9830850892111574, "lm_q1q2_score": 0.8255299405512132, "lm_q2_score": 0.8397339656668286, "openwebmath_perplexity": 419.44107317169556, "openwebmath_score": 0.6266876459121704, "tags": null, "url": "http://comprensivobovalino.it/yofy/moment-of-inertia-of-triangle-about-apex.html" }
comes up heads 75 percent of the time. Case 2: One head. (a) What is the sample space of the experiment? (b) Given that both flips produce heads, what is the probability that Alice drew the two-headed coin from the urn?. What is the probability that it was the two-headed coin? 43. He is then either shouted at or not. If it is heads, he is willing. The first coin is two-headed. Problem 1 (20%) There are three coins in a box. A probability of one means that the event is certain. One is a two-headed coin; another is a fair coin; and the third is a biased coin that comes up heads 75% of the time. One is a two-headed coin (having head on both faces), another is a biased coin that comes up heads 75% of the times and the third is also a biased coin that comes up tails 40% of the time. The probability of getting any number face on the die is no way influences the probability of getting a head or a tail on the coin. One coin is fair, the other has heads on both sides. There are three coins in a
{ "domain": "makobene.de", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9867771770811146, "lm_q1q2_score": 0.8482965725150092, "lm_q2_score": 0.8596637541053282, "openwebmath_perplexity": 262.3697052783987, "openwebmath_score": 0.8458251953125, "tags": null, "url": "http://chhh.makobene.de/two-headed-coin-probability.html" }
condensed-matter, quantum-spin, computational-physics, ising-model, spin-chains Title: How can I explicitly express the Ising Hamiltonian in matrix form? I am reading this book about numerical methods in physics. It has the following question: Consider the Ising Hamiltonian defined as following $$H=-\sum_ {i=1}^{N-1} \sigma_i^x \sigma_ {i+1} ^x + h \sum_ {i=1} ^N \sigma_i^z$$ Write a program that computes the $2^N \times 2^N$ matrix for different $N$
{ "domain": "physics.stackexchange", "id": 54460, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "condensed-matter, quantum-spin, computational-physics, ising-model, spin-chains", "url": null }
ros, frequency, topic, subscribe, roscpp Originally posted by Bill5785 on ROS Answers with karma: 141 on 2017-05-09 Post score: 0 If input is being offered at 100 Hz, but processing results in only 1/10th of the messages being processed in time, then the output of your component will be 10 Hz. Which particular messages you'll miss in the output depends a bit on buffer settings (of your subscriber) and whether your algorithm is deterministic in time, but in general that is what would happen. Originally posted by gvdhoorn with karma: 86574 on 2017-05-09 This answer was ACCEPTED on the original site Post score: 2
{ "domain": "robotics.stackexchange", "id": 27853, "lm_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, frequency, topic, subscribe, roscpp", "url": null }
cc.complexity-theory, ds.algorithms, time-complexity, nt.number-theory, interactive-proofs The case I asked about---the one where Merlin has BQP powers, but no more than that---is still open. To answer your last question: no, one would not need to prove BPP≠BQP in order to solve this problem. The reason is that this problem only concerns the relativized setting: the setting where the function $f$ is a black box, which Arthur and Merlin can learn about only by querying it. And in the relativized setting---unlike the "real," unrelativized one---we can often prove unconditional separations between complexity classes! Indeed, I already mentioned one example above: it's known that any classical randomized algorithm to solve Simon's problem has to make exponentially many queries to $f$. That fact implies the existence of an oracle separating BPP from BQP.
{ "domain": "cstheory.stackexchange", "id": 1022, "lm_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, ds.algorithms, time-complexity, nt.number-theory, interactive-proofs", "url": null }
c#, design-patterns, game, console private void ProcessInput() { uip.Process(); } public void Notify(ConsoleKey consoleCommand) { switch (consoleCommand) { case ConsoleKey.Q: { uip.Stop(); running = false; } break; } } } Starting to feel better, any suggestions tips or plain 'youre doing it wrongs' are more than welcome, especially regarding the user input handling. I'm going architectural because coupling is an architectural issue and there is a fairly common general architecture for screen oriented games. Game Engine I think it will be difficult to create a screen oriented game without using a traditional game loop architecture. The basic loop might look like: while(true) { timerState = timerList.tick(timerState); keyboardState = keyboardState.nextState(keyboardState); UpdateScreen(timerState, keyboardState); pause(frameRate); }
{ "domain": "codereview.stackexchange", "id": 10251, "lm_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#, design-patterns, game, console", "url": null }
fft, discrete-signals, signal-analysis, noise, analog-to-digital So my questions are what NFFT points to take.? as that would also determine the noise floor.. .. what exactly would the noise floor be. ?. how exactly i can see the -120 dBFS/Hz in the graph or what does it means in terms of the graph... is this the correct way to add noise ? Thanks All help would be appreciated. Please see this post that details most of the noise considerations for an ADC What are advantages of having higher sampling rate of a signal? In particular the relationship for the noise floor given a full scale sine wave: $$SNR = 6.02 \text{ dB/bit} + 1.76 \text{ dB}$$ Using your numbers: 1.5Vpp sinewave. If we assume this sinewave is full scale (any higher voltage would start to add clipping noise), then this is the level of 0 dBFS. In particular the variance of this or the standard deviation is used in the dB ratio computation according to: $$SNR = 20Log_{10}(\sigma_s/\sigma_n)$$ or $$SNR = 10Log_{10}(\sigma_s^2/\sigma_n^2)$$
{ "domain": "dsp.stackexchange", "id": 8384, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fft, discrete-signals, signal-analysis, noise, analog-to-digital", "url": null }
java, object-oriented, unit-testing, android, serialization public void testCheckPassword() { User User1 = null; try { User1 = new User( "Mike", "M12345678", "1990/10/13", "(555) 555-1234", "123456@test.com", "password"); } catch (Exception e) { e.printStackTrace(); } assertEquals(true, User1.CheckPassword("password")); assertEquals(false, User1.CheckPassword("password1")); } } MainActivity.java implementation: package com.example.userclassserialization; import androidx.appcompat.app.AppCompatActivity; import android.content.Context; import android.os.Bundle; import android.widget.Toast; public class MainActivity extends AppCompatActivity { private User CurrentUser = null;
{ "domain": "codereview.stackexchange", "id": 41294, "lm_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, object-oriented, unit-testing, android, serialization", "url": null }
c++, search LibrarySystem library; library.RegisterBook("Test1", "Test1", BOOK_TYPE::Adult, "test1"); cout << library.BookDataOutput("test1") << endl; cin.get(); } and the output is: Book author: Test1 Book name: Test1 Book type: 5 Book Id: test1 Which matches all the information I provided. Since your search is only by 1 parameter, a map<string,Book> would work a lot better than a vector. map<string,Book> mBooks; string LibrarySystem::BookDataOutput(string bookId) { Book book = mBooks[bookId]; string data = "Book author: " + book.bookAuthor + "\n" + "Book name: " + book.bookName + "\n" + "Book type: " + to_string(book.bookType) + "\n" + "Book Id: " + book.bookID; return data; }
{ "domain": "codereview.stackexchange", "id": 23601, "lm_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++, search", "url": null }
quantum-mechanics, mathematical-physics, operators, hilbert-space, eigenvalue where $|\mathcal S\rangle$ is the state vector. How can we be sure that the position operator has enough eigenbasis to span the whole Hilbert space. For instance, say, that a operator $A$ is defined as, $$A=\begin{bmatrix} 1&1\\0&1\end{bmatrix}$$ has eigenvalue 1 and a eigenvector $\begin{bmatrix}1\\0\end{bmatrix}$ which is not enough to span the 2D space. Similarly, how can we be sure that the eigenvectors of the the position operator can span the whole space? Also, is it a coincidence that the eigenbasis of the Hamiltonian are orthogonal to each other? The answer to your question is the spectral theorem. Roughly, it says that any self-adjoint operator (that is, one satisfying $A^\dagger = A$ plus some other things when the dimension is infinite) has a basis of orthogonal eigenvectors with real eigenvalues. The proof you can find all over the internet or in books about linear algebra and/or functional analysis.
{ "domain": "physics.stackexchange", "id": 38372, "lm_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, mathematical-physics, operators, hilbert-space, eigenvalue", "url": null }
ros, callback, subscribe Title: Using two topic's information in a subscriber's callback Hi, I have a design problem. I have a topic with an image, that needs to be analyzed and I need to get a certain coordinate from it. I also have another topic with a certain coordinate. I need to use both of those coordinates in a callback method. So let's say I have a subscriber's callback: callback(imageInfo) { //I only get the imageinfo here } So I get the imageinfo there but I need to use the certain coordinate info also, to calculate a result. I could create a global variable for the certain coordinate and have a different subscriber with a callback setting its value and then use the global variable in the callback(imageinfo). But is there a better way? It doesn't seem that good.
{ "domain": "robotics.stackexchange", "id": 21474, "lm_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, callback, subscribe", "url": null }
ros-indigo, xacro Title: Xacro problems in Indigo Hi, I recently installed Indigo on a fresh 14.04 install after working in Hydro for a while, and xacro code that used to work no longer works. When I simply try to run xacro.py I get errors complaining about kobuki_description, which the internet doesn't seem to know much about. Any help? ’$:’rosrun xacro xacro.py neato.urdf.xacro > model.urdf Traceback (most recent call last): File "/opt/ros/indigo/share/xacro/xacro.py", line 60, in <module> xacro.main() File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py", line 653, in main process_includes(doc, os.path.dirname(args[0])) File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py", line 245, in process_includes filename_spec = eval_text(elt.getAttribute('filename'), {}) File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py", line 484, in eval_text results.append(handle_extension(lex.next()[1][2:-1]))
{ "domain": "robotics.stackexchange", "id": 19496, "lm_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-indigo, xacro", "url": null }
c, array, multithreading, random, fluent-interface /******************************************************************************* * Implements array length selection. * *******************************************************************************/ static minimum_selector* impl_with_length(const size_t length) { tl_length = length; return &gl_minimum_selector; } /******************************************************************************* * Initiates the fluent API for creating random arrays. * *******************************************************************************/ size_selector* create_random_array() { if (!tl_api_initialised) { gl_size_selector.of_length = impl_with_length; gl_minimum_selector.with_minimum = impl_with_minimum; gl_maximum_selector.with_maximum = impl_with_maximum; tl_api_initialised = 1; } return &gl_size_selector; } #endif /* FLUENT_ARRAYS_H */
{ "domain": "codereview.stackexchange", "id": 13116, "lm_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, multithreading, random, fluent-interface", "url": null }
gauss-law \begin{equation} \Phi=\dfrac{\Theta}{4\pi}\dfrac{Q}{\epsilon_{0}} \tag{01} \end{equation} where $\:\Theta\:$ is the solid angle(*) by which the point Q "sees" the surface $\:S$. Now, if $\:0=\ell \leq a \:$ and the strip has a finite height $\:b\:$ along the negative $\:z\:$ then according to the Proposition-Practical Rule in my answer here we have (Figure 01) \begin{equation} \tan\Theta\left(b\right)=\dfrac{s}{h\!\cdot\!d}=\dfrac{a\!\cdot\!b}{h\!\cdot\!\sqrt{a^{2}+b^{2}+h^{2}}} \tag{02} \end{equation} so for an infinite strip (Figure 02) \begin{equation} \tan\Theta=\lim_{b\rightarrow \infty}\tan\Theta\left(b\right)=\lim_{b\rightarrow \infty}\dfrac{a\!\cdot\!b}{h\!\cdot\!\sqrt{a^{2}+b^{2}+h^{2}}} \nonumber \end{equation} that is \begin{equation} \boxed{\:\:\color{blue}{\tan\Theta=\dfrac{a}{h}}\:\:} \qquad 0=\ell \leq a \tag{03} \end{equation}
{ "domain": "physics.stackexchange", "id": 48528, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gauss-law", "url": null }
tensor-calculus, differentiation, notation, elasticity, continuum-mechanics Title: Meaning of the notation $\sigma_{ji,j}$ In page 28 of the book Introduction to Linear Elasticity, 4ed by Phillip L. Gould · Yuan Feng, it says $$ \int_V{\left( f_i+\sigma _{ji,j} \right) \text{d}V=0} $$ What does it mean by writing $\sigma _{ji,j}$? Also in equation $(2.32)$, $$ \int_V{G_{i,i}\text{d}V=\int_A{n_iG_i\text{d}A}} $$ What does $G_{i,i}$ means? As already mentioned, Einstein's summation convention is a notation shortcut in which repeated indices are summed over. The comma that follows the physical quantities you have mentioned is just partial derivation with respect to the $i^{\text{th}}$ coordinate of whatever system coordinate you are working in. The only resources I have seen this comma notation used are GR books and articles, but it is obvious that this is also the case here. Thus, in your case, $G_{i,i}= \dfrac{\partial G_i}{\partial x^i} \equiv \sum_i \dfrac{\partial G_i}{\partial x^i} \equiv \nabla \cdot G,$ the divergence of your vector field $G$.
{ "domain": "physics.stackexchange", "id": 73899, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "tensor-calculus, differentiation, notation, elasticity, continuum-mechanics", "url": null }
quantum-mechanics, measurements, measurement-problem, quantum-measurements, born-rule Because of the orthogonality of the basis functions, only terms where $n=m$ would be able to get out from the integrating operator. As they are orthogonal, the result from any such term will be $\left| c_{n}(t)\right|^{2}$. Hence we deduce the following expression; $$\sum_{n} \left| c_{n}\right|^{2} =1$$
{ "domain": "physics.stackexchange", "id": 91188, "lm_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, measurements, measurement-problem, quantum-measurements, born-rule", "url": null }
php, php5, exception-handling, pdo public static function getInstance() { if (!isset(self::$instance)) { self::$instance = new static(); } return self::$instance; } public function fetchData($sql, $params = array(), $fetchMode = 'all') { // Should try...catch block be here? try { $this->sth = $this->db->prepare($sql); if (count($params) > 0) $this->setBind($params); $this->sth->execute(); $fetch = ($fetchMode == 'single') ? "fetch" : "fetchAll"; return $this->sth->$fetch(); } catch (PDOException $e) { $this->error = array( 'status' => 'error', 'message' => $e->getMessage() ); return false; } } public function setBind($params) { if (is_object($this->sth)) { foreach ($params as $key => $value) { $this->sth->bindValue(":$key", $value); } } }
{ "domain": "codereview.stackexchange", "id": 2441, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, php5, exception-handling, pdo", "url": null }
algorithm, c, tree, integration-testing if (temp != NULL) { postorderTree(temp->left); postorderTree(temp->right); printf(" %d--%c ", temp->key, temp->color); } } void traversal(struct node *root) { if (root != NULL) { printf("root is %d-- %c", root->key, root->color); printf("\nInorder tree traversal\n"); inorderTree(root); printf("\npostorder tree traversal\n"); postorderTree(root); } }
{ "domain": "codereview.stackexchange", "id": 32605, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm, c, tree, integration-testing", "url": null }
${B}{≔}\left[\begin{array}{ccc}{1}& {0}& {0}\\ {0}& {-1}& {0}\\ {0}& {0}& {-1}\end{array}\right]$ (7) > $\mathrm{eval}\left(\mathrm{Normalizer}\right)$ ${\mathbf{proc}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{option}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{builtin}}{=}{\mathrm{normal}}{,}{\mathrm{remember}}{,}{\mathrm{system}}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (8) > $\mathrm{LinearAlgebra}:-\mathrm{IsSimilar}\left(A,B\right)$ ${\mathrm{false}}$ (9) > $\mathrm{Normalizer}≔\mathrm{radnormal}$ ${\mathrm{Normalizer}}{≔}{\mathrm{radnormal}}$ (10) > $\mathrm{LinearAlgebra}:-\mathrm{IsSimilar}\left(A,B\right)$ ${\mathrm{true}}$ (11)
{ "domain": "maplesoft.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9664104933824754, "lm_q1q2_score": 0.8175276407055098, "lm_q2_score": 0.8459424295406088, "openwebmath_perplexity": 1907.8874485999188, "openwebmath_score": 0.8885136246681213, "tags": null, "url": "https://jp.maplesoft.com/support/help/maple/view.aspx?path=LinearAlgebra%2FIsSimilar" }
centripetal-force Title: Centripetal motion of a ball as the string gets shorter A ball is tied to a straw with a string. The ball is set to circle around the straw. As it rotates, the string winds up on the straw, and the string between the straw and the ball gets shorter and shorter. As this happens, the velocity of the ball increases.
{ "domain": "physics.stackexchange", "id": 79528, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "centripetal-force", "url": null }
lab-techniques, materials The approaches I've seen have been rather cavalier - basically just throwing a bunch of the powder in the squirt bottle and filling it with water. You quickly get a sense of how much will dissolve, and if you use a squirt bottle with a drop tube that doesn't go all the way to the bottom, you don't need to worry if not all of it dissolves. Alternatively, as you you seem the fastidious type, you can fill another (non-squirt) bottle partway with Alconox, the rest of the way with water and let that sit (perhaps with occasional mixing). This should give you a saturated Alconox solution, which you can use to fill the squirt bottle, being careful not to transfer residual powder from the bottle. Then you can add more Alconox powder and water to the stock bottle, let dissolve, and you should be ready for the next time. Again, this may only give you a 10-20% solution of Alconox in water, but that should be more than sufficiently concentrated for most usages.
{ "domain": "biology.stackexchange", "id": 6868, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lab-techniques, materials", "url": null }
organic-chemistry, enzymes This didn't take much effort to find so I'm sure you can find more examples easily. As for catalase, it seems to just decompose $\ce{H2O2}$, but this is useful in many different areas. For example, decomposing $\ce{H2O2}$ in contact lens cleaning solutions, preventing foods from being oxidised in wrappers (in conjunction with glucose oxidase, another enzyme), and removing $\ce{H2O2}$ from milk before cheese is made. The decomposition reaction is also used as a test for catalase in bacteria. Sources: General use - National Center of Biotechnology Education - and more uses (including the cheese example) - Worthington Enzyme Manual
{ "domain": "chemistry.stackexchange", "id": 2978, "lm_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, enzymes", "url": null }
python, python-3.x, functional-programming, hangman What if the implementation of get_words changes? This comment becomes obsolete. Lines 47-48: # Print the list of possible words. return possible_words No printing here. You print it sometime later in the game loop, but not here. Here, there's only a return, which in itself doesn't do any printing. Instead, consider commenting what each function does, preferably using Python doc-strings. def get_words(word_len): """ Returns a list of words each with length equal to `word_len`. """
{ "domain": "codereview.stackexchange", "id": 34812, "lm_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, functional-programming, hangman", "url": null }
python, optimization, genetic-algorithms individual[pos_to_mutate] = randint( min(individual), max(individual)) # crossover parents to create children parents_length = len(parents) desired_length = len(pop) - parents_length children = [] while len(children) < desired_length: male = randint(0, parents_length-1) female = randint(0, parents_length-1) if male != female: male = parents[male] female = parents[female] half = len(male) / 2 child = male[:half] + female[half:] children.append(child) parents.extend(children) return parents
{ "domain": "datascience.stackexchange", "id": 601, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, optimization, genetic-algorithms", "url": null }
c, serialization, arduino unsigned long currentTime = millis(); // Set current time static unsigned long previousTime = 0; // Set previous time /* Set string to incoming data. Establish 'three-way handshake' and count the amount of times handshaking performed. Set lights according to the handshakes counted. */ if (serial.available() > 0) { while (serial.available() > 0) { readString = serial.readString(); } if (readString == SYNCHRONIZE) { serial.print(SYNACK); } else if (readString == ACKNOWLEDGED) { switch (counter) { case 0: digitalWrite(REDLED1, HIGH); digitalWrite(REDLED2, HIGH); break; case 10: digitalWrite(GREENLED1, HIGH); digitalWrite(REDLED1, LOW); break;
{ "domain": "codereview.stackexchange", "id": 37627, "lm_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, serialization, arduino", "url": null }
tree, formatting, clojure, ascii-art (defn tree-string "Creates and returns a tree string from node." [node] (let [{:keys [value left right]} node s (str value)] (apply assemble {[0 (- (quot (count s) 2))] s} (map #(when % (tree-string %)) [left right]))))
{ "domain": "codereview.stackexchange", "id": 26826, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "tree, formatting, clojure, ascii-art", "url": null }
python, python-2.x, json, http, socket s.bind((HOST,PORT)) print ("Socket bound.") #Start listening s.listen(10) print ("Socket Listening") conn, addr = s.accept() url = 'http://www.google.com' while True: data = conn.recv(1024) dictionary = dict(item.split("|") for item in data .split(";")) json = json.dumps(dictionary, ensure_ascii=False) r = requests.get(url, data=json) print r.text This code does not compile, and has many bugs. Can you fix the errors in it? url- = is a syntax error. I don't recommend calling a variable split when you are using a method split, it's confusing. You did not use that variable named split. You did not define a variable message. print 'r.text' should I suppose be print r.text. I'm not sure about data = conn.recv(1024), what will happen if a request is longer than 1024 bytes? This code needs to be debugged, it is not ready for code review. But it seems like a nice idea, and structurally okay, a good start. I could help you debug it and get it working if you like.
{ "domain": "codereview.stackexchange", "id": 11965, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-2.x, json, http, socket", "url": null }
the-sun On the equator, the sun will be straight overhead and a vertical stick will cast no shadow at solar noon on the equinoxes. On the vernal equinox, north of the subsolar point (on the equator) the vertical stick's shadow will point a little westwards of true north (NNW) reading 336.5° from true north and little eastwards of true south (SSE) reading 156.5° from true north. On the autumnal equinox, north of the subsolar point (on the equator), the shadow will point a little eastwards of true north (NNE) reading 23.5° from true north (and south of the subsolar, the shadow will point a little westward of true south (SSW) reading 203.5° from true north). --https://en.wikipedia.org/wiki/Sun_path#Shadow_of_a_vertical_stick_at_solar_noon
{ "domain": "astronomy.stackexchange", "id": 3988, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "the-sun", "url": null }
javascript, jquery Title: A more elegant way of adding option data to a dropdown box using jQuery The code I have below is currently what I am wanting to see if I can shorten. The code works as-is right now but I don't like the face that each IF statement has its own $each loop in it. I was wanting to see if I can condensed this down to allow only one call to the $each loop. switch (input.Type.toLowerCase()) { case 'slider': .....[skipped code here] case 'ddl': inputContainer.append($("<select>") .attr("id", input.ID) .addClass("ctrl") .addClass("form-item-ddl") );
{ "domain": "codereview.stackexchange", "id": 42182, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery", "url": null }
qiskit, programming I get the following error: AttributeError: 'ManagedResults' object has no attribute 'combine_results' Furthermore, the combine_results method is not listed under help(type(job_results)): Does this mean that the method has been deprecated? If so how can I overcome this? It's still there. See the source code: https://github.com/Qiskit/qiskit-ibmq-provider/blob/stable/0.8/qiskit/providers/ibmq/managed/managedresults.py#L178 Are you using the right version of qiskit-ibmq-provider? combine_results was introduced in 0.8. If you do import qiskit print(qiskit.__qiskit_version__) it'll show you the version of each element.
{ "domain": "quantumcomputing.stackexchange", "id": 1918, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "qiskit, programming", "url": null }
- What does the notation with \ mean? –  user1038665 Oct 29 '12 at 23:45 @user1038665 The notation $A \backslash B$ means the set of elements in the set $A$ but not in the set $B$. Also, as Austin Mohr has pointed out, note that the intersection $E_1 \cap E_2$ is counted twice: once as part of $E_1$ and once as part of $E_2$. Hence, it needs to be subtracted off. –  user17762 Oct 29 '12 at 23:49 @marvis which program was used for the graphics? –  yiyi Oct 30 '12 at 1:05 @MaoYiyi I drew it using TikZ in LaTeX and cut copy pasted it. –  user17762 Oct 30 '12 at 1:08
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846634557752, "lm_q1q2_score": 0.8315987607837209, "lm_q2_score": 0.8499711737573763, "openwebmath_perplexity": 147.58148488551168, "openwebmath_score": 0.969265878200531, "tags": null, "url": "http://math.stackexchange.com/questions/223882/the-probability-of-the-union-of-two-events" }
#### Opalg ##### MHB Oldtimer Staff member Find the minimum value of $xy$, given that $x^2+y^2+z^2=7$, $xy+xz+yz=4$, and $x, y$ and $z$ are real numbers. First, the minimum value of $xy$ must be positive, because if $xy\leqslant 0$ then $(x+y)z\geqslant 4$. So $(x+y)^2\geqslant\dfrac{16}{z^2}$, and $$7-z^2 = x^2+y^2 = (x+y)^2 - 2xy \geqslant (x+y)^2 \geqslant \frac{16}{z^2}.$$ Thus $z^2 + \dfrac{16}{z^2} \leqslant 7$. But that cannot happen, because the minimum value of $z^2 + \dfrac{16}{z^2}$ is $8$ (occurring when $z^2 = 4$). So we may assume that $xy>0$. Let $u = \sqrt{xy}$ and $v = x+y$. Then we can write the equations as $v^2-2u^2 + z^2 = 7$, $vz+u^2=4$. Therefore $v^2 - 2(4-vz) + z^2 = 7,$ so $(v+z)^2 = 15$. But $vz\leqslant\bigl(\frac12(v+z)\bigr)^2 = \frac{15}4.$ Therefore $xy = u^2 \geqslant 4-\frac{15}4 = \frac14$.
{ "domain": "mathhelpboards.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9857180631379971, "lm_q1q2_score": 0.8104466686818101, "lm_q2_score": 0.822189121808099, "openwebmath_perplexity": 298.8340266958963, "openwebmath_score": 0.9169202446937561, "tags": null, "url": "https://mathhelpboards.com/threads/find-minimum-value-of-xy.6650/" }
ros Comment by dornhege on 2013-09-30: This doesn't answer the question, but might be a better solution to what you want to do: Check out the cmd_vel_mux: http://wiki.ros.org/cmd_vel_mux . I got the launch file working this weekend. Dornhege pointed out the missing item this morning. When I wrote the question, I was assuming the "name="mux_cmdvel" item was redundant on the "mux:=mux_cmdvel". Apparently they don't do the same thing. So, the real answer to my question is that placing all of the rosrun arguments in an "args=" item is proper formatting for a launch statement(which I wasn't sure of). I was just missing the mux:= part. Thanks
{ "domain": "robotics.stackexchange", "id": 15683, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
ros, colcon Originally posted by ashakeri on ROS Answers with karma: 3 on 2021-04-23 Post score: 0 Original comments Comment by jpace121 on 2021-04-24: Are cpplint and uncrustify installed? Comment by ashakeri on 2021-04-26: @jpace121 Yes they are installed but the same problem exist. I installed the cpplint via "pip install cpplint". Comment by christophebedard on 2021-04-26: It's not actually failing though. It's a warning. Maybe just proceed with whatever you wanted to do and see if it works? Comment by ashakeri on 2021-05-03: @christophebedard The functionalities that I want is not working. I do everything according to this documentation but it does not work. According to your answer I think there should be something missing in the documentation. Now, I am trying to find a solution. Comment by christophebedard on 2021-05-03: I'd suggest you open a new question for that other problem. It's not actually failling. this Finished <<< autoware_auto_common [23.8s]
{ "domain": "robotics.stackexchange", "id": 36357, "lm_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, colcon", "url": null }
homework-and-exercises, pressure, water, density, fluid-statics $$\begin{aligned}-\Delta v &= 45.8 \cdot 10^{-11} \cdot (1.16 \cdot 10^8 - 1.0\cdot 10^5)\\ &= 7.3 \cdot 10^{-10}\end{aligned}$$ A quick sanity check says that this should be about $53\cdot 10^{-3}$ rather than $7.3\cdot 10^{-10}$.
{ "domain": "physics.stackexchange", "id": 38964, "lm_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, pressure, water, density, fluid-statics", "url": null }
• For any two rows $$i, i'$$, their intersection contains the same number of $$1$$s: indeed, $$\forall i, i', \sum_j (A_{ij}A_{i'j}) = {m-2 \choose n-2}$$, independent of $$i, i'$$. This is the number of subsets $$T_j$$ that contains both $$i$$ and $$i'$$, which equals the number of ways to choose the remaining $$n-2$$ elements out of the remaining $$m-2$$ possibilities. Since we identify rows $$i, i'$$ as the OP's sets $$S_i, S_{i'}$$, this means $$|S_i \cap S_{i'}| = p/2 = {m-2 \choose n-2}$$. • Now we solve: $${m-2 \choose n-2} = {1 \over 2} {m-1 \choose n-1} \implies n = 1 + {m-1 \over 2} = {m+1 \over 2}$$. In other words, parameterized by odd integer $$m$$, we can define $$n = {m+1 \over 2}$$ and we have exhibited a collection of sets (rows of $$A$$) where: • individual set size $$p={m-1 \choose n-1}$$ • no. of sets $$k \le m$$ • universe size $$U = L = {m \choose n}$$, the no. of columns of $$A$$ • ratio $$U/p = {m \choose n} / {m-1 \choose n-1} = m/n = {2m \over m+1}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9678992923570261, "lm_q1q2_score": 0.8187870864456892, "lm_q2_score": 0.8459424373085146, "openwebmath_perplexity": 394.28025355856016, "openwebmath_score": 0.9674398303031921, "tags": null, "url": "https://math.stackexchange.com/questions/2922543/union-of-sets-with-pairwise-intersection-having-half-of-the-elements" }
audio, sampling Title: The current state of the art in audio signal interpolation Three questions: What are all the metrics one can use to measure audio interpolation quality, objectively? (but also in terms of psychoacoustics if possible) By those metrics, what is the current state of the art in audio interpolation? Suppose I were to render two files from a sequence of notes from virtual instruments in two resolutions and then compare an upsampling of one file with the high-frequency rendered version, what software could one use to compare these objectively? - ideally using the before-mentioned metrics So far, from I've been able to gather, these resamplers provide some of the best quality http://www.mega-nerd.com/SRC/ http://sox.sourceforge.net/SoX/ http://www.izotope.com/tech/src/
{ "domain": "dsp.stackexchange", "id": 153, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "audio, sampling", "url": null }
We shall denote the sets of negative coordinates of $$x$$ and $$y$$, respectively, by $$K$$ and $$L$$ (so $$|K| = k$$ and $$|L| = l$$). Let their complements be $$K'$$ and $$L'$$. Now, a pair of indices $$i, j$$ contributes a nonzero term to the objective if and only if exactly one of $$i, j$$ is in $$K$$, and exactly one of $$i, j$$ is in $$L$$. The total number of such pairs (which we can view as edges in the intersection of two complete bipartite graphs) is given by: $$| K \cap L | | K' \cap L' | + | K \cap L' | | K' \cap L |$$ If we let $$m := | K \cap L |$$, this is just: $$m (n + m - k - l) + (k - m)(l - m)$$ This is a quadratic function of $$m$$ with minimiser $$\frac{1}{4}(2k + 2l - n)$$. Case 1: If $$2k + 2l \leq n$$, this is minimised on the boundary when $$m = 0$$. We can take $$K$$ and $$L$$ to be disjoint and everything is much simpler. The number of nonzero terms is $$kl$$, and the size of each term is: $$\dfrac{n^2}{\sqrt{lkn^2(n-l)(n-k)}}$$
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9653811611608242, "lm_q1q2_score": 0.8224591924760123, "lm_q2_score": 0.851952809486198, "openwebmath_perplexity": 211.76061190150264, "openwebmath_score": 0.9922521114349365, "tags": null, "url": "https://mathoverflow.net/questions/312227/what-is-the-minimum-of-this-quantity-on-sn-2-times-sn-2" }
quantum-mechanics, electromagnetism, optics, statistical-mechanics, scattering Maxwell equations First to compute absorption, we need to consider, to simply one polarization (we need to compute also the other one and do an average for the transmission but this is not a big deal here). For a plane wave who propagates in $z$ direction, we assume an electric field $E_x(z)$ who obeys to: $$ \left[ \partial_z^2 + k^2 (1 + f(z)) \right] E_x(z) = 0 $$ with $1 + f(z) = \epsilon(z)$, with $\epsilon$ the relative permittivity of CO2 and $k = 2 \pi / \lambda$. It is obvious that $f(z) << 1$. We can rely permittivity to molecular polarizability by Debye formula: $$ \epsilon - 1 \simeq N(z) \alpha = f(z) $$ with $\alpha$ the polarizability of one molecule of CO2 and $N(z)$ the number of CO2 particles by unit of volume. We assume the form of $N$ with exponential approximation: $$ N(z) = N_0 exp(-z/H) $$ With $H \simeq 6$ km. The solution is exact in terms of hypergeometric serie, but we can have a more comprehensive approximation by posing into the propagation equation:
{ "domain": "physics.stackexchange", "id": 94294, "lm_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, electromagnetism, optics, statistical-mechanics, scattering", "url": null }
here for a quick overview of the site, Detailed answers to any questions you might have, Discuss the workings and policies of this site, Learn more about Stack Overflow the company, Learn more about hiring developers or posting ads with us, I think it's trying to graph a curve when it ought to be a region, and it's confused because of the equal sign. Conic Sections: Parabola and Focus. By using this website, you agree to our Cookie Policy. How to sustain this sedentary hunter-gatherer society? The ceiling function by ceil(), the floor function by floor(), and the sign function by sign(). Conic Sections: Ellipse with Foci Why Is an Inhomogenous Magnetic Field Used in the Stern Gerlach Experiment? Is Elastigirl's body shape her natural shape, or did she choose it? The absolute value symbol by | (i.e., Shift + \ on US keyboards). An online calculator to calculate values of the floor and ceiling functions for a given value of the input x. How do we actually do the function though? It is an
{ "domain": "greenbirdit.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9585377272885903, "lm_q1q2_score": 0.8089052974358638, "lm_q2_score": 0.843895106480586, "openwebmath_perplexity": 1096.1523227406492, "openwebmath_score": 0.2347310334444046, "tags": null, "url": "http://greenbirdit.com/kmqv9o/tth1uxx.php?id=floor-function-desmos-643a98" }
quantum-chemistry, electrons, terminology ADDENDUM For completeness, I'll add that in addition to $\hat{S}_z$, two other important operators that measure properties of electrons that can be known at the same time as energy is known are $\hat{L}^2$, the operator for the magnitude of total (quantum) angular momentum and $\hat{L}_z$, the z-component of that angular momentum. Thus, we can theoretically have an electron for which all four properties are fixed at one time, and we define the state described by the four eigenvalues by representing those eigenvalues with the "quantum numbers" (simplified forms of the eigenvalues) with which you are probably familiar: n is the quantum number which represents the eigenvalues of the energy operator $\hat{H}$ (ie the Hamiltonian, which we associate with a specific shell) l is the quantum number which represents the eigenvalues of the operator $\hat{L}^2$ (which we equate with s,p, d etc orbitals)
{ "domain": "chemistry.stackexchange", "id": 14350, "lm_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-chemistry, electrons, terminology", "url": null }
javascript, html, game, ecmascript-6, dom function main() { // Hard-coded "settings" let settings = { backgroundColor : 0x008888, paddleSpeed : 0.3, ballSpeed: 0.2 }; let paddle = { width : 4, height : 1, depth : 1, color : 0xffffff, velocity : new THREE.Vector3(0.0, 0.0, 0.0), state : paddleStates.STATIONARY, startPosition : new THREE.Vector3(0.0, 0.0, -4.0) }; let ball = { radius : 0.5, color : 0xffff00, velocity : new THREE.Vector3(settings.ballSpeed, 0.0, -settings.ballSpeed), startPosition : new THREE.Vector3(0.0, 0.0, -9.0), segments : { width : 16, height : 16 } }; const levelBounds = { top : -35.0, right : 17.0, left : -17.0, bottom : 0.0 };
{ "domain": "codereview.stackexchange", "id": 31749, "lm_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, html, game, ecmascript-6, dom", "url": null }
For your original question, you can look at it this way : the eigenvalue of $M = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$ are the roots of the polynomial $$P(x) = \begin{vmatrix} a-x & b \\ c & d-x \end{vmatrix}$$ This is a 2nd degree polynomial, so it has real roots if the discriminant is positive. Hence, if $\Delta(a,b,c,d)$ is the discriminant of $P$, the set of matrix with real eigenvalues is $$\left\{ \begin{pmatrix} a & b \\ c & d \end{pmatrix} \mid (a,b,c,d)\in \Bbb R, \Delta(a,b,c,d) \geq 0 \right\}$$ So if you can prove that $\Delta(a,b,c,d)$ is continuous, you've won (do you see why?) • discriminant turns out to be Tr(M)^2 - 4*det(M) which is continuous as it is a linear combination of continuous functions (Tr^2 is composition of two continuous functions). Thus my original set is the inverse image of [0,\infty) under this cont map and thus closed – user166305 Jan 20 '16 at 17:26
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9896718490038141, "lm_q1q2_score": 0.8411925393712583, "lm_q2_score": 0.8499711699569787, "openwebmath_perplexity": 220.02441493895932, "openwebmath_score": 0.8875463008880615, "tags": null, "url": "https://math.stackexchange.com/questions/1619779/is-a-certain-subset-of-m-2-mathbbr-closed" }
javascript, algorithm, sorting return clonedArray; }; module.exports = insertion; Questions I tested the code and I know it works. But I wonder if the algorithm available in wikipedia is the best insertion sort algorithm. Having in mind I wish this function's API to be pure ( I don't want to change the original array, I want to return a new one), I have the following questions: Is there a better way to code insertion sort? What improvements can be made to this code? Other than rewriting it in a less pseudo-code-like way: const insertion = ( array ) => { if(!Array.isArray(array)) throw new Error("array must be an Array"); if (array.length === 0) return []; //shallow copy const clonedArray = array.slice();
{ "domain": "codereview.stackexchange", "id": 28420, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, algorithm, sorting", "url": null }
• You are listing functions from the Power set of $X$ to $Y$, not functions from $X$ to $Y$. You got $16$ but there are in fact many more ($2^8=256$). Oct 13, 2014 at 18:11
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226297554521, "lm_q1q2_score": 0.8032973928441269, "lm_q2_score": 0.8221891370573388, "openwebmath_perplexity": 68.3012789754146, "openwebmath_score": 0.7806753516197205, "tags": null, "url": "https://math.stackexchange.com/questions/972048/cardinality-of-the-set-of-all-indicator-functions" }
thermodynamics, electromagnetic-radiation, radiation, thermal-radiation, semiclassical Title: Drag force on mirror immersed in blackbody radiation In Einstein's "On The Present Status of the Radiation Problem" he mentions a thought experiment where A mirror of mass $M$ and area $A$ that is perfectly reflective in the range of frequencies $\nu$ to $\nu+d\nu$ and transparent in all others is restrained to movement in the $x$-axis, to which it is perpendicular, and immersed in an isotropic bath of gas in thermal equilibrium and black body radiation, which has energy density $$\rho=\frac{8\pi\nu^2}{c^3}\frac{h\nu}{e^{h\nu/kT}-1}d\nu$$ The mirror will experience a resistive force proportional to its velocity $-Rv$. Over that time, it'll also be imparted some extra momentum $\Delta$ by the small and random variations in the energy density and direction of the radiation. So, if at a certain time its momentum is $Mv$ its momentum after a very short interval of time $\tau$ will be $$Mv-Rv\tau+\Delta$$
{ "domain": "physics.stackexchange", "id": 65509, "lm_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, electromagnetic-radiation, radiation, thermal-radiation, semiclassical", "url": null }
c++, converting void take (std::string &numberString) { std:: cout << "Enter your number:\n"; std::cin >> numberString; while (1) { if (validate(numberString)) { break; //SUCCESS } else { std::cout << "Invalid number, try again:\n"; std::cin >> numberString; } } }
{ "domain": "codereview.stackexchange", "id": 9238, "lm_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++, converting", "url": null }
turing-machines, undecidability For any $\langle M, w \rangle$ construct a new TM $M'$ M'(x) Simulate M on w If M accepts w then run M_1 on x If M_1 accepts x then ACCEPT
{ "domain": "cs.stackexchange", "id": 9532, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turing-machines, undecidability", "url": null }
Notice that you have ab if a and b have the same sign and that you use -ab otherwise. Now, if a and b have the same sign, $$ab\geq0$$. If they have opposite signs (and are different than zero), $$ab<0$$. Using this, $$|a||b| = \begin{cases} ab & \text{if } ab \geq 0 \\ -ab & \text{if } ab<0 \end{cases} = |ab|$$ Quod erat demonstrandum :tongue2: Last edited: Jul 25, 2008 4. Jul 28, 2008 quark1005 let a = mcis(kpi) where m => 0, k is integer and b = ncis(hpi) where n => 0, h integer (clearly a,b are real) |a||b|= mn |ab|=|mcis(kpi)*ncis(hpi)| = |mncis[pi(k+h)]| = mn as required 5. Jul 28, 2008 HallsofIvy Staff Emeritus This would make more sense if you had said that "mcis(hpi)" is $$m (cos(h\pi)+ i sin(h\pi))$$ That is much more an "engineering notation" than mathematics. If you really want to go to complex numbers, why not if $$x= r_xe^{i\theta_x}$$ and $$y= r_ye^{i\theta_y}$$, then $$|xy|= |r_xe^{i\theta_x}r_ye^{i\theta_y}|= |(r_xr_y)e^{i(\theta_x+\theta_y)}|$$
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534392852384, "lm_q1q2_score": 0.8676433980306277, "lm_q2_score": 0.8840392863287585, "openwebmath_perplexity": 3610.9502987541396, "openwebmath_score": 0.8403744101524353, "tags": null, "url": "https://www.physicsforums.com/threads/properties-of-the-absolute-value.246785/" }
cc.complexity-theory, puzzles Title: Name and complexity of a stone placement puzzle Consider the puzzle comprised of $N$ stones. Each stone is given a set of candidate locations. The goal is to put each stone in one of its candidate locations such that no two stones are put in the same place. Has this problem and its complexity been studied in the literature somewhere? If so, what is it called? The puzzle is more or less similar to the exact cover problem. The phrase you are looking for is "system of distinct representatives". A stone placement represents its set of candidate locations, and all sets must have distinct placements. It is more or less the same as bipartite matching, on a graph connecting each stone to each location where it may be placed, and can be solved in polynomial time using matching algorithms.
{ "domain": "cstheory.stackexchange", "id": 5671, "lm_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, puzzles", "url": null }
If $r\geq i$, $s\geq j$, then the $(r,s)$ entry of $B_{ij}$ is $a_{r+1,s+1} = a_{N-r,N-s}$. Since $(r+1,s+1)$ is to the right and below $(i,j)$, then $(N-r,N-s)$ is to the left and above $(N+1-i,N+1-j)$, so the $(N-r,N-s)$ entry of $B_{N+1-i,N+1-j}$ is $a_{N-r,N-s}$, as desired. So the question comes down to whether the determinant of an $N\times N$ matrix is invariant under the transformation that maps the $(i,j)$ entry to the $(N+1-i,N+1-j)$th entry. This is achieved through a series of row and column exchanges: exchange first row with last row; second row with penultimate row; third row with antepenultimate row; etc.; and then exchange first column with last column; second column with penultimate column; third column with ante-penultimate column; etc. In the end, we have performed an even number of row/column exchanges, each of which multiplies the determinant by $-1$. So the two matrices have the same determinant.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9845754492759499, "lm_q1q2_score": 0.8426500221086268, "lm_q2_score": 0.8558511414521923, "openwebmath_perplexity": 181.305939652465, "openwebmath_score": 0.9403470754623413, "tags": null, "url": "http://math.stackexchange.com/questions/54118/do-matrices-with-central-symmetry-form-a-group" }
genetics, biochemistry, molecular-biology, proteins, molecular-genetics DNA binding should be a statistical process between association and dissociation at a given binding site. At higher temperatures the turn-over at the binding site should be higher (because there is more energy available to promote dissociation). T
{ "domain": "biology.stackexchange", "id": 2745, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, biochemistry, molecular-biology, proteins, molecular-genetics", "url": null }
The sum of factors of $$n$$ will be expressed by the formula: $$\frac{(a^{p+1}-1)*(b^{q+1}-1)*(c^{r+1}-1)}{(a-1)*(b-1)*(c-1)}$$ Example: Finding the sum of all factors of 450: $$450=2^1*3^2*5^2$$ The sum of all factors of 450 is $$\frac{(2^{1+1}-1)*(3^{2+1}-1)*(5^{2+1}-1)}{(2-1)*(3-1)*(5-1)}=\frac{3*26*124}{1*2*4}=1209$$ Greatest Common Factor (Divisior) - GCF (GCD) The greatest common divisor (gcd), also known as the greatest common factor (gcf), or highest common factor (hcf), of two or more non-zero integers, is the largest positive integer that divides the numbers without a remainder. To find the GCF, you will need to do prime-factorization. Then, multiply the common factors (pick the lowest power of the common factors). • Every common divisor of a and b is a divisor of gcd(a, b). • a*b=gcd(a, b)*lcm(a, b) Lowest Common Multiple - LCM
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226314280634, "lm_q1q2_score": 0.8668189653116194, "lm_q2_score": 0.8872045922259088, "openwebmath_perplexity": 711.1701522916192, "openwebmath_score": 0.8090343475341797, "tags": null, "url": "https://gmatclub.com/forum/math-number-theory-broken-into-smaller-topics-91274.html" }
electromagnetism, specific-reference, electrostatics, physical-chemistry, computational-physics $$\frac{\partial n_{i}}{\partial t}= \nabla \cdotp \lgroup D_{i}(\nabla n_{i}+\frac{q_{i}n_{i}}{kT}\nabla \phi)\rgroup.$$ Of course, these models include assumptions which may not always be valid, such as the use of Stokes law or the assumption of non-interaction of ions. More accurate numerical models may require the use of empirical data to account for these and other effects, including chemical reaction kinetics.
{ "domain": "physics.stackexchange", "id": 5200, "lm_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, specific-reference, electrostatics, physical-chemistry, computational-physics", "url": null }
electromagnetism, magnetic-fields Title: Why is there a difference between the magnitude of magnitude field of a finite wire in contrast to an infinite wire? Besides the two equations(from Ampère's Law & Biot-Savart Law) why is there a weaker magnetic field produced by a finite wire than the infinite wire? If we experimented between a wire(A) and another wire that is 100x wire(A) at wanted to measure the magnitude of the magnetic field at an equal point(P) the longer wire would produce a greater magnitude. If the parameters are set to have an equal current, and wire shape(expect length), why would they differ? Your mistake appears to be to believe that the magnetic field produced by a short piece of current-carrying wire is only non-zero at points lying in a plane perpendicular to the wire, going through the wire segment. That is not the case. The Biot-Savart law tells us that each current-carrying wire segment contributes a magnetic field, given in vector form by
{ "domain": "physics.stackexchange", "id": 36463, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, magnetic-fields", "url": null }
$$\ \mathbf{y = x : } \quad x^2 \ + \ x·x \ + \ x^2 \ = \ 12 \ \ \Rightarrow \ \ 3x^2 \ = \ 12 \ \ \Rightarrow \ \ x \ = \ y \ = \ \pm 2 \ \ , \ \ z \ = \ -(x+y) \ = \ \mp 4 \ \ ;$$ $$\ \mathbf{y = 1-x : } \quad x^2 \ + \ x·(1-x) \ + \ (1-x)^2 \ = \ x^2 \ - \ x \ + \ 1 \ = \ 12 \ \ \Rightarrow \ \ x^2 \ - \ x \ - \ 11 \ = \ 0$$ $$\Rightarrow \ \ x \ = \ \frac{ 1 \ \pm \ \sqrt{ \ 1 \ - \ 4·1·(-11)}}{2} \ = \ \frac{1 \ \pm \ \sqrt{45}}{2} \ \ \text{or} \ \ \frac{1 \ \pm \ 3\sqrt{5}}{2} \ \ , \ \ y \ = \ \frac{1 \ \mp \ 3\sqrt{5}}{2} \ \ ,$$ $$z \ = \ - \left( \frac{1 \ \pm \ 3\sqrt{5}}{2} \ + \ \frac{1 \ \mp \ 3\sqrt{5}}{2} \right) \ = \ -1 \ \ .$$ The two extremal values from the $$\ y = x \$$ case yield $$\ f( \ 2 \ ,\ 2 \ , \ -4 \ ) \ \ = \ \ 2·2 \ + \ 2·(- 4) \ = -4 \$$ and $$\ f( \ -2 \ ,\ -2 \ , \ +4 \ ) \ \ = \ \ (-2)·(-2) \ + \ 2·4 \ \ = \ \ 12 \ \ ,$$ the maximum value for our function. From the second case, we obtain the minimum value,
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9914225140794154, "lm_q1q2_score": 0.8196206768309675, "lm_q2_score": 0.8267117855317474, "openwebmath_perplexity": 266.38163282952473, "openwebmath_score": 0.7701714038848877, "tags": null, "url": "https://math.stackexchange.com/questions/2206708/method-of-lagrange-multipliers-for-multiple-constraints" }
speech-recognition Title: Continuous speech recognition with HMM I don't understand how this works. Help would be really appreciated. Let's say we have a 10 second sound input, we make a feature vector every 10ms - so we have 1000 vectors - $\mathbf{o}=o_1, \cdots,o_{1000}$. For simplicity, let's say that all we want to know, is what sequence of phones $p=p_1,\cdots,p_n$ is the answer to $\text{argmax } P(o|p)$ for $p$, or at least what's a good estimate/close answer. For all phones, we have a seperate left to right HMM model (I think that's what makes sense in this scenario). How exactly is this done? Will similar enough vectors be "put together" and only treated as 1? The input is probably not one phone or a thousand phones - but we don't know that... so for what $p$ will $P(o|p)$ be computed? Will similar enough vectors be "put together" and only treated as 1? No, this is not how it is done. so for what p will P(o|p) be computed?
{ "domain": "dsp.stackexchange", "id": 2071, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "speech-recognition", "url": null }
\begin{align}\mathfrak{I}=&\sum_{r=1}^n \int_{r-1}^r f(u) \, \text{d}u\\ \end{align} But we know that $\displaystyle \int_{a}^b f \,+ \int_b^c f = \int_a^c f$. Therefore : $$\boxed{\,\,\,\mathfrak{I} =\int_{0}^n f(x) \, \text{d}x\,\,\,\,\,}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9817357179075084, "lm_q1q2_score": 0.859791367796747, "lm_q2_score": 0.8757869884059266, "openwebmath_perplexity": 424.54790640078613, "openwebmath_score": 0.9522208571434021, "tags": null, "url": "https://math.stackexchange.com/questions/2099774/what-is-the-value-of-sum-r-1n-int-01fr-1xdx" }
java, beginner, strings for (int c = 1; c <= 1; c++) { all.append("|"); } for (int b = 1; b <= a; b++) { all.append(" "); } for (int b = 3; b >= a; b--) { all.append("\\"); } for (int b = 3; b >= 3; b--) { all.append("*"); } for (int b = 3; b >= a; b--) { all.append("/"); } for (int b = 1; b <= a; b++) { all.append(" "); } for (int c = 1; c <= 1; c++) { all.append("|"); } System.out.println(all.toString()); } System.out.println(outs.toString()); for (int a = 1; a <= 4; a++) { StringBuilder all = new StringBuilder(); for (int c = 1; c <= 1; c++) { all.append("|"); } for (int b = 1; b <= a; b++) { all.append(" ");
{ "domain": "codereview.stackexchange", "id": 15880, "lm_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, strings", "url": null }
homework-and-exercises, thermodynamics, heat, units Title: Dividing values with units I'm reading about the subject of heat in a basic physics book. If I am not mistaken the formula to work out how much energy is required to increase the temperature of water is e = M * t * shc Where e is energy in Joules M is mass in kg t is temperature to increase by in °C shc is specific heat capacity in J/kg°C If I need to solve how much the temperature has varied I rearrange the equation like this... t = e / M / shc And this is where I get stuck. e = 7.2 * 108 J M = 105 kg shc = 4.23 J/kg°C What is the resulting unit of measurement of the following? e / M = ? M / shc = ? Just write it out like this: $t = \frac{e}{\frac{m}{shc}}= \frac{J}{\frac{kg}{\frac{J}{kg\cdot{}^\circ{}C}}} = \frac{J}{J \cdot kg \cdot \frac{1}{kg\cdot^{\circ}C}} = \frac{1}{\frac{1}{^{\circ}C}} = ^{\circ}{\rm{}C}$
{ "domain": "physics.stackexchange", "id": 7836, "lm_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, thermodynamics, heat, units", "url": null }
decomposition Title: How to predict the decomposition products of for example barium carbonate? I am a high school student studying basic chemistry and I am confused about the process of writing decomposition reactions. The question I have encountered asks me to decompose $\ce{BaCO3}$. Online, I have found that this decomposes to $\ce{BaO + CO2}$.
{ "domain": "chemistry.stackexchange", "id": 12518, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "decomposition", "url": null }
- I thought that induction worked on the premise that for S(n), you first take some value k, input it: S(k) and consider it to be true. Then you take S(k+1) and show that it resembles S(k)? – Airdish Jan 3 at 13:31 @S.Mo In induction we have a predicate $P(n)$, that is, a true-false statement into which we can plug $n$ like a variable, for example, an equation involving $n$. We then show that if $P(n)$ is true for any $n$, then $P(n+1)$ is true. Using phrasing like "show that it resembles" makes it seem like induction is just a method of shuffling symbols around. – Jack M Jan 3 at 14:10 I'd have thought that an induction proof for this would look more like this: – Airdish Jan 3 at 17:05
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9372107914029486, "lm_q1q2_score": 0.8426662664253948, "lm_q2_score": 0.8991213867309121, "openwebmath_perplexity": 494.5499069268852, "openwebmath_score": 0.9015089273452759, "tags": null, "url": "http://math.stackexchange.com/questions/1598280/is-collapsing-considered-a-legitimate-proof" }
general-relativity, spacetime, geodesics, free-fall, equivalence-principle Then you are free to take your coordinates seriously and imagine that these are real forces, as one might imagine a geocentrist doing. That’s fine and it’s also the traditional approach to gravity: it's a real force between masses. Or, you might go the other way. Seeing these universal accelerations you might wonder what coordinates you can transform to, to insert their opposites and perfectly cancel them out. So you might assume that your coordinates are “in error” and the true “straight line” is not measured relative to the fixed objects around you that co-rotate with your coordinates, but rather relative to some other coordinate system—as a heliocentrist would do.
{ "domain": "physics.stackexchange", "id": 49915, "lm_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, spacetime, geodesics, free-fall, equivalence-principle", "url": null }
electrostatics Title: Confusion in Electric flux We define flux of an electric field $\vec{E}$ through a surface $S$ as $$\Phi =\int_S\vec{E}.d\vec{s}$$ Now we define flux through a surface as stated above What does it mean when we say flux coming out of a $q$ charge is $\displaystyle\frac{q}{\epsilon_0}$ ? I think this statement is not correct because flux is not something which comes out of a charge and even if it would have been like that why would it will always be $\displaystyle\frac{q}{\epsilon_0}$ until we have a closed surface around it rather we have electric lines of forces which can originate from a charge. The doubt arise when my teacher said that flux of arbitrary closed surface having $q$ charge inside it is $\displaystyle\frac{q}{\epsilon_0}$ because flux originating/emitting from the $q$ charge is $\displaystyle\frac{q}{\epsilon_0}$.
{ "domain": "physics.stackexchange", "id": 82444, "lm_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", "url": null }
python, performance, python-3.x, playing-cards def get_newdeck(choice, P1, P2, P3): ''' Function which reorders the deck in a way that the chosen list is in the middle of the two other lists. Parameters: choice, P1, P2, P3 Returns: the new, reordered deck ''' deck = P1+P3+P2 # Orders the deck with Pile 3 in middle if choice == 1: # if user's choice is 1 deck = P2+P1+P3 # Put pile 1 between other piles elif choice == 2: # If user's choice is 2 deck = P1+P2+P3 # Put pile 2 between other piles return deck def PrintPiles(P1, P2, P3): ''' Procedure which prints the lists(P1, P2, and P3) vertically with headers to tell the user which piles they are. Parameters: P1, P2, P3 Returns: None ''' # Prints the piles vertically print("Pile 1\tPile 2\tPile 3") for i in range(7): print(P1[i]+'\t'+P2[i]+'\t'+P3[i])
{ "domain": "codereview.stackexchange", "id": 28267, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, python-3.x, playing-cards", "url": null }
In The robust estimation of these Fourier coefficients from discrete data is discussed in the secion Spherical Approximation In particular all operation on those functions are implmented as operations on the Fourier coefficients. The crucial parameter when representing spherical functions by their harmonic series expansion is the harmonic cut off degree $$M$$. . To concluse this session we plot the first ten spherical harmonics
{ "domain": "github.io", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.991422513825979, "lm_q1q2_score": 0.8304352957068047, "lm_q2_score": 0.8376199694135332, "openwebmath_perplexity": 313.8715924893126, "openwebmath_score": 0.9524362087249756, "tags": null, "url": "https://mtex-toolbox.github.io/S2FunHarmonicRepresentation.html" }
thermodynamics I will continue to consider a single solid, which is qualitatively the same thing. One considers a solid, about which is only known that it consists of $N$ oscillators, sharing $q$ units of energy. This specifies the macrostate. Given that the system is in some macrostate, the entropy is $$S=k_B\ln \Omega$$ where $\Omega$ is the number of microstates corresponding to that particular macrostate.
{ "domain": "physics.stackexchange", "id": 15670, "lm_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", "url": null }
thermodynamics, hvac, building-design, environmental-engineering Relative humidity and temperature at a discharge of the HVAC system trended over time. Condensate discharge from the air conditioner into a bucket, gallons per day. Relative humidity and temperature in each room trended over time. Surrounding water table level Condensation locations and times of day Possible scenerios in order of likelyness:
{ "domain": "engineering.stackexchange", "id": 1862, "lm_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, hvac, building-design, environmental-engineering", "url": null }
cosmology, cosmological-inflation Title: How many years of expansion occurred during inflation? During inflation, expansion happens at a very rapid rate. How many years of expansion did it fast forward through? Meaning, if it weren't for inflation, how many years would it take for the universe to expand at its basic rate from the big bang to the size of the universe after inflation? Assuming we have the correct value for the cosmological constant the doubling time, that is the time it will take for the universe to double in size, is around 11.4 billion years. We have few hard theories about inflation, but suppose the universe expanded by $e^{60}$ as Danu suggests in his comment, then the number of doubling times is $60/ln(2) \approx 87$. The time it will take the current universe to double in size 87 times is about 990 billion years. You can obviously adapt this sum for whatever number of $e$-foldings your preferred theory of inflation predicts.
{ "domain": "physics.stackexchange", "id": 83088, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, cosmological-inflation", "url": null }
c++, ros-melodic, rosbag, tf2-ros, tf2 Title: Finding buffered frames in tf2_ros::Buffer (c++) I am creating a post-processing utility where I read all the transforms from a .bag file into a tf2_ros::Buffer. I would like to be able to ask the Buffer for all the frames it has cached. I don't see any public member functions in the doccumentation that allow you to view cached frames. What is the best way to access cached all the frames in a tf2_ros::Buffer? Originally posted by kkrasnosky on ROS Answers with karma: 78 on 2019-05-30 Post score: 0 Original comments Comment by gvdhoorn on 2019-05-30: I don't believe there is any support for that, but let's see if someone proves me wrong.
{ "domain": "robotics.stackexchange", "id": 33090, "lm_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++, ros-melodic, rosbag, tf2-ros, tf2", "url": null }
let’s look into the role of Adjoint in finding the Inverse of a matrix and some of its theorems. Determinant is a very useful value in linear algebra. The adjoint allows us to consider whether g : Y → X is equal to u −1 : Y → X. Up Next. A series of linear algebra lectures given in videos to help students learn about determinant of transpose. Our mission is to provide a free, world-class education to anyone, anywhere. To find the transpose of a matrix, we change the rows into columns and columns into rows. Matrix definitions involving transposition, Implementation of matrix transposition on computers, Transposes of linear maps and bilinear forms, https://en.wikipedia.org/w/index.php?title=Transpose&oldid=991607775, Creative Commons Attribution-ShareAlike License, This page was last edited on 30 November 2020, at 23:05. This proof is largely one of induction. One of the easiest and more convenient ways to compute the determinant of a square matrix is based on the LU decomposition where
{ "domain": "martinacoogan.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9678992914310603, "lm_q1q2_score": 0.8356761411301208, "lm_q2_score": 0.8633916240341031, "openwebmath_perplexity": 507.11214272483727, "openwebmath_score": 0.9179682731628418, "tags": null, "url": "https://martinacoogan.com/p1b7e/zig9g.php?page=determinant-of-transpose-6f78f5" }
c#, .net, xml, wpf, mvvm private void OnGamesChanged(object sender, EventArgs e) { Games = new ObservableCollection<Game>(_gameService.GetAll()); } } ManageGamesView - A screen used to add and remove games <Window x:Class="ENBOrganizer.UI.Views.ManageGamesView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ViewModels="clr-namespace:ENBOrganizer.UI.ViewModels" xmlns:UI="clr-namespace:ENBOrganizer.UI" Title="Manage Games" MinWidth="250" SizeToContent="WidthAndHeight" > <Window.Resources> <UI:PathToIconConverter x:Key="PathToIconConverter" /> </Window.Resources> <Window.DataContext> <ViewModels:ManageGamesViewModel /> </Window.DataContext> <Grid> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions>
{ "domain": "codereview.stackexchange", "id": 16647, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, .net, xml, wpf, mvvm", "url": null }
waves, wave-modeling Title: Is wave spectrum always positive and why? Is the 2-D elevation wave spectrum (as a function of wavenumber and direction, with units of $m^4$) always positive? If so, why would that be the case? Yes, wave variance or energy spectrum, direcional or non-directional is positive-definite as @aretxabaleta said in the comment. In linear water-wave theory, the surface elevation is described as a linear superposition of sinusoids: $$ \eta(t) = \sum_{i-1}^{N}a_i \sin(f_i t + \phi_i) $$ where $a_i$, $f_i$ and $\phi_i$ are the amplitude, frequency and phase, respectively, of each wave component $i$. The most commonly used wave spectrum is the wave variance spectrum. Wave variance is: $$ \langle\eta^2\rangle = \dfrac{1}{2N}\sum_{i=1}^{N}a_i^2 = \sigma^2 $$ and wave variance spectrum $F(f)$ is defined such that: $$ F(f)\Delta{f}=\dfrac{a_i^2}{2} $$ In the limit of $N \rightarrow \infty$ (continuous spectrum), the following holds: $$ \int_{0}^{\infty}F(f)df = \sigma^2 $$
{ "domain": "earthscience.stackexchange", "id": 408, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "waves, wave-modeling", "url": null }
ros after running gazebo with this following world file <?xml version="1.0" ?> <sdf version="1.3"> <world name="default"> <physics type="ode"> <gravity>0 0 -9.8</gravity> <ode> <solver> <type>quick</type> <dt>0.001</dt> <iters>40</iters> <sor>1.0</sor> </solver> <constraints> <cfm>0.0</cfm> <erp>0.2</erp> <contact_max_correcting_vel>100.0</contact_max_correcting_vel> <contact_surface_layer>0.0</contact_surface_layer> </constraints> </ode> </physics> <!-- A global light source --> <include> <uri>model://sun</uri> </include> <!-- A ground plane --> <include> <uri>model://ground_plane</uri> </include> <include> <uri>model://create</uri> <pose>0 0 0.5 0 0 0</pose> </include> <include> <uri>model://camera</uri> <pose>0 0 1 0 0 0</pose> </include> </world> </sdf>
{ "domain": "robotics.stackexchange", "id": 2772, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
complexity-theory, turing-machines, simulation I see one "problem" in the reasoning given in the cited paper (and also in several standard books on computational complexity) related to the construction of the Universal machine. This "problem" is that in the Universal machine simulation, one computational step of a simulated machine is supposed to be executed in constant time by the Universal machine. In other words, the length of the description of the simulated machine is supposed to be constant. But is this OK? Since in the proof of the Time Hierarchy Theorem, the input given to the simulated Turing machine is exactly this description, and thus, the description is somehow dependent of $n$. I am aware of that the description can be lengthened by a sequence of leading bits, but this does not seem to solve this problem.
{ "domain": "cs.stackexchange", "id": 1279, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, turing-machines, simulation", "url": null }
performance, strings, linux, assembly, amd64 It took me half a minute or so to figure out the naming pattern with labels like _after_remove_leading_zeroes_if_1 vs. _remove_leading_zeroes_loop_2. The "if" vs. "loop" part is a very small part of the label. It seems obvious in hindsight once you know where to look, but on reading the code for the first time, my reaction was "what is this mess of mostly-redundant long label names? Hard to see what jumps where". Then wondering why are there two different _2 labels, then finally seeing the if vs. while naming (which also apparently go with _after_remove... vs. _remove... for no apparent reason since the last label in the function isn't named "after". Meaningful label names are tricky, so yeah you might sometimes just give up and number them from a common base. In NASM, .bar: following a non-dot label like foo: is the same as foo.bar:, so it lets you use short label names but still avoid name conflicts with the rest of your file. So you could have asm like
{ "domain": "codereview.stackexchange", "id": 43808, "lm_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, strings, linux, assembly, amd64", "url": null }
cc.complexity-theory, pl.programming-languages, db.databases, finite-model-theory This question is inspired by the intersection of two previous questions: Programming languages for efficient computation Why do relational databases work at all, given the theoretical exponential complexity of answer finding (in the size of the query)? One way of looking at database query languages is through the lens of deductive databases, where queries are represented as logic programs. In this setting, the most relevant work related to your question is McAllester's On the complexity analysis of static analyses, which observed that you can reason about the running time of a query by reasoning about the number of "prefix firings" in the rules of your program. What a "prefix firing" is isn't terribly complicated, but I'll refer you to the paper for that.
{ "domain": "cstheory.stackexchange", "id": 834, "lm_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, pl.programming-languages, db.databases, finite-model-theory", "url": null }
rosbag Comment by ahendrix on 2014-10-27: If you know Python, it'll probably take 2-4 hours to write the appropriate script. You may also want to try the bag2csv.py answer from the question that you linked to. I wouldn't be suggesting this approach if I thought it was a waste of your time.
{ "domain": "robotics.stackexchange", "id": 19811, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rosbag", "url": null }
rust, compiler It's safest to use fuse. I recommend using associated types in trait implementations. This keeps the code DRYer and oftentimes shorter: // Use this fn next(&mut self) -> Option<Self> { // Instead of fn next(&mut self) -> Option<SpanResult<'input>> { Your implementation of is_id_continue is suspicious. Most of the time, the "continuation" character is a superset of the initial character. I'd have expected something like fn is_id_continue(ch: char) -> bool { is_id_start() || ch.is_ascii_digit() } I'm not a fan of the lack of symmetry in these two arms: ch if is_id_start(ch) => Some(self.read_identifier(i)), ch if ch.is_ascii_digit() => Some(self.read_number(i)), // Would rather ch if is_number_start(ch) => Some(self.read_number(i)),
{ "domain": "codereview.stackexchange", "id": 30176, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rust, compiler", "url": null }
machine-learning, classification, generative-models Let us consider the example of e-mail spam filtering. We have a set of reference e-mails and a label for each mail, which indicates whether it is spam. If we now, for example, look at Naive Bayes, we can see it utilizes the Bayes Formula to calculate the posterior estimate $P(Y|X) = \frac{P(X|Y)P(X)}{P(Y)}$. Opposed to other Bayesian Inference methods, Naive Bayes does not hold $P(X)$ as a model, but $P(X|Y)$, which can be modelled by our reference e-mail set. In this domain, all e-mails can be modelled as equally distributed, thus making $P(X)$ uninteresting. $P(Y)$ can also be approximated by the reference set (only looking at the labels). This way, we can generate probabilities for our label $Y$, which is binary in our case. Now we can apply the maximum a posteriori approach: We calculate $P(Y=true|X)$ and $P(Y=false|X)$ and see which of both is more likely. The most likely option will be selected as our classification.
{ "domain": "datascience.stackexchange", "id": 3706, "lm_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, classification, generative-models", "url": null }
newtonian-mechanics, reference-frames, acceleration, inertial-frames, equivalence-principle it was more practical. Inertial vs. non-inertial could be determined simply using accelerometers. In contrast, the old definition would require you to know the distribution of all of the matter in the universe so that you could correct for gravity. it led to general relativity. Using this definition a more accurate theory of gravity could be developed. One which was locally compatible with special relativity, and which made many bold predictions that have since been confirmed. it led to the geometrization of gravity. This explained the equivalence of inertial mass and passive gravitational mass, or at least it built their equality into the theory at a fundamental level. it allows a conceptually cleaner formulation of Newton’s laws. An object in free fall follows a geodesic. An object acted on by a net force experiences proper acceleration of $\vec F/m$. And momentum is conserved.
{ "domain": "physics.stackexchange", "id": 84905, "lm_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, reference-frames, acceleration, inertial-frames, equivalence-principle", "url": null }
java, symbolic-math @Override public MathObject subtract(MathObject that) { // return that.subtract(this); // Some implementation here } @Override public double doubleValue() { return c; } } So then MathObject would be: public interface MathObject { MathObject add(MathObject that); MathObject subtract(MathObject that); double doubleValue(); }
{ "domain": "codereview.stackexchange", "id": 19082, "lm_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, symbolic-math", "url": null }
javascript, node.js, promise, rest, express.js Your code is easy to read and it looks synchronous (while still have the advantages of asynchronous code). You do not have to build and throw error objects every where, you can simply send the message immediately. And, you can BREAK the code flow via return. This is not possible in a promise chain, as in those you have to force a throw (many times a meaningless one) and catch it to stop executing. The generator function will only be executed once passed into the library co, which then returns a Promise, stating if the execution was successful or not. This solution achieves: error differentiation avoids if then else hell and generalized catchers (although you will use try/catch in your code, and you still have access to a generalized catcher if you need one).
{ "domain": "codereview.stackexchange", "id": 24998, "lm_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, node.js, promise, rest, express.js", "url": null }