text
stringlengths
1
1.11k
source
dict
java, interview-questions, playing-cards Consider breaking this up into two enum definitions. public enum Rank { TWO(2), THREE(3), FOUR(4), FIVE(5), SIX(6), SEVEN(7), EIGHT(8), NINE(9), TEN(10), JACK(10), QUEEN(10), KING(10), ACE(11); and public enum Suit { SPADES, HEARTS, DIAMONDS, CLUBS } Now you don't repeat the points definition four times. I'm not sure that I'd make these internal to Deck. That makes sense for something like Map.Entry, which has no meaning outside Map. But a card matters in multiple situations. But of course, this something of a judgment call. I'm more accustomed to putting one enum value per line in Java. This is especially true when passing a value to the constructor. Avoid deprecated types private Stack<CARD> deck = new Stack<Deck.CARD>(); Stack has been deprecated in favor of Deque. You say CARD in one place and Deck.CARD in another. private Deque<Card> deck = new ArrayDeque<>();
{ "domain": "codereview.stackexchange", "id": 26878, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, interview-questions, playing-cards", "url": null }
python, ssh Title: Send commands over SSH to server Here's a very small and basic script that sends commands over SSH to another computer on my network: #!/bin/python import sys, os commands = "" for i in sys.argv[1:]: commands += " " + i; if len(sys.argv) <= 1: os.system("sshpass -p VerySecrectPassword ssh pi@172.16.0.141") else: os.system("sshpass -p VerySecrectPassword ssh pi@172.16.0.141" + commands) Am I being very "Pythonic"? Is it better to use a for loop to join all the commands or the join function? commands = " ".join(sys.argv[1:]) Personally, I think the for loop reads better, but that's just my opinion and I'm a newbie. Which is considered the better way to do things? Furthermore: Are there any other areas in this script that could be improved? Is it a bad idea to store the password in the script (located at /usr/bin)?
{ "domain": "codereview.stackexchange", "id": 22330, "lm_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, ssh", "url": null }
beginner, dart, flutter @override BoardPiece getTile(Context context) { return EmptyTile(index: context.index); } } class PlayerTileCheck implements BoardPieceStrategy { @override bool isRelevant(Context context) { return context.player.location == context.index; } @override BoardPiece getTile(Context context) { return PlayerTile(hero: context.player); } } class BlueBarrierTileCheck implements BoardPieceStrategy { @override bool isRelevant(Context context) { return context.game.barriers.contains(context.index); } @override BoardPiece getTile(Context context) { return BlueBarrierTile(index: context.index); } } class FoodTileCheck implements BoardPieceStrategy { @override bool isRelevant(Context context) { return context.game.pellets.contains(context.index); } @override BoardPiece getTile(Context context) { return FoodTile(index: context.index); } }
{ "domain": "codereview.stackexchange", "id": 44808, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, dart, flutter", "url": null }
thermodynamics, friction, atmospheric-science, drag, meteors Title: Compression vs. Friction - what happens when space objects enter Earth's atmosphere? When reading about what happens when cosmic debris enters the earth's atmosphere, some sources say friction, others say compression. For example: On space.com it says: Meteor showers occur when dust or particles from asteroids or comets enter Earth's atmosphere at very high speed. When they hit the atmosphere, meteors rub against air particles and create friction, heating the meteors. The heat vaporizes most meteors, creating what we call shooting stars. On the other hand Phil Plait writes:
{ "domain": "physics.stackexchange", "id": 95766, "lm_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, friction, atmospheric-science, drag, meteors", "url": null }
newtonian-mechanics, thermodynamics, energy, work, collision total mechanical energy of the horizontal section of ropes is given by $$KE+PE=mv^2+mgz$$And the rate of change of this total energy must be zero: $$2mv\frac{dv}{dt}-mgv=0$$So the downward acceleration of the tubular structure and rope within it is given by $$\frac{dv}{dt}=\frac{g}{2}$$
{ "domain": "physics.stackexchange", "id": 69181, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, thermodynamics, energy, work, collision", "url": null }
digital-communications, correlation So the matched filter is quite good idea. If you are dealing with streaming modem, you can use partly signal periodicity to detect signal at first and then make timing (like it's done in DVB-T for example). If packet modem is your case, you have to use frame header for the detection and timing problems. The main idea here that if you work with stream you can loose some data, while you are in synchronization process (you can trade off synchronization rapidness and its hardware complexity). But if you work with packet communications you're not allowed to loose frames if it's possible. So you must complete your synchronization with the aid of frame header only. And if you're not sure about the type of sync symbol yet, try maximum length sequences for example, they are quite common for such a task. Hope this helps.
{ "domain": "dsp.stackexchange", "id": 1984, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "digital-communications, correlation", "url": null }
ros Title: ROS Chat Group? Just a random question as I have lots of questions to ask, is there any active Chat group for ROS? I have quite a few questions and really don't want to spam the word (people have already been really helpful) Originally posted by burf2000 on ROS Answers with karma: 202 on 2017-01-17 Post score: 2 Technical questions are best asked here, on ROS Answers (after having searched for similar questions and answers). For more general discussion, https://discourse.ros.org may be appropriate. There used to be a ROS Slack organization (essentially a chat room), but it has been phased out in favor of https://discourse.ros.org I believe. Ditto for the mailing list. Originally posted by spmaniato with karma: 1788 on 2017-01-17 This answer was ACCEPTED on the original site Post score: 2
{ "domain": "robotics.stackexchange", "id": 26753, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
python, python-2.x, language-design An example peoples.txt: peter i taylor djmcmayhem(10): you(list(set(i))) Should output: for i in range(10): print(list(set(i))) What does the code do? It takes in an input file (by default peoples.txt in the same dir as main.py) and translates it from "People's Python" to standard python, and executes the result. It also writes the compiled "normal" code into <input_file_name>-output.txt, by default peoples-output.txt Run as python main.py custom/assignments.txt path/to/inputfile.txt (inputfile.txt is the People's Python code and assignments.txt is the dict of assignments you're using) In terms of style, how can I improve this? The things I notice:
{ "domain": "codereview.stackexchange", "id": 24414, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-2.x, language-design", "url": null }
lagrangian-formalism, conservation-laws, symmetry, variational-principle, noethers-theorem Then the Lagrangian would vary as: $\begin{align} & {{\delta }_{\varepsilon }}\mathsf{L}:=\mathsf{L}\left( {{g}_{\varepsilon }}\varphi ,{{\partial }_{\mu }}\left( {{g}_{\varepsilon }}\varphi \right) \right)-\mathsf{L}\left( \varphi ,{{\partial }_{\mu }}\varphi \right)=\sum\limits_{i=1}^{n}{\left[ \frac{\partial \mathsf{L}}{\partial {{\varphi }_{i}}}{{\delta }_{\varepsilon }}{{\varphi }_{i}}+\frac{\partial \mathsf{L}}{\partial {{\varphi }_{i,\mu }}}{{\delta }_{\varepsilon }}{{\varphi }_{i,\mu }} \right]} \\ & \quad \quad =\sum\limits_{i=1}^{n}{\left[ \frac{\partial \mathsf{L}}{\partial {{\varphi }_{i}}}\sum\limits_{I=1}^{N}{{{\varepsilon }_{I}}{{\left( {{T}_{I}}\varphi \right)}_{i}}}+\frac{\partial \mathsf{L}}{\partial {{\varphi }_{i,\mu }}}\sum\limits_{I=1}^{N}{{{\varepsilon }_{I}}{{\partial }_{\mu }}{{\left( {{T}_{I}}\varphi \right)}_{i}}} \right]} \\
{ "domain": "physics.stackexchange", "id": 25080, "lm_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, conservation-laws, symmetry, variational-principle, noethers-theorem", "url": null }
optics, electronics, instrument Title: Why is responsivity quoted as a figure of merit? Lately I have been investigating the physics literature on proposed photosensitive electronic devices made of graphene. Often I see responsivity values quoted as if they suppossed to impress, and there are even comparisons (e.g., "my 10 A/W detector is better than your 1 A/W detector"). An example (picked at random from a google search) is the abstract of this paper. What I find strange is that responsivity seems, to me, to be completely arbitrary: In photoconductive-mode detectors, responsivity depends entirely on the applied voltage bias. Responsivity is often dependent on the device size. By combining a photodetector with an amplifier, I can make any responsivity as desired. Even if we are worried about detecting small currents, this also depends hugely on the impedance of the photodetector. Photodiode amplifiers for example can exploit the high impedance of the signal to amplify very tiny currents.
{ "domain": "physics.stackexchange", "id": 23047, "lm_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, electronics, instrument", "url": null }
quantum-field-theory, gauge-theory, topology Finally, we have $H^2(M,\pi_1(G))$. If the gauge group is not simply-connected ($\pi_1(G) \neq 0$), a class in this group provides additional topological data necessary to specify the gauge theory beyond the usual instanton number. A characteristic class in this group is called the discrete magnetic flux or 't Hooft flux of the gauge theory. For some more discussion of these kinds of ideas, see e.g. Witten, Supersymmetric Index in Four-Dimensional Gauge Theories.
{ "domain": "physics.stackexchange", "id": 25732, "lm_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, gauge-theory, topology", "url": null }
c#, .net, collections new List<int> { 2, 1, 3, 9 }, new List<int> { 6, 8, 3, 9 }, new List<int> { 2, 1, 3, 9 }, new List<int> { 9, 2, 4 }, new List<int> { 6, 3, 8 }, new List<int> { 7, 3, 4 }, }; countList = CountList(testData); } public static List<List<int>> CountList(List<List<int>> input) { List<List<int>> returnListList = new List<List<int>>(); foreach (List<int> list in input) list.Sort(); HashSet<int> alreadyMatched = new HashSet<int>(); int count = 0; bool match = true; int lastEval = 0; for (int i = 0; i < input.Count - 1; i++) { if (alreadyMatched.Contains(i)) continue; returnListList.Add(input[i]); count = 1; lastEval = 0; for (int j = i+1; j < input.Count; j++) { if (alreadyMatched.Contains(j)) continue; lastEval = j; if (input[i].Count() != input[j].Count())
{ "domain": "codereview.stackexchange", "id": 23702, "lm_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, collections", "url": null }
python, networking, status-monitoring Using a generator here is a simple way of building the retry logic without having to worry about its inner mechanisms: def retry(generator, max_attempts=5): for attempt, status in enumerate(generator, start=1): if status or attempt >= max_attempts: break return status You can have your anti-flapping logic in a dedicated class: class StabilizedStatus: def __init__(self, status, flapping_threshold=3): self._previous_adjusted = self._adjusted_status = self._status = status self._status_count = 0 self._threshold = flapping_threshold def __bool__(self): return bool(self._status) @property def stabilized(self): if self._adjusted_status != self._previous_adjusted: self._previous_adjusted = self._adjusted_status return False return True
{ "domain": "codereview.stackexchange", "id": 42867, "lm_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, networking, status-monitoring", "url": null }
javascript, performance, programming-challenge, ecmascript-6 A number is only interesting if it is greater than 99 ... But I don't get this sequence. If we're talking about 99 here then say "99". if (n < 98) return 0; if (n < 100) return 1; Unnecessary Obsfucation - flipped array Checking for incrementing or decrementing sequence should be a dead simple one liner each. Why does it involve an array? In that context what does being flipped mean? Any refactoring/personal takes on the challenge should be preceded with concepts that I can search for ... How long should this have taken to come up with?
{ "domain": "codereview.stackexchange", "id": 30729, "lm_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, performance, programming-challenge, ecmascript-6", "url": null }
homework-and-exercises, electric-circuits, symmetry, electrical-resistance Title: Equivalent resistance for a complex circuit The problem is to find a equivalent resistance for the system below (resistance are all same). I tied a mixture between the Kennely theorem and the laws of Kirchoff's, but i didn't find an optimal solution of this. First thing to observe is that the scheme is symmetrical. It means, besides other things, that the potentials are equivalent at the mirrored points, and you can just exclude the resistor in the very middle. If the current through it is non-zero, which direction would it have and why is it not the opposite? Moreover, as one could witness soon, all the resistors on the horizontal line won't have any current through them. Indeed, you are left with two identical parallel branches of resistance say $R_x$ each, so the overall resistance would be $R_x/2$. But the same logic about the symmetry could now be applied to each of these branches!
{ "domain": "physics.stackexchange", "id": 82797, "lm_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, electric-circuits, symmetry, electrical-resistance", "url": null }
then of course one counterexample would not refute the conjecture: one would need to produce infinitely many counterexamples. But that would be a different conjecture. - This raises an important point which is that all theorems are implications. They may not have to be expressed as implications, but they are. This is even more obvious when you look at proof theory. A claim "for all x, P(x) entails Q(x)" is disproven by finding an x such that P(x) is valid and Q(x) is false. However, in the real world, it's possible that a conjecture is "almost" true, in the sense that P(x) needs some more conditions. It's well known that some proofs of Euclid are "almost" true, in that there are some nondegeneracy conditions which Euclid didn't consider. –  Pseudonym Jul 11 '13 at 2:16 Conjectures are usually proposed about some set of objects belonging to some set or domain, objects which are clearly identified. Let's call this domain $D$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.975946446405965, "lm_q1q2_score": 0.8001719940592484, "lm_q2_score": 0.8198933425148213, "openwebmath_perplexity": 448.1114823709173, "openwebmath_score": 0.8932148218154907, "tags": null, "url": "http://math.stackexchange.com/questions/440859/why-does-one-counterexample-disprove-a-conjecture/440863" }
astrophysics, resource-recommendations, stars, stellar-physics Title: Good books or resources for Stellar Astrophysics at graduate level? I wanted to know if there is a well established resource in the field of Stellar Astrophysics which is not very outdated. I have seen plenty of books at my university library but I do not know if there is a classical reference. I am a last year undergraduate (5th year in my country, so it is like a just graduate level) with good level at mathematics. Related: What are good books for graduates/undergraduates in Astrophysics? which ask for general Astrophysics books (two stellar astrophysics are mentioned in a general context, but I do not know if they are standard references in the field). I've taught a few classes on stellar evolution and stellar modelling, and here are some of the resources I've recommended there. These all lean on the theoretical stellar structure side, rather than observational characteristics of certain types of star and so on. Free lecture notes
{ "domain": "physics.stackexchange", "id": 26352, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "astrophysics, resource-recommendations, stars, stellar-physics", "url": null }
• Now this is what I call the beauty of math! $100=90+10=60+40=120-20$! – Aditya Agarwal Sep 14 '15 at 5:16 • Absolutely +1 for the sleek solution – Shailesh Sep 14 '15 at 13:59 For the first question, let $\alpha=\cos100^\circ$. By standard trig formulae you get $$8\alpha^3-6\alpha=2\cos300^\circ=1\ .$$ Now the square of your expression is \eqalign{\sin^2100^\circ\frac{(1+4\cos100^\circ)^2}{\cos^2100^\circ} &=\frac{(1-\alpha^2)(1+4\alpha)^2}{\alpha^2}\cr &=\frac{1+8\alpha+15\alpha^2-8\alpha^3-16\alpha^4}{\alpha^2}\cr &=\frac{8\alpha^3-6\alpha+8\alpha+15\alpha^2-8\alpha^3-16\alpha^4}{\alpha^2}\cr &=\frac{2+15\alpha-16\alpha^3}{\alpha}\cr &=\frac{16\alpha^3-12\alpha+15\alpha-16\alpha^3}{\alpha}\cr &=3\ .\cr} It's not hard to see that your expression is negative, and hence it equals $-\sqrt3$. • Nice way to do it. +1 – Shailesh Sep 14 '15 at 13:59
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9822877033706601, "lm_q1q2_score": 0.8164216038702411, "lm_q2_score": 0.8311430562234877, "openwebmath_perplexity": 424.520098398672, "openwebmath_score": 0.9338069558143616, "tags": null, "url": "https://math.stackexchange.com/questions/1434561/simplifying-tan100-circ4-sin100-circ?noredirect=1" }
c++, algorithm, sorting } for(int i=0; i<length; i++){ cout<<array[i]<<"\t"; } } First things first, don't use using namespace std in header files, where your radix sort implementation should be. Besides, convenience isn't a valid excuse when the only thing you import from std is cout: just type std::cout and you're done. One liner functions are often useless and noisy: you need to refer to the implementation to know exactly what they do, so they don't make the code more readable, and you have to come up with a name, which is not always easy. In the case of getNumberAtPosition, for instance, it's impossible to tell from the name if the position is meant for the most or least significant digit, and both are equally likely in a radix sort algorithm. everything that isn't meant to change should be const. The only place where it isn't idiomatic is in function signature, where you often don't tag built-in type arguments passed by value as const.
{ "domain": "codereview.stackexchange", "id": 33994, "lm_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, sorting", "url": null }
You're right that "instantaneous variation" makes no sense. But "instantaneous rate of change" does, and that is what we have all been talking about. #### chesterfiuk ##### New member Fine. Can you please give us a better term to use? " that is defined as the limit of rates of change over smaller and smaller intervals near the point " #### tkhunny ##### Moderator Staff member " that is defined as the limit of rates of change over smaller and smaller intervals near the point " The problem you are having is stopping at some finite place. When it says "smaller and smaller" it does not say to stop doing that. Keep doing it. If you stop, you are not understanding the limit. This is how ancient thinkers used to do it. They believed if you chopped things into small enough pieces you could explain things better. This isn't totally false, but the limit rejects this idea. Keep chopping until your pieces are size zero (0).
{ "domain": "freemathhelp.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846722794541, "lm_q1q2_score": 0.8296386630225643, "lm_q2_score": 0.847967764140929, "openwebmath_perplexity": 435.99476701289365, "openwebmath_score": 0.7376335263252258, "tags": null, "url": "https://www.freemathhelp.com/forum/threads/what-does-the-derivative-really-calculate.120588/#post-485085" }
ros2 and for the slam_toolbox example, a simple minimum look at a single parameter: slam_toolbox: ros__parameters: solver_plugin: blahblah::FakePluginFailToLoadPlz When I run the blackboard demo, it crashes if I give it a bad file path, but my node doesnt, but still fails to have anything from it included. Any thoughts? It seems like none of the ROS2 nodes I have will accept any comandline params, but when I do __ns:='/hi' on the blackboard, that will take fine. My other node again produces no errors even if this namespace is invalid and just doesn't take. I am declaring my parameters: std::string solver_plugin = std::string("solver_plugins::CeresSolver"); solver_plugin = this->declare_parameter("solver_plugin", solver_plugin);
{ "domain": "robotics.stackexchange", "id": 33870, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2", "url": null }
sas Title: Displaying date in SAS I am trying to display a date in my result after running the below program in SAS. It runs properly but in the sas data table under DOB column I don't get anything except a period . Below is my code what am I doing wrong? data sample; Input ID name $ Dob; Format DOB mmddyy10. ; datalines; 1 abc 22jan1996 2 xyz 25aug1996 ; run; Proc print data = sample; run; Also I would like to know what does a period means at the end of this line before the semicolon: Format DOB mmddyy10. ; Try the following: data sample; Input ID name $ Dob; informat DOB date9. ; format DOB mmddyy10. ; datalines; 1 abc 22jan1996 2 xyz 25aug1996 ; run; Proc print data = sample; run;
{ "domain": "datascience.stackexchange", "id": 7979, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sas", "url": null }
# Representations of functions as power series ## Differentiation and integration of power series
{ "domain": "uwo.ca", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9927672366245092, "lm_q1q2_score": 0.8046168996861658, "lm_q2_score": 0.8104789018037399, "openwebmath_perplexity": 254.30217762388602, "openwebmath_score": 0.9920211434364319, "tags": null, "url": "http://publish.uwo.ca/~pzsambok/calc%201301b%20007%2017wi/notes/notes/13%20-%20Representations%20of%20functions%20as%20power%20series.html" }
vba, error-handling, excel, time-limit-exceeded If NbMaxWords < 10 Then For i = LBound(A) To UBound(A) For k = 2 To NbMaxWords j = 0 TpStr = vbNullString Do While j <= k And i + j <= UBound(A) TpStr = TpStr & " " & CleanStr(A(i + j)) j = j + 1 Loop
{ "domain": "codereview.stackexchange", "id": 18491, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vba, error-handling, excel, time-limit-exceeded", "url": null }
classical-mechanics, gravity, mathematical-physics Title: How to induce artificial gravity? We could induce artificial gravity through centripetal acceleration. For example a ring-like structure in a spaceship could rotate about 1.34 rpm if the radius to the centre is 500 meters. This will give 1 g at the edges of the ring. However we can also induce artificial gravity in the spaceship through its propulsive power and hence a constant acceleration at 1 g of the spaceship is required.
{ "domain": "physics.stackexchange", "id": 38418, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, gravity, mathematical-physics", "url": null }
quantum-mechanics, quantum-tunneling $$ S = \int dt\left( \frac{M}{2}\left(\frac{dq}{dt}\right)^{2} - V(q)\right) $$ Suppose now that you perform formal transformation $t = i\tau$. Now the action takes the form $$ S_{E} = \int d\tau \left(\left(\frac{dq}{dt}\right)^{2} + V(q)\right) $$ Corresponding EOM takes the form $$ M\frac{d^{2}q}{d\tau^{2}} = -\frac{\partial (-V)}{\partial q} $$ Corresponding integral of motion $$ E_{E} = \frac{M}{2}\left( \frac{dq}{d\tau}\right)^{2} - V(q) $$ is called euclidean energy; note tht it doesn't coincide with the usual energy. Suppose now that you are looking for the solution $q_{b}$, for which $q_{b} = q_{0}$ at $\tau \to -\infty$ and $q_{b} = q_{1}$ at $\tau = \infty$; euclidean energy for such solution is zero. Now, the action for such configuration is $$ S_{E}[q_{b}] = 2 \int \limits_{-\infty}^{0}\sqrt{2MV(q(\tau))}d\tau = \left|d\tau = \sqrt{\frac{M}{2V(q_{b})}}dq_{b}\right| = S_{b} $$
{ "domain": "physics.stackexchange", "id": 28792, "lm_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-tunneling", "url": null }
biochemistry, biophysics, thermodynamics A general alternating model of transporters was proposed by Jardetzky as long ago as 1966, assuming three characteristic features: A cavity in the transporter to accommodate the substrate Two different transporter conformations to allow for the molecular cavity to be open to one side of the membrane in one conformation and to the opposite side in the other A binding site for substrates in the cavity, the substrate affinity of which may be different in the two conformations. Detailed thermodynamics of the GLUT transporters Zhang and Han (Biophysics Reports 2016) performed the kind of thermodynamic analysis solicited in the question in the light of structural information on GLUT transporters of the major facilitator superfamily (MFS). They considered two conformation states — Cin and Cout, with and without bound substrate in a four step model:
{ "domain": "biology.stackexchange", "id": 11813, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "biochemistry, biophysics, thermodynamics", "url": null }
complexity-theory, terminology, nondeterminism Title: What is meant by "solvable by non deterministic algorithm in polynomial time" In many textbooks NP problems are defined as: Set of all decision problems solvable by non deterministic algorithms in polynomial time
{ "domain": "cs.stackexchange", "id": 6079, "lm_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, terminology, nondeterminism", "url": null }
protocol-buffers Title: Aligning '=' on protocol buffers .proto files Should the equals sign be alined on protocol buffers? I am having a huge discussion with a colleague and we can't get to decide on what's the best practice. message foobar { optional bool var_one_short = 1; optional bool var_two_looooooooong_name = 2; optional bool another_var = 3; } vs message foobar { optional bool var_one_short = 1; optional bool var_two_looooooooong_name = 2; optional bool another_var = 3; } I think the second version is much easier to maintain. If you have a new variable with a longer name (like var_two_reaalllllly_looooooooong_name) you don't have to modify three other lines too to keep it nice. The first version also could cause unnecessary patch/merge conflicts. From Code Complete, 2nd Edition by Steve McConnell, p758:
{ "domain": "codereview.stackexchange", "id": 3354, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "protocol-buffers", "url": null }
ros, find-package, cmake Title: Cmake cannot find package for dji onboard sdk file Hi I was using dji onboard SDK for develop and meet problems about include sdk file into my project. I put several project in one workspace, After i 'catkin_make' it, it shows error, CMake Warning at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:76 (find_package): Could not find a package configuration file provided by "dji_sdk" with any of the following names: dji_sdkConfig.cmake dji_sdk-config.cmake Add the installation prefix of "dji_sdk" to CMAKE_PREFIX_PATH or set "dji_sdk_DIR" to a directory containing one of the above files. If "dji_sdk" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): meteorOnboard/fcu/CMakeLists.txt:8 (find_package)
{ "domain": "robotics.stackexchange", "id": 25871, "lm_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, find-package, cmake", "url": null }
c#, api, asp.net-web-api #region Classes for json serializer //POCO classes for serializer #endregion /// <summary> /// initialize the API /// </summary> /// <param name="uri">Base uri to API endpoint</param> /// <param name="key">Key value </param> /// <param name="args">Secret value</param> public API(string uri, string key, string secret) { _uri = uri; _key = key; _secret = secret; isInitialized = GetBearerTokenAsync().Result; } public Patron GetPatronById(string barcode) { string uri = String.Format("patrons/find?barcode={0}", barcode); var Patron = GetAsync<Patron>(uri).Result; return Patron; } public Boolean PlaceHold(int patronID, string recordType, int recordNumber, string pickupLocation) { string uri = String.Format("patrons/{0}/holds/requests", patronID);
{ "domain": "codereview.stackexchange", "id": 21755, "lm_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#, api, asp.net-web-api", "url": null }
homework-and-exercises, electromagnetism, energy-conservation } \end{align*} The simplest assumption about the frequency is that the field is being ramped up to its maximum while the bullet stops, so we've seen a quarter-oscillation and $1/f = 20\,\mathrm{ms}$. This gives us a peak field of 600 tesla, which is large, but not absurdly large. On the other hand, if Magneto is actually an FM radio broadcaster at 100 MHz, he'd need only a field of $$\mathrm{ \frac{ \pi\times10^4\,T/s }{ 10^8\,Hz } = \pi\times10^{-4}\,T. }$$ I don't think that radio engineers ordinarily think about local peak magnetic field strengths, but this isn't outrageous either. My college NPR station has a 100 kW transmitter. However, their antenna isn't shaped correctly to put that entire power into a one-cc volume.
{ "domain": "physics.stackexchange", "id": 14057, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, electromagnetism, energy-conservation", "url": null }
feature-selection Techniques based on individual features are efficient (i.e. fast) and usually help to reduce dimensionality and improve performance. But they are not necessarily optimal, because they cannot take into account the contribution of a subset of features together. For example they might select several features which are highly correlated between each other, even though selecting only one of them would be enough. In order to take into account how features interact, ideally one would train and test a model with every possible subset of features, and then select the best one. However the full exploration of $2^N$ subsets is rarely feasible, but some optimization methods can be used, for example feature selection with genetic learning. Note that there are also features extraction techniques. In this case the original semantic of the features is not preserved, since the whole set of features are transformed into a new representation.
{ "domain": "datascience.stackexchange", "id": 9953, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "feature-selection", "url": null }
performance, c Note the use of sizeof instead of an explicit 1000 And some other things... The man-page for getaddrinfo suggests looping through the list of addresses returned instead of just using the first (in case the first does not work). When something fails you should exit rather than continuing. instead of using strlen on a constant string, use sizeof: const char msg[] = "GET / HTTP/1.1\nhost: www.google.com\n\n"; ssize_t bytes_sent = send(socketfd, msg, sizeof msg - 1, 0); note the msg[], not *msg perhaps use perror or strerror on failure to read etc. camelCase function name but separate_word names elsewhere.
{ "domain": "codereview.stackexchange", "id": 4333, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, c", "url": null }
gravity Obviously when you finish going round the square you'll be back at your starting point and the vector will still be pointing in the same direction. But this is only true when the spacetime you're moving through is flat. If you try this on a curved spacetime you'll find that after completing the square you won't be back at your starting point and the vector may have rotated away from it's original direction.
{ "domain": "physics.stackexchange", "id": 14065, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gravity", "url": null }
c++, c++11, linked-list template<typename T> class List { struct Node { Node* next; T value; }; public: // in order to make this class a fully compatible with the STL // we need to implement iteration like in STL class const_iterator : public std::iterator<std::forward_iterator_tag, T, std::size_t, T const*, T const&> // Random access and bidirectional movement are not efficient in a single linked list, // so we choose a simple forward iterator that can store and retrieve values { public: // Traits(copy n paste) from STL containers typedef std::forward_iterator_tag iterator_category; typedef T value_type; typedef ptrdiff_t difference_type; typedef T const* pointer; typedef T const& reference; const_iterator(Node* current_node = nullptr) : m_current_position(current_node) {}
{ "domain": "codereview.stackexchange", "id": 16500, "lm_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, linked-list", "url": null }
vba, type-safety, vb6 Title: Revisited IsTypeSafe method implementation for "type-safe" List Following up on List<T> implementation for VB6/VBA, I'd like some thoughts about the revisited IsTypeSafe function, below. The previous version pretty much implemented VB.net's Option Strict setting, by only allowing widening numeric type conversions, and preventing implicit conversion between numeric and string data types. This one is more permissive, to a point where I'm torn between ease of use (VB6 isn't .net!) and correctness (it's twisting Option Strict by allowing implicit conversions of in-range values, i.e. a Long with a value of 32 could be added to a List<Byte>... does that help or hinder usability?). Given the following private type where TItem is the type name of T in List<T>... Private Type tList Encapsulated As Collection TItem As String OptionStrict As Boolean End Type Private this As tList The IsTypeSafe method's behavior depends on the values of this.OptionStrict and this.TItem:
{ "domain": "codereview.stackexchange", "id": 27495, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vba, type-safety, vb6", "url": null }
machine-learning, self-study, document-term-matrix The versions from the question Original $p(z_n,k=1)$ will be either p(z_n) (for $k=1$) or 0 (for $k \not= 1$). Note that $k=1$ is not a probabilistic event that might either occure with a certain probability, but a binary statement, that is either true (i.e. $p(K=1)=1$) or false (i.e. $p(k=1)=0$) GPT It shows that you should not trust GPT without checks. First GPT produces also the machine-learning-community-type shortcut equation (which is totally fine), but this only works if implicitly you could define a longer probability-theory-style equation. But $p(z_n|k)$ only makes sense if there would be an implicit random variable corresponding to $k$. We do not have this, so $p(z_n|k)$ just looks like a ML-style equation, but has not meaning (of course you are free to define a meaning for this notion. It would just differ from the common notions)
{ "domain": "datascience.stackexchange", "id": 11783, "lm_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, self-study, document-term-matrix", "url": null }
quantum-state $$\langle \psi | F(A) | \psi \rangle\, .$$ Now consider a mixed state prepared by statistically combining two different pure states $| \psi \rangle$ and $| \phi\rangle$, with the associated probabilities $p$ and $1 − p$, respectively. The associated probabilities mean that the preparation process for the quantum system ends in the state $|\psi \rangle$ with probability $p$ and in the state $|\phi\rangle$ with probability $1 − p$.
{ "domain": "quantumcomputing.stackexchange", "id": 2315, "lm_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-state", "url": null }
python, complexity, number-systems Except ... res = '' for i in converted[::-1]: res += string.hexdigits[i].upper() Which actually makes this an \$O(n^2)\$ algorithm, since while you are looping, you are copying all previous digits to add one character. Convert all the digits into the appropriate character, and then join them all together at once: res = ''.join(string.hexdigits[digit] for digit in converted[::-1]).upper() Using % b2 and //= b2 back-to-back is generally inefficient. When the math library computes one, it almost always has computed the other as a side effect. The divmod() function returns both values: while base10 > 0: base10, digit = divmod(base10, b2) converted.append(digit) Practice for a coding interview? You'd better clean up this code considerably. In addition to @Reinderien's suggestions, look at your two return statements return '-' + str(base10) if is_neg else str(base10) return '-' + res if is_neg else res
{ "domain": "codereview.stackexchange", "id": 35720, "lm_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, complexity, number-systems", "url": null }
ros, object-manipulation, ompl-planning, move-arm Originally posted by tfoote with karma: 58457 on 2011-10-06 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 5490, "lm_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, object-manipulation, ompl-planning, move-arm", "url": null }
algorithms, reference-request, scheduling, upper-bound If you also care about the dependence on $L$, you might be able to build on the above analysis to see how it might depend on $L$.
{ "domain": "cs.stackexchange", "id": 15286, "lm_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, reference-request, scheduling, upper-bound", "url": null }
filters, quadrature, software-defined-radio Mathematically, is there any way to split a complex signal into I and Q and perform filtering using several real-valued filters which would have the same response as a complex-valued filter (particularly for bandpass filtering)? If so, how, and what are the limits to this approach? I'd say there are two ways to look at this problem.
{ "domain": "dsp.stackexchange", "id": 2221, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filters, quadrature, software-defined-radio", "url": null }
c++, interview-questions, mathematics, graph /* * Generate Test Data */ std::pair<int,int> pairs[12] = { std::pair<int,int>( 3,4 ), std::pair<int,int>( 4,9 ), std::pair<int,int>( 8,0 ), std::pair<int,int>( 2,3 ), std::pair<int,int>( 5,6 ), std::pair<int,int>( 2,9 ), std::pair<int,int>( 5,9 ), std::pair<int,int>( 7,3 ), std::pair<int,int>( 4,8 ), std::pair<int,int>( 5,6 ), std::pair<int,int>( 0,2 ), std::pair<int,int>( 6,1 ) }; /* * Load Test Data onto Queue */ std::queue<std::pair<int,int> > queue; for( int x=0;x<12;x++ ) {
{ "domain": "codereview.stackexchange", "id": 598, "lm_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++, interview-questions, mathematics, graph", "url": null }
Currently unrated #### Rafael 3 months, 4 weeks ago That is excellent. How would this look like if the function was a 2D polynomial? I'm trying to apply this using numpy's poly2d the function itself is polyval2d(X,Y,C) where C is a (n,m) coefficient matrix. Currently unrated #### christian 3 months, 3 weeks ago Thank you. Fitting to a polynomial is, in principle, a linear least squares problem – you could look at https://scipython.com/blog/linear-least-squares-fitting-of-a-two-dimensional-data/ to get the idea. Currently unrated #### L Gee 3 weeks, 1 day ago Really good solution, absolutely using this. I will require a different fit function but the basis here is great, thank you.
{ "domain": "scipython.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9648551535992068, "lm_q1q2_score": 0.8675218926140221, "lm_q2_score": 0.899121375242593, "openwebmath_perplexity": 3874.1058910497372, "openwebmath_score": 0.590046763420105, "tags": null, "url": "https://scipython.com/blog/non-linear-least-squares-fitting-of-a-two-dimensional-data/" }
black-holes, astrophysics, neutron-stars, stellar-evolution The second experiment was recently done by nuclear physicists at Jefferson Lab. They measured the distribution of pressure inside the proton. The findings show that the proton’s building blocks, the quarks, are subjected to a pressure of 100 decillion Pascal (10^35) near the center of a proton, which is about 10 times greater than the pressure in the heart of a neutron star. This means that the outward-directed pressure from the center of the proton is greater than the inward-directed pressure near the proton’s periphery and therefore a neutron star cannot collapse. https://www.jlab.org/node/7928
{ "domain": "physics.stackexchange", "id": 49876, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "black-holes, astrophysics, neutron-stars, stellar-evolution", "url": null }
gazebo-1.9 Originally posted by nkoenig with karma: 7676 on 2013-09-15 This answer was ACCEPTED on the original site Post score: 0 Original comments Comment by onlytailei on 2017-06-03: The same problem even without gpu on gazebo 8. Any suggestions?
{ "domain": "robotics.stackexchange", "id": 3420, "lm_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-1.9", "url": null }
python def row_walk(matrix): used = set() for i, r1 in enumerate(matrix): for j, r2 in enumerate(matrix): if j > i and r1+r2 == j-i: used.update((i, j)) return [x for x in range(len(matrix)) if x not in used]
{ "domain": "codereview.stackexchange", "id": 19361, "lm_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", "url": null }
algorithms, randomized-algorithms, randomness while E is not empty: a = Random assignment SE = solved_by(E, a) # Equations in E solved by assignment a if |SE| * 2 >= |E|: E = E \ SE # Remove solved equations A = A U {a} # Add this assignment to the solution return A This algorithm will find at most $\lfloor log_2(n) \rfloor + 1$ assignments so that every equation is solved by at least one assignment because condition if |SE| * 2 >= |E| half the size of |E| and add one assignment to A after every success. This will also run in time, since the probability of success is $\frac{1}{2}$, so the expected iterations for success is 2.
{ "domain": "cs.stackexchange", "id": 14736, "lm_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, randomized-algorithms, randomness", "url": null }
javascript, php /* Class that takes care of receiving new messages from server PARAMS: longPollServerURL - string - URL of server file, which acts as long poll server lastIdGetURL - string - URL of txt file, where last message id is saved newMessageCallback - function - callback to get called when new message is received it is called with 4 params: id of the message, time when the message was sent as unix timestamp, nickname of the person who sent it, message text itself */ function ChatLongPoll(longPollServerURL, lastIdGetURL, newMessageCallback) { var mainContext = this, httpRequest = createAjax();
{ "domain": "codereview.stackexchange", "id": 7277, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, php", "url": null }
The relative entropy is always non-negative, and $$D(p||q)=0 \iff p=q$$. It is not a true distance because it is not symmetric. $$D(p||q)$$ is convex in the pair $$(p,q)$$. Mutal information is a measure of the amount of information that one ramdom variable contains about another ramdom variable. It means the reduction in the uncertainty of one random var due to the knowledge of the other. Def: The mutual information $$I(X;Y)$$ is defined as the relative entropy between the joint distribution and the product of the two distributions: $I(X;Y)=\sum_{x,y} p(x,y)~\log\frac{p(x,y)}{p(x)p(y)}$ Relations in the entropy measures: • $$I(X;Y) = I(Y;X)$$ • $$I(X;X) = H(X)$$ The mutual information of a random var with itself is its entropy, this is why sometimes entropy is referred to as self-information. • $$I(X;Y) = H(X) - H(X|Y) = H(Y) - H(Y|X)$$ That is, $$X$$ says as much about $$Y$$ and $$Y$$ says about $$X$$.
{ "domain": "ul.pt", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9921841114418225, "lm_q1q2_score": 0.8134851431536736, "lm_q2_score": 0.8198933381139645, "openwebmath_perplexity": 417.80957099082593, "openwebmath_score": 0.9006860852241516, "tags": null, "url": "http://www.di.fc.ul.pt/~jpn/r/inf_theory/informationtheory.html" }
filters, frequency, lowpass-filter, continuous-signals, poles-zeros Title: How can I determine the order of filter? This is my first study about signal analysing. I'm very confused about filter order. My problem is how can I know whether its 12-th order, or 2nd order like the book says so? I already knew that slope has 2 choises whether its in n multiples of -6n dB/oct or -20n dB/dec. If the slope is -20 dB/dec then the second order should have -40 dB/dec. For example, An n= 4th order is 24dB/octave slope. But, I saw this example below and pretty confuse about determine the slope of those two line and how can the first line is 12-th order. Its not like the slope reaches -240 dB/dec (-20 x 12) and the second line seems not like -40 dB/dec (-20 x 2). Is there anyone could explain this to me? Thank you. Note that the given slopes of $6n\textrm{ dB}/\textrm{octave}$ and $20n\textrm{ dB}/\textrm{dec}$, respectively, are asymptotic slopes for large frequencies. So you have to extrapolate the lines that are approximated by the magnitude responses at large
{ "domain": "dsp.stackexchange", "id": 6589, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filters, frequency, lowpass-filter, continuous-signals, poles-zeros", "url": null }
c++, recursion, c++17, constant-expression I do not like std::make_tuple(x) part, but do not see a better way to prepend an element to a tuple. You actually hint at the primary concern with your note about std::make_tuple(), std::tuple_cat() and gradually building up the result. The point is that you have much copying with a plethora of temporaries going on. Also, quite a bit of recursion. Use index_sequences, the power of template parameter pack expansion, and forwarding using std::forward_as_tuple() and you can flatten it, as well as only copy directly from the source to the destination without intermediate steps. While you are at it, ponder noexcept. #include <utility> #include <tuple> namespace detail { template <class T> constexpr std::size_t tuple_size_v = std::tuple_size_v<std::decay_t<T>>;
{ "domain": "codereview.stackexchange", "id": 34181, "lm_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++, recursion, c++17, constant-expression", "url": null }
algorithms, data-compression I would really appreciate if someone would tell me where to look for existing approaches to solving this problem. Thanks in advance! This is called erasure coding. Here each file represents a single symbol, and erasure codes allow to handle erasure of any $n-m$ symbols, i.e., loss of any $n-m$ files. There are many standard schemes that have been proposed.
{ "domain": "cs.stackexchange", "id": 19340, "lm_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, data-compression", "url": null }
Here's a parametric equation I have made for a regular $n$-gon, coded in R: n=5; theta=(0:999)/1000; r=cos(pi/n)/cos(2*pi*(n*theta)%%1/n-pi/n); plot(r*cos(2*pi*theta),r*sin(2*pi*theta),asp=1,xlab="X",ylab="Y", main=paste("Regular ",n,"-gon",sep="")); And picture: The formula I used is $$\displaystyle r=\frac{\cos\left(\frac{\pi}{n}\right)}{\cos\left(\left(\theta \mod \frac{2\pi}{n}\right) -\frac{\pi}{n}\right)} \; .$$ This equation is actually just the polar equation for the line through the point $(1,0)$ and $(\cos(2\pi/n),\sin(2\pi/n))$ which cointains one of the edges. By restricting the range of the variable $\theta$ to the interval $[0,2\pi/n[$, you will in fact just get that edge. Now, we want to replicate that edge by rotating it repeatedly through an angle $2\pi/n$ to get the full polygon. But this can also be achieved by using the modulus function and reducing all angles to the interval $[0,2\pi/n[$. This way, you get the polar equation I propose.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429103332288, "lm_q1q2_score": 0.8030389883314318, "lm_q2_score": 0.8152324938410783, "openwebmath_perplexity": 781.848302968416, "openwebmath_score": 0.8314317464828491, "tags": null, "url": "http://math.stackexchange.com/questions/41940/is-there-an-equation-to-describe-regular-polygons" }
sparse = AmatrixS[2 n + 1]; // AbsoluteTiming //First 0.0481058 original = Amatrix[2 n + 1] ; // AbsoluteTiming //First 35.6627 sparse == original True there is also considerable size savings as the array is extremely sparse: ByteCount /@ {original, sparse} {62220816, 272856} notice I assumed your KroneckerDelta's are never nonzero at the same position. If that's not the case you would create a separate SparseArray for each delta and add them together. • Hey @george2079! This looks great. Thank you. I previously used SpareArray but not this way. Thank you again. – Gaurav Maurya May 17 '17 at 11:05
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9683812309063186, "lm_q1q2_score": 0.8005721909486313, "lm_q2_score": 0.8267118004748678, "openwebmath_perplexity": 1778.8394973628258, "openwebmath_score": 0.3257712721824646, "tags": null, "url": "https://mathematica.stackexchange.com/questions/146062/difference-equations" }
ros, python, script, deb my_private_package1: ubuntu: ros-hydro-my-private-package1 In our case we add the follow line to the 20-default.list: yaml file:///home/freeleons/ws/src/roboteq/roboteq_msgs/roboteq_msgs.yaml We add the following lines to the roboteq_msgs.yaml: roboteq_msgs: ubuntu: ros-kinetic-roboteq-msgs Now run bloom-generate: bloom-generate rosdebian --os-name ubuntu --ros-distro kinetic If it still want to use rosdep to find the key, you need to run rosdep update. Then try to run rosdep resolve roboteq-msgs, if it successfully resolve the key. Next run the fakeroot command: fakeroot debian/rules binary it gives following error: dpkg-shlibdeps -Tdebian/ros-kinetic-roboteq-driver.substvars -l/home/freeleons/ws_copy/src/roboteq_driver/debian/ros-kinetic-roboteq-driver//opt/ros/kinetic/lib/ debian/ros-kinetic-roboteq-driver/opt/ros/kinetic/lib/roboteq_driver/driver_node dpkg-shlibdeps: warning: can't parse dependency ros-kinetic-roboteq_msgs
{ "domain": "robotics.stackexchange", "id": 28518, "lm_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, python, script, deb", "url": null }
haskell, json, api, sqlite module Main where import Control.Monad.Trans.Class (lift) import Data.List (intersperse) import Data.Map (fromList) import Data.Monoid ((<>)) import Database.HDBC import Database.HDBC.Sqlite3 import Data.Aeson (toJSON) import Controllers.Home (home, docs, login) import Network.Wai.Middleware.RequestLogger (logStdoutDev) import Network.Wai.Middleware.Static (addBase, noDots, staticPolicy, (>->)) import System.Environment (getEnv) import Web.Scotty -- Needed for type declarations import Data.Convertible.Base db :: String -> String db environment = case environment of "prod" -> "/mnt/vol/pg-text-7.db" "dev" -> "/home/jon/Code/gitenberg-scrape/pg-text-7.db" _ -> error "Environment must be one of 'prod' (production) or 'dev' (development)." port :: String -> Int port environment = case environment of "prod" -> 80 "dev" -> 8000 _ -> error "Environment must be one of 'prod' (production) or 'dev' (development)."
{ "domain": "codereview.stackexchange", "id": 29632, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "haskell, json, api, sqlite", "url": null }
computability, automata, computation-models, books Please post answers that describe a complete curriculum, explaining which chapters of each book are relevant at which stage of the course or self-study. Introduction to the Theory of Computation by Michael Sipser is a relatively recent entry into this field. It was the required book for a class my friend was taking, and I asked him for the PDF so I could browse through at my leisure. I ended up reading almost the whole book, even the chapters on topics I was already very familiar with, just because the book is such a joy to read. It's written at an introductory level, which means less notation, more exposition, and more intuition. The motivation behind every idea and theorem is crystal clear. He precedes every proof with a "proof idea" section that lays out the path the proof is going to take without getting into the gory details. The book covers Automata Theory, Computability Theory, and Complexity Theory to a satisfactory depth for an undergraduate level. I've read many textbooks in
{ "domain": "cs.stackexchange", "id": 7750, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computability, automata, computation-models, books", "url": null }
homework-and-exercises, classical-mechanics, spring Title: Force to compress previously supported spring? Let's assume I have a spring with k = 1 kN/m, an uncompressed length of 2.0 m, and a compressed length of 1.0 m (i.e. 1 kN of force to fully compress the spring.)
{ "domain": "physics.stackexchange", "id": 93626, "lm_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, spring", "url": null }
• Wouldn't there be some issues of uniform convergence? Why can you pass the integral through the sum? – abnry Jan 20 '14 at 15:07 • @nayrb Consider them as Lebesgue integrals. – Pedro Tamaroff Jan 20 '14 at 15:12 With the PolyLogaritm Recursive Property and $\ds{{\rm Li}_{2}\pars{0} = 0}$: \begin{align} \color{#66f}{\large\int_{0}^{1}{t\ln\pars{t} \over 1 + t^{2}}\,\dd t}&= \Re\int_{0}^{\ic}{\rm Li}_{2}'\pars{t}\,\dd t=\Re{\rm Li}_{2}\pars{\ic} =\color{#66f}{\large -\,{\pi^{2} \over 48}} \end{align}
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9863631651194374, "lm_q1q2_score": 0.8064253480592285, "lm_q2_score": 0.8175744761936437, "openwebmath_perplexity": 543.552873960666, "openwebmath_score": 0.9997543692588806, "tags": null, "url": "https://math.stackexchange.com/questions/644993/how-to-compute-int-01-fract-ln-t1t2" }
# We have two coins, A and B. For each toss of coin A, the probability of getting head is 1/2… We have two coins, A and B. For each toss of coin A, the probability of getting head is 1/2 and for each toss of coin B, the probability of getting Heads is 1/3. All tosses of the same coin are independent. We select a coin at random and toss it till we get a head. The probability of selecting coin A is ¼ and coin B is 3/4. What is the expected number of tosses to get the first heads? The above problem is taken from the website https://www.analyticsvidhya.com/blog/2017/04/40-questions-on-probability-for-all-aspiring-data-scientists/ question 11 My solution is either 1/(1/4*1/2 + 3/4*1/3)=8/3, including the success toss, or 5/3, not including the success toss. My understanding is that it is geometric distribution question.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.98549641775279, "lm_q1q2_score": 0.869629493698352, "lm_q2_score": 0.8824278587245935, "openwebmath_perplexity": 231.28077818769313, "openwebmath_score": 0.8348644971847534, "tags": null, "url": "https://math.stackexchange.com/questions/2767678/we-have-two-coins-a-and-b-for-each-toss-of-coin-a-the-probability-of-getting" }
python, genbank Title: KeyError when getting features from a genbank file with biopython with some accessions but not others I'm very new to python but i've been using it to extract the sequence of a gene from a genbank file. The issue is is that sometimes i'll get the output i want (prints the sequence to a file) and sometimes it will return a key error. This depends on which accession i'm using. Does anyone know why it sometimes might give a key error? I thought it might be something to do with the genbank records themselves, but they look pretty similar and the gene is there (in the gene feature qualifier). EG works with HG738867.1 but not AP019703.1. Here's my code - from Bio import Entrez, SeqIO
{ "domain": "bioinformatics.stackexchange", "id": 1734, "lm_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, genbank", "url": null }
mobile-robot, ros-kinetic, mobile-base, ur10, ur5 where pid_for_gazebo_ros_control.yaml contains just the following. gazebo_ros_control: pid_gains: shoulder_pan_joint: {p: 100.0, i: 0.01, d: 10.0} shoulder_lift_joint: {p: 100.0, i: 0.01, d: 10.0} elbow_joint: {p: 100.0, i: 0.01, d: 10.0} wrist_1_joint: {p: 100.0, i: 0.01, d: 10.0} wrist_2_joint: {p: 100.0, i: 0.01, d: 10.0} wrist_3_joint: {p: 100.0, i: 0.01, d: 10.0}
{ "domain": "robotics.stackexchange", "id": 30192, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mobile-robot, ros-kinetic, mobile-base, ur10, ur5", "url": null }
conformal-field-theory, group-theory Title: Integrating the generator of the infinitesimal special conformal transformation (c.f Di Francesco, Conformal Field Theory chapters 2 and 4). The expression for the full generator, $G_a$, of a transformation is $$iG_a \Phi = \frac{\delta x^{\mu}}{\delta \omega_{a}} \partial_{\mu} \Phi - \frac{\delta F}{\delta \omega_a}$$ For an infinitesimal special conformal transformation (SCT), the coordinates transform like $$x'^{\mu} = x^{\mu} + 2(x \cdot b)x^{\mu} - b^{\mu}x^2$$ If we now suppose the field transforms trivially under a SCT across the entire space, then $\delta F/\delta \omega_a = 0$. Geometrically, a SCT comprises of a inversion, translation and then a further inversion.
{ "domain": "physics.stackexchange", "id": 14634, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "conformal-field-theory, group-theory", "url": null }
java, game listOfDots.remove(i); } } System.out.println(n); } Iterator<Point> i = foods.iterator(); while(i.hasNext()){ Point food = i.next(); if(food.distance(n) < 20){ i.remove(); size++; } } frame.repaint(); }
{ "domain": "codereview.stackexchange", "id": 19723, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, game", "url": null }
c#, .net, reflection DragAndDropUrlFormat = true, Feeds = false, FileDownloadRestrictions = false, FileProtocolNavigation = false, FrameContentModification = false, FrameContentSecurity = false, GpuRendering = false, Http10ConnectionMaximum = 6, Http11ConnectionMaximum = 6, IFrameMailToThreshold = false, ImageMimeTypeDetermination = true, InformationBarHandling = false, InputPromptBlocking = false, IViewObjectLegacyDrawing = true, LegacyInputModel = true, LegacyCompressionSupport = true, LocalMachineLockdown = false, LocalImageBlocking = false, LocalObjectBlocking = false, LocalScriptBlocking = false, MimeTypeDetermination = true, MimeTypeHandling = false, MKProtocolSupport = true, NamedWindowIsolation = true, NavigationSoundSupport = false, ProtocolLockdown = false,
{ "domain": "codereview.stackexchange", "id": 19894, "lm_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, reflection", "url": null }
javascript, html, template, modules function cleanup () { while(listeners.length) { let listener = listener.pop(); listener.element.removeEventListener(listener.event, listener.fn); } } return { init, cleanup }; })(); ContentFilter.init(loadData, render, ''); // Rememeber to handle the cleanup on page unload or if you // redraw all the piece of page where you have the filter // module.
{ "domain": "codereview.stackexchange", "id": 29927, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, html, template, modules", "url": null }
This kind of problems is always ill-posed, since given any sequence $a_0,a_1,\ldots,a_n$ we are free to assume that $a_k=p(k)$ for some polynomial $p$ with degree $n$, then extrapolate $a_{n+1}=p(n+1)$ through Lagrange's approach or the backward/forward difference operator. A taste of the second approach: $$\begin{array}{ccccccccc} 1 & & 5 & & 19 & & 65 & & 211\\ & 4 && 14 && 46 && 146\\ & & 10 && 32 && 100 && \\ &&& 22 && 68 &&&\\ &&&& 46\end{array}$$ by applying four times the difference operator, we reach a constant polynomial, hence we may re-construct $p(n+1)$ this way:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9777138177076645, "lm_q1q2_score": 0.8367774958856141, "lm_q2_score": 0.8558511506439708, "openwebmath_perplexity": 447.47283512904306, "openwebmath_score": 0.920082151889801, "tags": null, "url": "https://math.stackexchange.com/questions/1790642/general-formula-for-the-1-5-19-65-211-sequence" }
ros, create-autonomy Regarding the /bumper message type: I assume that is_light_left etc. messages correspond to when the wheels are not solidly on the ground, right? I found that they are very unreliable, in some cases not responding at all to the wheel, and sometimes being very slow to respond. Is that a sign of a problem with the hardware? This is not correct. The bumper message is regarding the forward facing bumpers. is_light_left in particular refers to whether the left-most light sensor on the front bumper is detecting an obstacle. For detecting if a one of the wheels is not on the ground you can use the /wheeldrop topic, which outputs an std_msgs/Empty message if one of the two wheels is not on the ground. Regarding the omni IR sensor: It looks like it returns either 0 or 161 -- is that correct? But the range is very short (like 10-20 cm). I know a Roomba can find its way to the base from a longer distance. Is it not relying on the IR?
{ "domain": "robotics.stackexchange", "id": 29717, "lm_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, create-autonomy", "url": null }
homework-and-exercises, astrophysics, astronomy, luminosity The problem is that the correct answer is $7.6 \times 10^5 L_{\bigodot}$ The author's solution states that To calculate the luminosity, we need to use the bolometric absolute magnitude as only bolometric quantities account for the power emitted over the whole wavelength range. As $M = −2.5 \log L+c$, where $c$ is a constant, we can relate $\zeta$ Pup’s luminosity $L_{\zeta}$ to the solar luminosity $L_{\bigodot}$ $$M_{\zeta}-M_{\bigodot}=-2.5\log_{10}\left(\frac{L_{\zeta}}{L_{\bigodot}}\right)$$ and thus $$\frac{L_{\zeta}}{L_{\bigodot}}=10^{-4 \left(M_{\zeta}-M_{\bigodot}\right)}=10^{0.4(4.8+9.9)}=7.6\times 10^5$$ Okay, so I understand why the author's solution is correct. But I don't understand why my solution is incorrect. This is because from my lecture notes I have that
{ "domain": "physics.stackexchange", "id": 66214, "lm_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, astrophysics, astronomy, luminosity", "url": null }
thermodynamics, surface-tension $T$ is temperature, $S^i$ is entropy fo surface, $U^i$ is internal energy of surface and $A^i$ is surface area. Exploiting one-homogenity of entropy $S^i(\lambda U^i, \lambda A^i) = \lambda S^i(U^i, A^i)$ one gets Euler equation $$ T^iS^i = U^i - \sigma A^i .$$ For surface density of entropy $s^i=S^i/A^i$ and energy $u^i=U^i/A^i$ one have $$ T^i s^i = u^i - \sigma ,$$ from which you read that $\sigma$ is surface density of Helmholtz potential.
{ "domain": "physics.stackexchange", "id": 8155, "lm_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, surface-tension", "url": null }
quantum-mechanics, quantum-entanglement Title: Questions about entanglement from a laymen/quantum hobbyist Please note I am not a physicist I just read every article I can on it, I understand a good amount on it though. But no maths. (currently trying to learn the maths) By what means can we as humans entangle two particles? How does (just examples are fine) it happen in nature? And I would guess technically there could be a particle in me entangled with a particle in another person; maybe my future wife? I think the answer to the first is... We make them by shooting a photon at a half silvered mirror and somehow it splits and one bounces off the half silver while the other one leaves and we capture the one, and wait for the other and capture it too. Then measure one and measure the other and see they are the same? EDIT:
{ "domain": "physics.stackexchange", "id": 7200, "lm_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-entanglement", "url": null }
java, game, 2048 void makeAMove(Direction direction) { if(direction == Direction.UP) { for(int x = 0; x < area[0].length; x++) { for(int y = 1; y <= area.length - 1; y++) { if(y == 0) { continue; } if(area[y][x].isEmpty()) { continue; } if(area[y-1][x].isEmpty()) { //empty above - move there area[y-1][x].setPowerOf2(area[y][x].getPowerOf2()); area[y][x].setEmpty(); y-=2; //as we may need to move this cell even higher. continue; } if(area[y][x].getPowerOf2() == area[y-1][x].getPowerOf2()) { // are the same? make a merge area[y][x].setEmpty(); area[y-1][x].increasePowerOf2();
{ "domain": "codereview.stackexchange", "id": 36512, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, game, 2048", "url": null }
forces, fluid-dynamics, projectile, drag, navier-stokes As mentioned at the start other phenomena start to play a role, specifically 'lift' becomes dominant. First theoretically treated by Saffman, 'lift' occurs when the particle will start a rotation due to the gradient in velocity and causes it to move laterally depending on the orientation of the flow in relation to the motion of the particle. I will not go into details here, for more information see e.g. this publication on Saffman lift phenomena, specifically ch. 2 'Lateral migration: lift in low-Reynolds-number flows'
{ "domain": "physics.stackexchange", "id": 84610, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "forces, fluid-dynamics, projectile, drag, navier-stokes", "url": null }
catkin-make Title: How to disable "Policy CMP0045 is not set" warnings? I only create catkin package without edit anything. When I catkin_make , it shows a lots of warnings. It makes me very hard to see the other error or warnings. The full log: sam@sam:~/code/ros_hydro$ catkin_make Base path: /home/sam/code/ros_hydro Source space: /home/sam/code/ros_hydro/src Build space: /home/sam/code/ros_hydro/build Devel space: /home/sam/code/ros_hydro/devel Install space: /home/sam/code/ros_hydro/install #### #### Running command: "make cmake_check_build_system" in "/home/sam/code/ros_hydro/build" #### #### #### Running command: "make -j8 -l8" in "/home/sam/code/ros_hydro/build" #### sam@sam:~/code/ros_hydro$ catkin_make Base path: /home/sam/code/ros_hydro Source space: /home/sam/code/ros_hydro/src Build space: /home/sam/code/ros_hydro/build Devel space: /home/sam/code/ros_hydro/devel Install space: /home/sam/code/ros_hydro/install ####
{ "domain": "robotics.stackexchange", "id": 23175, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "catkin-make", "url": null }
vectors, group-representations, lie-algebra, spinors, lorentz-symmetry How do I obtain (3) and what is the specific form of $A$, i.e. its relation with the vector representation $\Lambda^\mu_{\,\,\nu}$? Defining the following $$ (\tilde p) \equiv p^\mu, \qquad \Lambda \equiv \Lambda^\mu_{\,\,\nu},$$ $$ \sigma \equiv \sigma_{\alpha \dot \alpha}, \qquad \hat p \equiv p_{\alpha \dot \alpha},$$ we can rewrite (1) and (2) in matrix form as $$ \tag{5} \hat p \equiv \sigma \tilde p \rightarrow \sigma \Lambda \tilde p = ( \sigma \Lambda \sigma^{-1}) \hat p,$$ however, this disagrees with (3) which I know to be right, so what is wrong with my reasoning? Why does the transformation law (3) has a form $$\tag{6} A \rightarrow U^{-1} A U,$$ while the usual vector transformation (1) has a form $V \rightarrow \Lambda V$?
{ "domain": "physics.stackexchange", "id": 18942, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vectors, group-representations, lie-algebra, spinors, lorentz-symmetry", "url": null }
definitions, markov-chain Any state representation which is composed by the full history is a MDP, because looking at the history (coded in your state) is not the same as looking back previous states, so Markov property holds. The problem here is that you will have an explosion of states, since you need to code in the state any possible trajectory, and it is unfeasible most of the times.
{ "domain": "ai.stackexchange", "id": 410, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "definitions, markov-chain", "url": null }
Given arbitrary $y \in \mathbb R ^n$, we seek an $x \in \mathbb R ^k$ such that $y = Ax$ In this setting, existence of a solution is highly unlikely Without much loss of generality, let’s go over the intuition focusing on the case where the columns of $A$ are linearly independent It follows that the span of the columns of $A$ is a $k$-dimensional subspace of $\mathbb R ^n$ This span is very “unlikely” to contain arbitrary $y \in \mathbb R ^n$ To see why, recall the figure above, where $k=2$ and $n=3$ Imagine an arbitrarily chosen $y \in \mathbb R ^3$, located somewhere in that three dimensional space What’s the likelihood that $y$ lies in the span of $\{a_1, a_2\}$ (i.e., the two dimensional plane through these points)? In a sense it must be very small, since this plane has zero “thickness” As a result, in the $n > k$ case we usually give up on existence
{ "domain": "quantecon.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9896718456529513, "lm_q1q2_score": 0.8225588762452533, "lm_q2_score": 0.8311430499496096, "openwebmath_perplexity": 466.1709062883697, "openwebmath_score": 0.9561919569969177, "tags": null, "url": "https://lectures.quantecon.org/jl/linear_algebra.html" }
IRS Rehires Hundreds of Fired Workers Despite Serious Transgressions August 3 2017 by Patrice Lee Onwuka Study: MD County to Lose 47,000 jobs because of $15 Minimum Wage August 2 2017 by Patrice Lee Onwuka Adam Carolla Schools Congress on Campus Free Speech July 31 2017 by Patrice Lee Onwuka How One Tech Company is Taking on the Future of Work July 28 2017 by Patrice Lee Onwuka Governor Christie Shuts Down Costly Paid Leave Expansion Bill July 27 2017 by Patrice Lee Onwuka Teachers’ Union Boss Plays the Race Card against Secretary DeVos July 25 2017 by Patrice Lee Onwuka Cutting the Strings on Obamacare Enrollment Assistance July 24 2017 by Patrice Lee Onwuka Not Even Death Stops a Government Check July 21 2017 by Patrice Lee Onwuka Who Cares for the Caregivers? July 19 2017 by Patrice Lee Onwuka College Diversity Officials Rake in Major Dough July 18 2017 by Patrice Lee Onwuka DHS Hides Spending$3.6 Mil of Taxpayer Dollars on Pricey Conferences July 17 2017 by Patrice Lee Onwuka
{ "domain": "ihuq.pw", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9869795114181105, "lm_q1q2_score": 0.857514230470787, "lm_q2_score": 0.8688267796346599, "openwebmath_perplexity": 6607.073204715545, "openwebmath_score": 0.199847012758255, "tags": null, "url": "http://nbkx.ihuq.pw/properties-of-matrix-multiplication-proof.html" }
# Integrating Fractions with Substitution 1. Jun 3, 2013 ### cp255 So the problem is ∫(6x+5)/(2x+1)dx. I know the proper way to solve this is to long divide these two expressions and then solve. However, I tried doing it with substitution. u = 2x+1 dx = du/2 I then reasoned that 3u + 2 = 6x+5 since 3(2x+1) + 2 = 6x+3+2 = 6x+5 so I substituted it on top. (1/2)∫(3u+2)/u du Solving this integral gives me (3/2)u + ln|u| + C which equals (6x+3)/2 + ln|2x+1| + C. However, Wolfram Alpha says the answer is 3x + ln|2x+1| + C. I don't understand what I did wrong or why I can't do what I did. 2. Jun 3, 2013 ### scurty It's the same answer. The 3/2 term gets absorbed into the + C term because 3/2 is just a constant. You did the problem correctly. 3. Jun 3, 2013 ### cp255 Well that makes sence. It is sometimes hard to check my calculus work especially with computers since there are so many different forms an answer can take. 4. Jun 3, 2013 ### scurty
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9603611620335328, "lm_q1q2_score": 0.8104440775532682, "lm_q2_score": 0.8438950986284991, "openwebmath_perplexity": 773.191044159227, "openwebmath_score": 0.9001209139823914, "tags": null, "url": "https://www.physicsforums.com/threads/integrating-fractions-with-substitution.695283/" }
ros, video, camera Originally posted by Nexus8 with karma: 106 on 2016-06-23 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by Fabiobreo on 2016-06-27: Thanks a lot, it worked for me!
{ "domain": "robotics.stackexchange", "id": 24521, "lm_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, video, camera", "url": null }
image-processing, opencv Title: Detecting defects/differences in printed images I've been experimenting with various methods to detect defects in printed images. Features that are qualified as defects may include scratches, discoloration, etc. I'm not very experienced in image processing and not sure if my approach would be acceptable. There are several approaches that I've tried: Given two images (one good, the other one is defect) Threshold and blur Run Canny edge detection Remove noises using fastNlMeansDenoising XOR the two images and use SIFT to find outstanding features that may be classified as a defect.
{ "domain": "dsp.stackexchange", "id": 3314, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "image-processing, opencv", "url": null }
The last examples above illustrate a very important property of equivalence classes, namely that an equivalence class may have many di erent names. Then Ris symmetric and transitive. Let . The intersection of two equivalence relations on a nonempty set A is an equivalence relation. The quotient remainder theorem. But di erent ordered … We say is equal to modulo if is a multiple of , i.e. Equality modulo is an equivalence relation. Modulo Challenge (Addition and Subtraction) Modular multiplication. Then is an equivalence relation. A rational number is the same thing as a fraction a=b, a;b2Z and b6= 0, and hence speci ed by the pair ( a;b) 2 Z (Zf 0g). We write X= ˘= f[x] ˘jx 2Xg. An equivalence relation is a relation that is reflexive, symmetric, and transitive. Example 5: Is the relation $\geq$ on $\mathbf{R}$ an equivalence relation? Theorem. The following generalizes the previous example : Definition. For example, take a look at numbers $4$ and $1$; $4 \geq 1$ does not imply that $1
{ "domain": "terabook.info", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9678992932829918, "lm_q1q2_score": 0.8023292887942892, "lm_q2_score": 0.8289388104343892, "openwebmath_perplexity": 683.6421284616597, "openwebmath_score": 0.8740193843841553, "tags": null, "url": "http://terabook.info/mzu82/9ac599-equivalence-relation-examples" }
1. ## Arithmetic Sequences What is the sum of the first 100 terms of this sequence: 5, 11, 17, 23...? 3. ## Re: Arithmetic Sequences I know how to calculate this but according to a site, my calculations are wrong. I did 5 + 6*99 which indicates the final term. Adding the final term to the first term 599+5 and dividing that by 2, would be the average. The number of terms as stated is 100, so the answer should be 302 * 100, but according to the site, that's not the answer, so I don't know what I did wrong here. 4. ## Re: Arithmetic Sequences The sum of an arithmetic sequence is given by $S_n = \dfrac{n}{2}(2a + (n-1)d)$ where • $n$ is the number of terms • $a = U_1$ which is the first term • $d$ is the common difference (between terms) You are told that $n=100$ and it's not hard to see that $a=5$. Now all that's left is to find the common difference and then plug into the formula at the top of this post.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105314577313, "lm_q1q2_score": 0.8004704963760951, "lm_q2_score": 0.8198933337131076, "openwebmath_perplexity": 520.5227240609872, "openwebmath_score": 0.7890233993530273, "tags": null, "url": "http://mathhelpforum.com/algebra/183969-arithmetic-sequences.html" }
ros, eclipse, makefile, cmake OBJS = BasibosAnaProgram all: @mkdir -p $(TARGET) for i in $(OBJS); do echo "$(CXX) $(INCS) $$i.cpp -o $(TARGET)/$$i $(LIBS)"; done @for i in $(OBJS); do $(CXX) $(INCS) $$i.cpp -o $(TARGET)/$$i $(LIBS); done clean: @for i in $(OBJS); do rm -f $(TARGET)/$$i; done And here is the example CMakeLists.txt that Makefile should be included: cmake_minimum_required(VERSION 2.4.6) include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) rosbuild_init() set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) rosbuild_add_library(${PROJECT_NAME} src/Basibos.cpp) rosbuild_add_library(${PROJECT_NAME} src/HedefeGitme.cpp) rosbuild_add_library(${PROJECT_NAME} src/Konum.cpp) rosbuild_add_library(${PROJECT_NAME} src/Robot.cpp) rosbuild_add_library(${PROJECT_NAME} src/Sonar.cpp) rosbuild_add_library(${PROJECT_NAME} src/Zaman.cpp) rosbuild_add_library(${PROJECT_NAME} src/XMLAyiklayici.cpp)
{ "domain": "robotics.stackexchange", "id": 15161, "lm_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, eclipse, makefile, cmake", "url": null }
NIntegrate[uvalfixed[x, T], {x, -BoundaryCondition, BoundaryCondition}] (* 1. *) • @ xzczd: Great answer man, as far as I can see now, this really seems to solve the problem. Thanks! – user1611107 Feb 10 at 11:49 • @ xzczd: Quick followup question, please? In your method, what would you do if the problem had a V(x) which diverges as x approaches +0, so that you want to place a reflecting boundary at some small positive x and solve numerically only in the half positive plane? Thanks! – user1611107 Feb 10 at 20:51 • @user1611107 I'm sorry, but I don't understand what you mean… – xzczd Feb 11 at 4:10 As correctly pointed out in the comment the domain of integration is very large. BoundaryCondition = 20; Plot[{Pinit[x], uval[x, 0]}, {x, -BoundaryCondition, BoundaryCondition}, PlotRange -> All, PlotStyle -> {Red, {Dashed, Green}}] BoundaryCondition = 100; BoundaryCondition = 150; Let's try with MethodOfLines while keeping the original domain of interest,
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9553191348157373, "lm_q1q2_score": 0.844539637402781, "lm_q2_score": 0.8840392771633079, "openwebmath_perplexity": 3631.8556957621067, "openwebmath_score": 0.41703495383262634, "tags": null, "url": "https://mathematica.stackexchange.com/questions/191081/how-to-preserve-normalization-in-ndsolve" }
The concepts of $$\limsup$$ and $$\liminf$$ are useful if a sequence $$a_n$$ does not converge, but is bounded. In this case, we still want to develop a concept of a limit for $$a_n$$. Suppose that $$a_n$$ is bounded and does not necessarily converge. Then, by the Bolzano-Weierstrass theorem, there exists at least one subsequence of $$a_n$$ that does converge. Note that there may be more than one subsequence of $$a_n$$ that converges. More specifically, let $$Q$$ be the set of subsequences of $$a_n$$ that converge. Then, for each sequence in $$Q$$, take its limit and put it into the set $$S$$, such that $$S = \{\lim s_n \mid s_n \in Q\}$$ We then define $$\limsup a_n = \sup S$$ and $$\liminf a_n = \inf S$$. Therefore, $$\limsup a_n$$ can be thought of as "the largest limit of all the convergent subsequences of $$a_n$$" and $$\liminf a_n$$ can be thought of as "the smallest limit of all the convergent subsequences of $$a_n$$". When $$a_n$$ does converge to a limit $$L$$, then the set
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.975946446405965, "lm_q1q2_score": 0.8132801855770941, "lm_q2_score": 0.8333246035907933, "openwebmath_perplexity": 179.16997474571744, "openwebmath_score": 0.9471896886825562, "tags": null, "url": "https://math.stackexchange.com/questions/493526/can-someone-clearly-explain-about-the-lim-sup-and-lim-inf/493650" }
ros, tcpros, publisher Comment by Mehdi. on 2014-03-31: You might consider installing Rosbridge and contacting it from java using websockets. All you need to do is to include websockets in your java project. An example of rosbridge can be found on this website (here implemented on javascript): http://rosbridge.org/doku.php?id=rosbridge_v2.0_example_commands Comment by unknown_entity1 on 2014-04-01: Thanks Mehdi, I appreciate your suggestion, and, rosbridge does not meet the requirements of the system my group is building. Our client will be highly efficient, very flexible, and work out of the box in autonomous robots, built by other robots, without the need for people in the middle.
{ "domain": "robotics.stackexchange", "id": 17469, "lm_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, tcpros, publisher", "url": null }
computational-physics, phase-transition, molecular-dynamics # now relax the entire structure to its local minimum min_style cg minimize 1e-4 1e-6 100 1000 run 0 # now you can test which phase melts or grows at a given temperature, e.g. 1500 K velocity all create 1500.0 1234 fix 1 all nvt temp 1500.0 1500.0 0.2 fix 2 all press/berendsen iso 0.0 0.0 1000.0 run 5000 First of all, you should choose the right order parameter. For freezing or melting transitions people often use the so-called bond order parameters: quantities that probe the structural local ordering. The Steinhardt-Nelson order parameters or related quantities are common choices. Once you have the right order parameter, you can look at your simulation and tell how many particles are in each phase. Now you have two choices:
{ "domain": "physics.stackexchange", "id": 47612, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computational-physics, phase-transition, molecular-dynamics", "url": null }
kinetic-theory-of-gases, viscosity, liquids Second question on the viscosity of gases The textbooks seems to be talking about a limited range of P. Viscosity of gases is dependent on very low or very high pressures. However, for ideal gases and normal pressures, it is only dependent on the temperature. Yes, it is quite counterintuitive. Also viscosity of gases increases with temperature. This is another surprise. https://en.wikipedia.org/wiki/Viscosity#Pure_gases You can try posting this second query in Physics forum. I don't know the derivation of that Wikipedia expression.
{ "domain": "chemistry.stackexchange", "id": 13206, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kinetic-theory-of-gases, viscosity, liquids", "url": null }
population-genetics, genetics, phenology The expected trait of the offspring is equal to the mean of the parents traits. For this I assumed we don't have more information about the genetic of the trait (typically, without knowing the directionality of dominance and number). What is the expected phenotypic trait of the offspring population given the phenotypic trait of the parent population? As a consequence of the above, the expected mean phenotypic trait of the offspring population is equal to the mean of the parent population (in absence of selection). What is the expected variance in the offspring population?
{ "domain": "biology.stackexchange", "id": 5635, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "population-genetics, genetics, phenology", "url": null }
Assuming that the entire company is made up of only those two lines of business, and you're asking "What is the average number of people hired by the whole company per month?", the answer is obviously 50+80 = 130. This seems to be what Ron wants, and it isn’t really an average at all, just a total! So what about the idea that you can’t average averages? That’s really a different story: The operations above are perfectly reasonable. Let me show you the kind of situation that I think you were worried about, and you'll see why it's different from the situations above: I take 4 exams and have an average score of 80. Then I take 2 more exams and on those 2, my average is 100. What's my overall average for the course? The wrong way to do it is (80+100)/2 = 90. This is wrong because the averages were of different-sized groups. To get the correct answer, I know that on the first 4 exams I got 320 total points because when I divide 320 by 4, I get 80.
{ "domain": "themathdoctors.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.985496423290417, "lm_q1q2_score": 0.8508693504563144, "lm_q2_score": 0.863391617003942, "openwebmath_perplexity": 590.2567744497204, "openwebmath_score": 0.746770441532135, "tags": null, "url": "https://www.themathdoctors.org/weighted-averages-averaging-averages-or-rates/" }
c#, generics, collections public T this[int index] { get { return _iterableList[index]; } set { _iterableList[index] = value; } } public IEnumerator<T> GetEnumerator() { return _iterableList.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } public int Count { get { return _iterableList.Count; } } public bool IsReadOnly { get { return _iterableList.IsReadOnly; } } public void Add(T item) { _iterableList.Add(item); } public void Clear() { _iterableList.Clear(); } public bool Contains(T item) { return _iterableList.Contains(item); } public void CopyTo(T[] array, int arrayIndex) { _iterableList.CopyTo(array, arrayIndex); } public int IndexOf(T item) { return _iterableList.IndexOf(item); }
{ "domain": "codereview.stackexchange", "id": 23543, "lm_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, collections", "url": null }
beginner, haskell, linked-list, functional-programming Title: Insert value into multiple locations in a list Code insertAt :: a -> [Int] -> [a] -> [a] insertAt x indices xs = go 0 xs where go _ [] = [] go j (y:ys) | nextIndex `elem` indices = y : x : go (nextIndex + 1) ys | otherwise = y : go nextIndex ys where nextIndex = j + 1 Questions How can I make this code more efficient? How can I make the code easier to follow? Is a recursive approach the correct one? Do the Prelude or Data.List have any functions that could make this more readable/efficient? Is it intended that insertAt 999 [1] [1..10] inserts 999 at index 1, but insertAt 999 [0] [1..10] does nothing. Shouldn't it insert a value at index 0? Also, it looks like certain other insertions don't work correctly: > insertAt 999 [2,5,6,7] [1..10] [1,2,999,3,4,999,5,999,6,7,8,9,10]
{ "domain": "codereview.stackexchange", "id": 41331, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, haskell, linked-list, functional-programming", "url": null }
is also known as the “slope.” The b represents the y-axis intercept. $\begin{array}{l}f\text{(2)}=\frac{\text{1}}{\text{2}}\text{(2)}-\text{3}\hfill \\ =\text{1}-\text{3}\hfill \\ =-\text{2}\hfill \end{array}$. Subtract x from each side. Find a point on the graph we drew in Example: Graphing by Using the y-intercept and Slope that has a negative x-value. Recognize the standard form of a linear function. Graphing a Linear Equation by Plotting Three Ordered Pairs. In Activity 1 the learners should enter the expressions one by one into the graphing calculator and classify the functions according to the shape of the graph. A linear equation is drawn as a straight line on a set of axes. But if it isn't, convert it by simply placing the value of m over 1. You need only two points to graph a linear function. First, graph y = x. Students also learn the different types of transformations of the linear parent graph. A Review of Graphing Lines. These unique features make Virtual Nerd a viable
{ "domain": "co.id", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.983596967483837, "lm_q1q2_score": 0.8857583575641955, "lm_q2_score": 0.900529776774399, "openwebmath_perplexity": 420.482420127325, "openwebmath_score": 0.5752109885215759, "tags": null, "url": "http://www.appeton.co.id/future-currency-tosgcr/63e023-linear-function-graph" }
formal-languages, regular-languages the empty set is in $F$; Each single element set is in $F$; If $X, Y$ are in $F$, then $X \cup Y$ is in $F$; If $X, Y$ are in $F$, then $XY$ is in $F$; If $X$ is in $F$, then $X^*$ is in $F$. In 4. $XY = \{xy \mid x \in X \text{ and } y \in Y \}$, what is this product? concatenation product? In the following link, there is a complete paper http://igm.univ-mlv.fr/~berstel/Mps/Travaux/A/1969-3RationalSetsCommutativeMonoids.pdf The product is the monoid product. A monoid is a set equipped with an operation (which we can call product) satisfying certain axioms. The classical monoid we use in formal languages is $\Sigma^*$ (for some alphabet $\Sigma$), in which case the monoid product is indeed concatenation. But this is not the only possibility: for example, every group is a monoid, since the monoid axioms are a subset of the group axioms.
{ "domain": "cs.stackexchange", "id": 4606, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "formal-languages, regular-languages", "url": null }
python, python-3.x, data-mining, apache-spark get leading start date get disabled records add column indicating whether product ever disabled (max of is disabled) capture replacement dataset get max replacement date create indicator for current lifecycle records filter data for current lifecycle records.
{ "domain": "codereview.stackexchange", "id": 30202, "lm_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, data-mining, apache-spark", "url": null }
ros, controller-manager Title: Starting a controller in the same namespace as the controller_manager I have a problem when trying to start controllers for multiple robots that they cannot find the controller_manager [WARN] [1498038782.062813, 84.949000]: Controller Spawner couldn't find the expected controller_manager ROS interface. I am using the plugin in the .xacro file like so: <gazebo> <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so"> <robotNamespace>/</robotNamespace> </plugin> </gazebo> and then launching each robot in a group with a different namespace. What am I doing wrong?
{ "domain": "robotics.stackexchange", "id": 28167, "lm_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, controller-manager", "url": null }
As another example, if the original sin wave is sampled in 0.5 seconds, that means we are assuming that its sampling rate is 16 points. And the original signal is a 2Hz sin wave as it would have completed two full cycles in 1 second. So I would expect that the Fourier coefficient corresponding to 2Hz has nonzero weights and everything else is zero. Fourier coefficient's frequency ($i.e. k$ in $x_k$) can be translated to frequency in herts by: $$\frac{\textrm{Sample Rate *} k}{\textrm{Total N of Sample Points} }\;\;\;\; \textrm{(Hz)}$$
{ "domain": "github.io", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.970687766704745, "lm_q1q2_score": 0.8067803889377646, "lm_q2_score": 0.8311430478583168, "openwebmath_perplexity": 2150.2376350235495, "openwebmath_score": 0.987745463848114, "tags": null, "url": "https://fairyonice.github.io/review-on-dicrete-fourier-transform.html" }