text
stringlengths
1
1.11k
source
dict
and so we have BMM for n !nmatrices is in O(n ) time, where !<2:373 (the current bound for integer matrix multiplication). These variables can be used to define matrices of booleans, with the usual syntax. The PowerShell logical operators evaluate only the statements required to determine the truth value of the statement. Array formulas can be understood as a combination of Array Constants, Array Operators and Array Ranges. Matrix Arithmetic cross Computes cross products. The implementation of left-shift and right-shift operators is significantly different on Windows for ARM devices. Chuang Department of Physics, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139, USA (Received 30 January 2010; published 4 May 2010) Entanglement, as studied in quantum information science, and nonlocal quantum correlations, as studied. max(), array. Animesh Raj has 8 jobs listed on their profile. But, for the beginner, they seem to often mysteriously fail, and it is difficult to
{ "domain": "hubischule-krone.de", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105273220726, "lm_q1q2_score": 0.8516819286201998, "lm_q2_score": 0.8723473779969194, "openwebmath_perplexity": 1035.6105504835496, "openwebmath_score": 0.5564281344413757, "tags": null, "url": "http://cjvy.hubischule-krone.de/boolean-matrix-operations.html" }
quantum-mechanics, experimental-physics Title: About a recent experiment which claims reality doesn't exist until we measure it? Reality doesn't exist until we measure it, Quantum Experiment confirms. Is this one more experiment which is the victim of how news generally hypes stuff like this? This is a section from the article:
{ "domain": "physics.stackexchange", "id": 22409, "lm_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, experimental-physics", "url": null }
population-genetics, book-recommendation The formula that appears on the screen as the lecturer says this does not match what he says (but it's hard to say; the typesetting is terrible). Furthermore, I find this description too vague (I have a million questions about each of the words in it). Also, I would like to see how this estimate is derived. Finally, judging by the number of egregious typos I've found in this series of lectures so far, I'd like to get a second independent rendition of these ideas. I thought that Google would make quick work of this question, but to my surprise, when I search for "heterozygosity" or "average heterozygosity" none of the hits I get mention this formula.
{ "domain": "biology.stackexchange", "id": 8669, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "population-genetics, book-recommendation", "url": null }
python, python-3.x, playing-cards def __le__(self, other): if isinstance(other, AbstractCard): return self.rank <= other.rank raise TypeError("Cannot compare to non-card types") def __eq__(self, other): if isinstance(other, AbstractCard): return self.rank == other.rank raise TypeError("Cannot compare to non-card types") def __ne__(self, other): if isinstance(other, AbstractCard): return self.rank != other.rank raise TypeError("Cannot compare to non-card types") def __gt__(self, other): if isinstance(other, AbstractCard): return self.rank > other.rank raise TypeError("Cannot compare to non-card types") def __ge__(self, other): if isinstance(other, AbstractCard): return self.rank >= other.rank raise TypeError("Cannot compare to non-card types")
{ "domain": "codereview.stackexchange", "id": 8861, "lm_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, playing-cards", "url": null }
general-relativity, differential-geometry, curvature, commutator, vector-fields Edit to retract the previous suggestion. It is exactly wrong. The curves to which $\mathfrak{u}$ and $\mathfrak{v}$ are tangent are not in general coordinate curves. This is far from rigorous, but it explains why the partial derivatives $u^{\beta}{}_{,\alpha}$ and $v^{\beta}{}_{,\alpha}$ scale proportionally with a uniform scaling of the parameters. I shall assume that the families of curves to which the vector fields $\mathfrak{u}$ and $\mathfrak{v}$ are parallel remain fixed as parameters are uniformly scaled. The included figure shows a very simply example representing only one family of tangent curves. These are the horizontal blue $v$ "curves". The vertical black line at the left side represents the set of points on adjacent $v$ curves with a parameter value of $0$. It is assumed that the parameterization changes continuously as "adjacent" curves are encountered when "cutting across the grain" of the family of $v$ curves.
{ "domain": "physics.stackexchange", "id": 50413, "lm_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, differential-geometry, curvature, commutator, vector-fields", "url": null }
python, datetime, python-2.x, json, console def __init__(self): self.data = data def menu(self, data): local_data_work = DataHandling() while True: x = raw_input( "Press Y to add to your database, E to edit, D to display records or any other key to quit: > ") if x == "Y": self.data = local_data_work.add_data(self.data) elif x == "E": data_work.edit_data(self.data) elif x == "D": data_work.print_output_to_screen(data) elif x == "Q": data_work.print_output_to_screen(data) filing.save_data(data, birth_data_file) exit() else: pass
{ "domain": "codereview.stackexchange", "id": 9784, "lm_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, datetime, python-2.x, json, console", "url": null }
python, game-of-life grid = np.zeros(shape=(N, N), dtype=np.int32) glider = np.array([[0, 0, 1], [1, 0, 1], [0, 1, 1]]) grid[3:6, 3:6] = glider pygame.init() WINDOW_SIZE = [980, 980] screen = pygame.display.set_mode(WINDOW_SIZE) pygame.display.set_caption("GAME OF LIFE") done = False clock = pygame.time.Clock() while not done: for event in pygame.event.get(): if event.type == pygame.QUIT: done = True for row in range(N): for column in range(N): color = BLACK if grid[row][column] == 1: color = GREEN pygame.draw.rect(screen, color, [WIDTH * column, HEIGHT * row, WIDTH, HEIGHT])
{ "domain": "codereview.stackexchange", "id": 33434, "lm_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, game-of-life", "url": null }
inorganic-chemistry, solubility This Lewis acid/base model seems to get a lot of mileage. I also know that silver is a good Lewis acid, as are many metal cations, because of the poor shielding afforded by the d electrons. Also, the silver cation has an empty 5s orbital. Thus, we can form a sulfide-to-cation sigma coordinate covalent bond. We may also form a pi-type coordinate covalent bond as the far-away d-electron density "drifts" to empty 3d valence orbitals on the sulfide anion, making the sulfide anion now more nucleophilic than ever.
{ "domain": "chemistry.stackexchange", "id": 1337, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, solubility", "url": null }
machine-learning, reinforcement-learning, gradient-descent, objective-functions Using pytorch, I need to calculate a loss, and then the gradient is calculated internally. How to obtain the loss from equations which are stated in the form of an iterative update with respect to the gradient? In this case: $\theta \leftarrow \theta + \alpha\gamma^tG\nabla_{\theta}ln\pi(A_t|S_t,\theta)$ What would be the loss? And in general, what would be the loss if the update rule were $\theta \leftarrow \theta + \alpha C\nabla_{\theta}g(x|\theta)$ for some general (derivable) function $g$ parameterized by theta? You can find an implementation of the REINFORCE algorithm (as defined in your question) in PyTorch at the following URL: https://github.com/JamesChuanggg/pytorch-REINFORCE/. First of all, I would like to note that a policy can be represented or implemented as a neural network, where the input is the state (you are currently in) and the output is a "probability distribution over the actions you can take from that state received as input".
{ "domain": "ai.stackexchange", "id": 2780, "lm_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, reinforcement-learning, gradient-descent, objective-functions", "url": null }
javascript, search Your tree can have lots of cruft leaf nodes because of bad index selection. (node_end + self.index) // 2 Say you want to put 9 equally sized squares into a 3x3 grid, you won't have a nice 9 leaf nodes. You'd have 36 leaf nodes. We see a less severe version of the problem in "Tree2". Had we selected 3 to be the first index to split on, rather than 4, we'd only have 2 nodes not 4. ┌─A ──3 └─B To solve the issue I'd move the index generation code out into a separate binary or quad tree. For example we could abstract the index generation as: class IndexNode: def __init__(self, index, start, end): self.index = index self.start = start self.end = end def left(self): start, end = self.start, self.index return Node((start + end) // 2, start, end) def right(self): start, end = self.index, self.end return Node((start + end) // 2, start, end)
{ "domain": "codereview.stackexchange", "id": 40868, "lm_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, search", "url": null }
io, rust The output is unbuffered. The code is very much buffering the input. Check out read_to_string: Read all bytes until EOF in this source, placing them into buf. That means that the program has to wait for the entire input string to exist before it writes a single byte. That input could be gigabytes! The code assumes that all input is a UTF-8 encoded string. This cat cannot be used with images or zipfiles any any kind of binary data. More tactical issues:
{ "domain": "codereview.stackexchange", "id": 22499, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "io, rust", "url": null }
The log-sum-exp function appears in a variety of settings, including statistics, optimization, and machine learning. For the special case where $x = [0~t]^T$, we obtain the function $f(t) = \log(1+\mathrm{e}^t)$, which is known as the softplus function in machine learning. The softplus function approximates the ReLU (rectified linear unit) activation function $\max(t,0)$ and satisfies, by $(*)$, $\notag \max(t,0) \le f(t) \le \max(t,0) + \log 2.$ Two points are worth noting. • While $\log(x_1 + x_2) \ne \log x_1 + \log x_2$, in general, we do (trivially) have $\log(x_1 + x_2) = \mathrm{lse}(\log x_1,\log x_2)$, and more generally $\log(x_1 + x_2 + \cdots + x_n) = \mathrm{lse}(\log x_1,\log x_2,\dots,\log x_n)$. • The log-sum-exp function is not to be confused with the exp-sum-log function: $\exp \sum_{i=1}^n \log x_i = x_1x_2\dots x_n$. Here are some examples: >> format long e >> logsumexp([1 2 3]) ans = 3.407605964444380e+00 >> logsumexp([1 2 30]) ans = 3.000000000000095e+01
{ "domain": "nhigham.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534338604444, "lm_q1q2_score": 0.8561683361685501, "lm_q2_score": 0.8723473846343393, "openwebmath_perplexity": 479.7915498684911, "openwebmath_score": 0.9465411901473999, "tags": null, "url": "https://nhigham.com/2021/01/05/what-is-the-log-sum-exp-function/" }
Ferris wheel that takes 28 seconds to make a complete revolution. in 1893 for the World's Columbian Exposition in Chicago. Use sliders to adjust the a,b,c,d parameters in y=asin(bx+c)+d. to finish the final 2/3 of a turn, it has to flow as a lot because the optimal element (fifty 3 + 2 = 55ft) which takes a million/2 a revolution. (b) Find the angular speed of the wheels in radians per minute. Captivating illustrations such as cycling, the Ferris wheel, and the human cannonball show trigonometry in action. 21 to degrees (1 dec) 2) Use a calculator to find the value of sin(2π/5). A bicycle traveled a distance of 100 meters. Solving trigonometric equations requires the same techniques as solving algebraic equations. A Ferris wheel has a diameter of 30 m, with the centre Example:. Ferris Wheel In Example 6 of. The wheel rotates at a rate of 2 revolutions every 6 minutes. ) The wheel's center is 12 meters from the ground. How do you use a calculator to evaluate trigonometric functions? How
{ "domain": "climatecsas.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9830850847509661, "lm_q1q2_score": 0.8275862358232395, "lm_q2_score": 0.8418256452674009, "openwebmath_perplexity": 697.3391188761855, "openwebmath_score": 0.7487067580223083, "tags": null, "url": "http://climatecsas.it/laax/ferris-wheel-trig-calculator.html" }
• When I have time I'll try and come back and write this out in more detail if you like. Essentially were talking about something homologous to the circle, still living in the complement. As for the cap product at the end, that's just the definition of cap product. – Steve D Sep 25 at 15:00
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9755769092358046, "lm_q1q2_score": 0.8171626988973955, "lm_q2_score": 0.8376199673867852, "openwebmath_perplexity": 240.67533200773497, "openwebmath_score": 0.9773452281951904, "tags": null, "url": "https://math.stackexchange.com/questions/2916780/linking-number-and-cup-product" }
capacitance, dielectric Why: Because for any configuration of an electrostatic (or magnetostatic, the calculations can be made analogous) system, we can define electric potential energy. There are two equivalent ways of doing so, $$U_{total}=\frac{1}{2}\sum_{i\in\text{All particles}}\sum_{j\in\text{All other particles}} \frac{q_iq_j}{4\pi\epsilon_0|\mathbf r_i-\mathbf r_j|}$$ $$U_{total}=\int_\text{entire space} \frac{\epsilon(\mathbf r)\,\mathbf E(\mathbf r)\cdot\mathbf E(\mathbf r)}{2}\,dV=\int_\text{entire space} \frac{\mathbf D(\mathbf r)\cdot\mathbf E(\mathbf r)}{2}\,dV$$ The problem with the first (and more conventional) method is that you need to account for all charges everywhere, free or bound. In the second one, knowing the field configuration is enough, and thus it is easier to compute in this system.
{ "domain": "physics.stackexchange", "id": 63690, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "capacitance, dielectric", "url": null }
c#, object-oriented, .net, mvp using (var sqlAdapter = new SqlDataAdapter(sqlCommand)) using (var dataSet = new DataSet()) using (var dataTable = new DataTable()) { sqlConnection.Open(); dataSet.Tables.Add(dataTable); sqlAdapter.Fill(dataTable); return dataTable; } } } } EDIT: I would also refactor your Earning property assignments to use helper methods to reduce the amount of repetition you have when converting possibly-null DB values: static class DbConvert { static decimal ToDecimal(object value) { return value == DBNull.Value ? 0 : Convert.ToDecimal(value); } static int ToInt32(object value) { return value == DBNull.Value ? 0 : Convert.ToInt32(value); } // and other appropriate methods... }
{ "domain": "codereview.stackexchange", "id": 7741, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, object-oriented, .net, mvp", "url": null }
ros, translation, transform Title: tf rotation before translation? I cannot find any documentation on convention used by tf. $ rosrun tf tf_echo /map /odom At time 1263248513.809 - Translation: [2.398, 6.783, 0.000] - Rotation: in Quaternion [0.000, 0.000, -0.707, 0.707] in RPY [0.000, -0.000, -1.570] For translation value and rotation quaternion value, is translation happening in original frame and then rotation happens? Or, does it rotate first and then the translation happens? What is the convention used by tf system? Which RPY convention is RPY using? Thanks. Originally posted by jys on ROS Answers with karma: 212 on 2013-12-19 Post score: 1 ROS coordinate frame conventions are defined here: http://wiki.ros.org/geometry/CoordinateFrameConventions And the API methods are also documented such as here: http://docs.ros.org/hydro/api/tf/html/c++/classtf_1_1Matrix3x3.html#af2107031776762df1a0fea357b4c3747 It will translate first. RPY is Fixed Axis XYZ
{ "domain": "robotics.stackexchange", "id": 16501, "lm_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, translation, transform", "url": null }
python, sqlite, connection-pool You might wish to implement a close method that closes all the connections. This method should only be called when it is known that all the connections have been returned to the pool for good. I have updated the signature on the __init__ method so that the client can add additional parameters the call to sqlite3.connect. If you timeout during acquisition, the RuntimeError message should be changed to "Timeout: No available connection in the pool."
{ "domain": "codereview.stackexchange", "id": 44790, "lm_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, sqlite, connection-pool", "url": null }
so the result follows by taking square roots of both sides. In Example 6.17 we saw that the equation $$x^2 + y^2 = 9$$ in Cartesian coordinates could be expressed as $$r = 3$$ in polar coordinates. This equation describes a circle centered at the origin, so the circle is symmetric about the origin. In general, polar coordinates are useful in situations when there is symmetry about the origin (though there are other situations), which arise in many physical applications. 6.4: Polar Coordinates is shared under a GNU Free Documentation License 1.3 license and was authored, remixed, and/or curated by Michael Corral via source content that was edited to conform to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.
{ "domain": "libretexts.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9918120900983037, "lm_q1q2_score": 0.8154571221597083, "lm_q2_score": 0.8221891327004132, "openwebmath_perplexity": 546.2524216736991, "openwebmath_score": 0.9881943464279175, "tags": null, "url": "https://math.libretexts.org/Bookshelves/Precalculus/Book%3A_Elementary_Trigonometry_(Corral)/06%3A_Additional_Topics/6.04%3A_Polar_Coordinates" }
velocity Is this different from pushing a stick? While you again say you cannot imagine this (I read your other question :-)), again the speed of sound is involved. Already pushing one single marble involves the sound speed in the marble... pushing one single marble does not mean that the other side from where you push moves instantly in sync with the side on where you push... it only moves after the perturbation traveled to the other side of the marble (the same as with a stick). This will not change if you push many marbles.
{ "domain": "physics.stackexchange", "id": 78850, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "velocity", "url": null }
automata, buchi-automata, connected-components, omega-automata Title: Equivalence of states between two "quasi-deterministic" strongly connected Büchi automata accepting the same $\omega$-language Hope someone can point me to the right direction to solve this problem. Premise. I call quasi-deterministic Büchi automaton (qDBA) a Büchi automaton $B = \langle S, \Sigma, S_0, \delta, F \rangle$, where $S$ is the set of states, $\Sigma$ the alphabet of transition labels, $S_0 \subseteq S$ the set of initial states, $\delta: S \times \Sigma \rightarrow S$ a partial transition function, and $F \subseteq S$ the set of accepting states. That is, a Büchi automaton where the only place of nondeterminism is in the initial state, while the transition function is deterministic. An $\omega$-word is accepted by $B$ iff any of the infinite runs induced by the word on $B$ passes infinitely many times through some states of $F$.
{ "domain": "cs.stackexchange", "id": 15873, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "automata, buchi-automata, connected-components, omega-automata", "url": null }
javascript, random with function withProbability(chance) { return Math.random() < chance; } JsLint gave me a for-loop error. Is this code ok despite that warning, or should this for-loop be changed to some other looping construct? Background prob_ is a ratio between fake actions and real actions. The loop is triggered once for each real action. If prob_ is greater than 1, the fake action is done. If it is in between 0 and 1, it is considered a probability and thus maybe a fake action follows. This is a case where it was not clear how to replace the for-loop with a forEach, as is often recommended. Maybe ES6 tail recursion could be used... More context function loadHttp(toLoad) { require("sdk/page-worker").Page({ contentURL: toLoad }); }
{ "domain": "codereview.stackexchange", "id": 18403, "lm_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, random", "url": null }
$$b+(n-|I|-b)=n-|I|$$ things: $b$ extended blocks, and the $n-|I|-b$ single elements that are not part of any extended block. It follows that $$\left|\bigcap_{k\in I}A_k\right|=(n-|I|)!$$ whenever $\varnothing\ne I\subseteq[n-1]$. Now the inclusion-exclusion principle tells you that \begin{align*} \left|\bigcup_{k\in[n-1]}A_k\right|&=\sum_{\varnothing\ne I\subseteq[n-1]}(-1)^{|I|-1}\left|\bigcap_{k\in I}A_k\right|\\ &=\sum_{\varnothing\ne I\subseteq[n-1]}(-1)^{|I|-1}(n-|I|)!\\ &=\sum_{k=1}^{n-1}\binom{n-1}k(-1)^{k-1}(n-k)!\;, \end{align*} and I’ll leave the rest for you to finish off.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307739782681, "lm_q1q2_score": 0.8536364223139234, "lm_q2_score": 0.8774767874818408, "openwebmath_perplexity": 317.7345540806825, "openwebmath_score": 0.7577570676803589, "tags": null, "url": "https://math.stackexchange.com/questions/1822068/how-many-permutations-of-1-2-3-n-there-are-with-no-2-consecutive-numbe" }
homework-and-exercises, angular-momentum, momentum, conservation-laws, angular-velocity Title: Does conservation of angular momentum break conservation of momentum? Say we have a spinning ring of mass $M$, rotating at $W_0$, at a radius $r$ from some pivot point. This ring has massless spokes extending out to a length of $2r$. From this, we can calculate the initial angular momentum: $L_0 = IW_0$ $I_0 = Mr^2$ $L_0 = Mr^2W_0$ While it's spinning, we drop on top of the massless spokes another ring of twice the radius, $2r$, but the same mass, $M$. Friction between the spokes and the ring makes sure the two rings spin together.
{ "domain": "physics.stackexchange", "id": 54410, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, angular-momentum, momentum, conservation-laws, angular-velocity", "url": null }
ros2 Next, I wanted to make sure Intellisense worked. I found two options that worked. One option was to manually add /opt/ros/eqloquent/include to the includePath in c_cpp_properties.json of the VSCode workspace. The other option, which is probably better, was to point the compileCommands in c_cpp_properties.json to the compile_commands.json generated from a colcon build with cmake arg of -DCMAKE_EXPORT_COMPILE_COMMANDS=ON. Is this the best way to enable Intellisense? Ideally, I wouldn't have to do this and VSCode ROS extension would "determine" the paths automatically. Next, I ran the VSCode build task(Ctrl-Shift-B) and it offered me 'colcon build' as the option. However, it doesn't let me pass any options e.g. if I want to do a clean first. Is there any way to do a clean from VSCode without typing it in a terminal? Also is there any way to just build a single package?
{ "domain": "robotics.stackexchange", "id": 34959, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2", "url": null }
electromagnetism However, how would Faraday’s law hold—if at all—if it were extended to a curve and a surface that extended into more than two dimensions? For example, what if $S$ extended vertically in the $z$ direction as $z = 5-x^2-y^2$ and $C$ was defined as the intersection of this paraboloid and the plane $z = x + y$? Or better yet, what if both $C$ equaled the intersection of that same paraboloid and the sinusoid $z = \sin x + \sin y$, allowing both $C$ and $S$ to extend past two dimensions? What you need is a closed loop $C$ which defines the throat of an open surface $S$.
{ "domain": "physics.stackexchange", "id": 40065, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism", "url": null }
• More simply...If Jack is a liar then his statement is True, a contradiction! Hence he must be a truth teller. But then... – lulu Sep 27 '16 at 22:55 • your inititial formula is wrong (you don't mention that Jack is the one who is speaking) the right formula is J <-> ~(J v E) – Willemien Sep 27 '16 at 22:58 • Are you sure? That formula translated would be something in the region of "Jack is a truth teller if and only if Jack or Emily are lying." @Willemien – Steve Sep 27 '16 at 23:08 • @Steve the formula ~(J v E) does not mean "Jack or Emily are lying", it's saying "it is not the case that at least one of them is a truth teller", which is equivalent to "both of them are lying" and so the formula written by Williemien is saying "Jack is a truth teller if and only if Jack and Emily are both liers", wich is a contradiction (anyway that formula doest't seem to help) – la flaca Sep 27 '16 at 23:33
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399043329855, "lm_q1q2_score": 0.8227321530382292, "lm_q2_score": 0.8479677545357568, "openwebmath_perplexity": 480.6404233733376, "openwebmath_score": 0.7749205231666565, "tags": null, "url": "https://math.stackexchange.com/questions/1944238/propositional-logic-problem-about-truth-tellers-and-liars" }
turing-machines, cellular-automata Title: What are the differences/relationship between 2D Turing Machines and Cellular Automata I have been reading up on 2D Turing machines on wolframscience and I am kind of confused about what exactly is the relationship between 2D Turing machines (like Paterson's worm and Langton's Ant) and Cellular Automata. I understand that they are both defined pretty differently but I keep seeing references between one and the other. For example, this article regarding Langton's Ant suggests that "the ant can simulate cellular automata and is thus computationally universal." Why is this true?
{ "domain": "cs.stackexchange", "id": 19060, "lm_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, cellular-automata", "url": null }
electromagnetism, visible-light, vision, biology, perception Your retina is only sensitive to photons within a certain range of energies: the range which corresponds to visible light. Visible light has a frequency between about $430\,\mathrm{THz}$ and $770\,\mathrm{THz}$, which corresponds to a photon energy of between about $2.8\times 10^{-19}\,\mathrm{J}$ and $5.1\times 10^{-19}\,\mathrm{J}$, or in more useful units, about $1.8\,\mathrm{eV}$ and $3.2\,\mathrm{eV}$: $1\,\mathrm{eV}$ is the energy required to move an electron through a potential difference of a volt. Well, if you assume that you are surrounded by objects at about room temperature, the question is now, how many photons do such objects emit in the right range of energies that your retina could detect them. The answer turns out to be about one photon every minute per square meter of area.
{ "domain": "physics.stackexchange", "id": 61563, "lm_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, visible-light, vision, biology, perception", "url": null }
visible-light, electromagnetic-radiation, photons, quantum-electrodynamics, discrete [Later edit, 30 minutes after first posting] I noticed I have misread your question, I apologize for that. Indeed the quantum nature of visible light is not exclusive to light, all of the electromagnetic spectrum is like that. On whether light is made of particles In propagation electromagnetic energy behaves as waves, which is why for a long time it was regarded as evident that propagating electromagnetic energy is a wave phenomenon. When electromagnetic energy interacts the particle nature manifests itself. The interaction that we measure is interaction with a detector. Whenever electromagnetic energy interacts with a detector (the detector measures it), it behaves as a particle. So we have that it neither makes sense to regard light as inherently a wave phenomenon, nor does it make sense to regard light as inherently a particle phenomenon.
{ "domain": "physics.stackexchange", "id": 57491, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "visible-light, electromagnetic-radiation, photons, quantum-electrodynamics, discrete", "url": null }
ros-melodic usb_camConfig.cmake usb_cam-config.cmake Add the installation prefix of "usb_cam" to CMAKE_PREFIX_PATH or set "usb_cam_DIR" to a directory containing one of the above files. If "usb_cam" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): ros-driver-techman-robot/usb_camera_test/CMakeLists.txt:12 (find_package) -- Configuring incomplete, errors occurred! i am using ros melodic on ubuntu 18.04. See also "/home/akash/project/build/CMakeFiles/CMakeOutput.log". See also "/home/akash/project/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed
{ "domain": "robotics.stackexchange", "id": 36592, "lm_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-melodic", "url": null }
from the population, but you pay $200 for each M&M, and you must buy in$1000 increments. The Frequentist School of Statistics Class 17, 18. The Bayesian approach captures the fact that we cannot be certain of the second outcome just because of the first observation. TEACHING NHST VS BAYESIAN INF ERENCE IN POSTSECONDARY TECHNOLOGY PROGRAMS. Frequentists use two-dimensional Monte Carlo (2MC) simulation to account for uncertainty associated with the parameters of a probability model that Bayesian methods handle natively. Bayesian Analysis "Statisticians should readily use both Bayesian and frequentist ideas. Using historical data for Bayesian sample size determination Author: Fulvio De Santis, J. Psychonomic Bulletin & Review. In Bayesian statistics, a credible interval is a posterior probability interval, used for purposes similar to those of confidence intervals in frequentist statistics. Bayesian parameter interpretation. The probability of flipping a coin and getting heads is
{ "domain": "erci.pw", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9822876976669629, "lm_q1q2_score": 0.8120688227348857, "lm_q2_score": 0.8267117919359419, "openwebmath_perplexity": 1148.3731933812414, "openwebmath_score": 0.7229945063591003, "tags": null, "url": "http://jjpe.erci.pw/frequentist-vs-bayesian-probability.html" }
Ordering is antisymmetric, there is an asymmetric relation is asymmetric if and only if, it be... Is necessarily antisymmetric ; but the converse of part ( a ) not to... Any asymmetric relation are considered as asymmetric relation is also irreflexive, i.e antisymmetric and irreflexive the previous to! Antisymmetric … Since dominance relation is irre & pm ; exive, nor asymmetric relation Contents Certain important of... ) not equal to element of is related to itself is irre & ;. Relation on the set of integers is neither symmetric, asymmetric, it antisymmetric. Less than is also an asymmetric relation ; asymmetric relation are considered as asymmetric relation ; Marc Lipson! Is antisymmetric provided that distinct elements are never both related to itself ; that,! Set is antisymmetric turn reproduce exactly 3 other items of symmetry and antisymmetry are independent, ( though concepts! A and false for others ( b ) Show that the converse of part ( )! Antisymmetric too my code to check if
{ "domain": "brandinglessons.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9518632288833653, "lm_q1q2_score": 0.803272713419369, "lm_q2_score": 0.843895098628499, "openwebmath_perplexity": 847.6615940074414, "openwebmath_score": 0.8047663569450378, "tags": null, "url": "http://brandinglessons.com/vampire-weekend-djpwhq/aa77ff-every-asymmetric-relation-is-antisymmetric" }
gaia, space-probe It wouldn't necessarily make it possible to measure parallaxes 50% further. Gaia works by taking approximately 70 (on average) measurements of a stellar position over 5-6 years. This amounts to sampling the 2 au baseline about 10 times, thus reduing the error bar on a single baseline parallax by about $\sqrt{10}$ and making the "equivalent baseline" about 7 au. To get similar precision with Mars you would need to be able to complete the 3 au baseline about 5 times, which would still take 5 years. So you don't obviously win in precision terms. Overall I think it is the telemetry problem that is the real killer. Gaia is currently telemetry limited - that is why there is a limit on the number of stars it will measure and on the number of stars it will get spectroscopy for.
{ "domain": "astronomy.stackexchange", "id": 4082, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gaia, space-probe", "url": null }
The statement "$$n$$ is an odd negative integer" can be translated to "$$n$$ is an integer AND $$n$$ is odd AND $$n$$ is negative". Converting this to formal logic we can write: • "$$n$$ is an integer" == $$n \in \mathbb{Z}$$ • "$$n$$ is negative" == $$n < 0$$ • "$$n$$ is odd" == $$\exists k \in \mathbb{Z} \quad (n = 2k +1)$$ (edit : if one takes $$k \in \mathbb{N}$$, then $$n > 0$$) and combining these statements about $$n$$: • "n is an odd negative integer" == ($$n \in \mathbb{Z}) \quad \land \quad (n<0) \quad \land \quad \exists k \in \mathbb{Z} \thinspace (n = 2k +1)$$ edit : Since $$\exists k \in \mathbb{Z} \thinspace (n = 2k +1)$$ already implies that $$n \in \mathbb{Z}$$, one can omit it and state : $$(n<0) \quad \land \quad \exists k \in \mathbb{Z} \thinspace (n = 2k +1)$$ • Thank you for the edit. – GrayLiterature Jan 19 at 16:01
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307684643189, "lm_q1q2_score": 0.8536364143585279, "lm_q2_score": 0.8774767842777551, "openwebmath_perplexity": 415.98921293151824, "openwebmath_score": 0.7230828404426575, "tags": null, "url": "https://math.stackexchange.com/questions/3991510/converting-n-is-an-odd-negative-integer-into-formal-logic/3991560" }
javascript, library The examination of the full code is by far not complete, but the most important points should be mentioned if I'm not mistaken. Conclusion Writing a DOM library is definitely a good exercise, but you happen to use a lot of functions jQuery and similar libraries provide. In this case, including a library would be a welcome trade-off for me. Have a look at Zepto.js for a small version of jQuery.
{ "domain": "codereview.stackexchange", "id": 8842, "lm_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, library", "url": null }
condensed-matter, semiconductor-physics Don't worry, your confusion is well placed and your question is rather common, note that some of the things I describe here may or may not be already clear to you, but I have to make sure they're mentioned.. First things first, the statement that "fermi level is the maximum energy level occupied by electrons at 0K" is completely wrong (this would be actually a more valid definition for the valence band energy), and for some reason seems to be a common misunderstanding, as you have realised yourself by looking through the web. You could add a correction to that definition, by saying that "the maximum energy level occupied by electrons in the valence band always lies below the fermi level", and this would be sort of say something more accurate about the fermi level. The most general definition though, which is always correct, is: "the chemical potential at 0 Kelvin". Frequently though the Fermi level is wrongly defined as the energy of the most energetic occupied electron state in a
{ "domain": "physics.stackexchange", "id": 76117, "lm_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, semiconductor-physics", "url": null }
fluid-dynamics, experimental-physics, density, data-analysis, porous-media The inlet pressure $p_1$ and outlet pressure $p_2$ were measured at the inlet and outlet faces of the rock, respectively. The volumetric flow rate $q$ was measured at the inlet face of the rock. While maintaining a (nearly) constant inlet pressure, the outlet pressure was varied and the corresponding flow rate was recorded as shown in the table below. Included in the table is the dynamic viscosity $\mu$ estimated using the mean pressure and temperature measured at the ends of the core, thus, a mean or average dynamic viscosity was estimated.
{ "domain": "physics.stackexchange", "id": 33967, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-dynamics, experimental-physics, density, data-analysis, porous-media", "url": null }
cosmology, multiverse There are different multiverse theories coming from cosmology, physics and philosophy. One of the theories comes from the cosmological theory of cosmic inflation. Cosmic inflation states that there are always fluctuations on the microscopic level and this results in energy waves that can form into matter and anti-matter pairs. The cosmic inflation now states that at the beginning of our universe there was a cosmological constant or a big vacuum that is by nature unstable and caused the microscopic fluctuations to happen on a cosmic size and thus resulted in a rapid expansion of the early universe. This cosmic inflation is a variation of the (hot) big bang theory, that explains a number of observations in the universe that are not explained by the (hot) big bang theory. What it doesn't explain is that if I have an energy fluctuation at microscopic level, it can happen that this energy wave splits into two matter pairs or an anti-matter/matter pair. Later these pairs annihilate each
{ "domain": "astronomy.stackexchange", "id": 1413, "lm_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, multiverse", "url": null }
solubility On the other hand, sodium triphosphate was a popular additive in laundry detergents. Unfortunately, it is also called trisodium phosphate (TSP). This is water soluble. Regardless, phosphates are discouraged now because they promote algae growth in waters. Whoever wrote triple super phosphate in your formulations was confused by the nomenclature.
{ "domain": "chemistry.stackexchange", "id": 15763, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "solubility", "url": null }
javascript, php, array For Loops Another thing about for loops. The arguments passed to a for or while loop are reparsed on each iteration. So passing a function in as an argument is usually a bad idea, at least if that function's return value is not meant to change i.e.(count() or in this case mb_strlen()). Both get the number of iterations the loop is going to go through. These numbers typically don't change between iterations so there is no need to recalculate it. It is just taking up extra processing power. If you move this function out of the argument list and set it as a variable it will run a bit faster, though it may be negligible in this case. jsanc623 touched on this, but I wanted to give the full reason. Nested Functions
{ "domain": "codereview.stackexchange", "id": 2118, "lm_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, php, array", "url": null }
on 378 sessions ### HideShow timer Statistics Is 3^(a^2/b) < 1? (1) a<0 (2) b<0 Hi, request your help to please understand the fundamental concept behind this question. ##### Most Helpful Expert Reply Math Expert Joined: 02 Sep 2009 Posts: 51218 Re: Is 3^(a^2/b) < 1? [#permalink] ### Show Tags 21 Jun 2012, 01:17 7 6 Is 3^(a^2/b) < 1? Notice that $$3^{\frac{a^2}{b}} < 1$$ to hold true, the power of 3 must be less than 0. So, the question basically asks whether $$\frac{a^2}{b}<0$$. This will happen if $$a\neq{0}$$ AND $$b<0$$ (if $$a=0$$ then $$\frac{a^2}{b}=0$$). (1) a<0. The first condition is satisfied ($$a\neq{0}$$) but we don't know about the second one. Not sufficient. (2) b<0. The second condition is satisfied ($$b<0$$) but we don't know about the first one (again if $$a=0$$ then $$\frac{a^2}{b}=0$$). Not sufficient. (1)+(2) Both condition are satisfied. Sufficient. Answer: C. For more on number theory and exponents check: math-number-theory-88376.html DS questions on exponents:
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9648551495568569, "lm_q1q2_score": 0.8514150740443787, "lm_q2_score": 0.88242786954645, "openwebmath_perplexity": 4824.161179065251, "openwebmath_score": 0.7549898624420166, "tags": null, "url": "https://gmatclub.com/forum/is-3-a-2-b-134754.html" }
observational-astronomy, the-sun, earth, python, skyfield def visible_earth_boundary_euclidean(body: str, time: dt.datetime, samples: int = 100) -> tuple[tuple[float, float]]: import numpy as np from numpy import cos, sin from scipy.spatial.transform import Rotation as R # Get the body's geocentric, astrometric position ephemeris = skyfield.api.load('de421.bsp') earth, body_ephemeride = ephemeris['earth'], ephemeris[body] timescale = skyfield.api.load.timescale() skyfield_time = timescale.from_datetime(time) astrometric_position = earth.at(skyfield_time).observe(body_ephemeride) # The cone aperature = 2 * cone_half_angle; https://en.wikipedia.org/wiki/Cone#Further_terminology cone_half_angle = np.arccos(MEAN_EARTH_RADIUS_KM / astrometric_position.distance().km)
{ "domain": "astronomy.stackexchange", "id": 7256, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "observational-astronomy, the-sun, earth, python, skyfield", "url": null }
python, python-3.x, chess, n-queens def report_solution() -> None: """ Calls backtrack and prints number of solutions """ total = backtrack() print() if not total: print('No possible solution was found') elif total == 1: print('There is a total of 1 solution') else: print(f'There are a total of {total} solutions') if __name__ == '__main__': GLOBAL_SIZE = int(input('Enter the size of the board: ')) global_board = new_board(GLOBAL_SIZE) report_solution()
{ "domain": "codereview.stackexchange", "id": 36600, "lm_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, chess, n-queens", "url": null }
quantum-gate, gate-synthesis \begin{align*} U\otimes V|0\rangle_L&=\alpha|00\rangle+\beta|11\rangle \\ U\otimes V|1\rangle_L&=\gamma|01\rangle+\delta|10\rangle \end{align*} I haven't verified whether such a transformation exists, but chances are fair because we choose $U,V$ to find the Schmidt decomposition of $|0\rangle_L$, guaranteeing the first line. Then, of course, $U\otimes V|1\rangle_L$ must be orthogonal to $U\otimes V|0\rangle_L$ so you're only worrying if it contains a component $\beta|00\rangle-\alpha|00\rangle$. So, let's assume such a transformation exists (if it doesn't, then I think you have very little hope). If so, then once we've applied $U\otimes V$ to the first pair of qubits, the parity of the two qubits tells us the logical state. Hence, we'd be able to implement the logical controlled-not using a pair of Toffolis:
{ "domain": "quantumcomputing.stackexchange", "id": 2435, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-gate, gate-synthesis", "url": null }
topology, yang-mills, instantons $$ \tag 3 n = \int d\sigma_{\mu}K^{\mu} = \int\limits_{S^3}\text{tr}\big[(g_{+}\partial g^{-1}_{+})^{3}\big] - \int\limits_{S^3}\text{tr}\big[(g_{-}\partial g^{-1}_{-})^{3}\big] $$ The question. How these approaches are related to each other? Precisely, it seems that $(2)$ is obtained in gauge fixing independent way, while $(3)$ is obtained in the fixed gauge. Therefore, is $(2)$ reduced to $(3)$ in the temporary gauge $A_{0} = 0$? Or these expressions aren't equivalent? The expressions eq. (2) and eq. (3) are both correct, but not equivalent, because they are given in different settings:
{ "domain": "physics.stackexchange", "id": 37132, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "topology, yang-mills, instantons", "url": null }
# More precise expression of the answer So the problem says "Let $X$ be the sum of outcomes of rolling $2$ dice, where the outcome for each dice appears with equal probability. What is the pmf of $X$?" I got: $X$ could take on any value in the set $\{2,3,4,5,6,7,8,9,10,11,12\}$ The probability mass function is $$f(x) = \begin{cases}\frac1 {36} & \text{ if } x∈{2,12}\\\frac1 {18} & \text{ if } x∈{3,11}\\ \frac1 {12} & \text{ if } x∈{4,10}\\ \frac1 {9} & \text{ if } x∈{5,9}\\\frac5 {36} & \text{ if } x∈{6,8}\\\frac1 {6} & \text{ if } x∈{7}\\ \ 0 & \text{ if } other\end{cases}$$ Is the answer correct? If so, is there any way I can write the answer in a more precise way instead of listing all the values of $x$? • does the pmf sum to 1? that's typically a good thing to check. – Daniel Xiang Jan 14 '17 at 3:08 • @DanielXiang Yes 1/36*2+2/36*2+3/36*2+4/36*2+5/38*2+6/36=1 – Kior Jan 14 '17 at 3:19
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9865717448632123, "lm_q1q2_score": 0.8111485629573981, "lm_q2_score": 0.8221891283434876, "openwebmath_perplexity": 226.86559780310537, "openwebmath_score": 0.8536516427993774, "tags": null, "url": "https://math.stackexchange.com/questions/2096971/more-precise-expression-of-the-answer" }
classical-computing, quantum-advantage, google-sycamore Title: Is there something wrong with cross-entropy benchmarking, or is it still considered as a reasonable path towards quantum supremacy? My question is strongly related with this one. Google's quantum supremacy claim uses Random Circuit Sampling. The principle is the following one: a realistic noise model for random circuits performed on a noisy quantum computer is the depolarising channel. That is, if $|\psi\rangle\!\langle\psi|$ is the pure state one would have got when applying a random circuit $C$ with a perfect quantum computer, the final state when executing this circuit on a noisy device is the following: $$\rho=\lambda|\psi\rangle\!\langle\psi|+\frac{1-\lambda}{2^n}I_{2^n}$$
{ "domain": "quantumcomputing.stackexchange", "id": 4643, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-computing, quantum-advantage, google-sycamore", "url": null }
ros, rosbridge Originally posted by swati shirke on ROS Answers with karma: 1 on 2016-06-24 Post score: 0 In general, adding 'from [the] internet' to your question doesn't really add much to the already asked question. If, by 'from [the] internet', you mean 'on a computer connected to the internet', networking is already baked into ROS, so rosbridge is not necessary. You need to learn about the ROS_MASTER_URI and possibly the ROS_IP environment variables. If, on the other hand, you mean 'from within a web browser', then yes, rosbridge can serve as a tool to help you do that. You can look at the list of experimental ROS client libraries; specifically, you'd likely be interested in rosnodejs. Even more specifically, you should look into robot web tools, and even more specifically than that, at the Widgets section on the Tools page. Originally posted by kramer with karma: 1470 on 2016-06-25 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 25046, "lm_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, rosbridge", "url": null }
c#, console, error-handling // note that OnErrorEventsArgs.ShowExceptionLevel.Error will end up here also default: if (e == null) { Logger.Error("\n[{0}] {1}", DateTime.Now.ToShortTimeString(), verboseMessage); Console.WriteLine("\n[{0}] {1}", DateTime.Now.ToShortTimeString(), verboseMessage); } else { if (verboseMessage == null) { Logger.Error(String.Format("\n[{0}]Base Exception: {1}\n\nStacktrace: {2}", DateTime.Now.ToShortTimeString(), e.GetBaseException(), e.StackTrace));
{ "domain": "codereview.stackexchange", "id": 4662, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, console, error-handling", "url": null }
cad, technical-drawing, drafting, drawings, autodesk-inventor Here's the used blending under construction: And this is the chamfered pipe end completed: BTW. I have no idea what makes just this (tricky) chamfer good. ADD after a comment The questioned asked how I guarantee that the chamfering result is 15 degrees tilted from the horizontal everywhere, not only at the rotated lines which are blended to a surface? I must admit I cannot prove it, the result looks right only visually. Worse: Cutting the pipe and measuring revealed that more intermediate lines are needed for less than 1 degree error. To make the error smaller one can insert intermediate lines as many as he likes, but this blending idea doesn't lead to an exact result, not at least in this program. Here's another approach (also blending and splitting with the blending result) which seems to give better accuracy without numerous intermediate steps The starting point is the cross-section of the pipe. I proceed with a half of the pipe, because the result can be mirrored and united.
{ "domain": "engineering.stackexchange", "id": 4790, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cad, technical-drawing, drafting, drawings, autodesk-inventor", "url": null }
discrete-signals, fourier-transform, continuous-signals, dsp-core, self-study I'm very disapointed with the books i've read ( Oppenhein, Lathi and related ) because it actually throws a lot of the beauty of analysis and algebra away, focusing on the computational side. Thanks a lot Oppenheim and Willsky's Signals and Systems or Lathi's Linear Systems and Signals are intended for Sophomores who have only a single semester of differential equations under their belts, so it is a bit unfair to criticize them for leaving out the functional analysis and the conformal mapping. At the sophomore level my favorite book is Siebert's Circuits, Signals, and Systems. It won't give you the mathematical rigor you desire either, but you can see his great love for the mathematics and he has these wonderful, witty, footnotes that provide a great historical perspective.
{ "domain": "dsp.stackexchange", "id": 935, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "discrete-signals, fourier-transform, continuous-signals, dsp-core, self-study", "url": null }
homework-and-exercises, special-relativity, time-dilation, lorentz-symmetry This is just the usual equation for time dilation. The time $t$ is the same time in equations (1) and (2), so we just set them equal to get: $$ \frac{2L}{c}\frac{1}{1 - u^2/c^2} = \frac{2L_0/c}{\sqrt{1-u^2/c^2}} $$ And this rearranges to the final result: $$ L = L_0\sqrt{1-u^2/c^2} $$ But I have to say that this is a dreadful derivation of the Lorentz contraction because it give you no insight into what actually happens in special relativity. The contraction is not really a contraction it is a rotation in spacetime. Have a look at "Reality" of length contraction in SR to get an idea of what is actually going on. You might also be interested to look at How do I derive the Lorentz contraction from the invariant interval? to see how the Lorentz contraction is related to the symmetry that underlies special relativity.
{ "domain": "physics.stackexchange", "id": 37649, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, special-relativity, time-dilation, lorentz-symmetry", "url": null }
# plot results plt.figure(1) plt.subplot(2,1,1) plt.plot(t,u,'g-',linewidth=3,label='u(t) Doublet Test') plt.grid() plt.legend(loc='best') plt.subplot(2,1,2) plt.plot(t,x1,'b-',linewidth=3,label='x(t) Nonlinear') plt.plot(t,x2,'r--',linewidth=3,label='x(t) Linear') plt.xlabel('time') plt.grid() plt.legend(loc='best') plt.show()
{ "domain": "apmonitor.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9883127399388854, "lm_q1q2_score": 0.84393284702706, "lm_q2_score": 0.853912747375134, "openwebmath_perplexity": 2979.089223695814, "openwebmath_score": 0.7025504112243652, "tags": null, "url": "https://apmonitor.com/pdc/index.php/Main/ModelLinearization" }
radiation, thermal-radiation, sun This shows that the Sun is approximately a black body with a temperature of about $5525(K).$ Now If we place a black body at a distance $l$ from the Sun will the radiation coming from the Sun (after a while, depending on $l$) causes this black body to have a temperature of $5525(K) $ too (by means of the blackbody radiation corresponding to the Sun), or will this only happen when the black body is completely surrounded completely by a material at $5525(K) $ (implying that the black body we place somewhere around the Sun is in a state of dynamical equilibrium)? Somewhat like a thermometer put in interstellar space will show a temperature of $2.7(K)$ because it's surrounded at all sides by the CMBR. Assuming the black body doesn't produce heat and we don't focus radiation towards it, it needs to be completely surrounded by a material at 5525K and reach thermal equilibrium to have a temperature of 5525K. If it is instead somewhere around the sun it will be in a dynamic equilibrium, having
{ "domain": "physics.stackexchange", "id": 54899, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "radiation, thermal-radiation, sun", "url": null }
$$[1 \times \textcolor{green}{3}]*[\textcolor{green}{3} \times 3] = \begin{bmatrix} x & y & z \end{bmatrix} * \begin{bmatrix} c_{00}&c_{01}&{c_{02}}\\ c_{10}&c_{11}&{c_{12}}\\ c_{20}&c_{21}&{c_{22}}\\ \end{bmatrix} = \begin{bmatrix} x'&y'&z' \end{bmatrix}$$ The inner dimensions (1 and 3) of the matrices involved in the multiplication are not the same (in red), so this multiplication is not possible: $$[3 \times \textcolor{red}{1}]*[\textcolor{red}{3} \times 3] \rightarrow \begin{bmatrix} x\\ y\\z \end{bmatrix} * \begin{bmatrix} c_{00}&c_{01}&{c_{02}}\\ c_{10}&c_{11}&{c_{12}}\\ c_{20}&c_{21}&{c_{22}} \end{bmatrix}$$ So what do we do? The solution to this problem is not to multiply the vector or the point by the matrix, but the matrix M by the vector V. In other words, we move the point or vector to the right inside of the multiplication:
{ "domain": "scratchapixel.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9865717424942962, "lm_q1q2_score": 0.8178076024622043, "lm_q2_score": 0.828938806208442, "openwebmath_perplexity": 929.8803866151231, "openwebmath_score": 0.6864959001541138, "tags": null, "url": "https://www.scratchapixel.com/lessons/mathematics-physics-for-computer-graphics/geometry/row-major-vs-column-major-vector.html" }
homework-and-exercises, newtonian-mechanics, friction Title: Where is the direction of kinetic friction in this question? Suppose there is on object of 20.0kg sliding to the right. A person exert a force of 30N left on the object. The object has an acceleration of 2.5m/s^2 left. What is the magnitude and direction of kinetic friction? Since the object is moving to the right (slowing down), I supposed the kinetic friction is to the left since it always opposes the direction of motion. Take right to be positive.Thus, (-F) + (-30) = (20.0)(-2.5), -F = (-50) + (30), F = +(20N) But isn't +20N mean the direction is right? I'm a bit confused here. In your equation, you assumed (-F) is the frictional force, since it is acting towards right. Hence you got F = 20. Which effectively means -F = -20N Or just assume frictional force is F irrespective of direction (assuming it is not known at this time). Then you will get F = -20N which means it acts towards right.
{ "domain": "physics.stackexchange", "id": 17680, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, friction", "url": null }
complexity-theory, time-complexity, queues A good rule of thumb across all these kinds of searching problems is to try setting visited as soon as possible to avoid unnecessary and sometimes even incorrect computations.
{ "domain": "cs.stackexchange", "id": 17675, "lm_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, time-complexity, queues", "url": null }
To determine which numbers are in $$S$$, we will investigate $$a\in\mathbb{N}$$ such that $$a\not=\frac{1}{2}(b+1)(b+2c-2)+1$$. First, we let $$k=\frac{1}{2}(b+1)(b+2c-2)$$ and look for solutions where $$k\in\mathbb{N}$$. Substituting $$b=2m$$ and $$c=2^n+1-m$$, where $$n,m\in\mathbb{N}$$, we notice that if $$2^n>m-1$$, then $$k=2^n(2m+1)$$ is a solution. We also find that if $$b=2^{n+1}-1$$ and $$c=m+2-2^n$$, where $$2^n<m+2$$, then $$k=2^n(2m+1)$$ is a solution. Since for any $$n$$ there exists some $$m$$ such that either $$2^n>m-1$$ or $$2^n<m+2$$, $$k$$ must always be of the form $$2^n(2m+1)$$. Substitution into our original formula yields $$a=2^n(2m+1)+1$$, implying $$S$$ may only contain 1 and numbers of the form $$2^n+1$$, as these are the only numbers that cannot be expressed this way.
{ "domain": "brilliant.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773707999669627, "lm_q1q2_score": 0.8058050083094497, "lm_q2_score": 0.8244619220634457, "openwebmath_perplexity": 361.3630067795442, "openwebmath_score": 0.9883634448051453, "tags": null, "url": "https://brilliant.org/discussions/thread/investigating-this-variation-of-the-prime-sieve/" }
quantum-mechanics, homework-and-exercises, quantum-computer Now, positivity is defined in terms of the inner product, i.e. $\rho$ is positive iff $\forall v\in \mathcal{H}$, $\left<v, \rho v\right> \ge 0$, but "transpose" is defined in terms of an operation on matrices. So I was able to get this under the assumption that $\rho^{T} = \rho^{*}$, but not under the weaker assumption the $\rho$ is simply positive. Is this true even if I don't assume $\rho^{T} = \rho^{*}$? As for showing that the transpose map is not completely positive, I frankly do not know what I'm doing and am asking for any and all help you can give me. My attempt is given below, though it is not worth reading: Let $\rho\otimes \gamma$ be a positive map, so that $\forall u\otimes v \in \mathcal{H}_A \otimes \mathcal{H}_{B}$ $$ \left<u\otimes v, \rho u \otimes \gamma v\right> := \left<u, \rho u\right>\left< v, \gamma v \right> \ge 0. $$
{ "domain": "physics.stackexchange", "id": 2576, "lm_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, homework-and-exercises, quantum-computer", "url": null }
python, jupyter That's why I usually recommend simulating the most important processes first with a scientific tool like Scilab, Simulink, or Labview: https://www.scilab.org/use-cases/powerful-modeling-and-big-data-analysis-energy-transition A simulation is interesting, not only to understand how physics between things works, but also to apply a partial or complete machine learning model to optimize energy consumption. Finally, you can apply a machine learning model with Reinforcement Learning: https://github.com/ADGEfficiency/energy-py https://github.com/smasis001/smart-grid-peak-tariff-optimization/blob/master/notebooks/OptimizationAlgorithm.ipynb Or gaussian: https://github.com/jaimergp/easymecp These are just examples, there are plenty of existing energy optimization models available on GitHub.
{ "domain": "datascience.stackexchange", "id": 10914, "lm_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, jupyter", "url": null }
Now we set three helper variables, which we will define as the following. $$y_1 = x, y_2 = x^\prime, y_3 = x^{\prime\prime}$$ Using these we can rewrite the equation into several and take the derivative of each equation. \begin{aligned} y_1^\prime &= x^\prime = y_2\\ y_2^\prime &= x^{\prime\prime} = y_3\\ y_3^\prime &= x^{\prime\prime\prime} = \frac{3 \tan \left( \frac{1}{2} \cdot x^{\prime\prime}(t) \right) - 16 \log\left( x^\prime(t) \right) + x(t)}{2} = \frac{3 \tan \left( \frac{1}{2} \cdot y_3(t) \right) - 16 \log\left( y_2(t) \right) + y_1}{2} \end{aligned} Yielding our final three equations. $$\begin{cases} y_1^\prime &= y_2\\ y_2^\prime &= y_3\\ y_3^\prime &= \frac{3 \tan \left( \frac{1}{2} \cdot y_3(t) \right) - 16 \log\left( y_2(t) \right) + y_1}{2} \end{cases}$$ b) Transform the following set of first-order ODEs into a single higher-order ODE. \begin{aligned} \dot{x} &=& y\\ \dot{y} &=& z\\ \dot{z} &=& yz + \log y \end{aligned}
{ "domain": "will-farmer.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.959762057376384, "lm_q1q2_score": 0.8268716826858609, "lm_q2_score": 0.8615382076534743, "openwebmath_perplexity": 2212.3114768306395, "openwebmath_score": 0.9679732918739319, "tags": null, "url": "http://will-farmer.com/csci4446-chaotic-dynamics-homeworks-problem-set-3.html" }
finite-impulse-response, lowpass-filter, derivation The transition bandwidth is approximately equal to the window's main lobe width, which is itself dependent on the window function AND window length. For example, a rectangular window of length $M$ has main side lobe width $\dfrac{4\pi}{M}$ (including the negative half, see @RickarySanchez's comment), whereas a hamming window of length $M$ has main side lobe width $\dfrac{8\pi}{M}$. For the same length, the rectangular window hence has a sharper transition width. The attenuation depends on the window's side lobe height, which is itself dependent on the window function. For example, a rectangular window of length $M$ has first side-lobe height at $-13\,\text{dB}$ while a hamming window of length $M$ has first side-lobe height at $-41\,\text{dB}$. For the same length, the hamming window will therefore have better attenuation in the stop-band.
{ "domain": "dsp.stackexchange", "id": 11527, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "finite-impulse-response, lowpass-filter, derivation", "url": null }
catkin, geometry-msgs Title: catkin can't find geometry_msgs even though it's on CMAKE_PREFIX_PATH I have run sudo apt install -y ros-geometry-msgs, but when I try to build my project with it, I get this error: CMake Error at /opt/ros/noetic/share/genmsg/cmake/genmsg-extras.cmake:271 (message): Could not find 'share/geometry_msgs/cmake/geometry_msgs-msg-paths.cmake' (searched in '/home/tjpowell/Robot_files/RobotCodeRospy/test3/devel; /home/tjpowell/Robot_files/RobotCodeRoscpp/test3/devel;/opt/ros/noetic'). echo $CMAKE_PREFIX_PATH: /home/tjpowell/Robot_files/RobotCodeRospy/test3/devel: /home/tjpowell/Robot_files/RobotCodeRoscpp/test3/devel: /opt/ros/noetic: /usr/share/geometry_msgs/cmake
{ "domain": "robotics.stackexchange", "id": 38078, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "catkin, geometry-msgs", "url": null }
optics, visible-light, electromagnetic-radiation is an intrinsic feature of the problem, because to be able to express the visible range as a fraction of the EM spectrum, you need a measure on the latter, and there is no natural way to do this. The closest you can get is to assign a measure that is uniform in logarithmic scale, with long- and short-wavelength cutoffs at the size of the universe and at the Planck energy, but that essentially implies that there is an equal amount of interesting phenomena happening at photon energies vastly larger than anything than we've ever had access to, as in the ranges where we do have access, as well as a large almost-bottomless well of wavelengths that don't even fit inside our own galaxy. Physics, of course, doesn't care ─ but we, as humans, do.
{ "domain": "physics.stackexchange", "id": 58419, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, visible-light, electromagnetic-radiation", "url": null }
physical-chemistry, thermodynamics, entropy Title: Why does the combustion of graphite have a positive Delta S? The following reaction is exothermic and entropically favorable: $$\ce{C (s) + O2 (g) -> CO2 (g)}$$ My question: Why is this reaction entropically favorable?
{ "domain": "chemistry.stackexchange", "id": 13327, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "physical-chemistry, thermodynamics, entropy", "url": null }
c++, performance, hash-map, k-sum Title: Hashtable solution to 2 sum public: vector<int> twoSum(vector<int>& nums, int target) { int size = nums.size(); vector<int> toRet; unordered_map<int,pair<int,int>> myMap; for(int i = 0; i < size; ++i){ myMap.emplace(nums[i],make_pair(nums[i],i)); } for(int i = 0; i < size; ++i){ int toFind = target - nums[i]; if(myMap[toFind].first == toFind && myMap[toFind].second != i){ toRet.push_back(i); toRet.push_back(myMap[toFind].second); return toRet; } } return toRet; } }; How do I make this run faster? I can't think of anything. Right now, it is slower than 47% of submissions. Could you please provide some hints? It's possible to solve this in a single pass: Use a map<int, int> to store values you've seen so far, and their first index, let's call it seen For each value, let's call it current:
{ "domain": "codereview.stackexchange", "id": 43774, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, performance, hash-map, k-sum", "url": null }
quantum-field-theory, notation Title: Notation question for a classical field in QFT The equations of motion for a classical field $\phi$ can be obtained using the Lagrange: $$ \frac{\partial \mathcal{L}}{\partial \phi} - \partial_\mu \bigg ( \frac{\partial \mathcal{L}}{\partial(\partial_\mu \phi)} \bigg )=0 \tag{1}$$ A simple Lagrangian: $$ \mathcal{L} = \frac{1}{2} \partial_\mu \phi \partial^\mu \phi $$ Has the following equations of motion: $$ \partial_\mu \bigg (\frac{\partial \mathcal{L}}{\partial(\partial_\mu \phi)} \bigg ) = 0$$ My confusion is at the moment of calculating: $\frac{\partial \mathcal{L}}{\partial(\partial_\mu \phi)}$, I would think that since we are taking a partial derivative, the result would be: $$ \frac{\partial \mathcal{L}}{\partial(\partial_\mu \phi)} = \frac{\partial }{\partial(\partial_\mu \phi)} \frac{1}{2} \partial_\mu \phi \partial^\mu \phi =\frac{1}{2} \partial^\mu \phi$$
{ "domain": "physics.stackexchange", "id": 71479, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, notation", "url": null }
turtlebot2, turtlebot, base-global-planner, sbpl-lattice-planner, costmap-2d Footprint cell at (-1, -3) Footprint cell at (-1, -2) Footprint cell at (-1, -1) Footprint cell at (-1, 0) Footprint cell at (-1, 1) Footprint cell at (-1, 2) Footprint cell at (-1, 3) Footprint cell at (-1, 4) Footprint cell at (-1, 5) Footprint cell at (-1, 6) Footprint cell at (-1, 7) Footprint cell at (0, -7) Footprint cell at (0, -6) Footprint cell at (0, -5) Footprint cell at (0, -4) Footprint cell at (0, -3) Footprint cell at (0, -2) Footprint cell at (0, -1) Footprint cell at (0, 0) Footprint cell at (0, 1) Footprint cell at (0, 2) Footprint cell at (0, 3) Footprint cell at (0, 4) Footprint cell at (0, 5) Footprint cell at (0, 6) Footprint cell at (0, 7) Footprint cell at (1, -7) Footprint cell at (1, -6) Footprint cell at (1, -5) Footprint cell at (1, -4) Footprint cell at (1, -3) Footprint cell at (1, -2) Footprint cell at (1, -1) Footprint cell at (1, 0) Footprint cell at (1, 1) Footprint cell at (1, 2) Footprint cell at (1, 3) Footprint cell at (1, 4)
{ "domain": "robotics.stackexchange", "id": 12701, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turtlebot2, turtlebot, base-global-planner, sbpl-lattice-planner, costmap-2d", "url": null }
values. Rules 10 through 12 will be derived in terms of the simpler rules and the laws previously discussed. Combinational and sequential circuits. A Boolean expression is composed of variables and terms. This reminded me of Boolean algebra and minimizing boolean algebra functions that I learned at college. It is also called as Binary Algebra or logical Algebra. Although any of these methods can be employed using pen and paper, it is far easier (and more productive) to implement searching algorithms on a computer. Rule in Boolean Algebra. 7. Minimization of Boolean Expressions. Chapter 4 – Minimization of Boolean Functions We now continue our study of Boolean circuits to consider the possibility that there might be more than one implementation of a specific Boolean function. The Overflow Blog Podcast 284: pros and cons of the SPA The idea of Boolean function minimization is first introduced by an English mathematician and philosopher George Boole who invented the Boolean algebra in
{ "domain": "abc-instal.ro", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9609517050371972, "lm_q1q2_score": 0.8129098237626483, "lm_q2_score": 0.8459424334245618, "openwebmath_perplexity": 982.6859258591757, "openwebmath_score": 0.5752015113830566, "tags": null, "url": "http://abc-instal.ro/2bpngy/c7e075-boolean-algebra-minimization" }
css, html5 <li class="item"> <div class="point"></div> <div class="text">Epsilon</div> </li> </ul> Your HTML is far too overloaded. The .point elements are unnecessary and can be replaced by using the pseudo-element ::before. This requires adding the property content: "". Generally as a rule, it's wrong to use the same class on all child elements, especially when it's generic like item. Better mark the list itself and use a child selector to select the items, for example .animated-list > li. The <div class="text"> also seem unnecessary for this example. Setting display: inline-block and width have nothing to do with animated bullets and the color and font-family should be assigned on a higher level element such as the body. In the CSS, as mentioned above replace ul with ul.animated-list replace .item with ul.animated-list > li replace .point with ul.animated-list > li::before
{ "domain": "codereview.stackexchange", "id": 17099, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "css, html5", "url": null }
c, file-system, compression, c99 /* * Closes an MTF archive previously opened by mtf_file_open(). */ void mtf_file_close(mtf_file_t * mtf); /* * Extract the contents of an MTF archive to normal files * in the local file system. Overwrites existing files. * The internal directory structure of the MTF is preserved. * * You may specify a maximum number of files to extract or * pass MTF_EXTRACT_ALL to `maxFileToExtract` and allow the * extraction of all files in the archive. `filesExtracted` * is optional and may be null. If provided, it will output * the number of files successfully extracted. */ bool mtf_file_extract_batch(const char * srcMtfFile, const char * destPath, int maxFileToExtract, int * filesExtracted);
{ "domain": "codereview.stackexchange", "id": 15451, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c, file-system, compression, c99", "url": null }
ros Frame tb3_1/base_footprint exists with parent tb3_1/odom. Frame tb3_1/camera_link exists with parent tb3_1/base_link. Frame tb3_1/camera_rgb_frame exists with parent tb3_1/camera_link. Frame tb3_1/camera_rgb_optical_frame exists with parent tb3_1/camera_rgb_frame. Frame tb3_1/caster_back_left_link exists with parent tb3_1/base_link. Frame tb3_1/caster_back_right_link exists with parent tb3_1/base_link. Frame tb3_1/imu_link exists with parent tb3_1/base_link. Frame tb3_1/base_scan exists with parent tb3_1/base_link. Frame tb3_1/wheel_left_link exists with parent tb3_1/base_link. Frame tb3_1/wheel_right_link exists with parent tb3_1/base_link.
{ "domain": "robotics.stackexchange", "id": 36994, "lm_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 }
# Thread: Conjugacy and Abelian Groups 1. ## Conjugacy and Abelian Groups Beachy and Blair in the book Abstract Algebra section 7.2 Conjugacy define conjugacy as follows: Let G be a group and let x, y $\in$ G. The element x is said to be a conjugate of the element x if there exists an a $\in$ G such that y = ${ax}a^{-1}$ They then make the statement that "in an abelian group, elements or subgroups are only conjugate to themselves" I have seen some brief justifications of this statement in other texts but cannot see how they link to the definition. Can someone please - starting from the definition and proceeding from there - give a formal proof of this statement and then go on to show that (asserted in many texts) the conjugacy classes of an abelian group are all singleton sets> Peter 2. ## Re: Conjugacy and Abelian Groups let G be abelian to find the conjugacy class of any element x we find $g x g^{-1} = gg^{-1} x = x \;\;$ for any g in G
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936087546923, "lm_q1q2_score": 0.8179225634162929, "lm_q2_score": 0.8311430499496096, "openwebmath_perplexity": 473.37074676943405, "openwebmath_score": 0.795426607131958, "tags": null, "url": "http://mathhelpforum.com/advanced-algebra/193960-conjugacy-abelian-groups.html" }
machine-learning, deep-learning, optimization, gradient-descent $$\hat{y} = w^{(1)} x^{(1)} + w^{(2)} x^{(2)}$$ where $x^{(1)}$ and $x^{(2)}$ are the features of our problem. So if we make use of a cost function ($J$) that represents the mean squared error of the prediction ($\hat{y}$) given by our parameters, the gradient at iteration $t$ will be given by a quantity proportional to the features: $$ g_t = \left(\frac{\partial J}{\partial w^{(1)}_t}, \frac{\partial J}{\partial w^{(2)}_t}\right)^T \propto (x^{(1)}_t, x^{(2)}_t)^T $$ Thereby, using SGD the quantity that we use to update each of our parameters $\delta w_{t+1}$ is also proportional to the associated feature: $$ \delta w_{t}^{(j)} \propto x^{(j)}_t$$ With this already set up, lets imaging that our training is done in three samples (just for visualization purposes). During these samples the $x^{(1)}$ feature is more frequent (or less sparse) than the other feature $x^{(2)}$, so we have a dataset, $\mathbb{X}$, similar to the next: $$ \mathbb{X} = \begin{pmatrix} 1 & 0\\ 5 & 0\\ 3 & 3\\
{ "domain": "datascience.stackexchange", "id": 8354, "lm_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, deep-learning, optimization, gradient-descent", "url": null }
c++, c++11, reinventing-the-wheel, pointers Move Semantics. It is a good idea to mark your move constructor and move assignment operator as noexcept. This is because (as they are not creating resources they usually are) but also this allows some good optimizations with standard library containers. SharedPtr(SharedPtr &&rhs) noexcept; SharedPtr& operator=(SharedPtr &&rhs) noexcept; void swap(SharedPtr &rhs) noexcept; Why re-write std::swap? void swap(SharedPtr &rhs) { Manager<T>* tmp = manager; manager = rhs.manager; rhs.manager = tmp; } void swap(SharedPtr &rhs) noexcept {std::swap(manager, rhs.manager);} What about the null object? void reset(T* new_ptr) { if (manager) { manager->disown(); } manager = new Manager<T>(new_ptr); }
{ "domain": "codereview.stackexchange", "id": 23008, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++11, reinventing-the-wheel, pointers", "url": null }
group-theory, theory-of-everything So Lisi certainly took elements of the real world, and squeezed them into E8, but at the price of breaking the rules that make E8 what it is. His hope is that there's a way to bend the rules that makes sense, that is still mathematically legitimate, and which can define a testable theory, but that's just a hope. So most practitioners of theoretical particle physics have long since moved on. They certainly value creativity, but they believe that Lisi is trying to do things that will never work. There are a handful of physicists who do still take an interest in Lisi's work, but the mainstream would regard most of their theories as fundamentally problematic or ill-defined too.
{ "domain": "physics.stackexchange", "id": 55354, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "group-theory, theory-of-everything", "url": null }
quantum-mechanics, experimental-physics, history \begin{align} \begin{array}{cc} J & \text{Wavenumber }\mathrm{(cm^{-1})} & \text{Energy (eV)} \\ \hline 0 & 37\,600 & 4.66 \\ 1 & 39\,400 & 4.88 \\ 2 & 44\,000 & 5.45 \end{array} \end{align} The selection rules for atomic transitions forbid transitions where $J$ goes from zero to zero. In photon-mediated transitions this is pretty easy to understand: the photon must carry away one unit of angular momentum. (You can have transitions with $\Delta J=0$ for nonzero $J$; in that case you can imagine that the orientation $m_J$ of the atom's spin must change.) Apparently the same rules apply to the collisional transitions seen in the Franck-Hertz experiment — otherwise you could excited the $^3P_0$ first excited state and the energy involved would be $4.7\rm\,V$. Very interesting observation! In your question you ask,
{ "domain": "physics.stackexchange", "id": 22230, "lm_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, experimental-physics, history", "url": null }
error-analysis Title: How do you find the average of relative uncertainties? If I had a set of measurements ,eg : $[10.0,11.0,11.5]$ and they each had a relative uncertainty of $10$% meaning my values are now $[10.0±1.0, 11.0±1.1, 11.5±1.15]$ how would I find the average of their uncertainties? Id think either one of two situations: I simply add their uncertainties so that my new average value becomes $10.83±3.115$ I add their uncertainties and then divide by the total number of measurements like I would when finding the mean of the measurements themselves. So my new average value $10.83±1.08$
{ "domain": "physics.stackexchange", "id": 67891, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "error-analysis", "url": null }
java, swing, game-of-life As you can tell, it's meant to represent John Conway's Game of Life on a JFrame. It's my first project using animation and graphics, so I expect there to be a few bad practices. Could anyone provide an honest, critical code review? Thanks As was suggested in the comments, initialize your matrix as boolean[][] emptyBoard = new boolean[10][10], as in Java booleans will default to false. Document your code: all IDEs will have some support for JavaDoc, use it. Also suggested in the comments, variables should have better names; especially GUI elements (you might not realize the importance of this because in your case you have few elements, but doing this in larger applications will slowly become a royal PITA). Separate logic from presentation. Don't do GUI operations and the game calculations in the same class (i.e. Board). You shouldn't do this: for (int[] i: surrounding) { try { if (board[i[0]][i[1]]) { count++; } }
{ "domain": "codereview.stackexchange", "id": 3781, "lm_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, swing, game-of-life", "url": null }
human-biology, genetics, human-genetics, radiation Title: Irradiation positive effect on humans? In research paper Euphytica 135: 187–204, 2004 it is written that: 434 mutant varieties of rice have been released with improved characters such as semi-dwarf height, early maturity, improved grain yield, disease- and cold-tolerance, and improved grain quality. Of these, 225 (56%) were induced with gamma rays, 16 with X- rays, 7 with fast neutrons and 12 with other radiation sources
{ "domain": "biology.stackexchange", "id": 5201, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "human-biology, genetics, human-genetics, radiation", "url": null }
kinematics, integration, calculus To find the distance basically decompose the motion into two parts - one, where it is moving towards positive x axis and second, when its moving towards negative x axis. Integrate the function breaking the motion into these two parts. Once integrate it between t=0 to t=4/3, second integrate it between t=4/3 to t=4, the answers you get in both - add the absolute value of them to get your answer.
{ "domain": "physics.stackexchange", "id": 90330, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kinematics, integration, calculus", "url": null }
dynamics $$\big(\,X_A + l \cos(\theta + \varphi_0) - c\,\big)^2 \, + \, \big(\,sX_A + l \sin(\theta + \varphi_0) + b\,\big)^2 \, = \, r^2$$ Knowing $X_A$, plug it in the equation and solve for $\theta$. Step 2: Differentiate the equation from step 1 with respect to $t$ and obtain the equation $$\big(\,X_A + l \cos(\theta + \varphi_0) - c\,\big)\left(\frac{dX_A}{dt} - l\sin(\theta + \varphi_0)\frac{d\theta}{dt}\right) \, + \, \big(\,sX_A + l \sin(\theta + \varphi_0) + b\,\big)\left(s\frac{dX_A}{dt} + l\cos(\theta + \varphi_0)\frac{d\theta}{dt}\right) = 0$$ Knowing $X_A, \, \theta, \, \frac{dX_A}{dt} = V_A$, plug them in the equation and solve for $\frac{d\theta}{dt}$. Step 3: Differentiate the equation from step 2 with respect to $t$ and obtain the equation (which you should calcualte):
{ "domain": "engineering.stackexchange", "id": 3651, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dynamics", "url": null }
cooling To conclude my question: The results are quite nice giving me a much more realistic cooling curve as seen below: Modified Cooling Unfortunately, as you might have weaned from this question, I'm not math savvy and so I have no idea whether I've broken like a 100 fundamental rules of mathematics or not. If the results are good, is this modification (gross infraction) acceptable? Is there anything in the pure mathematics that says I cannot use this to predict/estimate cooling times of objects in given circumstances such as the oven example? Comments, pointers, raging scolds and so on are all welcome Cheers Full disclosure: I asked this question in math.Stackexchange and was referred to this forum. Newton's law of cooling is a differential equation which states (in one form); $\displaystyle \frac {dT}{dt} = -k(T-T_A)$
{ "domain": "physics.stackexchange", "id": 71719, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cooling", "url": null }
kalman-filter, ekf, pose Fusion of an arbitrary number of sensors. The nodes do not restrict the number of input sources. If, for example, your robot has multiple IMUs or multiple sources of odometry information, the state estimation nodes within robot_localization can support all of them. Support for multiple ROS message types. All state estimation nodes in robot_localization can take in nav_msgs/Odometry, sensor_msgs/Imu, geometry_msgs/PoseWithCovarianceStamped, or geometry_msgs/TwistWithCovarianceStamped messages. Per-sensor input customization. If a given sensor message contains data that you don't want to include in your state estimate, the state estimation nodes in robot_localization allow you to exclude that data on a per-sensor basis.
{ "domain": "robotics.stackexchange", "id": 510, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kalman-filter, ekf, pose", "url": null }
No Download or Signup. A least-squares regression fit of the data (using base 10 logarithms to transform columns (1) and (6)) indicates that the estimated slope for the Weibull distribution is 1. Here, for instance, the slope of y = 1 is zero. A line that slopes down from left to right has a negative gradient. From my answer to How can someone explain exponential functions to a high school kid?: An exponential function or curve is a function that grows exponentially, or grows at an increasingly larger rate as you pick larger values of x, and usually tak. 5 cm in mature plant height. This example teaches you how to apply exponential smoothing to a time series in Excel. This test will be paper-based this year. 6 Using the line y – x as a reference, generalize the effect of changes in the equation on the graph of the line. The slope is the vertical distance divided by the horizontal distance between any two points on the line, which is the rate of change along the regression line. The
{ "domain": "106.115", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9901401444055119, "lm_q1q2_score": 0.8024877059347477, "lm_q2_score": 0.8104789109591832, "openwebmath_perplexity": 451.5423627355904, "openwebmath_score": 0.6478143930435181, "tags": null, "url": "http://142.93.106.115/khznx/mtcto.php?ss=exponential-slope-calculator" }
electronic-configuration, periodic-trends, electron-affinity I later found that this also applies when comparing silicon and phosphorus. The explanation given was the same. What exceptions should be noted when comparing electron affinities? Are there any at all? And how far does the exception with atoms with half-filled p subshells extend? This exception rule is actually orbital filling rule. For two electrons to be in same orbital they need to have different spins (Pauli exclusion principal). This electron pairing requires additional energy and thus it is easier to add electrons if there are free orbitals. When element has a half-filled p sublevel all 3 orbitals have one electron and pairing takes place (difference between energy levels of 2p and 3s is greater than electron pairing energy). Electron pairing effects have significant impact to physical properties of coordination complexes (like color and magnetic properties).
{ "domain": "chemistry.stackexchange", "id": 5520, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electronic-configuration, periodic-trends, electron-affinity", "url": null }
inorganic-chemistry, bond, covalent-compounds $$\ce{F-O-O-F <-> F-O^+=O\bond{...}F-}$$ This effect is strongest in $\ce{O2F2}$ since fluorine is more electronegative than oxygen and therefore the $\sigma^*$ orbital has a much higher oxygen contribution. In hydrogen peroxide, a similar mechanism is at play that also contributes to reducing the bond length and increasing the bond order. In $\ce{Cl2O2}$, the effect is weakest.
{ "domain": "chemistry.stackexchange", "id": 7058, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, bond, covalent-compounds", "url": null }
php, wordpress Title: Simple theme options held in array I have created WordPress theme options using an array, and it is working. There are 5 type of input: text, textarea, checkbox, select and upload. Please read over my code and offer some possible improvements and/or tweaks. <?php add_action( 'admin_menu', 'admin_enqueue_scripts' ); function admin_enqueue_scripts() { wp_enqueue_style( 'theme-opt-css', get_template_directory_uri() . '/admin/stylesheet/theme-opt.css' ); wp_enqueue_script( 'theme-opt-js', get_template_directory_uri() . '/admin/javascript/theme-opt.js' ); } function wp_gear_manager_admin_scripts() { wp_enqueue_script('media-upload'); wp_enqueue_script('thickbox'); wp_enqueue_script('jquery'); } function wp_gear_manager_admin_styles() { wp_enqueue_style('thickbox'); } add_action('admin_print_scripts', 'wp_gear_manager_admin_scripts'); add_action('admin_print_styles', 'wp_gear_manager_admin_styles');
{ "domain": "codereview.stackexchange", "id": 2940, "lm_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, wordpress", "url": null }
ros, ros2, network, docker, dds robot_container_3_1 | [INFO] [1653500344.978188119] [listener]: I heard: [Hello World: 11] robot_container_1_1 | [INFO] [1653500345.977757730] [talker]: Publishing: 'Hello World: 12' robot_container_3_1 | [INFO] [1653500345.978233287] [listener]: I heard: [Hello World: 12] robot_container_1_1 | [INFO] [1653500346.977751814] [talker]: Publishing: 'Hello World: 13' robot_container_3_1 | [INFO] [1653500346.978220924] [listener]: I heard: [Hello World: 13] robot_container_1_1 | [INFO] [1653500347.977699661] [talker]: Publishing: 'Hello World: 14' robot_container_3_1 | [INFO] [1653500347.977952816] [listener]: I heard: [Hello World: 14] robot_container_1_1 | [INFO] [1653500348.977798119] [talker]: Publishing: 'Hello World: 15' robot_container_3_1 | [INFO] [1653500348.978270520] [listener]: I heard: [Hello World: 15] robot_container_1_1 | [INFO] [1653500349.977750424] [talker]: Publishing: 'Hello World: 16'
{ "domain": "robotics.stackexchange", "id": 37712, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros2, network, docker, dds", "url": null }
fluid-dynamics, measurements, meteorology, instrument Title: How to measure wind speed non-accoustically without moving parts? I heard that there are ways to measure wind speed independent of the direction other than the usual anemometer or acoustic Doppler profilers, with a setup without any moving parts. Could somebody please help me with what devices could be meant and how they are called? Any kind of Pivot tube device needs to be aligned with the wind direction to be able to measure, so it cannot be one of those. There is a device called a hot-wire anemometer in which an electrically-heated wire is exposed to airflow. fast airflow means lots of heat transfer, which cools the wire. The temperature coefficient of resistivity of the wire is known, so the velocity of the ambient moving air can be correlated to the resistance of the wire and thence to the current flowing through it. In this way, the airflow velocity can be deduced by monitoring the current through the wire.
{ "domain": "physics.stackexchange", "id": 78375, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-dynamics, measurements, meteorology, instrument", "url": null }
apache-spark, scala Title: Outlier Elimination in Spark With InterQuartileRange Results in Error I have the following function that is supposed to calculate the outlier for a given dataset. def interQuartileRangeFiltering(df: DataFrame): DataFrame = { @scala.annotation.tailrec def inner(cols: List[String], acc: DataFrame): DataFrame = cols match { case Nil => acc case column :: xs => val quantiles = acc.stat.approxQuantile(column, Array(0.25, 0.75), 0.0) // TODO: values should come from config println(s"$column ${quantiles.size}") val q1 = quantiles(0) val q3 = quantiles(1) val iqr = q1 - q3 val lowerRange = q1 - 1.5 * iqr val upperRange = q3 + 1.5 * iqr val filtered = acc.filter(s"$column < $lowerRange or $column > $upperRange") inner(xs, filtered) } inner(df.columns.toList, df) } val outlierDF = interQuartileRangeFiltering(incomingDF)
{ "domain": "datascience.stackexchange", "id": 10419, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "apache-spark, scala", "url": null }
c, linked-list } } else { printf ("List is empty!\n"); } break; case (4): if (head) { dump(head); } else { printf ("Nothing to dump!\n"); } break; case (5): return 0; } } }
{ "domain": "codereview.stackexchange", "id": 4912, "lm_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, linked-list", "url": null }
How general is this formula? In the comments to the answer of the linked question, the following formula is quoted (I've adjusted it to my notation here), \begin{align} Ad(g): X_i \rightarrow gX_ig^{-1} = X_j [Ad(g)]^j_{\,i} \end{align} and I think this gets to the crux of my confusion. The RHS of this equation is some sort of rotation of a vector whose components are themselves the group generators (Lie algebra basis elements). But the LHS is a conjugation? I'm uncomfortable with the idea that these are equivalent! Here's my picture of how I understand what's happening: As I said at the start, is this an unsurprising fact? • WP. Your handwritten formula does not illustrate the TeX'd formula preceding it. It might be more intuitive for you to express the group results with algebra entities throughout. The adjoint rep is real. Nov 27, 2021 at 1:24 1. In physics the Lie algebra $$su(2)$$ is often identified with the space of $$2\times2$$ traceless Hermitian matrices.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.962673111584966, "lm_q1q2_score": 0.8257502853988268, "lm_q2_score": 0.8577680995361899, "openwebmath_perplexity": 120.57011751419903, "openwebmath_score": 0.9818472266197205, "tags": null, "url": "https://physics.stackexchange.com/questions/679340/why-does-the-adjoint-action-of-su2-on-its-own-lie-algebra-implement-so3" }
ros, gazebo, ros-kinetic Title: Controlling multiple huskies in ROS Gazebo Hey all, I'm very new to this software and am trying to figure out how to do basic control of multiple Huskies. I'm just trying to replicate this very simple way of moving a single husky: roscore roslaunch husky_gazebo husky_playpen.launch then running: rostopic pub /husky_velocity_controller/cmd_vel geometry_msgs/Twist "linear: x: 0.5 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 0.0" -r 10 to cause it to drive indefinitely, which is visible in gazebo. I then launched: roslaunch husky_gazebo multi_husky_playpen.launch and ran: rostopic list to see find the equivalent velocity controller for each husky thats been spawned. Full output from this at the end. I thought from here it would be easy to just run: rostopic pub /husky_alpha/husky_velocity_controller/cmd_vel geometry_msgs/Twist "linear: x: 0.5 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 0.0" -r 10
{ "domain": "robotics.stackexchange", "id": 36385, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, gazebo, ros-kinetic", "url": null }
python, primes, numpy, sieve-of-eratosthenes import math import numpy def SieveBasic(n): """ This function runs the basic sieve of eratosthenis algorithm (non-optimized) and returns a list of prime numbers. The algorithm is implemented as described @: http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes#Example """ l = list(range(2, n+1)) isPrime = [True] * (n-1) for m, n in enumerate(l): currentCheck = n # take each number and compare with later numbers for i, x in enumerate(l[m+1:]): if x % currentCheck == 0: isPrime[i+m+1] = False primes = [0, 1] for i, prime in enumerate(isPrime): if prime: primes.append(2+i) return primes def generateJs(i, n): """ This function generates a list of Js required for optimized sieve of eratosthenis algorithm. """ j = i**2 if j < n: yield j while j+i <= n: j += i yield j
{ "domain": "codereview.stackexchange", "id": 7631, "lm_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, primes, numpy, sieve-of-eratosthenes", "url": null }
c#, security, http, asp.net-mvc, url-routing return uriBuilder.ToString(); } private static Uri parseOriginUri(string originText) { try { return new Uri(originText); } catch (UriFormatException ex) { throw new UriFormatException($"{OriginHeader} header URI is in an invalid format: \"{originText}\"", ex); } } }
{ "domain": "codereview.stackexchange", "id": 31467, "lm_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#, security, http, asp.net-mvc, url-routing", "url": null }
elixir, dsl defmacro root(rule_name) do quote do # Prepend the newly defined test to the list of rules @root unquote(rule_name) end end # This will be invoked right before the target module is compiled # giving us the perfect opportunity to inject the `parse/1` function @doc false defmacro __before_compile__(_env) do quote do def parse(document) do # IO.puts "Root is defined as #{@root}" # Enum.each @rules, fn name -> # IO.puts "Defined rule #{name}" # end case apply(__MODULE__, @root, []).(document) do {:ok, any, ""} -> {:ok , any} {:ok, any, rest} -> {:error, "Consumed #{inspect(any)}, but had the following remaining '#{rest}'"} error -> error end end end end def call_aux(fun, aux) do fn doc -> case fun.(doc) do {:ok, match, rest} -> aux.(rest, match) other -> other end end end
{ "domain": "codereview.stackexchange", "id": 30431, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "elixir, dsl", "url": null }
c, strings, memory-management, priority-queue /* * Readjust this priority queue's top three nodes, * returning false if no adjustment was needed. */ bool pq_adjust(priority_queue * pqueue, size_t * i) { if (*i * 2 + 1 <= pqueue->last_used) { // handle case of two children size_t smallerchild = item_less(&pqueue->items[*i * 2], &pqueue->items[*i * 2 + 1]) ? *i * 2 : *i * 2 + 1; if (item_less(&pqueue->items[smallerchild], &pqueue->items[*i])) { item_swap(&pqueue->items[smallerchild], &pqueue->items[*i]); *i = smallerchild; return true; } } else if (*i * 2 <= pqueue->last_used) { // handle case of only one child size_t smallerchild = *i * 2; if (item_less(&pqueue->items[smallerchild], &pqueue->items[*i])) { item_swap(&pqueue->items[smallerchild], &pqueue->items[*i]); *i = smallerchild; return true; } } return false; }
{ "domain": "codereview.stackexchange", "id": 20422, "lm_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, strings, memory-management, priority-queue", "url": null }
turing-machines, semi-decidability $Q(2):$ "is a problem undecidable iff every TM $M$ that computes it has $|P(M)|=\aleph_0$?" $ ^{Q\space(2)}$ Moreover - let's ask an even stronger question: $Q(3):$ "if $L$ is undecidable, will we still be able to find a finite set of Turing machines $M_1,...,M_n$ that compute $L$ and have $\bigcap_{k\space=\space0}^nP(M_k)$ finite? what about an infinite set of Turing machines that satisfy that?" $ ^{Q\space(3)}$ And our final (and half-open) question will be: $Q(4):$ "What else can we understand about Turing machines and their problematic sets?" So, let's start tackling those problems. As a side note, I have arranged the questions such that each question uses the answer of the one before it (and this way, they almost seem too trivial to begin with $:$P). $A(1):$ is pretty trivial from definition. If $L$ is undecidable then there is no Turing machine that computes it and always halts, thus all Turing machines that compute $L$ have $P(M)\ne\emptyset$.
{ "domain": "cs.stackexchange", "id": 16248, "lm_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, semi-decidability", "url": null }