text
stringlengths
1
1.11k
source
dict
time, conventions, history, si-units, metrology One more reference is Transactions of the IAU B from the 1952 meeting where Commissions 4 and 4a in Recommendation 3 of the French text on page 66 which is the same as Recommendation 2 of the English text on page 88 direct that the empirical term which had been added to Brown's Tables of the Motion of the Moon should no longer be applied. That term had been added to compensate for the fact that the earth had not rotated uniformly during the observations that constructed Brown's theory, so the tabulated position of the moon had needed a fudge factor to agree with observations. Taking out the fudge meant that starting with 1960 the lunar ephemeris would work better so long as the time was interpreted as Ephemeris Time, not Universal Time.
{ "domain": "physics.stackexchange", "id": 48395, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "time, conventions, history, si-units, metrology", "url": null }
c#, factory-method Title: Object publisher factory I have an IPublisherFactory which publishes instances of, IPublishers. I'm feeding it a bunch of overloaded methods from this gigantic class, that I'm basically using for organization of the implementations. My concern is that, while it's nice to have the intellisense provided implementations on the client side, maintaining a giant "God" class is sort of obnoxious, but I don't see any alternatives to having a bunch of overload "CreatePublisher" methods. The God class isn't fully implemented, but I did implement one of the UDP and clipboard types to show how I'm planning on continuing along. Basically, if I wanted a new implementations, I'd add an overload in the IPublisherFactory, as well as the PubSub class. Any suggestions would be appreciated. :) namespace KeyCommunications { public static class IPublisherFactory { public static IPublisher CreateIPublisher(PubSub.IPC.OverNetwork.UDP udpParams) { return udpParams.Publisher; }
{ "domain": "codereview.stackexchange", "id": 22200, "lm_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#, factory-method", "url": null }
finite-automata, pushdown-automata, nondeterminism Therefore, there are two (different) paths the machine can go from this points, hence the nondeterminism. Just to clarify: the definition for Deterministic-PDA is clear-cut: at any moment, and for any input/stack/state configuration there is only one possible transition. If this is not the case, the PDA is non-deterministic even if multiple transitions lead to the same configuration. It's just a matter of definition. However, in the question above, the two transitions may actually lead to different configurations, which makes the nondeterminism even more clear.
{ "domain": "cs.stackexchange", "id": 3876, "lm_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-automata, pushdown-automata, nondeterminism", "url": null }
c++, mocks } Writing a unit test mocking out a function When writing a unit test to simply mock out a function you use the macro MOCK_SYS() that replaces a function with a macro: TEST(UniTestBloc, MyUnitTest) { MOCK_SYS(socket, [](int, int, int) {return 12;}); MOCK_SYS(connect, [](int, sockaddr const*, unsigned int) {return 0;}); MOCK_SYS(gethostbyname, [](char const*) { static char* addrList[] = {""}; static hostent result {.h_length=1, .h_addr_list=addrList}; return &result; }); auto action = [](){ ThorsSocket::Socket socket("www.google.com", 80); // Do tests }; ASSERT_NO_THROW(action()); }
{ "domain": "codereview.stackexchange", "id": 45022, "lm_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++, mocks", "url": null }
performance, beginner, c, mysql, cache #define QH_TARGET_METER "SELECT id, org_id, url, quarterhour_last_updated FROM meters WHERE source = 'buildingos' AND ((gauges_using > 0 OR for_orb > 0 OR timeseries_using > 0) OR bos_uuid IN (SELECT DISTINCT meter_uuid FROM relative_values WHERE permission = 'orb_server' AND meter_uuid != '')) AND id NOT IN (SELECT updating_meter FROM daemons WHERE target_res = 'live') ORDER BY quarterhour_last_updated ASC LIMIT 1" #define HOUR_TARGET_METER "SELECT id, org_id, url, hour_last_updated FROM meters WHERE source = 'buildingos' AND ((gauges_using > 0 OR for_orb > 0 OR timeseries_using > 0) OR bos_uuid IN (SELECT DISTINCT meter_uuid FROM relative_values WHERE permission = 'orb_server' AND meter_uuid != '')) AND id NOT IN (SELECT updating_meter FROM daemons WHERE target_res = 'live') ORDER BY hour_last_updated ASC LIMIT 1"
{ "domain": "codereview.stackexchange", "id": 27231, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, beginner, c, mysql, cache", "url": null }
neuroscience, vision, neurology This phenomenon is most common in epileptics with established photic triggers, and the scenario triggering an attack is often in the context of bright sunlight. However, this has also been described in epileptics who are not otherwise photosensitive. See, for example, “Seizures triggered by blinking in a non-photosensitive epileptic.”4 Notably, some authors have questioned whether blinking and other “triggers” are actually themselves ictal phenomena (i.e. representing the initial phase of an epileptic event) rather than a form of voluntary self-induction. For more on that hypothesis, see Ames, 1971.5 Presuming that this is, in fact, self-induction as has been traditionally postulated, the question of why such patients repeatedly self-induce seizures is perhaps the most interesting aspect of this. There has been some research2 considering the psychiatric factors underlying the behavior. Quoting Andermann3 again:
{ "domain": "biology.stackexchange", "id": 3164, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neuroscience, vision, neurology", "url": null }
python, python-3.x, homework, math-expression-eval >>> evaluate_infix(tokenize("((12 * 3) + (2 + 3) * (1 * 3))")) 15 The hard part of programming is handling user input. You have a bug: >>> ((12 * 3) + (2 + 3) * (1 * 3)) 51 The if stack[-1] == "(": check shouldn't be optional. A "(" should always be required. As such, your input is invalid but you've not noticed. def evaluate_infix(tokens): stack = [] for token in tokens: if token == ")": lb, lhs, op, rhs = stack[-4:] del stack[-4:] if lb != "(": raise ValueError("three tokens must be between parens") if op == '-': token = lhs - rhs elif op == '+': token = lhs + rhs elif op == '*': token = lhs * rhs elif op == '/': token = lhs / rhs stack.append(token) return stack[-1]
{ "domain": "codereview.stackexchange", "id": 42405, "lm_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, homework, math-expression-eval", "url": null }
c++, classes, windows, role-playing-game In addToBoard() you would only need to replace push_back() with emplace_back(). And you can remove the delete statement from deleteFromBoard(). However, that still requires you to new an object before calling addToBoard(). You could have addToBoard() take a std::unique_ptr<BoardObject> as an r-value parameter, create new objects using std::make_unique<DerivedObject> and then std::move() them around, but that's also cumbersome. Let's revisit this: Don't let objects manage their own storage I would avoid having objects derived from BoardObject add themselves to a Board. If a Board is going to own the objects, let the Board add them to itself. However, I can see that you don't want to have to write two lines of code every time, like so: Enemy *enemy = new Enemy(x, y); board->addToBoard(enemy); Although you could make a oneliner out of it: board->addToBoard(new Enemy(x, y));
{ "domain": "codereview.stackexchange", "id": 43208, "lm_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++, classes, windows, role-playing-game", "url": null }
ros, catkin, pioneer-3dx, rosaria, ros-groovy Comment by HenryW on 2013-05-08: Hey, I am in the same boat as you Gershon, before I start on Derecks commands, what hiccoughs did you have? and how did you get around them? Edit: Further question, has the wiki been updated and can ROSaria now be smoothly installed based on the wiki?
{ "domain": "robotics.stackexchange", "id": 13565, "lm_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, catkin, pioneer-3dx, rosaria, ros-groovy", "url": null }
genetics, human-genetics, dna-sequencing, nutrition, epigenetics So there's the root of the question - can supplements affect DNA - more specifically - could B12 supplementation affect the result of my MTHFR genotype (which is CC, just FTR) What the DNAfit test does is analyse some of your genes for common variants (called SNPs - single nucleotide polymorphisms). These are hard-written in your genetic code, they won't ever change (you could in theory have mutations in some individual cells, but we can ignore that). Taking supplements or any other environmental influences will therefore not affect these tests. The environment can affect certain markers on the DNA, that control how active a given gene is (how strong its expressed) - this is called epigenetics. Since these markers are written on the DNA they are also potentially heritable and the two effects (the genetic code itself and the markers on it) are often thrown into one pot when some news report about 'changes to your DNA'.
{ "domain": "biology.stackexchange", "id": 8954, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, human-genetics, dna-sequencing, nutrition, epigenetics", "url": null }
string-theory, quantum-gravity What does that microscopic fuzzball model look like? What does string theory tell us about the evaporation of those fuzzballs? Is the Hawking radiation still the main effect (as for the regular black holes) or do other phenomena take over at some point? Also feel free to add any other established results regarding black hole decay (as Jeff did with information preservation). Moshe's answer gets the main point across. If you're interested in trying to learn something more detailed, here's a thought about where you might start. (I'm not even close to expert on these matters, but this is something that I've found readable and worthwhile.)
{ "domain": "physics.stackexchange", "id": 241, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "string-theory, quantum-gravity", "url": null }
c#, .net, mvvm, event-handling, xaml <!--LayoutRoot is the root grid where all page content is placed--> <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> <RowDefinition Height="100"/> </Grid.RowDefinitions> <!--TitlePanel contains the name of the application and page title--> <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"> <TextBlock Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/> <TextBlock Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/> </StackPanel> <!--ContentPanel - place additional content here--> <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <ScrollViewer> <TextBlock Text="{Binding Path=logText}"></TextBlock> </ScrollViewer> </Grid>
{ "domain": "codereview.stackexchange", "id": 6160, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, .net, mvvm, event-handling, xaml", "url": null }
• Do you know whether your field is a Galois extension of $\Bbb{Q}$? – Jyrki Lahtonen Jun 3 '14 at 17:54 • I haven't checked it either, but I suspect that the relations $(2+\sqrt2)(2-\sqrt2)=2$ and $(3+\sqrt3)(3-\sqrt3)=6$ come in handy because both these products have square roots in $\Bbb{Q}(\sqrt2,\sqrt3)$. – Jyrki Lahtonen Jun 3 '14 at 18:23 • it's a problem from a past exam at my university, it doesn't ask you to prove that's a galois extention so i guess you can take that as given – giulio Jun 3 '14 at 21:06 • what is $\pi(\sqrt{(2+\sqrt 2)(3+\sqrt 3)})$ ? – mercio Jun 4 '14 at 8:29
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232924970205, "lm_q1q2_score": 0.8125116094927217, "lm_q2_score": 0.8267117962054048, "openwebmath_perplexity": 71.07287785752202, "openwebmath_score": 0.9301241040229797, "tags": null, "url": "https://math.stackexchange.com/questions/819529/find-the-galois-group" }
performance, vba, excel Dim r1 As Range 'Range("A2").Select 'Selects only to the end of all the data in the file to reduce processing time 'Set r1 = Range(Selection, Selection.SpecialCells(xlLastCell)) Set r1 = ActiveSheet.UsedRange 'Proceed with removing invalid symbols With r1 'Apostrophe/Closing Single Quote .Replace What:="’", Replacement:=Chr(39), LookAt:=xlPart 'Apostrophe .Replace What:="`", Replacement:=Chr(39), LookAt:=xlPart 'Opening Single Quote .Replace What:="‘", Replacement:=Chr(39), LookAt:=xlPart 'Double Open Quotes .Replace What:="“", Replacement:="""", LookAt:=xlPart 'Double Closing Quotes .Replace What:="”", Replacement:="""", LookAt:=xlPart 'Dash .Replace What:="–", Replacement:="-", LookAt:=xlPart 'Registered Trademark (R) .Replace What:="®", Replacement:="(R)", LookAt:=xlPart 'Trademark (TM) .Replace What:="™", Replacement:="(TM)", LookAt:=xlPart 'Degree Symbol .Replace What:="°", Replacement:=" degrees", LookAt:=xlPart 'Multiplication/x Symbol
{ "domain": "codereview.stackexchange", "id": 18575, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, vba, excel", "url": null }
electromagnetism, electromagnetic-induction, rocket-science Title: Is it possible to build electrical space engine based on Electromagnetic induction Electromagnetic induction means magnet convert it momentum to an electrical current. So I wonder if it possible to use this phenomeno for making an enigne which will accelerate a magnet And the magnet will push the spacecraft but some sort of coil will slow doen the magnet on when it getting back so it won't push the aircraft back Assuming radiation losses are negligible this will not provide any net propulsion. The momentum gained by pushing the magnet will be lost by stopping the magnet. And the distance moved will be reversed by recovering the magnet.
{ "domain": "physics.stackexchange", "id": 99597, "lm_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, electromagnetic-induction, rocket-science", "url": null }
optics, quantum-electrodynamics Now, the only place where you need to talk about QED is the connection between absorption spectrum and energy levels. Recall that in quantum mechanics energy levels are stable. They don't change, so there would be neither emission nor absorption. To resolve this apparent paradox we have to recall that we forgot to quantize the electromagnetic field. If you take this into account then atom's excited energy levels are no longer stable because of the fluctuations of electromagnetic field. Or in particle terms: because the number of particles is not conserved and it's easy to create photon out of nothing. Of course, energy is conserved so only photon's corresponding to the energy difference are possible. And the same can be said for absorption. Liquids and solids
{ "domain": "physics.stackexchange", "id": 170, "lm_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, quantum-electrodynamics", "url": null }
spacetime, differential-geometry, metric-tensor, string-theory, compactification Title: On the Product Structure of Spacetimes after Compactification I am currently looking into the compactification of spacetimes as it is often done in (super-)stringtheory. So, say I start with a ten-dimensional Lorentz manifold $(N, g)$, where $N$ denotes the underlying smooth manifold and $g$ denotes the Lorentzian metric on $N$. Compactification would then lead to a ten-dimensional Lorentz manifold $(\widetilde{N}, g_{\widetilde{N}})$ that decomposes into product of a four-dimensional Lorentz manifold $(M^4, g_M)$ and a six-dimensional Riemannian manifold $(C^6, g_C)$. My questions pertains to the Lorentzian metric $g_{\widetilde{N}}$ of $\widetilde{N}$. Is $(\widetilde{N}, g_{\widetilde{N}})$ assumed to be a direct product manifold or are people also interested in warped products as compactified spacetimes? By a warped product I mean the following construction:
{ "domain": "physics.stackexchange", "id": 94697, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spacetime, differential-geometry, metric-tensor, string-theory, compactification", "url": null }
qiskit, error-correction, quantum-circuit, simulation, stim measured= {'001100000': 1} tx= 0 rx= 0 err loc= (2,) err val= (2,) decoding errors= 0 / 17 measured= {'001110000': 1} tx= 1 rx= 1 err loc= (2,) err val= (2,) decoding errors= 0 / 18 measured= {'010100000': 1} tx= 0 rx= 0 err loc= (3,) err val= (0,) decoding errors= 0 / 19 measured= {'010110000': 1} tx= 1 rx= 1 err loc= (3,) err val= (0,) decoding errors= 0 / 20 measured= {'100000000': 1} tx= 0 rx= 0 err loc= (3,) err val= (1,) decoding errors= 0 / 21 measured= {'100010000': 1} tx= 1 rx= 1 err loc= (3,) err val= (1,) decoding errors= 0 / 22 measured= {'110100000': 1} tx= 0 rx= 0 err loc= (3,) err val= (2,) decoding errors= 0 / 23 measured= {'110110000': 1} tx= 1 rx= 1 err loc= (3,) err val= (2,) decoding errors= 0 / 24 measured= {'011000000': 1} tx= 0 rx= 0 err loc= (4,) err val= (0,) decoding errors= 0 / 25 measured= {'011010000': 1} tx= 1 rx= 1 err loc= (4,) err val= (0,) decoding errors= 0 / 26 measured= {'111100000': 1} tx= 0 rx= 0 err loc= (4,) err val= (1,) decoding errors= 0 / 27
{ "domain": "quantumcomputing.stackexchange", "id": 4259, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "qiskit, error-correction, quantum-circuit, simulation, stim", "url": null }
c#, generics, inheritance, static public class BCA : BC { private BCA() { } public static BCA Init(BOConfigBase config) { BCA ret = new BCA { Config = config }; return ret; } public override void Process() { Config.Counter += 1; } } To call this, I will do this : static void Main() { { var boConfigOne = new BOConfigOne() { A = "one", B = "one", C = "one", One = "one" }; var testBO = new BOOne(boConfigOne); testBO.Init(); testBO.Process(); Console.WriteLine( $"A = {boConfigOne.A}, B = {boConfigOne.B}, C = {boConfigOne.C}, One = {boConfigOne.One}, Counter = {boConfigOne.Counter}"); }
{ "domain": "codereview.stackexchange", "id": 34260, "lm_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#, generics, inheritance, static", "url": null }
homework-and-exercises, classical-mechanics \begin{equation} \ddot{x}+\omega_0x=g-\omega_0^2l+(\omega_0^2-\omega^2)a\sin\omega t \end{equation} I am not confident about this solution since when $\omega=\omega_0$, the driven oscillation in the equation disappears. What did I do incorrectly? Let's check your answer starting back at Newton's 2nd Law: $$F_{net} = m \ddot{x}$$ $$F_{spring} + F_{gravity} = m \ddot{x}$$ $$-k (x - x_{spring} - l) + m g = m \ddot{x}$$ $$-k (x - a sin(\omega t) - l) + m g = m \ddot{x}$$ $$-k x + a k sin(\omega t)) + k l + m g = m \ddot{x}$$ $$\ddot{x} + \frac{k}{m} x = g + \frac{k l}{m} + \frac{a k}{m} sin(\omega t))$$ Substituting $\omega_0 = \sqrt{\frac{k}{m}}$, we get our equation of motion: $$\ddot{x} + \omega^2_0 x = g + \omega^2_0 l + a \omega^2_0 sin(\omega t))$$ To check that this is plausible, we can find solutions of the form $$x = \alpha sin(\omega t) + \beta$$ Substituting and finding $\alpha$ and $\beta$,
{ "domain": "physics.stackexchange", "id": 19154, "lm_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, classical-mechanics", "url": null }
a disc of radius 25 cm is. That is, it is the inertia of a rigid rotating body with respect to its rotation. {I pq = mm4} 10. Planar and polar moments of inertia both fall under the classification of "second moment of. It should not be confused with the second moment of area, which is used in beam calculations. May 17, 2019 Mirielle Sabety, Keane Wong, Anthony Moody Purpose: The purpose of today's lab is to measure the moment of inertia of a triangle about it's center of mass with in 2 different orientations. They will make you ♥ Physics. In other words, if your moment of inertia measurement instrument has 0. 1) Prove that the centroid of any triangle of height h and base b is located 2/3 of the distance from the apex. height of triangle mounted is 240mm. Mass ball (m) = 100 gram = 100/1000. Neutral Axis/Moment of Inertia. m is mass and r is the distance from the axis. 70 cm with point P in the middle of the side and the other two sides. RIGID BODIES - MOMENT OF INERTIA The inability
{ "domain": "comprensivobovalino.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9830850892111574, "lm_q1q2_score": 0.8255299405512132, "lm_q2_score": 0.8397339656668286, "openwebmath_perplexity": 419.44107317169556, "openwebmath_score": 0.6266876459121704, "tags": null, "url": "http://comprensivobovalino.it/yofy/moment-of-inertia-of-triangle-about-apex.html" }
electromagnetism, special-relativity, metric-tensor Title: Matrix representation of electromagnetic tensor, with 1 index covariant and 1 index contravariant Leafing through the notes of one of my professors, I found this particular relationship: $$ \det F^\mu{}_\nu=-(\bar B\cdot\bar E)^2. $$ I already know the matrix structure of $F^{\mu\nu}$ and $F_{\mu\nu}$. But how can this representation be proven? The transformation of co- to contravariant and back is given in special relativity by the most simple metric tensor: $$\eta^\mu {}^\nu=\eta_\mu {}_\nu=\text{diag}(1,-1,-1,-1).$$ (Sometimes one also finds the convention $ \text{diag}(-1,1,1,1)$)
{ "domain": "physics.stackexchange", "id": 76774, "lm_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, special-relativity, metric-tensor", "url": null }
ros, sbpl Title: Unable to locate package ros-indigo-sbpl hello .. I'm trying to install SBPL from pre-built binary package using this command 'sudo apt-get install ros-indigo-sbpl" but it seem there is an error "E: Unable to locate package ros-indigo-sbpl" .. I tried to update apt-get but the problem is still not solved what shall i do? Originally posted by hiba on ROS Answers with karma: 3 on 2014-11-22 Post score: 0 Per the sbpl wiki page and the Indigo buildfarm status page, SBPL is not yet released into Indigo. You'll have to build it from source: https://github.com/sbpl/sbpl Originally posted by ahendrix with karma: 47576 on 2014-11-22 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by hiba on 2014-11-23: thank you for replay ... I was using the same link and i stuck in step 2 ... do you mean this step should be skipped?? Comment by ahendrix on 2014-11-23: Which link? There are three in my answer
{ "domain": "robotics.stackexchange", "id": 20121, "lm_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, sbpl", "url": null }
python, integer Title: Finding shortest sequences of integers whose product is larger than n Here is the task: For an integer n, return a list of the k length integers sequences whose product is larger than n but as close to n as possible (i.e. smallest larger than n number), and whose largest member is the smallest possible. For each sequence length k, there is one such sequence, and we want to have the sequences for all possible k's. 1 doesn't count as a valid member. The sequences are ordered from largest to smallest member. For example, for n=100, the longest non-trivial sequence is with k=7 and is [2, 2, 2, 2, 2, 2, 2]. sequences with k>7 will be just an extension to this sequence (i.e. additional 2's appended to this list) and thus we will disregard them as trivial and will not care for them.
{ "domain": "codereview.stackexchange", "id": 22094, "lm_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, integer", "url": null }
reinforcement-learning, q-learning, actor-critic-methods Title: Relationship between Rewards and Q Value (Graph between Q(s, a) vs episodes) I'm employing the Actor-Critic algorithm. The critic network approximates the action-value function, i.e. $Q(s, a)$, which determines how good a particular state is, when provided with an action. $Q(s, a)$ is approximated using the backpropagation of the temporal difference error (TD error). We can understand that $Q(s, a)$ has been approximated properly when TD error is minimized, i.e. when it is saturated at lower values. My question is, when exactly can you say that $Q(s, a)$ is approximated properly, if you don't have TD error, i.e. if you have to plot the graph between $Q(s, a)$ vs episodes, then what would be the optimal behaviour? Will it be increasing exponential with saturation value around reward values, or increasing exponential with saturation (around any value)? Follow up: What can be the possible mistake, if the output of Q-value function is around 5x the rewards, and not saturating? TLDR;
{ "domain": "ai.stackexchange", "id": 2581, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, q-learning, actor-critic-methods", "url": null }
theory Real RAM machines are used to describe idealized numerical computations. They are most commonly used in computational geometry. In some sense this is an example of hypercomputation, in that the Real RAM cannot be simulated by a Turing machine, since Turing machines can only handle finite strings (though recursion theory has fixes for that). Boolean circuits are a theoretical model popular in complexity theory and theoretical cryptography, and also used to study certain algorithm (under the name bit complexity), for example fast integer multiplication. They might be inspired by actual digital circuits, but in practice are probably a poor model for those. Algebraic circuits are the "Real RAM" analog of Boolean circuit. They make an appearance when studying fast matrix multiplication, as an example.
{ "domain": "cs.stackexchange", "id": 18445, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "theory", "url": null }
javascript, node.js, ecmascript-6, telegram // /help command bot.on('/help', (msg) => msg.reply.text('Usage:\n /imageof <your_word> sends you an random image.\nExample:\n/imageof dog - You\'ll get an random image of a dog.\n\nAbout:\nVersion: 2.0\nCreator: @CodeFox\nGitHub: https://github.com/CodeF0x/image-search-telegram-bot\nAll images are taken from https://unsplash.com.')); This is fine for now. But should your app grow, consider putting the messages in a dedicated object. This allows you to easily look up and modification of messaging without diving into code. var html = new JSDOM(response.body); // Parse the response var images = html.window.document.getElementsByClassName('_2zEKz'); // Get all images - in this case by class name, otherwise we would get profile pictures too var sources = []; // Array to pick random url from
{ "domain": "codereview.stackexchange", "id": 30868, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, node.js, ecmascript-6, telegram", "url": null }
So, we need to impose additional criteria (e.g. that the topological space $Y$ is Hausdorff, or, stronger, that it is a metric space). Then you can prove the following (fairly trivial) statement (see: $X$ is Hausdorff if and only if the diagonal of $X\times X$ is closed): (1) In $Y\times Y$, the diagonal $D_Y=\{(y,y)\mid y\in Y\}$ is closed. In a metric space, the proof that the diagonal is closed is much easier: note the map $d:Y\times Y\to\mathbb R$ (distance) is continuous, and the diagonal is the pre-image of the closed set $\{0\}$. Also, the following is always valid (see: Continuity of cartesian product of functions between topological spaces): (2) The function $f\times g:X\to Y\times Y$, where we define: $(f\times g)(x)=(f(x), g(x))\in Y\times Y$, is continuous. Thus, combining (1) and (2): the pre-image of $D_Y$ in $f\times g$ is a closed subset of $X$ containing $S$, so it must contain $\overline{S}=X$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9643214532237354, "lm_q1q2_score": 0.8307997746980301, "lm_q2_score": 0.8615382058759129, "openwebmath_perplexity": 152.90477278562483, "openwebmath_score": 0.9327051639556885, "tags": null, "url": "https://math.stackexchange.com/questions/2651803/proof-verification-f-g-continuous-agree-on-a-dense-subset-implies-agree-on" }
machine-learning, random-forest From here, the variance of the expected generalization error of an ensemble corresponds to: where p(x) is the Pearson’s correlation coefficient between the predictions of two randomized models trained on the same data from two independent seeds. If we increase the number of DT's in the RF, larger M, the variance of the ensemble decreases when ρ(x)<1. Therefore, the variance of an ensemble is strictly smaller than the variance of an individual model. In a nutshell, increasing the number of individual randomized models in an ensemble will never increase the generalization error.
{ "domain": "datascience.stackexchange", "id": 4957, "lm_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, random-forest", "url": null }
python, beginner, python-3.x, statistics Title: Program to accept numbers, then calculate the mean, median, and range I created a basic program that allows a user to continuously input values until he or she is satisfied; furthering, the program outputs the mean, median, and range. Then, the code gives you the option to run it again or exit. #Mean, median, and range from clear import * def main(): clear() list_one = [] while True: q = input('Type a number or type stop at any time: ').lower() if q.isnumeric(): list_one.append(int(q)) print(''' Great choice! Choose again or type stop the sequence.''') elif q == 'stop': list_one.sort(key=int) print(''' And the values are...''') def mean(): return 'Mean: ' + str(sum(list_one)/len(list_one))
{ "domain": "codereview.stackexchange", "id": 32310, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-3.x, statistics", "url": null }
ros, ros-melodic, rosout Original comments Comment by gvdhoorn on 2018-08-25: I'm confused: are you starting multiple masters? Comment by knxa on 2018-08-25: No, but I can see my title wasn't chosen well. Sorry. I just want this parameter to be set no matter which roslaunch file I run, for any rostest etc., without having to define it multiple places. Comment by gvdhoorn on 2018-08-26: Updated your title. Couldn't really come up with something 'catchy', but this at least covers the question better I believe. Comment by gvdhoorn on 2018-08-26: As to the question I don't believe that is currently supported. Not officialy anyway. Edit: you might take a look at wiki/roscore. Editing roscore.xml might be a way to get this in there, but that file is managed by your pkg manager by default. I don't .. Comment by gvdhoorn on 2018-08-26: .. know whether you can provide an override for it. See ros/ros_comm/tools/roslaunch/resources/roscore.xml for the default contents.
{ "domain": "robotics.stackexchange", "id": 31637, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-melodic, rosout", "url": null }
• Do what you want. Mark it as a duplicate. I do not care about the upvotes. Ah, by the way: The group must be finite. Imagine that if we have group $(\mathbb Z_n,\overline +)$ it has infinite elements and in this way it is impossible to verify the associativity. – manooooh Jul 24 '18 at 17:27 • I don't want to mark it as a duplicate. What I find most interesting about this discussion is that there are two distinct questions, and the question "is this a group?" which seems to be asking more than the question "is this operation associative?" is actually easier to answer. I am not sure what you mean by $({\mathbb Z}_n,\mp)$. ${\mathbb Z}_n$ normally denotes a finite set/group/ring of size $n$. – Derek Holt Jul 24 '18 at 17:54
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9678992923570262, "lm_q1q2_score": 0.8148024521037371, "lm_q2_score": 0.8418256512199033, "openwebmath_perplexity": 214.5843932644968, "openwebmath_score": 0.8026933073997498, "tags": null, "url": "https://math.stackexchange.com/questions/2859954/how-many-elements-have-to-verify-the-associativity-property-in-a-group/2859961" }
• @nomen: The question isn't asking about PA. The axioms listed uniquely define the natural numbers (at the price of requiring a set quantifier to state). Nov 21, 2019 at 22:24 • @nomen You're using PA to mean "first order Peano arithmetic". This is pretty standard nowadays among logicians, but actually Peano originally formulated his axioms in second order logic. Given a surrounding set-theory context (either informal, or say ZF), the second-order Peano postulates characterize $\mathbb{N}$ up to isomorphism. Nov 26, 2019 at 20:23
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9715639636617014, "lm_q1q2_score": 0.8117256988722478, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 269.8924925897593, "openwebmath_score": 0.871462881565094, "tags": null, "url": "https://math.stackexchange.com/questions/3444198/how-does-peano-postulates-construct-natural-numbers-only/3444371" }
python, cryptography, websocket # client.py Hello Rofl 123 Notes: In real I'd use SSL for my websocket connections. The simplified code does not support multiple clients. Questions: Is this a good implementation for encryption in a chat? I used RSA because I read that RSA was a good way send the derived key from client to server. But I don't understand: The AES key is generated from the derived key. The password entered by the client is send encrypted to the server. But the derived key used for the AES is send unencrypted from the server to the client. Couldn't someone with bad intentions not just intercept this derived key and use that to generate the same AES-key? I first thought it would make more sense to let the client generate a derived key and set it encrypted to the server. But each client would have a different salt? If my implementation is wrong, what to change? Other things to consider? Is this a good implementation for encryption in a chat?
{ "domain": "codereview.stackexchange", "id": 45227, "lm_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, cryptography, websocket", "url": null }
special-relativity, reference-frames $$ \vec{F} = m \vec {a} \Rightarrow \vec{0}=m\vec{a} \Rightarrow \vec{a} = \vec{0} $$ ($\vec{F}=\vec{0} $ as i 'let go of the particle of mas $m$') That results contradicts what I observe and therefore the second Law of Newton does not hold and by definition I am not an inertial reference frame. For the second case, we know that: $$ \vec{F}=m\vec{a} \Rightarrow -ma\hat{i}=m\vec{a} \Rightarrow \vec{a}=-a\hat{i} $$ This time, Newton's second law agrees with observation and therefore I am an inertial reference frame. The conclusion is that: If we have complete knowledge on the forces we know the kind of reference frame we're in. The thing is that in reality we are never able of determining the exact forces that are exerted on a particle. So how can we really know whether we are in an inertial reference frame or not ?
{ "domain": "physics.stackexchange", "id": 54226, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, reference-frames", "url": null }
python, python-3.x def isint(value): return isinstance(value, int) def isstr(value): return isinstance(value, str) def parttype(parttype): """ returns the partition type descriptor based on a string, int or hex partition type """ if ishex(parttype): return parttype_hex_2_description(parttype) if isint(parttype): return parttype_int_2_description(parttype) if isstr(parttype): return parttype_2_description(parttype) return def main(): print('do not run this interactively') print('import and call the parttype() function') return if __name__ == '__main__': main () The dictionary The naming rules in PEP 8 state: __double_leading_and_trailing_underscore__: "magic" objects or attributes that live in user-controlled namespaces. E.g. __init__, __import__ or __file__. Never invent such names; only use them as documented.
{ "domain": "codereview.stackexchange", "id": 20789, "lm_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", "url": null }
quantum-mechanics, wavefunction, potential, schroedinger-equation, quantum-tunneling $V(x) = \begin{cases} V_0 \, \, \, \text{for} \, \, x<0 \\ 0 \, \, \, \, \, \, \text{for} \, \, {0 \le x \le L} \\ V_0 \, \, \, \text{for} \, \, x> L\end{cases}$ with $V_0 > 0$. The spectrum of the corresponding Hamiltonian $H = - \frac{\hbar^2}{2m} \frac{d^2}{dx^2}+V(x)$ consists of discrete energy eigenvalues $0 < E_1 < E_2 < \ldots < V_0$ and a continuous spectrum $\sigma_{\rm c} = [V_0, \infty)$. The energy eigenfunctions (bound state wave functions) $\phi_n(x)$, being normalizable solutions of the eigenvalue equation $(H \phi_n)(x) =E_n \phi_n(x)$, behave as $\phi_n(x) \sim e^{-\kappa_n x}$ for $x> L$ and $\phi_n(x) \sim e^{\kappa_n x}$ for $x<0$, where $\kappa_n=\sqrt{2m (V_0-E_n)}/\hbar$. Being in contrast to the situation in classical mechanics, there is thus a non-vanishing probability to find a particle with energy $E< V_0$ in the region of a non-vanishing potential ($x<0$ and $x>L$, respectively).
{ "domain": "physics.stackexchange", "id": 92715, "lm_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, wavefunction, potential, schroedinger-equation, quantum-tunneling", "url": null }
lagrangian-formalism, mass, field-theory, classical-field-theory Thanks! P.S. I should note that I'm using $ \hbar = c = 1 $ units. I also presume that $ \phi $ has units of length (like oscillator displacement). P.P.S. While googling this question, I found how to use Fourier analysis of the equations of motion to prove that $ m $ represents the mass of the scalar field. While this is somewhat helpful, I'm really looking for an explanation of why we cannot simply extend the dependence on $ m $ from our intuition as a set of interconnected springs. I think you're confusing two different masses: the mass of the springs and the mass of the field quanta. Start with coupled masses-on-springs, of mass $M=1$ and spring constant $k$. Let's imagine that the springs are located on a 2d lattice, and they oscillate only in a 3rd direction.
{ "domain": "physics.stackexchange", "id": 33460, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lagrangian-formalism, mass, field-theory, classical-field-theory", "url": null }
python, programming-challenge, python-3.x, dynamic-programming Once upon a time in a strange situation, people called a number ugly if it was divisible by any of the one-digit primes (2, 3, 5 or 7). Thus, 14 is ugly, but 13 is fine. 39 is ugly, but 121 is not. Note that 0 is ugly. Also note that negative numbers can also be ugly; -14 and -39 are examples of such numbers. One day on your free time, you are gazing at a string of digits, something like: 123456 You are amused by how many possibilities there are if you are allowed to insert plus or minus signs between the digits. For example you can make 1 + 234 - 5 + 6 = 236 which is ugly. Or 123 + 4 - 56 = 71 which is not ugly. It is easy to count the number of different ways you can play with the digits: Between each two adjacent digits you may choose put a plus sign, a minus sign, or nothing. Therefore, if you start with D digits there are 3^D-1 expressions you can make. Note that it is fine to have leading zeros for a number. If the string
{ "domain": "codereview.stackexchange", "id": 24906, "lm_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, programming-challenge, python-3.x, dynamic-programming", "url": null }
molecular-orbital-theory, metal Circled are orbitals both containing $2$ electrons each which combine using LCAO to give a set of bonding and antibonding electrons. However, the $4$ electrons involved in this bonding appear to only give $3$ electrons in the bonding and antibonding MO's produced. This confuses me. Surely using $4$ electrons, I expect all $4$ of these electrons to also be present in the rectangle drawn. Why are there only 3 electrons shown? Is one electron being used for the next addition of AOs? Any answers would be greatful! From left to right, it shows 1, 2, 3, and 4 atoms of sodium, with a total of 1, 2, 3, and 4 valence electrons. So this diagram is different from others which have the uncombined AO's on the left and right, and the combined MO's in the middle. Here, we are adding more and more atoms to go from discreet energy levels (left 4 columns, up to four atoms) to a band structure (rightmost column, many atoms in bulk metal).
{ "domain": "chemistry.stackexchange", "id": 12132, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "molecular-orbital-theory, metal", "url": null }
I don't understand the argument, can anyone shed some light on this? • This may help: math24.net/… – David Mitra Jan 27 '12 at 21:50 • Also, see page 27 onward here: google.com/… – David Mitra Jan 27 '12 at 22:04 • If you differentiate once more, you will obtain a linear combination of linearly independent functions equal everywhere to zero. It contradicts to the linear independence of functions. – Vladimir Kalitvianski Jan 28 '12 at 10:58 • Looking at the links David left, pg. 670 of the Pete Olver textbook chapter pdf has a good answer. It seems that it is because, even though the limits are stated, the series is still converging to the sawtooth and not x, so the differentiation is converging to the differential of the sawtooth, i.e. $1-2\pi\delta(x-\pi)$. I had considered this but assumed that because in the question was explicit about the limits, this was not an issue and would converge to x ... – Brendan Jan 28 '12 at 19:55
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693241956308277, "lm_q1q2_score": 0.8013517406675802, "lm_q2_score": 0.8267117898012104, "openwebmath_perplexity": 319.14160113499815, "openwebmath_score": 0.9580826163291931, "tags": null, "url": "https://math.stackexchange.com/questions/103097/performing-a-differentiation-on-a-fourier-series" }
c++, state-machine, sfml, entity-component-system, pong #pragma once #include <SFML/Graphics/Transformable.hpp> namespace SFML { class Transform { public: void set_origin(const Vector_2 <float>& origin) { sfml_transformable.setOrigin(origin.x, origin.y); }; void set_position(const Vector_2 <float>& position) { sfml_transformable.setPosition(position.x, position.y); }; void set_rotation(const float& degrees) { sfml_transformable.setRotation(degrees); }; void set_scale(const Vector_2 <float>& scale) { sfml_transformable.setScale(scale.x, scale.y); }; Vector_2 <float> get_position() const { return sfml_transformable.getPosition(); }; float get_rotation() const { return sfml_transformable.getRotation(); }; Vector_2 <float> get_scale() const { return sfml_transformable.getScale(); }; const sf::Transform& get() const { return sfml_transformable.getTransform(); };
{ "domain": "codereview.stackexchange", "id": 42092, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, state-machine, sfml, entity-component-system, pong", "url": null }
c * * @param ptr Name of pointer to free. */ #define FREE_SAFE(ptr) \ do { \ free(ptr); \ ptr = NULL; \ } while(0) Next, let us define the header with macros used to generate declarations and definitions, respectively. Also, note that a benefit of this is to make the data type opaque. // dynarr.h #ifndef DYNARR_H #define DYNARR_H #include <stdlib.h> #include "utils.h"
{ "domain": "codereview.stackexchange", "id": 43023, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c", "url": null }
c++, algorithm, c++11, graph, homework Overly old style Adding the extra space between > characters in a template has been fixed 5 years ago. vector<vector<int> > games; // Be consistent and dont add the space vector<vector<int>> games; Global mutable state All the above variables are at file level scope (commonly referred to as global variables). This is BAD design. global mutable state makes the program hard to test and validate. You should "probably" wrap these in a class object with the following functions being members of that class. Then declare an instance of the object inside main. Parameter passing Passing an array and a size is notoriously dangerous. bool BFS(vector<vector<int> > residualCapacity, int parent[], int source, int sink) ^^^^^^^^^^^^^^^^^^^^^^^^^^
{ "domain": "codereview.stackexchange", "id": 19963, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, algorithm, c++11, graph, homework", "url": null }
frequency-spectrum, fourier-series, integration Title: Determine spectrum amplitudes for half-wave rectified sine I am trying to learn how to solve a bunch of digital signal problems and I have trouble understanding the solutions provided by this book I'm using. Basically, this problem asks me to determine spectrum amplitudes for half-wave rectified sine, as the title mentions. The signal looks like this: The development in complex (exponential) Fourier series will be given by: What properties are used to get to this answer? I don't get from where did the came from. Full solution: I was missing the red n. From that and using
{ "domain": "dsp.stackexchange", "id": 2049, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "frequency-spectrum, fourier-series, integration", "url": null }
electromagnetism, lagrangian-formalism, field-theory, gauge-theory Exercise for the reader: Show that if $A_\mu = \Omega^{-1} \partial_\mu \Omega$, then $$(dA)_{\mu\nu} \equiv \partial_\mu A_\nu - \partial_\nu A_\mu = -[A_\mu,A_\nu]$$ so the $\frak{g}$-valued(!) 2-form $F$ with components $F_{\mu\nu} \equiv (dA)_{\mu\nu} + [A_\mu,A_\nu] = 0$. Furthermore, show that under change of gauge, $F \mapsto \Omega F \Omega^{-1}$.
{ "domain": "physics.stackexchange", "id": 74435, "lm_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, lagrangian-formalism, field-theory, gauge-theory", "url": null }
quantum-mechanics, symmetry It is evident that every unitary or antiunitary operator induces a map satisfying (1). This is the reason why one says that symmetries are all of unitary or antiunitary operators over ${\cal H}$. Since $\langle U\psi| A U\psi\rangle = \langle \psi| (U^*A U)\psi\rangle$, acting on pure states with symmetries $\psi \to U\psi $ is equivalent to acting on observables $A \to U^*AU$. Hence, one can define a "dual" action on symmetries on observables: $$A \to U^*AU$$ All that makes sense if no superselection rules occur so that every unit vector represent a pure state (up to phases), otherwise a different notion of symmetry due to Kadison is more appropriate (equivalent to Wigner's one in the standard case). A dynamical symmetry is a (unitary) symmetry $U$ with the following property with respect to the temporal evolutor of the system $V_t = e^{-itH}$: if I modify the initial state $\psi$ with $U$, the evolution $\psi_t = V_t\psi$ of $\psi$ changes with the same rule
{ "domain": "physics.stackexchange", "id": 52160, "lm_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, symmetry", "url": null }
homework-and-exercises, newtonian-mechanics, rotational-dynamics, moment-of-inertia Title: Rotational Inertia of a Disc and Subsequent Acceleration This is more of a conceptual problem as opposed to anything wrong with the maths! (I think/I hope! :) ) But essentially the problem states: imagine a circular flat disc of radius $R$ and of mass $m$ that rests on a rough horizontal table. A light string is wound onto the disc and constant tension $T$ (where $T=mg$) is applied vertically downwards to the free end. There is no slip between the disc and the table. Show that the acceleration from rest at the centre of the disc is $2g/3$.
{ "domain": "physics.stackexchange", "id": 18795, "lm_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, rotational-dynamics, moment-of-inertia", "url": null }
spacetime, information, complex-systems This means that we have: $$ a = \left( \sum_{n=0}^{6·10^{32}} P_{6·10^{32}}^{6·10^{32}-n,n} \right)^{6·10^{32}} = \left( 2^{6·10^{32}} \right)^{6·10^{32}} $$ So, it is sometimes heard that the number of atoms in the observable universe is $10^{85}$. For some people, it is weird that chess is more complex than the number of atoms of the observable universe, since chess it is actually in the universe. But what I say is that if we take 1 cm³ of space, we are going to have a complexity much bigger than chess or even go. So, Does it make sense to talk about such a thing as the complexity of space?
{ "domain": "physics.stackexchange", "id": 67353, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spacetime, information, complex-systems", "url": null }
sql, sql-server, t-sql Title: Complex reporting query suggestion needed for different approach as per latest Tsql format We have recently migrated from SQL Server 2008 R2 to SQL Server 2017 web edition. I am not a SQL developer but enthuses to learn. Since many of our scrips are of old SQL format, I am searching for some alternative to leverage new T-SQL formats to help optimize the codes. Below is one example which I believe can be modified using some different approach. It will be helpful for me if someone suggest me some approaches so that I can learn in detail about them. Below query is for report it uses UNION ALL, the first part fetches data of ID for which payments are done incorrectly marked as 'recoup' and second part fetched data for the same ID it amount of payment required to be done. SELECT TOP 200 'Recoup',ERH_DOC_DATE,ERH_DOCNO,ERH_RECV_FROM,ERD_BLH_ID,BLD_CODE,A.ERD_ALLOWED_AMT,A.ERD_PAID_INS_AMT FROM TRN_ERA_HEAD,TRN_ERA_DET A,TRN_BILLING_DET
{ "domain": "codereview.stackexchange", "id": 42255, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sql, sql-server, t-sql", "url": null }
production rates of Hamiltonian systems in an external field, thermostatted to obtain a stationary state are considered. Hi guys, I need your help to know how to draw the phase trajectory of a system in the phase plane. In c, we present the probability distributions at times t = 0, t = 1 and t = 6 in the first configuration, i. In an n dimensional phase space, the generator of the time translation can be written in terms of a Hamiltonian and a set of Poisson brackets for the phase space variables. In particular, if the Hamiltonian is returned to its original form the system will return to its original state, apart from a phase factor. The inside region, where the pendulum oscillates back and forth, corresponds to. This has been quantified in terms of the notion of “singular structures’ in the Lagrangian descriptor plots, which are easy to recognize visually (Mancho, Wiggins et al. 10 ) subject to the 2-point boundary conditions , equations. The independence of path is a result of the
{ "domain": "alexborsci.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9822877033706598, "lm_q1q2_score": 0.8053711484277776, "lm_q2_score": 0.8198933425148213, "openwebmath_perplexity": 837.5383784951399, "openwebmath_score": 0.7293795943260193, "tags": null, "url": "http://alexborsci.it/phase-space-trajectory-from-hamiltonian.html" }
performance, validation, r "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q", "B10011Q"), DAY = c("1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2",
{ "domain": "codereview.stackexchange", "id": 14442, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, validation, r", "url": null }
Super-logarithm on the imaginary line - Printable Version +- Tetration Forum (https://math.eretrandre.org/tetrationforum) +-- Forum: Tetration and Related Topics (https://math.eretrandre.org/tetrationforum/forumdisplay.php?fid=1) +--- Forum: Mathematical and General Discussion (https://math.eretrandre.org/tetrationforum/forumdisplay.php?fid=3) +--- Thread: Super-logarithm on the imaginary line (/showthread.php?tid=88) Super-logarithm on the imaginary line - andydude - 11/15/2007 I just found a way to calculate slog on the imaginary axis! It depends very much on Jay's observation that slog is imaginary-periodic. Let $S(x) = \text{slog}_e(i x)$. S is periodic with period $2\pi$, because $S(x + 2\pi) = \text{slog}(i (x + 2\pi)) = \text{slog}(i x + 2i\pi) = \text{slog}(i x) = S(x)$. Since S is periodic, we can use Fourier series to represent it. Let $R(x) = S(-i\ln(x))$, then $R(e^{ix}) = S(x)$. The Taylor series coefficients of R will then be the Fourier series coefficients of S. In terms
{ "domain": "eretrandre.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713831229043, "lm_q1q2_score": 0.8231780262323485, "lm_q2_score": 0.8354835432479661, "openwebmath_perplexity": 453.08515119741, "openwebmath_score": 0.8964579105377197, "tags": null, "url": "https://math.eretrandre.org/tetrationforum/printthread.php?tid=88" }
• Can you show that $|b| \leq 1$ is also a sufficient condition for the convergence of the sequences? – cpiegore Feb 20 '16 at 14:35 • @cpiegore : as I shown it reduces to solving the convergence of $c_{n+1} = b(e^{c_n}-1)$ which is easy in $\mathbb{R}$ but much less in $\mathbb{C}$. it is probably already solved somewhere so make a research. and you'll probably have to show by induction that $Re(c_n)$ and $|c_n|$ let $c_n$ converge, maybe by studying $arg(c_n)$ ? you could also simulate the sequence on a computer to see what is happening when it converges or diverges (and I don't think it converges for most $|b| = 1$). – reuns Feb 20 '16 at 22:58
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9863631643177029, "lm_q1q2_score": 0.801782373085416, "lm_q2_score": 0.8128673110375457, "openwebmath_perplexity": 88.14897015906828, "openwebmath_score": 0.9507485032081604, "tags": null, "url": "https://math.stackexchange.com/questions/1652846/convergence-or-divergence-of-infinite-power-towers-of-complex-numbers-zzz" }
# Proving a sequence has limit using an epsilon - N argument I have two separate sequences that I using this approach on. $$a_n=\frac{n^3-2n^2+3}{2n^3+7n}$$ & $$a_n=\frac{n^3}{2^n}$$ Proof 1 $$a_n=\frac{n^3-2n^2+3}{2n^3+7n}\to \frac{1}{2}$$ $$\text{Let } \epsilon \gt 0 \,\, \exists N \;\;\forall n\geq N \; \left\lvert {a_n-\frac{1}{2}}\right\rvert \lt \epsilon$$ $$\left\lvert {\frac{n^3-2n^2+3}{2n^3+7n}-\frac{1}{2}}\right\rvert=\left\lvert {\frac{(2n^3-4n^2+6)-(2n^3+7n)}{4n^3+14n}}\right\rvert=\left\lvert {\frac{-4n^2-7n+6}{4n^3+14n}}\right\rvert \lt \frac{1}{2n} \lt \epsilon$$ $$\frac{1}{2\epsilon} \lt n$$ I am having difficulty in showing exactly why, $$\left\lvert {\frac{-4n^2-7n+6}{4n^3+14n}}\right\rvert \lt \frac{1}{2n}$$ Proof 2
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9780517434062462, "lm_q1q2_score": 0.8041435061247112, "lm_q2_score": 0.8221891239865619, "openwebmath_perplexity": 354.5774599873581, "openwebmath_score": 0.9207504391670227, "tags": null, "url": "https://math.stackexchange.com/questions/3167746/proving-a-sequence-has-limit-using-an-epsilon-n-argument" }
Any ideas of how to get past just this part? • Pull an $x^2$ out and note that $$\frac{d}{dx}\left(\frac{1}{1-x}\right)=1+2x+3x^2+4x^3+...$$ Oct 22, 2016 at 1:56 • @Eleven-Eleven If I use your idea then I would get $F(x)=1+2xF(x)+\frac{1}{(1-x)^2}$, this equals $F(x)=\frac{(1-x)^2+1}{(1-2x)(1-x)^2}$ then I could use partial fractions to separate this into three terms with a $1-\underline{}x$ in the denominators, find a summation and find $a_n$ Oct 22, 2016 at 2:21 • Yes except you have $x^2$ in the numerator, not 1. Oct 22, 2016 at 2:27 • For all things generating functions, look up Wilf's Generatingfuntionology... it is free to download online and you get all the tricks to solve such expression... Oct 22, 2016 at 2:32
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773707993078211, "lm_q1q2_score": 0.8542975547688564, "lm_q2_score": 0.8740772236840656, "openwebmath_perplexity": 267.4933318592511, "openwebmath_score": 0.9189510941505432, "tags": null, "url": "https://math.stackexchange.com/questions/1979381/assume-that-a-n-infty-n-0-is-a-sequence-given-by-a-0-1-and-a-n1-2" }
are eigenvectors always orthogonal eigenvalues.. what if two of the eigenfunctions are orthogonal to know span the whole area... Related are eigenvectors always orthogonal distinct eigenvalues are orthogonal Hermitian matrix has always 1 as an eigenvalue n't! Eigenvalue 5 be linearly independent to each others of eigenvectors need be orthogonal square matrix do! Be, mutually orthogonal every set of eigenvectors need are eigenvectors always orthogonal orthogonal a product, where proved only... U, another rotation repeated eigenvalues, we conclude that the third eigenvector is not orthogonal one! ϬNd mutually are eigenvectors always orthogonal eigenvectors ( though not every set of eigenvectors need be orthogonal ) a Hermitian matrix has eigenvectors... Orthogonal eigenvectors with different eigenvalues of real, since we can always an! Finally is the family of real, since we can use any linear combination choose. Generalize the above argument to three or more degenerate eigenstates
{ "domain": "painbenit.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9822877044076955, "lm_q1q2_score": 0.8206852117674522, "lm_q2_score": 0.8354835432479661, "openwebmath_perplexity": 630.5071021837142, "openwebmath_score": 0.8961015939712524, "tags": null, "url": "https://www.painbenit.com/paymaster-services-uathy/are-eigenvectors-always-orthogonal-7b9981" }
\sqrt{\ensuremath{\pi} }\right) }}}-1\right)$ But Maxima offers another possibility for defining functions, called lambda functions, which are extremely powerful. The idea is to work with unnamed functions, as when one says 'consider the function that sends the variable argument u to the expression u^2+1'. This is done as follows: (%i29) lambda([u],u^2+1); $\tag{%o29} \operatorname{lambda}\left( [u],{{u}^{2}}+1\right)$ Obviously, this can't be used as it stands, but we can say something like 'map the function that squares its argument and sums 1 to the result' to every element in the list [1,2,3,4], like this: (%i30) map(lambda([u],u^2+1),[1,2,3,4]); $\tag{%o30} [2,5,10,17]$ Isn't it magic? Maxima can compute the numerical values of all the standard functions. As an example, consider the value at 14.5 of the Bessel function of the first kind J0: (%i31) bessel_j(0,14.5); $\tag{%o31} 0.08754486801037642$ Next, we are going to compute a real root of J0(x) near x=14.5, with a 20-digits
{ "domain": "uaslp.mx", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.972830769252026, "lm_q1q2_score": 0.8085615346754277, "lm_q2_score": 0.8311430520409023, "openwebmath_perplexity": 8210.193559783387, "openwebmath_score": 0.9115439653396606, "tags": null, "url": "http://galia.fc.uaslp.mx/~jvallejo/Maxima%20Mini-Tour%2019-May-2019.html" }
python, performance, object-oriented, game def __init__(self): self.wall_list = self.goal_list = self.enemy_list = self.victory_sprite = None self.collectedCoins = 0 self.numCoins = 0 self.background = None def setup_room_1(): room = Room() room.wall_list = arcade.SpriteList(use_spatial_hash=True) room.enemy_list = arcade.SpriteList() room.goal_list = arcade.SpriteList(use_spatial_hash=True) room.victory_sprite = arcade.SpriteList(use_spatial_hash=True) # Draw platforms and ground for x in range(0, SCREEN_WIDTH, SPRITE_SIZE): wall = arcade.Sprite(":resources:images/tiles/grassMid.png", SPRITE_SCALING) wall.bottom = 0 wall.left = x room.wall_list.append(wall) for x in range(SPRITE_SIZE * 3, SPRITE_SIZE * 8, SPRITE_SIZE): wall = arcade.Sprite(":resources:images/tiles/grassMid.png", SPRITE_SCALING) wall.bottom = SPRITE_SIZE * 3 wall.left = x room.wall_list.append(wall)
{ "domain": "codereview.stackexchange", "id": 39842, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, object-oriented, game", "url": null }
c#, object-oriented is should be Capitalized, with no underscores in the beginning(preferably none in the rest of the name), and a property, meaning it has the {get; set;} or the more lengthy getters and setters you used in the OP.
{ "domain": "codereview.stackexchange", "id": 6557, "lm_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", "url": null }
The max norm is not the (absolute value of) the function at one specific point, but at a point that depends on the function itself. In a more general setting where functions are not necessarily continuous, it is called the supremum norm. The integral of $|f|$ cannot be higher than the length of the integration interval multiplied by the maximum of $|f|$ because of the definition of the Riemann integral (the constant function $\max(|f|)$ defines an upper sum in the sense of the Riemann integral). On the other hand, one can construct positive continuous functions on the interval that have very small surface areas underneath their graphs, yet their maximum is defined by a very sharp spike.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9817357216481429, "lm_q1q2_score": 0.8223214332007046, "lm_q2_score": 0.8376199572530448, "openwebmath_perplexity": 236.765979993574, "openwebmath_score": 0.9554903507232666, "tags": null, "url": "https://math.stackexchange.com/questions/1553148/not-exists-number-c-geq-0-for-which-f-max-leq-cf-1-but-exist" }
complexity-theory, algorithm-analysis, probabilistic-algorithms $$(n - 1) + n - 1 - \ln|n| + 1 + \Theta(1) = 2n - 1 - \ln|n| + \Theta(1)$$ And we get the expected total number of comparions: $$2n - \ln|n| + \Theta(1)$$
{ "domain": "cs.stackexchange", "id": 11062, "lm_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, algorithm-analysis, probabilistic-algorithms", "url": null }
php, template Title: Handling views and templates My guts tells me that this isn't the proper way to handle views / templates, so that's why I'm asking you what could be done better. Some background: This application I'm building now is for use in a school project with people that don't have much knowledge of PHP. Therefore I'm not using a framework like Laravel, or implementing a whole template engine, but I'm trying it to keep as simple as possible while still using classes and code separation. The homeController: Class homeController extends BaseController { public function index() { $this->view->make("common/home"); } } The View class: Class View{ public static $file; public function make($file){ View::$file = $file; require_once DIR_VIEW . "default/template.php"; } } The template.php file: <!DOCTYPE html> <html> <head> <title>Just an title</title> </head> <body> <?php require_once 'header.php'; ?>
{ "domain": "codereview.stackexchange", "id": 10580, "lm_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, template", "url": null }
gazebo You could also try reducing the definition of your heightmap Originally posted by chapulina with karma: 7504 on 2018-05-30 This answer was ACCEPTED on the original site Post score: 0 Original comments Comment by Mansan on 2018-06-14: Thanks!This helped me a lot! Running gzserver doesn't slow down the simulation, and most of the time I dont need to use the client, so it is at least a partial solution.
{ "domain": "robotics.stackexchange", "id": 4271, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo", "url": null }
quantum-mechanics, quantum-field-theory, special-relativity, dirac-equation Don't split it into $\psi_{L/R}$ first, because that will only complicate things. Working with the original Dirac equation is easier. You can split it into $\psi_{L/R}$ after you're done with everything else, because $\gamma^5$ commutes with $K$.
{ "domain": "physics.stackexchange", "id": 78684, "lm_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, quantum-field-theory, special-relativity, dirac-equation", "url": null }
# Prove • August 12th 2008, 05:02 AM Ortega Prove Prove that: $\ \frac{1}{2}.\frac{3}{4}...\frac{{2n - 1}}{{2n}} < \frac{1}{{\sqrt {2n + 1} }},n > 1 \ $ • August 12th 2008, 05:52 AM CaptainBlack Quote: Originally Posted by Ortega Prove that: $\ \frac{1}{2}.\frac{3}{4}...\frac{{2n - 1}}{{2n}} < \frac{1}{{\sqrt {2n + 1} }},n > 1 \ $ use induction. RonL • August 12th 2008, 05:54 AM Ortega Quote: Originally Posted by CaptainBlack use induction. RonL yes i know to solve this problem using induction but i try another method, another method without induction. • August 12th 2008, 09:07 AM CaptainBlack Quote: Originally Posted by Ortega yes i know to solve this problem using induction but i try another method, another method without induction. Why do you not want to use induction on this. Also if it is a requirement on the problem, perhaps you should have mentioned it in the original post.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9835969708496457, "lm_q1q2_score": 0.8153416925714014, "lm_q2_score": 0.8289387998695209, "openwebmath_perplexity": 2240.3849390227656, "openwebmath_score": 0.9308773875236511, "tags": null, "url": "http://mathhelpforum.com/algebra/45809-prove-print.html" }
proof-assistants, software-testing So it seems that what we want to prove is that the system behaves as expected. And given we have defined how we want the system to work, the question is how to prove it matches the specification, at a high level. How much do we prove, how do we know the proofs actually prove what we want and the behavior will be what we want (and proven). I think you raise an important point, which is that in a high level language, specifications can be hard to distinguish from implementations. For example, in Coq, the specification of "The sum of the elements of a list of naturals" is probably going to look something like: Fixpoint sum (l : List Nat) : Nat := match l with | [] => 0 | x::xs => x + sum xs It's hard to imagine what the specification of this would be, other than some predicate like Inductive Is_Sum : Nat -> List Nat -> Prop := | IS_Empty : Is_Sum 0 [] | IS_Cons : Is_Sum s xs -> Is_Sum (x + s) (x::xs)
{ "domain": "cs.stackexchange", "id": 11430, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "proof-assistants, software-testing", "url": null }
nebula Title: Is this a real photo or an art work? I've never seen this Hubble picture, is it an artist impression? It's fascinating because there are voids apparently cause by supernovae. From the video 1 Hour of Epic Space Music: COSMOS - Volume 1 The deviant art mentioned in the information below the video is by Natasha Sharma, she has a different style than that. There are also real photos from hubble in the video, I can't tell if it is a genius space artist or a real photo. It is 'From Nothing', made by cosmicspark, a.k.a Tim Barton. This picture was painted from nothing, in roughly 12 hours while I listened to a lot of interesting lectures on physics, including Dr. Lawrence Krauss' famous lecture "A Universe From Nothing".
{ "domain": "astronomy.stackexchange", "id": 2609, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nebula", "url": null }
human-genetics, natural-selection, intelligence, human-evolution [...] a summary of fecundity and IQ would potentially answer my question but only if it accounted for the current selection process we see going on in modern technophile societies. This is problematic as to date it is really difficult, if not impossible, to detect recent selection. This is mainly due to the fact that most methods depend on detecting changes in allele frequencies over time and this needs a considerable number of generations to integrate over. There have been some efforts to develop more accurate methods, but looking at selection in the last 100 years (which you would need to be able to when looking at the technologically modern populations) is not possible so far. The best attempt I am aware of so far is Field et al. (2016, preprint) who looked, based on genome-wide association study data, at recent selection in the last 2000 years. However, they do not mention intelligence. Update: This paper was a pre-print. It is now published in Science: Field et al. (2016).
{ "domain": "biology.stackexchange", "id": 6160, "lm_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-genetics, natural-selection, intelligence, human-evolution", "url": null }
special-relativity, spacetime, metric-tensor, coordinate-systems, inertial-frames x\\ ict\\ \end{bmatrix} $$ $$ \begin{bmatrix} x'\\ ct'\\ \end{bmatrix} = \begin{bmatrix} cosh(\lambda) & sinh(\lambda)\\ sinh(\lambda) & cosh(\lambda)\\ \end{bmatrix} \begin{bmatrix} x\\ ct\\ \end{bmatrix} $$ Space-space parallelepiped strains leave $x^2-y^2$ invariant. Space-time parallelepiped strains leave $x^2-(ct)^2$ invariant. Rotations leave $x^2+(ict)^2$ invariant. Please see my answer to this question if you would like more math. I don't think "the reason we don't treat the time-axis like a usual space-axis is that we can't move backwards in time" is a good argument. However, if $ct>x$ a boost can not make $ct'<x'$ because $x^2-(ct)^2$ is invariant. Thus if an event is causal in the forward light cone then it is causal in the forward light cone in all boosted frames too. A real rotation of x and real ct could turn $ct>x$ into $ct'<x'$ and screw up causality.
{ "domain": "physics.stackexchange", "id": 66365, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, spacetime, metric-tensor, coordinate-systems, inertial-frames", "url": null }
php, game, image // black text for couloured tiles $textcolor = ImageColorAllocate($this->image, 0, 0, 0); } else { // display black rectangle for non-existing tile $backgroundColorRGB = imagecolorallocate($this->image, 0, 0, 0); imagefilledrectangle($this->image, 0, 0, self::CELL_SIZE, self::CELL_SIZE, $backgroundColorRGB ); // white text for couloured tiles $textcolor = ImageColorAllocate($this->image, 255, 255, 255); } } // set text $coordsString = "{$this->coordsX}:{$this->coordsY}"; ImageString($this->image, 1, 5, 5, $coordsString, $textcolor); // save to cache ImageJpeg($this->image, $cacheFilePath);
{ "domain": "codereview.stackexchange", "id": 5769, "lm_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, game, image", "url": null }
strings, f# let url = url + sprintf "&%s=%s" (fst valuePairs.[0]) (snd valuePairs.[0]) I would use pattern matching to extract the key and the value, instead of fst and snd. Also, why not make url part of the sprintf, to make the code more consistent? And, while "mutating" variables like this is allowed by the language (you're not actually mutating it, you're creating a new variable with the same name, that hides the old one), I would generally avoid it to avoid confusion. With these changes, the code would look like this: let key, value = valuePairs.[0] let newUrl = sprintf "%s&%s=%s" url key value Also, concatenating strings like this is pretty inefficient (since every new string has to copy the whole previous string). One way to fix that would be to use StringBuilder, but that leads to using mutable data structures. A better way would be to put all the parts into a collection (ideally a list) and then join them using String.Join().
{ "domain": "codereview.stackexchange", "id": 9189, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "strings, f#", "url": null }
And here are any eigenvalues. So, the final guy on this list allows any eigenvalues, any complex numbers. But the eigenvectors, I want to be orthogonal. So that's why I have the Q. So, how would you recognize such a matrix and what is the name for them? We're going beyond 18.06, because probably I don't mention the name for these matrices in 18.06, but I could. Anybody know it? A matrix of that form is a normal matrix. Normal. So, that's the total list, is a normal matrix. So, normal matrices look like that. I have to apologize for whoever thought up that name, normal. I mean that's like, OK. A little more thought, you could have come up with something more meaningful than just, say, normal. [INAUDIBLE] that's the absolute opposite of normal. Almost all matrices are not normal. So anyway, but that's what they're called. Normal matrices.
{ "domain": "mit.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9869795110351223, "lm_q1q2_score": 0.8092179216091193, "lm_q2_score": 0.8198933337131077, "openwebmath_perplexity": 546.3189445835717, "openwebmath_score": 0.7802076935768127, "tags": null, "url": "https://ocw.mit.edu/courses/mathematics/18-065-matrix-methods-in-data-analysis-signal-processing-and-machine-learning-spring-2018/video-lectures/lecture-31-eigenvectors-of-circulant-matrices-fourier-matrix/" }
javascript, angular.js function clearForm(){ $scope.userForm = createUserData(); } I also notice clear_form. JS naming convention uses camelCase for variables. For constants, SNAKE_CASE is usually used like any other language. profile: 'Mortal', Suggesting you store the profile as IDs (the numbers) instead of the text. The text is just the UI. That way, you don't have to be comparing strings to get the right value for the dropdown. For your password confirm, I suggest you create a directive that renders two inputs. For your app, a password confirm directive would look like a custom element: <password-confirm value="{{ userForm.password }}"></password-confirm> This way, the app isn't aware of the two inputs. Also, the logic remains inside the directive. All the app knows is that value binds to userForm.password on the controller. If both inputs are valid, userForm.password will have a value. Otherwise, the directive supplies something like null to userForm.password.
{ "domain": "codereview.stackexchange", "id": 18159, "lm_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, angular.js", "url": null }
ros, boost from /opt/ros/noetic/include/ros/publisher.h:35, from /opt/ros/noetic/include/ros/node_handle.h:32, from /opt/ros/noetic/include/ros/ros.h:45, from /home/marta/catkin_ws/src/imagineer/src/controller.cpp:1:
{ "domain": "robotics.stackexchange", "id": 36402, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, boost", "url": null }
Rod can transport 2 bars the distance in an hour if he takes two at a time. After each pair, he uses 1/3 hr to go back. So he can do that 3 times in 4 hours and is back at the starting point, where he can take another pair. After 5 hours he is at B with 8 bars. He can go back (20 min), get one more bar and hot-foot it (30 min) back to B at 5 hrs 50 minutes with 9 bars. Lisa needs 2/3 hr (40 min) to carry 1 bar and 1/2 hr (30 min) to come back for a total of 1 hr 10 min. After 4 hr 40 min, she would be back at the start having taken 4 bars. She can then bring her 5th bar arriving at 5 hr 20 minutes. This approach brings 14 bars and leaves them 20 minutes before the train arrives. It's tempting to try to use Lisa's spare 50 minutes and Rod's spare 20 minutes to bring another bar. But Lisa can't get back to A and then to B even empty handed in that time.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357591818725, "lm_q1q2_score": 0.8179682590320194, "lm_q2_score": 0.8354835371034368, "openwebmath_perplexity": 947.357799367172, "openwebmath_score": 0.5592548251152039, "tags": null, "url": "https://puzzling.stackexchange.com/questions/111626/the-thieves-and-the-gold-bars" }
algorithms The way to visualize this algorithm is with a tree whose paths are sequences of non-overlapping pairs. The first level of the tree contains all the pairs that contain 0. For the example above, the tree is Root | ---------------- | | | (0,1) (0,2) (0,3) | | | (2,3) (1,3) (1,2) In this example all the paths through the tree actually give correct collections, but for example if we left out the pair (1,2) then the rightmost path would have only one node and would correspond to the search in step 3 failing. Search algorithms of this type can be developed for many similar problems of enumerating all objects of a particular type.
{ "domain": "cs.stackexchange", "id": 17781, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms", "url": null }
decidability, logic-programming Now, what I want to do is to add both $+$ and $\times$ with their arithmetic semantics, i.e., I want to solve the decision problem: $$ \mathbb{N} \models \mathcal{Q}_1 x_1 \cdots \mathcal{Q}_n x_n \left[ t_1 = s_1 \land \cdots \land t_m = s_m \right] , $$ where $\mathcal{Q}_i$ is a quantifier, $x_i$ is a variable, $t_j$ and $s_j$ are terms; and terms are $\lambda$-terms extended with the constants $0$, $S$, $+$ and $\times$. I have concluded that one cannot add both + and × in the λProlog programming language with their arithmetic semantics since the decision problem is undeciable. Because if it was decidable then Hilbert's tenth problem would have a positive answer. See the Wikipedia page for Hilbert's tenth problem.
{ "domain": "cstheory.stackexchange", "id": 5136, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "decidability, logic-programming", "url": null }
security, bash, macos Title: Script to temporarily drop admin privileges Description The aim of my project is to allow administrators to drop privileges for reasons of self-control. Currently, it works only on MacOS Sierra but the concept should be extensible to any Unix compatible system. The sudoers mechanism is the workhorse. By adding a file in sudoers.d/ the administrator user (let's call him my-admin) is given permissions to run the script admin-helper as root. The admin-helper script when run, toggles my-admin's membership from the admin group. When the my-admin is not in the admin group, the user is only added after the script sleeps for 20 min. Files admin-helper #!/bin/bash set -e -u username=$SUDO_USER delay=$((60*20)) #20 minutes uGuid=$(dscl . -read /Users/$username/ GeneratedUID | sed -nE 's/GeneratedUID: (.*$)/\1/p')
{ "domain": "codereview.stackexchange", "id": 25521, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "security, bash, macos", "url": null }
stim, surface-code Title: Simulating the surface code with stim: meaning of qubit coordinates I would like to simulate the rotated surface code using stim for various code sizes. For my application, I would like to know where the stabilizers are located. What is the meaning of the coordinates provided by stim? Is it (X, Y, time)? If so, how is the code orientated? Ideally, I would like to have a function that maps between the stim coordinates, and the distance to the western (weight-2 Z stabilizer) and northern (weight-2 X stabilizer) boundary for different code sizes. I guess one could figure that out by studying the circuit diagrams. I would be happy to have a faster solution, such as the following figure picturing the surface code together with the stim coordinates:
{ "domain": "quantumcomputing.stackexchange", "id": 4702, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "stim, surface-code", "url": null }
Handbook on statistical distributions for experimentalists. The graph below describes the distribution of probabilities. Is the derivative of the probability distribution function. Plot of gaussian pdf x px introduction l gaussian probability distribution is perhaps the most used distribution in all of science. In this video, ill derive the formula for the normalgaussian distribution.
{ "domain": "web.app", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9912886157996523, "lm_q1q2_score": 0.8010278250138873, "lm_q2_score": 0.8080672089305841, "openwebmath_perplexity": 272.43198922359966, "openwebmath_score": 0.8616483211517334, "tags": null, "url": "https://scurupcalbu.web.app/251.html" }
• So the same plane can be used twice (one way and the other), is that so? Aug 5, 2018 at 19:44 • @Fimpellizieri: I guess the way I interpret the riddle, the answer is yes. I think this makes the riddle harder, because you have to keep track of when the returning planes arrive at the airport and are able to be sent out again in the other way. If you want to interpret the riddle to mean that planes can only be used once, then I think the solution is a little easier, but still an interesting problem. Aug 5, 2018 at 20:26 • @Jared as you said that the planes can refuel, then is the answer below correct? – user572932 Aug 5, 2018 at 21:25
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9848109516378094, "lm_q1q2_score": 0.8028498836448035, "lm_q2_score": 0.815232489352, "openwebmath_perplexity": 499.15102663797273, "openwebmath_score": 0.635242760181427, "tags": null, "url": "https://math.stackexchange.com/questions/2872604/getting-an-airplane-around-the-world" }
c++, c++11, library, pointers // op_wrapper wraps Op::operator() and dispatches to observer fn // observer fn then calls op_wrapper.op() to invoke Op::operator() // this redirection is needed to call the actual operation in a context when T is actually defined template <typename T, typename Op, typename R, typename ObserverFnSig> struct op_wrapper : public Op { using this_type = op_wrapper<T, Op, R, ObserverFnSig>; using return_type = R; // observer function to call ObserverFnSig observer_fn; template <typename Op_, typename Fn> constexpr op_wrapper( Op_&& op, Fn&& obs ) : Op( std::forward<Op_>( op ) ) , observer_fn( std::forward<Fn>( obs ) ) {}
{ "domain": "codereview.stackexchange", "id": 32615, "lm_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, library, pointers", "url": null }
\to {\mathbf A}^1_{\mathbf C} = \Spec({\mathbf C}[T])$ such that the (scheme theoretic) fibre $X_t$ of $f$ over $t \in {\mathbf A}^1_{\mathbf C}$ is (a) isomorphic to ${\mathbf P}^1_{\mathbf C}$ when $t$ is a closed point not equal to $0$, and (b) not isomorphic to ${\mathbf P}^1_{\mathbf C}$ when $t = 0$. We will call $X_0$ the {\it special fibre} of the morphism. This can be done in many, many ways. Try to give examples that satisfy (each of) the following additional restraints (unless it isn't possible): \begin{enumerate} \item Can you do it with special fibre projective? \item Can you do it with special fibre irreducible and projective? \item Can you do it with special fibre integral and projective? \item Can you do it with special fibre smooth and projective? \item Can you do it with $f$ a flat morphism? This just means that for every affine open $\Spec(A) \subset X$ the induced ring map $\mathbf{C}[t] \to A$ is flat, which in this case means that any nonzero polynomial in $t$ is
{ "domain": "github.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9854964220125032, "lm_q1q2_score": 0.8080019446376565, "lm_q2_score": 0.8198933315126792, "openwebmath_perplexity": 120.73245969658541, "openwebmath_score": 0.9982831478118896, "tags": null, "url": "https://github.com/stacks/stacks-project/blob/master/exercises.tex" }
regular-languages, finite-automata Title: I'm asked to draw DFA for this {$\epsilon$, 0} however I do not understand what {$\epsilon$, 0} mean I'm asked to draw a DFA of this {$\epsilon$, 0} but have no clue what it means. Can someone help me understand what the automata is supposed to do? I know that $\epsilon$ is the symbol for empty word. As an example having to make an automata for this {w| w contains at least two 0s and at most one 1} is pretty understandable but {$\epsilon$, 0} not so much. To put it simply I do not understand the problem question I'm asked. **Edit: I forget to specify that we have the alphabet {0,1} The problem is to find a DFA, such that the only two words it accepts are '$\epsilon$' - the empty word, and '0'
{ "domain": "cs.stackexchange", "id": 16250, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "regular-languages, finite-automata", "url": null }
thermodynamics This ties in with the everyday meaning of spontaneous, i.e. that it doesn't require any intervention. It just happens on its own. I've also seen spontaneous processes referred to as "natural", which seems to imply that there's something unnatural about non-spontaneous processes. As if they required some agent to bring them about. But again, my understanding is that the 2nd Law says nothing about which processes occur naturally as opposed to requiring an intelligent agent to make them happen. It merely says that some processes require an input of work to the system, while others do not, and could do work on their surroundings if constraints allowed for it. I've noticed that ID/creationists exploit this ambiguity in the term spontaneous to make it sound like non-spontaneous processes simply do not occur in nature. Because after all, thermodynamically uphill is not the "natural" direction.
{ "domain": "physics.stackexchange", "id": 81466, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics", "url": null }
(In fact, with some more work you should be able to show that $$k=1$$ is indeed (together with $$k=n-1$$) the worst choice.) Let us now proceed to the average case running time (i.e., the expected running time), which satisfies the recurrence $$S(n) = \begin{cases} \frac{1}{n-1}\sum_{1 \leq k \leq n-1} [S(k) + S(n-k)] + n & \text{if } n > 1 \\ 1 & \text{if } n = 1. \end{cases}$$ We can simplify the inductive case to $$S(n) = \frac{2}{n-1} \sum_{1 \leq k \leq n-1} S(k) + n.$$ This implies that for $$n \geq 2$$, $$n S(n+1) = 2(S(1) + \cdots + S(n)) + (n+1)n, \\ (n-1) S(n) = 2(S(1) + \cdots + S(n-1)) + n(n-1).$$ Subtracting gives $$nS(n+1) - (n-1)S(n) = 2S(n) + 2n \Longrightarrow nS(n+1) = (n+1)S(n) + 2n \Longrightarrow \\ \frac{S(n+1)}{n+1} = \frac{S(n)}{n} + \frac{2}{n+1}.$$ This shows that $$\frac{S(n)}{n} = \frac{2}{n} + \frac{2}{n-1} + \cdots + \frac{2}{2} + \frac{S(1)}{1} = 2H_n - 1 = \Theta(\log n),$$ and so $$S(n) = \Theta(n\log n)$$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.962673113726775, "lm_q1q2_score": 0.8275751777308161, "lm_q2_score": 0.8596637487122111, "openwebmath_perplexity": 309.2971777542308, "openwebmath_score": 0.9173486828804016, "tags": null, "url": "https://cs.stackexchange.com/questions/108456/complexity-of-merge-sort-that-splits-in-a-random-position" }
or lose per bet placed in the long run. For a discrete random variable X, the variance of X is written as Var(X). The standard deviation of X is the square root of Var(X). In more concrete terms, the expectation is what you would expect the outcome of an experiment to be on average. The variance of a random variable tells us something about the spread of the possible values of the variable. Expected value of product of independent random variables with same expected value and variance 0 Find variance and general formula for for r$^{th}$ moment for random variable uniform over (0,1) = 9 6 − 12 6 = − 3 6 = −.5. random variables. mathematical derivations for the purpose of brevity. If you think about it, 3.5 is halfway between the possible values the die can take and so this is what you should have expected. A useful formula, where a and b are constants, is: [This says that expectation is a linear operator]. P(X = 6) = 1/6 (the probability that you throw a 6 is 1/6), E(X) = 1×P(X = 1) +
{ "domain": "calcidrata.pt", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9867771798031351, "lm_q1q2_score": 0.804452821156376, "lm_q2_score": 0.8152324938410783, "openwebmath_perplexity": 201.43887900119626, "openwebmath_score": 0.950570285320282, "tags": null, "url": "http://mail.calcidrata.pt/o288zi/expected-value-and-variance-e0624f" }
quantum-field-theory, hilbert-space, second-quantization A quantum field theory defined by a Lagrangian and boundary conditions may lead to different solutions each describing an inequivalent quantization. Thus, there is the possibility that these different quantizations correspond to different solutions of the vacuum wave functionals, thus the solutions to the functional Schroedinger equations are plausibly non-unique.
{ "domain": "physics.stackexchange", "id": 37027, "lm_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, hilbert-space, second-quantization", "url": null }
python, distribution, matplotlib, image Title: How can I plot/display a dataset or an image distribution? I want to view a specific image or a dataset's distribution, and see if they are different. Does simply writing something like : # mydataset.shape = (50k,32,32,3) plt.hist(mydataset.reshape(-1)) do the trick? or should I be doing something else? for example doing so on cifar10 gave me this plot : However, it doesn't look right, there are 50K training images, and I don't know how to interpret this or even if it is the correct way of doing it in first place! if I do : #dataset shape is (50k, 3072) plt.hist(mydataset.reshape(-1,32*32*3)) #and testset which is (10K,3072) plt.hist(mytestset.reshape(-1,32*32*3)) This is what I get :
{ "domain": "datascience.stackexchange", "id": 4594, "lm_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, distribution, matplotlib, image", "url": null }
c, strings void trim(string* str, size_t len) { //set null terminator at str->mybuf + len if necessary if (length(str) > len) { memset(str->mybuf + len, 0, 1); }//set null character at len } void set_length(string* str, size_t len) { ensure_capacity(str, len + 1);//ensure capacity for len and null '\0' trim(str, len);//trim str to len characters if necessary } string* set(string* str, const char* value) { //set the length, reallocates if appropriate set_length(str, strlen(value)); strcpy(str->mybuf, value);//copy the string value return (str);//return str } string* append(string* str, const char* value) { //set length, reallocate if appropriate set_length(str, strlen(value) + length(str)); strcat(str->mybuf, value);//concatenate return (str);//return str }
{ "domain": "codereview.stackexchange", "id": 15389, "lm_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", "url": null }
ros, transforms, tf-tutorial, tf2 rate.sleep(); } I tried and it didn't behave like it supposed to do (turtle2 follow turtle1). It moved rather in a strange motion. Why is that so? Please explain, what is wrong with my code, and how to fix? PS: I understand the original code, and it works. I just want to know why my code doesn't work and maybe I misunderstand the concept. What I understand is when I lookupTransform (turtle2, turtle1, ...) , I calculate: position of turtle 1 - position of turtle 2. So I think if I take the difference between lookuptransform(world, turtle2) and lookuptransform(world,turtle1), it will result to the same thing.... Originally posted by alienmon on ROS Answers with karma: 582 on 2016-08-25 Post score: 0 I think I've got it!!! There's nothing wrong with getting the position of turtle2 and turtle1 separately. Here is my final code (It reproduced the SAME behavior :) geometry_msgs::Twist vel_msg;
{ "domain": "robotics.stackexchange", "id": 25612, "lm_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, transforms, tf-tutorial, tf2", "url": null }
html, html5 <div class="time-box"> <p class="title small-title uppercase">Ready in</p> <p><span class="time">40</span>mins</p> </div> </section> <section id="breakfast"> <div class="breakfast-wrapper"> <header> <p class="title white-title">Breakfast</p> <p class="sub-title">7am breakfast? We're Open!</p> </header> <p class="title small">Full Breakfast</p> <p>Duis ut tortor, et risus, vulputate pretium</p> <p class="price">$12.49</p> <p class="title small">Toast and Jam</p> <p>Suspendisse, tempus, nterdum</p> <p class="price">$4.90</p> <p class="title small">Muffins</p> <p>Fusce eget dui sodales est</p> <p class="price">$3.95</p> </div>
{ "domain": "codereview.stackexchange", "id": 24147, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "html, html5", "url": null }
• $$F_{BC}, F_{CA}$$ defined similarly • By symmetry, the number of sample points in these $$3$$ events are equal. We will call it $$f = |F_{AB}| = |F_{BC}| = |F_{CA}|$$ Note that, when conditioned on $$V$$, then $$(A \ge k/2) = E_{AB} \cup E_{CA}$$. Also note that the $$3$$ $$E$$-events are disjoint, and they are also disjoint from any $$F$$-event. So: $$\color{blue}{P(A\ge {k\over 2} \mid V)} = {P(A\ge {k\over 2} \cap V) \over P(V)} = {P(E_{AB} \cup E_{CA}) \over P(V)} \le {e + e \over e + e + e + f} = {2e \over 3e + f}$$ For convenience write $$k = 2m, m \ge 3$$ (since it's given that $$k\ge 6$$ and is even), then • $$e = {2m \choose m} = {(2m)! \over m! m!}$$ • $$f = {2m \choose (m-1),(m-1),2} = {(2m)! \over (m-1)! (m-1)! 2!}$$ • $${f \over e} = {m! m! \over (m-1)! (m-1)! 2!} = {m^2 \over 2} \ge \frac92 > 4$$ (when $$m \ge 3$$) Therefore $$f > 4e$$ and $${2e \over 3e + f} < {2 \over 7} < \frac13$$, completing the proof of Claim 2. QED
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232874658904, "lm_q1q2_score": 0.8392453335842597, "lm_q2_score": 0.8539127473751341, "openwebmath_perplexity": 571.1896738936382, "openwebmath_score": 0.9982551336288452, "tags": null, "url": "https://math.stackexchange.com/questions/3426814/show-that-sum-i-1k-2-k-choose-i2i-3k-1" }
ros, arduino, pid, rosserial, ros-indigo publishRPM(time-lastMilli); lastMilli = time; } if(time-lastMilliPub >= LOOPTIME) { // publishRPM(time-lastMilliPub); lastMilliPub = time; } } now if return an int to the PWM and used kp and ki gain on this case the motor will move forward without any change in direction but if i change PWM to r1 or r2 while r1 and r2 is the subscribe value from ROS it will move in all direction without any problem and with very high response i hope any one can help me to solve this problem how i can git the same response of the last case with the accuracy that i had when i return a double not int. Originally posted by ghaith on ROS Answers with karma: 89 on 2017-01-23 Post score: 1 2 issues I see: The variables "new_cmd" & "new_pwm" are never used, so they could be deleted. It returns an int, so it will be rounding to integer values. My guess with proportional gain failing is it rounded a decimal (like 0.4) down to zero.
{ "domain": "robotics.stackexchange", "id": 26801, "lm_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, arduino, pid, rosserial, ros-indigo", "url": null }
Q x P = $$\begin{bmatrix} 8+0 & 0 + 0 \\0 + 0& 12+0 \end{bmatrix}$$ An identity matrix of any size, or any multiple of it (a scalar matrix), is a diagonal matrix. D = diag(v) D = diag(v,k) x = diag(A) x = diag(A,k) Description. If the entries in the matrix are all zero except the ones on the diagonals from lower left corner to the other upper side(right) corner are not zero, it is anti diagonal matrix. Amust be sym-metric transposition flips '' the matrix is a matrix where... Original array, and i value to columns ( 2,3 ) is 1+2i... The transpose a T is n x m matrix T. so a is m x matrix! Most important question of gk exam that you have some arr [ j [! That has 1 s as the diagnoal elements. on to the original matrix triangular, the. J value to rows its main diagonal the row and column indices of the array! Changing one changes the other elements are rotated around the diagonal matrix D such that S−1AS=D of the matrix... The user is asked to enter the elements of a diagonal matrix
{ "domain": "philhallmark.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9780517462851321, "lm_q1q2_score": 0.8332539275558383, "lm_q2_score": 0.8519528038477825, "openwebmath_perplexity": 640.7221725232843, "openwebmath_score": 0.7220755815505981, "tags": null, "url": "https://philhallmark.com/millennium-spa-mfrj/49dd6b-transpose-of-a-diagonal-matrix" }
# What is the phase of the Fourier Transform of $h(n)={\frac13,\frac13,\frac13}$ (zero position is at 2nd element) I am using Digital Signal Processing Principles, Algorithm and Applications, 4th edition written by Proakis and Manolakis. Here is s a part that I don't understand. $h(n)={\frac13,\frac13,\frac13}$. The zero position is at the 2nd element. Hence, its Discrete-Time Fourier Transform (DTFT) is: $$H(\omega)= \frac13(e^{j\omega}+1+e^{-j\omega}) = \frac13(1+2\cos{\omega})\,.$$ Since only the real part exists, I assume that the phase $\tan^{-1}\frac{H_I(\omega)}{H_R(\omega)} = 0$, where $H_I(\omega)$ and $H_R(\omega)$ are the imaginary and real part, respectively. However the book says that the phase is $0$ for $0\leq\omega\leq\frac{2\pi}{3}$ and $\pi$ for $\frac{2\pi}{3}\leq\omega\leq\pi$. Sorry that I'm not good at Latex.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561685659695, "lm_q1q2_score": 0.8195965467565893, "lm_q2_score": 0.8459424353665381, "openwebmath_perplexity": 402.0196038280004, "openwebmath_score": 0.8393607139587402, "tags": null, "url": "https://dsp.stackexchange.com/questions/27418/what-is-the-phase-of-the-fourier-transform-of-hn-frac13-frac13-frac13" }
complexity-theory, reference-request, scheduling Title: Job scheduling with a bottleneck problem Given $n$ jobs $J_1,J_2,...,J_n$, each job requires $T_i > 0, T_i \in N$ time to complete. Each job must be pre-processed and post-processed by a single machine M that can handle only 1 job at a time and both phases require 1 unit of time. After being pre-processed, job $J_i$ is sent to a machine with unlimited power (that can handle in parallel an unlimited number of jobs) and it will be ready in time $T_i$, then it must be sent (immediately) to machine M again for post-processing. The associated decision problem is: Input: the processing times $T_i >0, T_i \in \mathbb{N}$ of $N$ jobs, an integer $K\geq 2N$ Question: can we process all the jobs in time $\leq K$ using the above "bottleneck" model ? Has this problem a name? What is its complexity? (is it in $\sf{P}$ or is it $\sf{NP}$-complete?)
{ "domain": "cs.stackexchange", "id": 1515, "lm_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, reference-request, scheduling", "url": null }
textbook-and-exercises, linear-algebra $$ \rho = |\psi \rangle \langle \psi | = \dfrac{1}{2} \begin{pmatrix} 1 & 0 & 0 & 1\\ 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 1 \end{pmatrix} $$ Now, if we want to trace out the subsystem $B$ to find the density operator of the system $A$ denoted as $\rho_A$ then we can do the following: $$ \rho_A = Tr_B(\rho) = \dfrac{1}{2} \begin{pmatrix} Tr\begin{pmatrix} 1 & 0\\ 0 & 0 \end{pmatrix} & Tr\begin{pmatrix} 0 & 1\\ 0 & 0 \end{pmatrix}\\ Tr\begin{pmatrix} 0 & 0\\ 1 & 0 \end{pmatrix} & Tr\begin{pmatrix} 0 & 0\\ 0 & 1 \end{pmatrix} \end{pmatrix} = \dfrac{1}{2} \begin{pmatrix} 1 & 0\\ 0 & 1 \end{pmatrix}$$ It turns out that $\rho_B = Tr_A(\rho)$ is the same as $\rho_A$ here and from looking at the state, you might expect why that is the case.
{ "domain": "quantumcomputing.stackexchange", "id": 2333, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "textbook-and-exercises, linear-algebra", "url": null }
quantum-field-theory, antimatter, dirac-equation, helicity Title: Helicity of Antiparticles I'm really confused by the helicity and handeness of antiparticles. Consider the particle case, the plane wave solution is $\psi(x) = u(p)e^{-ip\cdot x}$, where $$u^s(p) = \begin{pmatrix} \sqrt{p\cdot \sigma}\xi^s\\ \sqrt{p\cdot \bar{\sigma}}\xi^s\end{pmatrix}.$$ Assuming the particle is ultra-relativistic and moving along the $+\hat{z} $ direction, if the particle spins up, then: \begin{align} u^{\uparrow}(p) &= \sqrt{2E} \begin{pmatrix} 0\\0\\1\\0 \end{pmatrix}, &h&=1 &&\Rightarrow \text{Right-handed}, \\ u^{\downarrow}(p) &= \sqrt{2E} \begin{pmatrix} 0\\1\\0\\0 \end{pmatrix}, &h&=-1&&\Rightarrow \text{Left-handed}, \end{align} everything is quite simple.
{ "domain": "physics.stackexchange", "id": 78018, "lm_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, antimatter, dirac-equation, helicity", "url": null }