text
stringlengths
1
1.11k
source
dict
differential-geometry, spacetime-dimensions, linear-algebra Title: What exactly is a dimension? How do you exactly define what is and isn't a dimension? I heard somewhere that it is "anything you can move through" but if that is right, why wasn't time and space considered a dimension before Einstein? Coming from a math perspective, I would define a dimension as "any property which is orthogonal to all other properties." "Orthogonal" here means you cannot get to one property by applying scalar operations on another. For example, the x-axis dimension can never become a y-axis value, and similarly for time vs. spatial dimensions. For that matter, it's fair to consider any "unit" as a dimension, since you can't apply any function to convert, say, mass or color of an object into one of its spatial dimensions.
{ "domain": "physics.stackexchange", "id": 22613, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "differential-geometry, spacetime-dimensions, linear-algebra", "url": null }
Maybe it will help to notice that $10^j=2^j5^j$, so clearly $2^j|10^j$, and thus $10^j\equiv 0\pmod{2^j}$. Essentially for that particular case, you have $10\equiv 0\pmod{2}$, which says $2|10$. It follows that $10^j\equiv 0\pmod{2^j}$ because $10^j$ has $j$ factors of $10$, each of which is divisible by $2$, and thus you can divide by $j$ factors of $2$. That is $2^j|10^j$, or $10^j\equiv 0\pmod{2^j}$. Does that make it more clear?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9890130557502124, "lm_q1q2_score": 0.8834946583892588, "lm_q2_score": 0.8933093989533708, "openwebmath_perplexity": 488.43683317997164, "openwebmath_score": 0.9607234597206116, "tags": null, "url": "http://math.stackexchange.com/questions/23780/how-does-divisibility-test-using-congruence-work" }
mark the line segment SP of length MR to get the point P of the hyperbola. A Bézier curve (/ ˈ b ɛ z. i. eɪ / BEH-zee-ay) is a parametric curve used in computer graphics and related fields. To put this equation in parametric form, you’ll need to recall the parametric formula for an ellipse: This video explains how to determine the parametric equations of a line in 3D.http://mathispower4u.yolasite.com/ The Length and Width dimensional constraint parameters are set to constants. The parametric equation for a circle is: Parameterization and Implicitization. Solution . If the function f and g are di erentiable and y is also a di erentiable function of x, the three derivatives dy dx, dy dt and dx dt are related by the Chain rule: dy dt = dy dx dx dt using this we can obtain the formula … Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share … Given the parametric equations of a surface it is
{ "domain": "regency-group.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232940063591, "lm_q1q2_score": 0.8103003883837694, "lm_q2_score": 0.8244619285331332, "openwebmath_perplexity": 528.449860012721, "openwebmath_score": 0.8386204242706299, "tags": null, "url": "http://regency-group.com/jlngq0kv/parametric-equation-formula-b2adc2" }
c++, performance, tic-tac-toe, classes public: void print_board(); int play_move(int index, char move); int check_win(char move); void start(); }; int main() { TicTacToe game; game.start(); return 0; } void TicTacToe :: start() { while (playing == true) { print_board(); std::cout << "Play your move " << current_turn << std::endl; std::cin >> input; if (play_move(input, current_turn) == 0) { std::cout << "Box already occupied" << std::endl; continue; }; state = check_win(current_turn); if (state == 1) { print_board(); std::cout << current_turn << " wins the game!" << std::endl; break; } else if (state == 2) { std::cout << "Draw!" << std::endl; break; }; current_turn = (current_turn == 'X') ? 'O' : 'X'; }; };
{ "domain": "codereview.stackexchange", "id": 42109, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, performance, tic-tac-toe, classes", "url": null }
venus, water Most rocky planets have plenty of Oxygen stored in the rocks that make up their crust and Venus already has plenty of Nitrogen. What Venus really lacks is hydrogen, so any hydrogen rich elements might be useful in the long run, but the first step is some kind of process to reduce the CO2 and get the planet to begin to cool down. Maybe a sun-shield but one that size would be a very expensive project and very far outside of our ability right now. Removing what's basically an ocean's mass of CO2 is very difficult. CO2 is a very stable molecule and not easily removed from an atmosphere.
{ "domain": "astronomy.stackexchange", "id": 4943, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "venus, water", "url": null }
machine-learning, clustering, scikit-learn So the path, here is 1->2->4->1, where 1,2,4 are Pageids. @Shagun's answer is right actually. I just expand it! There are 2 different approaches to your problem: Graph Approach As stated in @Shagun's answer you have a weighted directed graph and you want to cluster the paths. I mention again because it's important to know that your problem is not a Graph Clustering or Community Detection problem where vertices are clustered! Cunstructing a Graph in networkx using the last two column of the data, you can add time spent as weight and users who passed that link as an edge attribute. After all you'll have different features for clustering: the set of all vertices an individual ever met in the graph, total, mean and std of time spent, shortest path distribution parameters, ... which can be used for clustering the user behaviors. Standard Data
{ "domain": "datascience.stackexchange", "id": 306, "lm_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, clustering, scikit-learn", "url": null }
You know how to compute the conditional probabilities appearing in the derivation above. To begin, I checked your computations in (a) and (b), using R statistical software. They are correct: 1 - pnorm(36, 30, 3) 0.02275013 # part (a) 1 - pnorm(36, 50, 7) 0.9772499 # part (b) If you know about the Empirical Rule you can get very close to the answer to (a) without tables or extra computation: The probability of a result more than $2\sigma = 6$ away from $\mu = 30$ (in either direction) is about 5%. You are looking only in the upper direction so it should be about half that or 2.5%, which is very near to 0.2275. You should be able to verify similarly that part (b) is about right. For the rest, you need to find the 'overall' probability that it takes longer than 36 minutes. The 'law of total probability' gives (.9)(.0228) + (.1)(.9772). Do you see how I got that?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9793540710685614, "lm_q1q2_score": 0.8118245965963004, "lm_q2_score": 0.8289388083214156, "openwebmath_perplexity": 234.79983225614126, "openwebmath_score": 0.7449105381965637, "tags": null, "url": "https://math.stackexchange.com/questions/1351929/normal-distribution-exercise" }
beginner, logging, powershell Although not in use in your script, you should be aware of the following: Parameter names can also have aliases. So for example Get-WinEvent -ComputerName $comp could also be written Get-WinEvent -cn $comp. Aliases have to be defined; they aren't automatic. Parameter names accept any unambiguous stub of the name. So, you can use a partial name, like Get-WinEvent -FilterH @{}. In this example, you can't use Get-WinEvent -Filter because there are also -FilterXml and -FilterXPath parameters, but you can do down to a single character as long as it's unambiguous for that command.
{ "domain": "codereview.stackexchange", "id": 28174, "lm_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, logging, powershell", "url": null }
ros, c++, catkin, cmake My three new files have this structure: Node file: #include <classheader.h> int main(int argc, char** argv) { ros::init(argc, argv, "ClassName_Node"); ClassName CN; ros::spin(); return 0; } Header file : #ifndef _CLASSHEADER_H #define _CLASSHEADER_H #include <head_loc/manythings.h> class ClassName { private: Multiple ClassVariables; public: ClassName(); // Constructor for publishers etc.. output function1(); // do 1st thing output functionN(); // do Nth thing }; #endif Class fucntions : #include <classheader.h> ClassName::ClassName() // Constructor for publishers etc.. { } output ClassName::function1() // do 1st thing { } output ClassName::functionN() // do Nth thing { }
{ "domain": "robotics.stackexchange", "id": 21124, "lm_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, c++, catkin, cmake", "url": null }
python, interview-questions, circular-list Introducing enumerate to get rid of the code to track index: #split list at index point, compare the lists rot2 = lst2[index:] + lst2[:index] for i, x in enumerate(lst1): if x != rot2[i]: return False return True
{ "domain": "codereview.stackexchange", "id": 29370, "lm_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, interview-questions, circular-list", "url": null }
Guest Mar 4, 2017 #14 0 $$\text{First we decide what ranks we will use. Then we will pick suits for all of the cards.} \text{We choose the two paired ranks in {13\choose 2}=78 ways and the remaining rank in {11\choose 1}=11 ways.} \text{Then we choose the suits for these cards in {4\choose 2}{4\choose 2}{4\choose 1}=144 ways.} \text{This gives a total of 78\cdot 11\cdot 144 = \boxed{123552} two pair hands.}$$ Guest Mar 4, 2017
{ "domain": "0calc.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787827157819, "lm_q1q2_score": 0.8370957851868656, "lm_q2_score": 0.847967764140929, "openwebmath_perplexity": 2760.915328615229, "openwebmath_score": 0.8127923011779785, "tags": null, "url": "https://web2.0calc.com/questions/in-poker-a-5-card-hand-is-called-two-pair-if-there-are-two-cards-of-one-rank-two-cards-of-another-rank-and-a-fifth-card-of-a-third-rank" }
algorithms, optimization, combinatorics, integers (10. Observe that a minimal set solution which is the goal of the algorithm cannot contain more than one repetition of the same number.) Example: $$\{2,3,5,7,8,10,12,13,15\}$$ Represent 15 in all possible ways as a sum of two numbers from the set of sums. $$(13,2),(12,3),(10,5),(8,7)$$ Try to find maximal number that is in all groups or that can be represented as a sum. Obviously we can start searching for it from 8, there is no point going above it. 13 from the first group is 13=8+5 so 13 is fine, but 12 from the second group is not fine since there is no 4 to make 12=8+4 in the set of sums. Next we try with 7. But immediately 13 cannot be covered, there is no 6. Next we try 5. 13=5+8, 12=5+7, 10=5+5, and for the last either 8=5+3 or 7=5+2 but not both. The groups are now: $$((5,8),2),((5,7),3),((5,5),5),((5,3),7)$$ 5 is repeating in all groups so we extract it $P=\{5\}$. We extract 5 only once from each group. $$(8,2),(7,3),(5,5),(3,7)$$
{ "domain": "cs.stackexchange", "id": 5906, "lm_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, optimization, combinatorics, integers", "url": null }
rust Title: Rust language solution to old "Perl Quiz of the Week" #21 I'm particularly concerned here that I'm copying more often than I need to, and that's slowing things down; obviously, given the algorithm/approach, I need to do some copying, but I don't want to be doing more than necessary. Code also available at https://gist.github.com/fizbin/905a219af86adb95a6e7fd4bd26a507e /* * This program solves the puzzle * https://perl.plover.com/qotw/e/021 * * (In case that link goes away, a brief summary of the problem * is to consider the free non-abelian group with 26 generators * 'a' through 'z', under the equivalence relation that any two * words found in the dictionary that are anagrams of each other * are equivalent. Now determine which letters commute with which * other letters, and specifically which letters are in the center.) * * It does so by reading the dictionary to determine all anagram * pairs and then applying two strategies over and over again
{ "domain": "codereview.stackexchange", "id": 43862, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rust", "url": null }
c#, thread-safety, concurrency, collections Concurrent software should always be tested, for that reason I include a couple of tests (you don't have to review them): public const int TakeNMessages = 10000; static void Main(string[] args) { foreach (var thread in TestWithWaitersFirst()) { thread.Join(); } Console.WriteLine("Completed " + "TestWithWaitersFirst"); foreach (var thread in TestWithProducersFirst()) { thread.Join(); } Console.WriteLine("Completed " + "TestWithProducersFirst"); Console.Read(); } private static void WriteWithThreadId(string message) { Console.WriteLine("Thread" + Thread.CurrentThread.ManagedThreadId + ": " + message); }
{ "domain": "codereview.stackexchange", "id": 22044, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, thread-safety, concurrency, collections", "url": null }
python-3.x, excel, xml def write_sheet_header(worksheet): ''' Writes the first row in the worksheet. The cell text is the key from wantedInfos. The column character comes from the keys "col" flag. We use characters because worksheet.column_dimensions cannot work with integer. param 1: worksheet object ''' row = 1 boldFont = Font(name="Calibri", bold = True) for key in wantedInfos.keys(): width = wantedInfos[key]["Width"] column = wantedInfos[key]["Col"] worksheet.column_dimensions[column].width = width cell_name = get_cell_name(column, row) cell = worksheet[cell_name] cell.font = boldFont worksheet[cell_name] = key logging.debug("Column {} was set to width {}".format(key, width)) worksheet.freeze_panes = "ZZ2" logging.debug("First row pinned")
{ "domain": "codereview.stackexchange", "id": 45197, "lm_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-3.x, excel, xml", "url": null }
Finally, we will get 60+60+90 = 210 arrangements if we consider 1-1-1 to be a valid option - since the question does not explicitly exclude this possibility. Could you please explain why we ignored 1-1-1 combination? Hey jhabib, You have to place all the marbles. If you assume the 1-1-1 combination, note that 2 marbles are leftover. But you HAVE TO distribute 5 marbles. So 3-1-1 and 2-2-1 are the only possibilities. All 5 marbles must be distributed.
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9532750413739076, "lm_q1q2_score": 0.8597784670932733, "lm_q2_score": 0.9019206732341567, "openwebmath_perplexity": 1365.9630466009708, "openwebmath_score": 0.8652944564819336, "tags": null, "url": "https://gmatclub.com/forum/in-how-many-ways-can-5-different-colored-marbles-be-placed-in-3-distin-161598.html" }
condensed-matter, quantum-spin, quasiparticles Title: How to unify these two distinct pictures of spin waves? For convenience let's focus on an isotropic ferromagnet, $H = -\sum \boldsymbol{S_i \cdot S_j}$. On a classical level we are often given the picture of spin waves as slowly rotating spins, each sufficiently close to perfect alignment as to keep the energy cost really small. This is also the intuition given for Goldstone modes: one can use the continuous symmetry to start with a given spin direction and then apply bigger and bigger rotations as one goes further along. However the quantum-mechanical picture seems completely different to me. There a spin wave with momentum $\boldsymbol k$ is created by applying the operator $\sum e^{-i \boldsymbol{k \cdot r}} \; S^+_\boldsymbol{r}$ on a ground state of all spins down. In other words it is a massive superposition where each state only has a single perturbed spin.
{ "domain": "physics.stackexchange", "id": 37379, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "condensed-matter, quantum-spin, quasiparticles", "url": null }
You ask a very insightful question that I wish were emphasized more often. EDIT: It appears you are seeking reputable sources to justify the above. Sources and relevant quotes have been provided. Here's how I would explain this: • In probability, the emphasis is on population models. You have assumptions that are built-in for random variables, and can do things like saying that "in this population following such distribution, the probability of this value is given by the probability mass function." • In statistics, the emphasis is on sampling models. With most real-world data, you do not have access to the data-generating process governed by the population model. Probability provides tools to make guesses on what the data-generating process might be. But there is always some uncertainty behind it. We therefore attempt to estimate characteristics about the population given data. From Wackerly et al.'s Mathematical Statistics with Applications, 7th edition, chapter 1.6:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9664104933824753, "lm_q1q2_score": 0.8558835539435348, "lm_q2_score": 0.8856314783461303, "openwebmath_perplexity": 271.8597849264751, "openwebmath_score": 0.8698630928993225, "tags": null, "url": "https://math.stackexchange.com/questions/3959113/what-is-the-difference-between-expectation-variance-for-statistics-versus-p/3959120" }
unchanged. EECS 203-1 Homework 9 Solutions Total Points: 50 Page 413: 10) Let R be the relation on the set of ordered pairs of positive integers such that ((a, b), (c, d)) ∈ R if and only if ad = bc. Suppose that R is a relation from A to B. Suppose that the relation R on the finite set A is represented by the matrix MR. Show that the matrix that represents the symmetric closure of R is MR ∨ Mt R. Discrete structure. When A = B, we use the same ordering. For a given relation R, a maximal, rectangular relation contained in R is called a concept in R. Relations may be studied by decomposing into concepts, and then noting the induced concept lattice . Furthermore, when A = B we use the same ordering for A and B. i.e., Theorem :The transitive closure of a relation R equals the connectivity relation R*. Matrix Representations of Linear Transformations and Changes of Coordinates 0.1 Subspaces and Bases 0.1.1 De nitions A subspace V of Rnis a subset of Rnthat contains the zero element and is
{ "domain": "spar.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464499040094, "lm_q1q2_score": 0.8046306880235453, "lm_q2_score": 0.8244619242200081, "openwebmath_perplexity": 672.011338475735, "openwebmath_score": 0.8599205613136292, "tags": null, "url": "http://sandbox.spar.com/dracula-lives-ttfpkg/c3cte.php?9040a0=let-r-be-the-relation-represented-by-the-matrix" }
javascript, functional-programming, gulp.js major = parseInt(versionArray[0]); minor = parseInt(versionArray[1]); patch = parseInt(versionArray[2]); if (ver === 'major') { major = parseInt(versionArray[0]) + 1; } else if (ver === 'minor') { minor = parseInt(versionArray[1]) + 1; } else if (ver === 'patch') { patch = parseInt(versionArray[2]) + 1; } version = major + '.' + minor + '.' + patch; if (ver === '' || ver === undefined) { version = '0.0.0'; } gutil.log(gutil.colors.blue.bold('##################################################')); gutil.log(gutil.colors.blue.bold(' Building Dashboard version '+version)); gutil.log(gutil.colors.green.bold('~~ All change is detectable ~~')); gutil.log(gutil.colors.blue.bold('##################################################')); } The first thing that I see is that: major = parseInt(versionArray[0]) + 1;
{ "domain": "codereview.stackexchange", "id": 19181, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, functional-programming, gulp.js", "url": null }
c#, design-patterns, asynchronous, web-scraping public bool UrlAlreadyAdded(string url) { return UrlsToCrawl.Contains(url) || UrlsCompleted.Contains(url); } } } } crawler.Start(); This is very confusing naming. If a method is called Start(), I would expect it to, well, start the work and then return, not do all of the work. A better name would be something like Run(), or maybe even better, something more specific. private const string SiteUrl = "http://stackoverflow.com"; Why is this here? I think this makes much more sense as a constructor parameter, or maybe parameter to Start(). private const int MaxWorkers =5; Again, this should be probably configurable. Also, if you're processing a single website, it doesn't make much sense to have more workers than ServicePointManager.DefaultConnectionLimit, which by default is set to 2. public WebCrawler() { client = new HttpClient(); crawlList = new CrawlList(); }
{ "domain": "codereview.stackexchange", "id": 9877, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, design-patterns, asynchronous, web-scraping", "url": null }
As pointed out in the comments, it depends whether the 3-persons tables are distinguishable or not. If the 3-persons table are distinguished There is Three cases to look at. • If $$G$$ and $$J$$ sit at the 4-persons table, we need two more to seat with them, from remaining eight. Then choose the three, from remaining six for first 3-persons table, the last three goes at the last table. $${8\choose2} {6\choose3} {3\choose3}=560$$ • if they sit at the first 3-persons table, we need one more to complete the table. Then split the remaining seven. $${8\choose1} {7\choose4}{3\choose3}=280$$ • If they sit at the second 3-persons table, it is exactly the same as above. $${8\choose1} {7\choose4}{3\choose3}=280$$ The number of possibilities that $$G$$ and $$J$$ are seated together. $$560+280+280=1120$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9845754515389344, "lm_q1q2_score": 0.8348882329210957, "lm_q2_score": 0.8479677526147223, "openwebmath_perplexity": 277.89107246283055, "openwebmath_score": 0.8455268144607544, "tags": null, "url": "https://math.stackexchange.com/questions/3527698/counting-combinations" }
solar-system, geophysics, tidal-effect I'm also not sure how to answer the question about the Moon. It seems hard to imagine how the Moon could be in orbit yet the Earth still be tidally locked to the Sun, but I'm no expert. Another potential big difference is plate tectonics. If the oceans are frozen on the cold side then this will put a lot of weight on the plates there, which will probably change the dynamics of the whole system - but unfortunately I'm not currently able to imagine what the result would be. Plate tectonics are quite important for recycling elements over very long time scales. The water cycle on this planet would tend to transport nutrients to the hot side and deposit them there, so you'd need geological activity to recycle them in the long term.
{ "domain": "physics.stackexchange", "id": 3611, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "solar-system, geophysics, tidal-effect", "url": null }
watch as each graph is created and then pieced together to make a function. If there is no answer for f (x), write none. Let us examine where f has a discontinuity. production possibilities curve worksheet answers Redesign and Price. Piecewise Functions – Definition, Graph & Examples There are instances where the expression for the functions depends on the given interval of the input values. X 2 x 2 x 2 cases i. Show Answer. Answer: \displaystyle\lim\limits_{x. Piecewise FUNctions worksheet from mon Core Fun on from Piecewise Functions Worksheet With Answers, source:pinterest. * (z=Rd) where F_Ta_III can assume an infinite value only when z 2. Please be sure to answer the question. 2; Either recalculate the slope using (0,1) and (2,5) or note that the slope has not changed since the y-values of both endpoints have been increased by 1 which means that the change in y has not changed. Provide details and share your research! But avoid … Asking for help, clarification, or responding to
{ "domain": "m-spitzer.de", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464422083111, "lm_q1q2_score": 0.840815155525152, "lm_q2_score": 0.8615382147637196, "openwebmath_perplexity": 985.4630696164663, "openwebmath_score": 0.3814734220504761, "tags": null, "url": "http://m-spitzer.de/piecewise-functions-answers.html" }
python, python-3.x, database, websocket def handle_message(msg: dict) -> None: ... # still indented, so still inside the `with client` ws_linear.trade_stream( handle_message, "BTCUSDT" ) # still indented, so still inside the `with client` while True: sleep(1) # with statement ends here # client will be closed here
{ "domain": "codereview.stackexchange", "id": 44176, "lm_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, database, websocket", "url": null }
ros, bullet, transform Title: Error "error: ‘Matrix3x3’ is not a member of ‘tf’" while building bosch-ros-pkg I got errors while building some packages separately in bosch_shared_autonomy (pkgs are: safe_teleop_{ base, pr2, stage }). All errors look similar as the one below. : /home/user/link/bosch-ros-pkg-sourceforge/stacks/bosch_shared_autonomy/safe_teleop_base/src/safe_trajectory_planner.cpp:402: error: ‘Matrix3x3’ is not a member of ‘tf’ /home/user/link/bosch-ros-pkg-sourceforge/stacks/bosch_shared_autonomy/safe_teleop_base/src/safe_trajectory_planner.cpp:402: error: expected ‘;’ before ‘matrix’ /home/user/link/bosch-ros-pkg-sourceforge/stacks/bosch_shared_autonomy/safe_teleop_base/src/safe_trajectory_planner.cpp:403: error: ‘matrix’ was not declared in this scope :
{ "domain": "robotics.stackexchange", "id": 9683, "lm_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, bullet, transform", "url": null }
nuclear-physics, fusion For production purposes (be them energy, manufacture, etc.) we humans usually prefer more result (i.e: more energy output) as a result of less investment (i.e: less energy expenditure) to improve the efficiency of the conversion. As such, any fusion reaction for heavier elements will undoubtly be less energetic per dollar spent having it working, regardless if the purpose is weaponry, energy production or propulsion
{ "domain": "physics.stackexchange", "id": 5543, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nuclear-physics, fusion", "url": null }
computational-chemistry, quantum-chemistry, theoretical-chemistry, density-functional-theory MY ATTEMPTED ANSWER We have bond elongation in the reactant to the point of breakage. CISD is not size-consistent. It recovers less electron correlation energy for the larger reactant than for the products since the reactant is larger, so CISD cannot be used. The basis set however is fine. I don't know what method can work best for this system but would go arbitrarily with CCSD(T). 3. BLYP/6-31G(d) for geometry optimization and calculation of binding energy of the neon dimer, $\ce{Ne\bond{...}Ne}$. MY ATTEMPTED ANSWER
{ "domain": "chemistry.stackexchange", "id": 840, "lm_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-chemistry, quantum-chemistry, theoretical-chemistry, density-functional-theory", "url": null }
python, performance, python-3.x, programming-challenge, depth-first-search If you don't need this to be a class as a requirement of the leetcode automated judging, you can gain some efficiency by not passing an extra self argument all the time. This can simply be a function. Reworked Code def judge_point_24(nums): for i, a in enumerate(nums[:-1]): for j, b in enumerate(nums[i+1:], i+1): operations = {a+b, a*b, a-b, b-a} if a: operations.add(b/a) if b: operations.add(a/b) if len(nums) > 2: next_items = nums[:i] + nums[i+1:j] + nums[j+1:] for x in operations: if judge_point_24(next_items + [x]) == True: return True else: return any(abs(x-24) < 0.1 for x in operations) return False if __name__ == '__main__': def test(expected, nums): print(nums, judge_point_24(nums)) assert judge_point_24(nums) == expected
{ "domain": "codereview.stackexchange", "id": 34703, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, python-3.x, programming-challenge, depth-first-search", "url": null }
Since each vital line contains the same number of each numeral, each vital row and column contains $k$ occurrences of $2$. For vital diagonals in either direction, we count there are exactly $$1+2+\dots+(k-1)+k+(k-1)+\dots+2+1=k^2$$ occurrences of $2$. Therefore, $N=4k^2$. But there are $3k^2$ occurrences of $2$ in the whole table, and each entry belongs to exactly $1$ or $4$ vital lines. So $N\equiv 3k^2\pmod 3$, so $4k^2\equiv 3k^2\pmod 3$ which means $k$ is a multiple of $3$. Thus, $n$ must be a multiple of $9$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9911526449170696, "lm_q1q2_score": 0.8080198424929234, "lm_q2_score": 0.8152324938410783, "openwebmath_perplexity": 179.06899436452062, "openwebmath_score": 0.737983763217926, "tags": null, "url": "https://math.stackexchange.com/questions/2876896/filling-in-a-square-with-1-2-3-such-that-in-every-row-column-diagonal-divisibl" }
The Bisection Method is used to find the zero of a function. The x-coordinate of this point is the average of the positive and negative guesses. Download MatLab Programming App from Play store. function [ r ] = bisection( f, a, b, N, eps_step, eps_abs ) % Check that that neither end-point is a root % and if f(a) and f(b) have the same sign, throw an exception. com 9/27/01. To code the bisection algorithm. In this video tutorial, the algorithm and MATLAB programming steps of finding the roots of a nonlinear equation by using bisection method are explained. The method is also called the interval halving method. Basic Bisection Algorithm: 1. We also check whether f(a) = 0 or f(b) = 0, and if so return the value of a or b and exit. Image: The Bisection Method explained. The problem is that it seems like the teachers recommended solution to the task isn't quite right. Here’s what we do: As with the bisection algorithm, start by choosing an interval [a,b] in which we. The bisection method
{ "domain": "ac-immacolata.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9843363499098283, "lm_q1q2_score": 0.8516715152979666, "lm_q2_score": 0.8652240825770432, "openwebmath_perplexity": 622.7896160604779, "openwebmath_score": 0.4754257798194885, "tags": null, "url": "http://ac-immacolata.it/csxr/bisection-method-algorithm-matlab.html" }
mechanical-engineering, electrical-engineering, mechanical-failure Which techniques or design principles are applied to ensure a fault tolerant design, and which are applied to ensure a robust design?
{ "domain": "engineering.stackexchange", "id": 223, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering, electrical-engineering, mechanical-failure", "url": null }
electromagnetism, magnetic-fields The magnetic field created by the coil as a function of position. This is also rather difficult to calculate from first principles, though it can be done (particularly if you're only interested in the case where the ball moves along the symmetry axis of the coil.) You could also in principle measure the magnetic field at several points along the desired path and interpolate between them to figure out the force. Also, remember that I said that the magnetic field had to be "not too strong" above; if the magnetic field is too strong, then the nice linear relationship between the magnetic dipole $\vec{m}$ and the magnetic field $\vec{B}$ breaks down.
{ "domain": "physics.stackexchange", "id": 83517, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, magnetic-fields", "url": null }
Let us consider there are two matrices one is the input matrix ‘I’ and the second is the output matrix ‘O’. > t(dat) [,1] [,2] [,3] A 1 2 3 B 4 5 6 C 7 8 9 D 10 11 12 . A matrix with only one row is called a row vector, and a matrix with one column is called a column vector, but there is no distinction between rows and columns in a one-dimensional array of ndarray. If a matrix has only one row then it is called a row matrix. Matrix Transpose in R Last Updated: 22-04-2020 Transpose of a matrix is an operation in which we convert the rows of the matrix in column and column of the matrix in rows. The first one is using t to just transpose the dataframe as if it would be a matrix (indeed the result of t is a matrix, not a dataframe). So, in this video, I wanted to talk about an operation you can do on a matrix that's called taking the transpose of the matrix. This is because a functional maps every n -vector x into a real number y . • Transpose. Let be a matrix defined by Is it symmetric?
{ "domain": "thelaunchpadtech.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9648551566309688, "lm_q1q2_score": 0.8330478538582039, "lm_q2_score": 0.8633916170039421, "openwebmath_perplexity": 368.5576146674933, "openwebmath_score": 0.6036203503608704, "tags": null, "url": "https://www.thelaunchpadtech.com/forum/d96go/r9w2t0.php?a3a973=transpose-of-row-matrix-is-called" }
ocean, oceanography, remote-sensing, salinity Title: How is ocean salinity measured from space? Since 2009, two satellites (SMOS from ESA and Aquarius from NASA) are providing global salinity measurements. While ocean temperature is easily derived from infrared radiation for instance, what parameter is measured by those satellites to estimate the salinity of the ocean? In a nutshell: The instrument measures microwave radiances (after calibration) If we know the sea surface temperature, we can use radiances to calculate emissivity. The emissivity at 1.4 GHz is itself a function of near-surface ocean salinity. However, in reality, it's more complicated, because there are other factors that come into the equation, such as surface roughness, which depends on wind. Remote sensing problems are often underdetermined, and we need to make assumptions in order to retrieve the desired quantity. Measuring ocean salinity from space is a classical inverse problem. You can find details in the highly cited paper:
{ "domain": "earthscience.stackexchange", "id": 28, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ocean, oceanography, remote-sensing, salinity", "url": null }
visible-light, electromagnetic-radiation, radio, microwaves, infrared-radiation Title: Does a source emitting visible light also emit infrared, microwave and radio waves? I have a bulb which is hot enough to emit visible light and obviously it's hot enough to emit radiation which lies before the visible light temperature i.e. radio waves, microwaves, and infrared light. So is the bulb emitting radio waves, microwaves, infrared and visible light at the same time? (I think this is true but not sure as astronomers see stars at almost all light i.e. infrared, UV, Gamma rays, visible etc.) Thanks in advance! Not all light bulbs are thermal emitters. Fluorescent lights do not use incandescence, hence they would not emit an equal spectrum to an incandescent source with an identical maximal light frequency. But in general yes objects do concurrently emit a whole spectrum of waves based on their temperature, regardless of whether their light is visible to us.
{ "domain": "physics.stackexchange", "id": 20993, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "visible-light, electromagnetic-radiation, radio, microwaves, infrared-radiation", "url": null }
formal-languages, regular-languages, automata, formal-grammars, regular-expressions Now, for the automaton. The first observation is that the only way we can get an $a$ is if it's the first symbol we see; that's the only place an appropriate transition is defined and we never return to the initial state. We don't need to see an $a$ to accept; we can see a $b$ instead and accept (both $a$ and $b$ are accepted by the automaton). Now, how many $b$s can we see and still accept? Suppose the NFA always goes to state $2$ after the first input symbol (why not? it's an NFA). If we:
{ "domain": "cs.stackexchange", "id": 3427, "lm_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, automata, formal-grammars, regular-expressions", "url": null }
xml, xslt Title: Enumerating ancestors in XSLT I've been playing with some genealogical files in XML lately and wanted to create a transform that would list, for each person, the person's name, the count of ancestors, and the list of ancestors. Here's what I came up with, but I'd like to see if there's a better way to do this. <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsd="http://www.w3.org/2001/XMLSchema" > <xsl:output method="text"/> <xsl:template match="/people"> <xsl:apply-templates select="person"/> </xsl:template> <!-- for each person, print the name and ancestor count --> <xsl:template match="person"> <xsl:value-of select="@name"/> <xsl:text>(</xsl:text> <xsl:apply-templates select="." mode="count-kin"/> <xsl:text>): </xsl:text> <!-- now name all of the ancestors --> <xsl:apply-templates select="." mode="name-kin"/> <xsl:text> </xsl:text> </xsl:template>
{ "domain": "codereview.stackexchange", "id": 40199, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "xml, xslt", "url": null }
However, if 1, 2 and 5 do not balance then you eliminate 7 and 8. Recall that 1, 2 and 5 came from the heavier side of the first weighing so that if 1, 2 and 5 are heavier than 3, 4 and 6, then 3 and 4 are ordinary keys so that 1 and 2 are potentially heavier while 6 is potentially lighter (recall it came from the light side of the first weighing). A third weighing comparing 1 and 2 tells you that if 1 and 2 are the same then 6 is the a heavy key and if 1 and 2 are not the same then the heavier of the two is the odd key. On the other hand, if 1, 2 and 5 are lighter than 3, 4 and 6 then 1, 2 and 6 are ordinary keys while 5 is potentially lighter and 3 and 4 are potentially heavier. Finally, compare 3 and 4 (third weighing!). If they are the same then 5 is the special key and if they are not the same then the heavier of 3 and 4 is a heavy key. I'll leave it to you to decide the case when 1, 2, 3 and 4 balance with 5, 6, 7 and 8. :) 5. Nov 27, 2005 ### firstwave
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534316905262, "lm_q1q2_score": 0.8380756017487547, "lm_q2_score": 0.8539127529517043, "openwebmath_perplexity": 395.2470214797964, "openwebmath_score": 0.5628970265388489, "tags": null, "url": "https://www.physicsforums.com/threads/here-is-a-fun-math-statistic-probability-question.101523/" }
beginner, vba, excel, web-scraping now if you, or anyone else, sees one of those in the middle of a procedure, they'll know exactly what it is. Readable Code B = B - 3 If B <= 0 _ Then B = B + 12 C = C - 1 End If D = B & "/" & A & "/" & C B = B - 3 If B <= 0 _ Then B = B + 12 C = C - 1 End If I haven't got a clue what this is or what it's supposed to be doing. I just have to blindly trust that it's doing what it's supposed to be. Good variable naming will go a long way here. Just replacing variables with good, descriptive, names gives the following: lngMonth = lngMonth - 3 If lngMonth <= 0 _ Then lngMonth = lngMonth + 12 lngYear = lngYear - 1 End If str3MonthsAgoDate = lngMonth & "/" & lngDay & "/" & lngYear lngMonth = lngMonth - 3 If lngMonth <= 0 _ Then lngMonth = lngMonth + 12 lngYear = lngYear - 1 End If
{ "domain": "codereview.stackexchange", "id": 15456, "lm_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, vba, excel, web-scraping", "url": null }
type-checking, type-inference function c(x) { var n = d(x) var m = e(x) return n * m } function d(x) { return x + 2 } function e(x) { return x + 3 } Then, I am analyzing the method d(x). From just analyzing it by itself, we can infer that x must be some sort of number. We do this by what seems like simulating x + 2, and realizing that for that to be satisfied x must be a number. Not quite sure how to implement the type inference here, not sure if it uses symbolic evaluation too. But then we get to the function call a(1). In this case to do typechecking / type inference on d(x), we have to somehow traverse down the tree of functions, simulating how x is transformed along the way. It finds out that it is divided by 2 somewhere in there, so it goes from integer to float. So we check based on our original assumption that d(x) is a number, and agree that it will be valid. That is just me roughly trying to figure out how to do type checking / type inference. I'm wondering two things:
{ "domain": "cs.stackexchange", "id": 11770, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "type-checking, type-inference", "url": null }
algorithm, c, tree, iteration Sret = push(Sret, ret) stk = push(stk, curr) next = curr->sx else curr = Top(stk) if (last != curr-> dx) then //In-order block Srsx = push(Srsx, pop(Sret)) if (last != curr-> dx && curr->dx != NULL) then next = curr->dx else //Post-order block rdx = pop(Sret) rsx = pop(Srsx) r = pop(Sret) ret = rdx + rsx + r Sret = push(Sret, ret) stk = pop(stk) next = NIL last = curr curr = next This solutions works if I assume that a pop on an empty stack returns 0. Any other suggestions? Improvements? Is it really correct? Please can I have some feedback? Many thanks Working code (main.c): #include <stdio.h> #include <stdlib.h> #include "stack.h" #include "stack_int.h" #include "tree.h"
{ "domain": "codereview.stackexchange", "id": 26156, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm, c, tree, iteration", "url": null }
solver and calculator. In calculus, an improper integral is the limit of a definite integral, as an endpoint of the interval of integration approaches either a specified real number or ∞ or −∞ or, in some cases, as both endpoints approach limits. The reason you can’t solve these integrals without first turning them into a proper integral (i.e. Integrating over an … one without infinity) is that in order to integrate, you need to know the interval length. Therefore, both functions diverge. The every single and general integration techniques and even unique, important functions being provided. The equation for an indefinite integral can be written as . The calculator will evaluate the definite (i.e. Similarly, if a continuous function f\left(x\right)f(x) is give… Namely, what do you do when a definite integral has an interval that is infinite or where the function has infinite discontinuity? Example: Proper and improper integrals. This calculus 2 video tutorial explains how to evaluate
{ "domain": "loveourlula.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9603611654370414, "lm_q1q2_score": 0.8200646412507298, "lm_q2_score": 0.8539127473751341, "openwebmath_perplexity": 514.4997292402578, "openwebmath_score": 0.9548237919807434, "tags": null, "url": "http://loveourlula.com/aliya-mustafina-gamm/b9cec7-improper-integral-calculator" }
Please enter any value below to calculate the remaining values of a circle. You want to decorate your tabletop, which is in the shape of a circle, with a colorful sticker. The area of a circle is: π times the Radius squared: A = π r 2. or, when you know the Diameter: A = (π /4) × D 2. or, when you know the Circumference: A = C 2 / 4 π. The circle calculator, formula, example calculation (work with steps), real world problems and practice problems would be very useful for grade school students (K-12 education) to understand the concept of perimeter and area of circle. The calculations are done "live": How to Calculate the Area. If the radius of the tabletop is 21 in, find the amount of paper you need to cover its top surface. A unit circle or a trigonometry circle is simply a circle with radius 1 unit. Written by: PK. Unit circle calculator is an extremely handy online tool which computes the radians, sine value, cosine value and tangent value if the angle of the unit circle is entered.
{ "domain": "tigersul.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773708026035286, "lm_q1q2_score": 0.8080039676062328, "lm_q2_score": 0.8267117919359419, "openwebmath_perplexity": 634.1841053177131, "openwebmath_score": 0.8611290454864502, "tags": null, "url": "https://tigersul.com/michelle-visage-knxs/circle-calc%3A-find-a-148554" }
electrostatics, charge, conductors, method-of-images The potential inside the plate vanishes. The area left to the plate has no charges, and the boundary conditions are those of vanishing potential, so the solution is trivial: the potential vanishes left of the plate. This means that there is no electric field there, and so no charge density on the left side of the plate. This means that in total we have negative net charge (which can be found by integration). The result is the same if the thickness is zero. So far so good. But could this be more subtle? Setup 2: the neutral case A claim that the plate could be uncharged: This article claims that given an uncharged, non-grouded, conducting infinite plate gives the same electric field as a dipole, using the method of images. If the fields are the same as in the grounded case discussed above, then the potentials in both setups must be the same (let the potential at infinity vanish). So the plate is de-facto grounded, even if not physically.
{ "domain": "physics.stackexchange", "id": 95087, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics, charge, conductors, method-of-images", "url": null }
Example 3rd number and first number sum = 2 (middle number). Also, is there any better approach towards this problem rather than counting and arranging the 3 digit number? • Your confusion is completely reasonable, the problem as quoted is not well-stated and there are at least two reasonable interpretations. – André Nicolas Aug 26 '15 at 14:38 • Have you reproduced the question exactly ? "sum of the 2 digits" is not even proper English. – true blue anil Aug 26 '15 at 14:39 • @trueblueanil reproduced the correct english form of the question. – justin takro Aug 26 '15 at 14:44 • @AndréNicolas yes What to do i think Calculate and See the options side by side – justin takro Aug 26 '15 at 14:45 • If you have reproduced, (not changed) to correct English form, I would interpret it as the sum of any 2 digits is equal to the third. – true blue anil Aug 26 '15 at 14:49 4 Answers I'm going to assume that the problem means that the sum of any two digits equals the third.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561676667174, "lm_q1q2_score": 0.8215587908256713, "lm_q2_score": 0.8479677564567913, "openwebmath_perplexity": 321.1737973788015, "openwebmath_score": 0.765707790851593, "tags": null, "url": "https://math.stackexchange.com/questions/1410362/how-many-3-digit-numbers-can-be-formed-so-that-the-sum-of-two-digits-will-be-e" }
navigation, rviz, gmapping, base-laser, hokuyo Originally posted by guigui on ROS Answers with karma: 33 on 2014-06-02 Post score: 0 TF_OLD_DATA probably means that you have not set sim time to true. When playing back bagfiles, you have to use sim time so that the clock published by rosbag will be used by nodes that need to interact with time: rosparam set use_sim_time true This should be run after starting your roscore, but BEFORE starting gmapping or rosbag Originally posted by fergs with karma: 13902 on 2014-06-02 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 18138, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, rviz, gmapping, base-laser, hokuyo", "url": null }
ros, pocketsphinx Title: pocketsphinx recognizer.py has initial incorrect output I am using pocketsphinx and it works great for recognition. However, when recognizer.py first starts, it outputs one or two random words from the dictionary, as if there was a queue that has to be cleared. This happens even if the microphone is muted. Any idea where that might be originating? Is there some way to suppress that? Originally posted by dan on ROS Answers with karma: 875 on 2013-12-20 Post score: 0 I've not seen this before -- but I imagine it is likely an issue with either gstreamer or the VADAR gstreamer plugin which is used to segment the audio input. There's currently no built in options to handle such a problem, but it could probably be easily added by storing the time at which the pipeline was enabled and making sure that some time as passed when an utterance arrives. Originally posted by fergs with karma: 13902 on 2013-12-21 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 16508, "lm_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, pocketsphinx", "url": null }
c++, memory-management, template, trie void Trie::insert(std::string const& key) { assert(!key.empty()); auto node = &root; for (auto ch : key) { auto next_node = node->get_child(ch); if (next_node == nullptr) { node->add_child({}, ch); next_node = node->get_child(ch); assert(next_node != nullptr); } node = next_node; } node->set_last_letter(true); } bool Trie::contains(std::string const& key) const { assert(!key.empty()); auto node = &root; for (auto ch : key) { node = node->get_child(ch); if (node == nullptr) return false; } return node->is_last_letter(); } bool Trie::erase(std::string const& key) { assert(!key.empty()); auto node = &root; auto node_stack = std::stack<Node*>{ }; for (auto ch : key) { node = node->get_child(ch); if (!node) // key not in trie return false; node_stack.push(node); }
{ "domain": "codereview.stackexchange", "id": 31763, "lm_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++, memory-management, template, trie", "url": null }
<<{r,n1,n2}, r, {{r,n1},{n1,n2}}>> Programmers realized that this leads to errors, because it's easy to forget if the root is G[1] or G[2].  Programming languages introduced records, which are like tuples except the components are named rather than numbered.  The components of the graph G could be named G.nodes, G.root, and G.edges.  These components were called fields, and the graph G had the three fields named nodes, root, and edges. Programming languages later added a lot of additional stuff to records and called them objects.  TLA+ and PlusCal keep the original concept of a record as simply a value, just like a tuple or a number.  It introduces a simple way to write records, where the graph G can be written: [nodes |-> {r,n1,n2}, root |-> r, edges |-> {{r,n1},{n1,n2}}]
{ "domain": "azurewebsites.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471656514752, "lm_q1q2_score": 0.8322780692502828, "lm_q2_score": 0.8459424373085146, "openwebmath_perplexity": 2114.7976024829736, "openwebmath_score": 0.7224023938179016, "tags": null, "url": "http://lamport.azurewebsites.net/tla/tutorial/intermezzo2.html" }
cr.crypto-security, relativization, advice-and-nonuniformity, search-problem, random-oracles if $\;\;\; 1\hspace{-0.04 in}\big/\hspace{-0.07 in}\left(\hspace{-0.02 in}n^{2+j}\hspace{-0.02 in}\right) \; < \; \operatorname{Prob}_{\mathcal{O}}\left[A^{\mathcal{O}}(n,z^{\mathcal{O}}(n))\right] \;\;\;$ then
{ "domain": "cstheory.stackexchange", "id": 3714, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cr.crypto-security, relativization, advice-and-nonuniformity, search-problem, random-oracles", "url": null }
$f\left(x\right)=a{\left(x-{x}_{1}\right)}^{3}+b{\left(x-{x}_{1}\right)}^{2}+c\left(x-{x}_{1}\right)+d\text{\hspace{0.17em}}.$ ## Tips • You also can perform spline interpolation using the interp1 function with the command interp1(x,y,xq,'spline'). While spline performs interpolation on rows of an input matrix, interp1 performs interpolation on columns of an input matrix. ## Algorithms A tridiagonal linear system (possibly with several right-hand sides) is solved for the information needed to describe the coefficients of the various cubic polynomials that make up the interpolating spline. spline uses the functions ppval, mkpp, and unmkpp. These routines form a small suite of functions for working with piecewise polynomials. For access to more advanced features, see interp1 or the Curve Fitting Toolbox™ spline functions. ## References [1] de Boor, Carl. A Practical Guide to Splines. Springer-Verlag, New York: 1978. ## See Also #### Introduced before R2006a
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.983085084750966, "lm_q1q2_score": 0.8706510999155973, "lm_q2_score": 0.8856314813647587, "openwebmath_perplexity": 2331.510718211438, "openwebmath_score": 0.5684455633163452, "tags": null, "url": "https://www.mathworks.com/help/matlab/ref/spline.html?requestedDomain=www.mathworks.com&nocookie=true" }
a circle with speed e^t starting from x=1, y=0 equations that describe the motion of object... Center at and radius is, where demonstrate concavity as referring to a mathematical definition instead 2 Let., y = a cos θ, y = a sin θ usually entered as as a of! Is to make the process of differentiation of the form r = f θ. Between 0 and 2 p, x and y as written above all points that satisfy the equations is as. 9.32: graphing the parametric equations is called as circle equations that describe the motion of an involute the... A general topic | use as referring to a mathematical definition instead often useful have... Is to make the process of differentiation of the reasons for using parametric equations are commonly used in physics model... Curves, such as a pair of equations in Example 9.3.4 to concavity..., r = f ( θ ) we also have to consider the domain our! ( x ) \ ) model the trajectory of an object around the unit circle of curves single equation when... Topic | use as referring
{ "domain": "juvemedspa.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9863631659211717, "lm_q1q2_score": 0.8064253509068541, "lm_q2_score": 0.817574478416099, "openwebmath_perplexity": 355.1375793835365, "openwebmath_score": 0.840110719203949, "tags": null, "url": "http://www.juvemedspa.com/js/0tlwp08k/parametric-equation-of-circle-cbd045" }
r Title: Simulated annealing in R I am new in R and I have to implement simulated annealing for schaffer function and I did it. However I am not sure about the correctness of the code. simulated_annealing <- function(schaffer, step, s0, niter) { s_n <- s0 iter_count <- 0 for (k in 1:niter) { T <- (1 - step)^k s_new <- rnorm(2, s_n, 1) dif <- func(s_new) - func(s_n) if (dif < 0) { s_n = s_new } else { random <- runif(1,0,1) if (random < exp(-dif/T)) { s_n <- s_new } } iter_count <- iter_count + 1 print(sprintf("The number of iteration was: %f",iter_count)) print(sprintf("Function at s_new: %f", func(s_new))) print(sprintf("Function at s_n: %f", func(s_n))) print(sprintf("Current point: %f", s_n)) print(sprintf("Temperature: %f", T)) } return(s_n) }
{ "domain": "codereview.stackexchange", "id": 25863, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "r", "url": null }
orbital-motion, solar-system, celestial-mechanics, satellites, eclipse Title: Can you see a solar eclipse from the International Space Station? Inspired by last week's solar eclipse, I'm wondering under what conditions one can see a total solar eclipse from the ISS. How often does it happen? I guess it doesn't last very long because of the fast orbital speed. It's close enough to the earth to be well within the range of solar eclipses. There's always going to be a solar eclipse somewhere in space because the moon will always cast a shadow behind it, well, except for when the moon is eclipsed by the earth. But the moon's shadow passes over the earth just a small percentage of the time.
{ "domain": "physics.stackexchange", "id": 20583, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "orbital-motion, solar-system, celestial-mechanics, satellites, eclipse", "url": null }
asteroids, impact Taylor et al. (1996) have monitored incoming meteors with the AMOR radar in New Zealand and detected in one year 350,000 trails from incoming meteors of size 10–100 $\mu$m vaporizing in ~100 km's height. I don't know exactly how large an area AMOR monitors, but from simple trigonometry, and as an order-of-magnitude estimate, if the events happen in $h \sim 100\,\mathrm{km}$'s height, the radar can "see" a distance $d=\sqrt{h^2+2R_\oplus h} \sim 1100\,\mathrm{km}$, and thus covers an area $A\sim4\times10^6\,\mathrm{km}^2$. Thus, again multiplying by $A_\oplus$, this amounts to the order of 40 to 50 million meteors per year. Killer meteor rate and the Sudan asteroid
{ "domain": "astronomy.stackexchange", "id": 1404, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "asteroids, impact", "url": null }
rust let power = solax.get_inverter_power().await?; let mut db = Db::init(&env::var("MYSQL_DB_URL").unwrap())?; db.write_inverter_power(&power)?; let wa = WattAnalyticsApi::init( &env::var("WA_USERNAME").unwrap(), &env::var("WA_PASSWORD").unwrap() ).await?; let data = wa .get_power_meter_data( &env::var("METER_ID").unwrap(), 1, 1, Local::now(), Local::now().checked_add_signed(Duration::milliseconds(10000)).unwrap() // smaller from-to differences give off just an empty array ) .await? .power_data; db.write_home_power_usage(data.first().unwrap())?; Ok(()) } The GitHub repository Your solution looks good! Here are my suggestions for improving the structure to make it a bit easier to maintain and extend: As far as I can tell dotenv is not actively maintained so it might be better to switch to its fork dotenvy
{ "domain": "codereview.stackexchange", "id": 43598, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rust", "url": null }
matlab, convolution, image-processing, blur Title: Image Processing I have an image and I am trying to find its rows and columns. A = imread('lena.jpg'); nrows = size(A,1) ncols = size(A,2) This is 3 dimensional matrix. Output of this 512 and 512. I know A is the matrix but how can I know value of for example A[211][312] ? I want to use convolution filter to the image, obtain new matrix and turn it into a picture like "lena with blur". You can iterate for each channel: data = double(imread('lena.jpg')); data = data/255; % Potentially optional dataFilt = zeros(size(data)); nChan = size(data,3); kernelFilter = ones(11,11)/121; for iChan = 1:nChan dataFilt(:,:,iChan) = filter2(kernelFilter,data(:,:,iChan)); end subplot(1,2,1) imagesc(data) xlabel('Picture') subplot(1,2,2) imagesc(dataFilt) xlabel('Picture with blur')
{ "domain": "dsp.stackexchange", "id": 8890, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "matlab, convolution, image-processing, blur", "url": null }
java, object-oriented Title: Animals in the Zoo I am creating a zoo. In my zoo I want to have 3 types of animal: Mammal, Bird and Fish. I want to keep them in cages. My implementation of animals is (classes for Mammal and Fish looks almost the same as Bird, only TypeEnum is different): public class Bird implements Animal { private AnimalDetails animalDetails; private final BirdTypeEnum birdTypeEnum; public Bird(AnimalDetails animalDetails, BirdTypeEnum birdTypeEnum) { this.setAnimalDetails(animalDetails); this.birdTypeEnum = birdTypeEnum; } public String move() { return birdTypeEnum.move(); // return birdTypeEnum.toString() + " fly"; } public String getVoice() { return birdTypeEnum.getVoice(); } // getters and setters toString method }
{ "domain": "codereview.stackexchange", "id": 10788, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, object-oriented", "url": null }
vba, error-handling, excel Integer Is officially deprecated. The compiler will silently convert all Integers to Longs, so just use Long instead. Error Handling Do you really want your function to return 0 for all errors? What if it's given an empty object reference? I would rename your label to CleanFail: and think about what other failure scenarios it might want to deal with.
{ "domain": "codereview.stackexchange", "id": 19465, "lm_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", "url": null }
Fortunately, we can express this as an infinite product. For a number to be squarefree is just for it to not be divisible by $$4, 9, 25, \ldots, p^2,\ldots$$. The limiting fraction of $$(n,n+1)$$ pairs which do not contain a multiple of 4 is $$2/4$$; likewise, for neither to be a multiple of 9 is $$7/9$$, and so on. However, congruence modulo the first $$N$$ primes is independent over large ranges by the Chinese remainder theorem. So our probability that a "random" pair are both squarefree is $$\prod_p\frac{p^2-2}{p^2}$$ which looks to be around $$0.322634...$$, or a touch under one third. This means that your limiting value will be $$\frac12\left(1-\prod_p\frac{p^2-2}{p^2}\right) \approx 0.33868295...$$ If $$n+1$$ is squarefree then $$p(n+1)=n+1\implies a_n=0$$ thus $$\lim\sup_{n\to \infty} \dfrac{1}{x}\sum_{n \le x}a_n \le 1-\frac{6}{\pi^2}\approx 0.393$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9817357189762611, "lm_q1q2_score": 0.8564145901091501, "lm_q2_score": 0.8723473879530492, "openwebmath_perplexity": 237.79102174026804, "openwebmath_score": 0.9285973310470581, "tags": null, "url": "https://math.stackexchange.com/questions/3465091/how-often-is-the-product-of-the-distinct-prime-factors-of-a-number-greater-than" }
performance, vba, excel Use With With let's you hold an object reference, so this: sht.PageSetup.Zoom = False sht.PageSetup.FitToPagesWide = 1 sht.PageSetup.FitToPagesTall = 1 sht.PageSetup.BlackAndWhite = False sht.PageSetup.PrintArea = "A1:X62" Becomes: With sht.PageSetup .Zoom = False .FitToPagesWide = 1 .FitToPagesTall = 1 .BlackAndWhite = False .PrintArea = "A1:X62" End With Much easier to work with. Only Exit In One Place If you've got a random Exit Sub halfway through your code, on the end of a long if statement, it's very easy for someone to miss it. When you miss something like that, it's easy to change the code in a way that you *think* is safe, but is actually going to cause unexpected behaviour. So, instead of using an Exit here, you should just wrap everything in an If statement: Sub Picture11_Click() Const USER_PRINT_DIALOG As String = "Do you wish to print summary pages? Will take approximately 1-2 minutes to run the macro"
{ "domain": "codereview.stackexchange", "id": 21280, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, vba, excel", "url": null }
performance, vba, excel Title: Unoptimized VBA macro that edits cell values based on a partial string This macro is used to check if a partial string is present in a cell. Since the partial string is part of a product reference number, I have a lot of combinations. Is it possible to write these partial string combinations more efficient? Macro Sub Contain_Copy() Dim ranger As Long Dim lastrow As Long Dim FromSheet As Worksheet, ToSheet As Worksheet Set FromSheet = Sheets("C") lastrow = FromSheet.Cells(Rows.Count, "N").End(xlUp).Row
{ "domain": "codereview.stackexchange", "id": 26252, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, vba, excel", "url": null }
Of the $k+1$ gaps you could place the number $k+1$, only one will be illegal (immediately after $k$). So we get $|A_{k+1}|=k|A_k|$, $|A_1|=1$ It doesn't take long to generate $|A_n|=(n-1)!$ • You missed the fact that you could place $k+1$ into an invalid permutation, breaking up the only pair that made it invalid. For instance, for $n=3$, there is $1,3,2$ in addition to the two permutations you counted. – joriki Apr 7 '16 at 6:21
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9863631645181364, "lm_q1q2_score": 0.8109770726140462, "lm_q2_score": 0.8221891305219504, "openwebmath_perplexity": 193.61855223850796, "openwebmath_score": 0.9261277914047241, "tags": null, "url": "https://math.stackexchange.com/questions/1640926/counting-permutations-with-given-condition" }
vba, vb6 Title: KeyValuePair implementation In order to implement my own Dictionary<TKey, TValue> in VB6, I've implemented a KeyValuePair class, which can accomodate any type as its key, or value. This KeyValuePair class implements the IComparable and IEquatable interfaces which I'm also using in this custom List<T> implementation KeyValuePair.cls Private Type tKeyValuePair Key As Variant value As Variant End Type Private this As tKeyValuePair Implements IComparable Implements IEquatable Option Explicit Private Function IsComparable() As Boolean IsComparable = Not IsObject(this.Key) Or TypeOf this.Key Is IComparable End Function Public Property Get Key() As Variant If IsObject(this.Key) Then Set Key = this.Key Else Key = this.Key End If End Property Public Property Let Key(k As Variant) If IsEmpty(k) Then Err.Raise 5 this.Key = k End Property
{ "domain": "codereview.stackexchange", "id": 6881, "lm_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, vb6", "url": null }
meteorology, weather, precipitation, statistics, weather-forecasting Title: What do weather forecasters mean when they say "50% chance of rain"? What do weather forecasters mean when they say "50% chance of rain"? Even more confusing: weather report often says something like "30% chance of rain. >10mm", then the next day "70% chance of rain <1mm". How should I deal with this information, for example, if I'm planning a picnic? In the US, meteorologists forecast the probability of ANY amount of precipitation falling. The minimum amount of that we deem acceptable to meet this criteria is .01". So, we are forecasting the probability of one hundredth of an inch of precipitation to fall at a location. We look at observational data from ground stations, satellites, and computer models and combine it with our knowledge of meteorology/climate and our past experiences with similar weather systems to create a probability of precipitation.
{ "domain": "earthscience.stackexchange", "id": 1179, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "meteorology, weather, precipitation, statistics, weather-forecasting", "url": null }
microcontroller, gazebo, moveit Comment by fergs on 2013-08-11: SimpleMoveit was before we moved this to the new moveit_plugins repository, back when it was in my personal repository. Comment by cdrwolfe on 2013-08-12: Updated to add more details Comment by yin on 2016-11-28: hello, I also encounter this problem, do you solve the problem? Comment by tudler88 on 2016-11-30: make sure you have all the packages installed. A good way to check is to cd into the src/'your_robot' directory and type "rosdep install -r --from-paths . " It's unclear from your launch files and topic listing, but it's worth checking to make sure: MoveIt requires that your robot-interface nodes provide a FollowJointTrajectory action. Have you provided this action in one of your robot nodes? The controller manager files specify how to connect MoveIt to this action (which joints, what namespace/topic names, etc.), but a controller_manager does not provide the action itself.
{ "domain": "robotics.stackexchange", "id": 15199, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "microcontroller, gazebo, moveit", "url": null }
beginner, haskell, cryptography fromRight (Right a) = a generate = evalCRand $ tabulay ['A'..'Z'] main = newGenIO >>= printGenerated . fromRight . generate separate = join " " . chunksOf 1 tabulay :: [Char] -> Gen [[Char]] tabulay = mapM $ \x -> separate <$> ([x, '|'] ++) <$> tabulax 26 tabulax :: Int -> Gen [Char] tabulax cint = replicateM cint $ randomChoiceA arrMap arrMap :: Array Int Char arrMap = listArray (1, length characterMap) characterMap randomChoiceA ls = (ls !) <$> getCRandomR (bounds ls) characterMap :: [Char] characterMap = let cmap = ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] symb = ",./?~`!@#$%^&*()-_+={[]}\\|:;\"'" in cmap ++ symb type Gen a = CRand HashDRBG GenError a
{ "domain": "codereview.stackexchange", "id": 2322, "lm_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, cryptography", "url": null }
kinect, husky, openni-camera <!-- SKIM CLOUD --> <node pkg="clearpath_tools" type="SkimImage" name="skim1" > <param name="in" value="camera/rgb/points" /> <param name="out" value="camera/points/skim" /> <param name="skim_factor" value="2" /> </node> <!-- PASSTHROUGH --> <node pkg="clearpath_tools" type="Passthrough" name="passthrough1" > <param name="in" value="camera/points/skim" /> <param name="out" value="camera/points/passthrough" /> <param name="dist" value="4.0" /> </node>
{ "domain": "robotics.stackexchange", "id": 10938, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kinect, husky, openni-camera", "url": null }
- Why he choose $A = \{k\in \mathbb{Z},k\leq x \}$ ? –  Mohamez Oct 17 '12 at 15:46 What the proof says is that there is some set $A$, made of integer that are all less or equal to $x$. The set being bounded, it has a largest element, say $N$. In particular, $N\leq x$ by definition. Now why can we conclude that $$N\leq x<N+1?$$ Suppose $x\geq N+1$, then certainly $N+1$ would be in our set $A$, which contradict the fact that $N$ was the maximal element. Therefore we conclude that $N\leq x<N+1$ - Backwards. This would be proved as a consequence of the result in the question. –  GEdgar Oct 17 '12 at 14:56 it depends on how you see the problem, I agree that it does not go with the added information though –  Jean-Sébastien Oct 17 '12 at 14:59 Downvote rescinded. Another point (for the uniqueness): you need that there are no integers with distance less than 1 from each other. –  GEdgar Oct 17 '12 at 15:15 Hint $\$ Apply continuous mathematical induction.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9532750387190131, "lm_q1q2_score": 0.8024913802613117, "lm_q2_score": 0.8418256512199033, "openwebmath_perplexity": 230.73024187070848, "openwebmath_score": 0.9667178392410278, "tags": null, "url": "http://math.stackexchange.com/questions/215648/how-to-show-that-forall-x-in-mathbbr-space-existsn-in-mathbbz-such-t" }
the 2nd congruence into: $$a^5 \equiv a \mod{2}$$ Then the part that I am unclear on occurs. It seems that we can just multiply the 2 moduli together and the desired congruence falls out that: $$a^5 \equiv a \pmod{10}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9875683513421314, "lm_q1q2_score": 0.8836657606079439, "lm_q2_score": 0.8947894689081711, "openwebmath_perplexity": 147.5086358032251, "openwebmath_score": 0.9810587167739868, "tags": null, "url": "https://math.stackexchange.com/questions/2668314/multiplication-of-moduli-in-modular-congruences" }
geophysics, geology, oceanography, sea-level, rocks Title: Can rocks have pressure signatures? Since rocks can have magnetic signatures, as is the case with paleomagnetism, can they store past pressures also? For example, when researchers are trying to determine past ocean levels, they usually look at isotopes. But is there any way they can look at rock morphology to see how high sea levels may have been (maybe a more compressed rock meant higher pressures, meaning higher sea levels and vice versa)? Since rocks can have magnetic signatures, as is the case with paleomagnetism, can they store past pressures also?
{ "domain": "earthscience.stackexchange", "id": 539, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "geophysics, geology, oceanography, sea-level, rocks", "url": null }
javascript, beginner var elements = focusableElements(); var activeElement = document.activeElement; // Determine which element is the one that will receive focus for (var el = 0; el < elements.length; el++) { if (elements[el] === activeElement) { if (e.shiftKey && elements[el-1]) { targetElement = elements[el-1]; } else if (elements[el+1]) { targetElement = elements[el+1]; } break; } } } if ([37, 39].indexOf(e.keyCode) > -1) { var previousLink; var nextLink; var linkElements = recordList.getElementsByClassName(linkName); for (var i = 0; i < linkElements.length; i++) { if (activeLink === linkElements[i]) { previousLink = linkElements[i-1]; nextLink = linkElements[i+1]; break; } }
{ "domain": "codereview.stackexchange", "id": 16988, "lm_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, beginner", "url": null }
beginner, datetime, ios, swift Have you measured performance? Going back to my previous comments, we shouldn't overly concern ourselves with performance until we measure it and determine it's not good enough per our acceptance criteria. And it's important to note that "as fast as possible" is generally not considered acceptable criteria in a professional setting, where "less than 10 milliseconds" is. And with criteria like that, it doesn't matter if it runs in 1 millisecond, 5 milliseconds, or 9.999 milliseconds. If it's less than 10 milliseconds, it's acceptable. You write tests to prove it is meeting that criteria, and you move on to the next acceptance criteria and stop worrying about how fast this particular thing is.
{ "domain": "codereview.stackexchange", "id": 19480, "lm_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, datetime, ios, swift", "url": null }
visible-light, electronics, perception, light-emitting-diodes The light from any given pixel goes out in all directions, but a lens can make it re-converge back to a point. Hold up a sheet of white paper. Is there an image on it? No, of course not. It has light on it---light coming from each object in the room---but no image. That's because there is no lens to make the image. I guess that's what you're imagining. Eyes and cameras are special: They have lenses. Sharp images don't just form on their own.
{ "domain": "physics.stackexchange", "id": 16648, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "visible-light, electronics, perception, light-emitting-diodes", "url": null }
microbiology, genomics, microbiome 4) The further away from well studied microbiomes we get, the less specific will be our assignment of taxonomy and function, because we have not seen enough comparable microbes before. So more information will be hidden in the "dark matter" (in metagenomics: reads not assigned to a taxon and/or function). Unfortunately I don't know of any jellyfish microbiomes so far. Their body (as far as I know ) seems to be much more "permeable" for sea water (-> their environment) and thus I would think that they generally would have aquatic bacteria in whatever corresponds to their gut. The sea microbiome is said to be very diverse and far too little studied, although there are cool projects like the Global Ocean Sampling Day to try and close this huge gap as best as possible.
{ "domain": "biology.stackexchange", "id": 6600, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "microbiology, genomics, microbiome", "url": null }
filter-design, filter-bank This property can be used in the creation of analog quadrature sources to remove residual quadrature error by first hard limiting to ensure equal amplitude, then adding and subtracting the two signals, and finally hard limiting again to remove the introduced amplitude error. I also used this in an algorithm to efficiently compare the magnitude of complex numbers using a "Sigma Delta Argument Test", with the following mathematical derivation for all cases: Mathematical Derivation Consider two complex phasors: $$z_1 = A_1e^{j\phi_1}$$ $$z_2 = A_2e^{j\phi_2}$$ Where $A_1$ and $A_2$ are positive real quantities representing the magnitude of $z_1$ and $z_2$ and $\phi_1$ and $\phi_2$ are the phase in radians. Divide both by $z_1$ to have expression for $z_2$ relative to $z_1$ $$z_1' = \frac{z_1}{z_1} = 1$$ $$z_2' = \frac{z_2}{z_1} = \frac{A_2}{A_1}e^{j(\phi_2-\phi_1)} = Ke^{j\phi}$$ Such that if $K>1$ then $z_2>z_1$ The sum and the difference of the $z_1'$ and $z_2'$ would be:
{ "domain": "dsp.stackexchange", "id": 11066, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filter-design, filter-bank", "url": null }
slam, navigation, linux, g2o, ros-fuerte above for errors from rospack itself. Aborting. Please fix the broken dependency! Call Stack (most recent call first): /opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:203 (rosbuild_invoke_rospack) CMakeLists.txt:35 (rosbuild_init) -- Configuring incomplete, errors occurred! -------------------------------------------------------------------------------} [ rosmake ] Output from build of package rgbdslam written to: [ rosmake ] /home/ben/.ros/rosmake/rosmake_output-20120521-184019/rgbdslam/build_output.log [rosmake-2] Finished <<< rgbdslam [FAIL] [ 0.37 seconds ] [ rosmake ] Halting due to failure in package rgbdslam. [ rosmake ] Waiting for other threads to complete. [ rosmake ] Results: [ rosmake ] Built 32 packages with 1 failures. [ rosmake ] Summary output to directory
{ "domain": "robotics.stackexchange", "id": 9473, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "slam, navigation, linux, g2o, ros-fuerte", "url": null }
cell-culture, safety Title: Cell line immortalisation biosafety Cell lines are often immortalised by artificial expression of proteins which specifically cause the knockout of important cancer suppression genes or the activation of proto-oncogenes. Cellular immortality happens upon impairment of cell-cycle checkpoint pathways (p53/p16/pRb), reactivation or up-regulation of telomerase enzyme, or upregulation of some oncogenes or oncoproteins leading to a higher rate of cell division. However, this would appear to fall under the purview of Biosafety Level 3 since the protein expression vectors are capable of causing cancer in the researcher when they infect the researcher. Cancer can certainly be considered a serious or lethal disease, and aerosolisation of the vectors, while rare, is not impossible (for example during a spill). According to the biosafety definitions of Columbia University,
{ "domain": "biology.stackexchange", "id": 4232, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cell-culture, safety", "url": null }
thermodynamics, visible-light, perpetual-motion In an inertial reference frame, an object either remains at rest or continues to move at a constant velocity, unless acted upon by a force. There is no friction in space. There are no forces opposing motion. Therefore, not only light, but any object, can travel indefinitely. The second law of thermodynamics is more of a "no free lunch" statement. It means we cannot build a perpetual motion machine of the second kind, that is (from wikipedia): [...] a machine which spontaneously converts thermal energy into mechanical work. When the thermal energy is equivalent to the work done, this does not violate the law of conservation of energy. However, it does violate the more subtle second law of thermodynamics (see also entropy). Needless to say, perpetual motion of an untouched body is useless in terms of extraction of mechanical energy.
{ "domain": "physics.stackexchange", "id": 52849, "lm_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, visible-light, perpetual-motion", "url": null }
is non-empty. On what interval is the function #ln((4x^2)+9) ... Can a function be continuous and non-differentiable on a given domain? Review of Rules of Differentiation (material not lectured). Since the one sided derivatives f ′ (2−) and f ′ (2+) are not equal, f ′ (2) does not exist. That is, C 1 (U) is the set of functions with first order derivatives that are continuous. So the … Theorem 3. What did you learn to do when you were first taught about functions? Example of a function that does not have a continuous derivative: Not all continuous functions have continuous derivatives. The notion of continuity and differentiability is a pivotal concept in calculus because it directly links and connects limits and derivatives. The initial function was differentiable (i.e. Example of a function that does not have a continuous derivative: Not all continuous functions have continuous derivatives. The derivative of a real valued function wrt is the function and is defined as – A function is
{ "domain": "com.mx", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9773707973303966, "lm_q1q2_score": 0.8207314614492937, "lm_q2_score": 0.8397339716830606, "openwebmath_perplexity": 226.08973867728454, "openwebmath_score": 0.8623834252357483, "tags": null, "url": "http://g2ingenieria.com.mx/glen-durrant-tzulfx/differentiable-vs-continuous-derivative-7be835" }
$P(A_j \geq T_A, \ A_{j-1} < T_A) = \sum_{m=1}^{N_A}\sum_{n=m}^{N_A}P(A_{j-1} = T_A - m)P(A = n)$ I skipped the details, but the above is due to the fact that we can write what we want in terms of $A_{j-1}$ and $A$ (instead of $_j$), and these variable are independent. It's a complicated problem, but we have all the peices we need to compute the exact probability that Alice wins, given parameters $N_A, T_A, O_A, N_B, T_B, O_B$ and even $P_A$, the probability that Alice goes first. $P(\text{Alice Wins}) = \sum_{j=1}^\infty\\ \biggl[\sum_{m=1}^{N_A}\sum_{n=m}^{N_A}P(A_{j-1} = T_A - m)P(A = n)\biggr]\biggl[1-F_{B_j}(T_B-1) + \\ P_A\sum_{m=1}^{N_B}\sum_{n=m}^{N_B}P(B_{j-1} = T_B - m)P(B = n)\biggr]$ Indeed for the problem you described above, we see that Alice has only a 46.32907 % chance of winning. If you want to see more details, or play around with different values, the R-code which calculates the equation I've just described can be found here.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9875683480491555, "lm_q1q2_score": 0.8714578211864399, "lm_q2_score": 0.8824278571786139, "openwebmath_perplexity": 345.0094096371282, "openwebmath_score": 0.9166350960731506, "tags": null, "url": "https://math.stackexchange.com/questions/2036557/alice-and-bob-are-flipping-coins" }
homework-and-exercises, newtonian-mechanics, angular-momentum, rotational-dynamics, conservation-laws Note that there are similar problems where the two discs share a common axis of rotation. In that case conservation of angular momentum can be used.
{ "domain": "physics.stackexchange", "id": 38386, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, angular-momentum, rotational-dynamics, conservation-laws", "url": null }
electricity, electric-circuits, electric-current Title: Back $emf$ and power? The formula relating current to back emf is $V-E=IR$ where $V$ is the source pd and $E$ is the back Emf. Thus it can be seen that as the back emf increases the current decreases. But what is the implication of the power ($PV$) delivered across by the source and that across the compenent. I presume that both just decreases, otherwise energy would be lost, is this correct, and if so please can you explain? Suppose we're dealing with a perfect motor, so there is no friction and no resistive losses. If we apply a voltage the motor will accelerate until the back EMF is equal to the voltage, and in this state we have: $$ P = (V - E)I = 0 $$
{ "domain": "physics.stackexchange", "id": 13527, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electricity, electric-circuits, electric-current", "url": null }
rna-sequencing, microarray Title: What do HG and NA mean in Geuvadis project RNAseq sample labels? I'm looking at RNASeq Data from Geuvadis website e.g. the file GD660.GeneQuantRPKM.txt.gz. The samples are labeled by e.g. HG00105.1.M_120209_7 or NA20812.2.M_111216_6 What do HG and NA mean? Are they ethnic backgrounds? If not, how can I look up the ethnic mapping to the samples? Thanks! If you google HG00105, among the first hits is geo accession GSM649517 with the title HG00105/NA12878. Channel1: Characteristics gender: Male cell line: lymphoblast cell line HG00105 ethnicity: British from England and Scotland, UK (1000 Genomes codes: GBR) Channel2: gender: female cell line: lymphoblast cell line NA12878 ethnicity: Northwest European American from Utah (HapMap code: CEU) So no, they are not coding for the ethnic background but are part of the unique identifier of the sample.
{ "domain": "biology.stackexchange", "id": 4538, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rna-sequencing, microarray", "url": null }
newtonian-mechanics, textbook-erratum Now, what I don't understand here is what he means when he says that force is sometimes a function of velocity. It should always be a function of velocity,shouldn't it.
{ "domain": "physics.stackexchange", "id": 46322, "lm_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, textbook-erratum", "url": null }
computer-vision, terminology, algorithm, definitions, image-processing Title: What are the main algorithms used in computer vision? Nowadays, CV has really achieved great performance in many different areas. However, it is not clear what a CV algorithm is. What are some examples of CV algorithms that are commonly used nowadays and have achieved state-of-the-art performance? There are many computer vision (CV) algorithms and models that are used for different purposes. So, of course, I cannot list all of them, but I can enumerate some of them based on my experience and knowledge. Of course, this answer will only give you a flavor of the type of algorithm or model that you will find while solving CV tasks.
{ "domain": "ai.stackexchange", "id": 2097, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computer-vision, terminology, algorithm, definitions, image-processing", "url": null }
java, performance, linked-list private void eraseRoot() { this.rootNode = this.rootNode.nextNode; } private void eraseTail() { LinkedList<NodeDataType>.LinkedListNode<NodeDataType> temp = this.rootNode; LinkedList<NodeDataType>.LinkedListNode<NodeDataType> temp2 = temp; while (temp.nextNode != null) { temp2 = temp; temp = temp.nextNode; } temp2.nextNode = null; } private void eraseNodeAt(int position) { LinkedList<NodeDataType>.LinkedListNode<NodeDataType> temp = this.rootNode; LinkedList<NodeDataType>.LinkedListNode<NodeDataType> temp2 = temp; for (int i = 0; i < position - 1; i++) { temp2 = temp; temp = temp.nextNode; } temp2.nextNode = temp.nextNode; }
{ "domain": "codereview.stackexchange", "id": 42416, "lm_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, performance, linked-list", "url": null }
c, database, circular-list, embedded Below is the test code char sensorValStr1[] = "aaaaaaa"; char sensorKey1[] ="sensorRef1"; cbucket_t sensor1 = {sensorKey1, STRING, sensorValStr1, 1613343690}; uint16_t sensorValU16_2 = 0xAAAA; char sensorKey2[] ="sensorRef2"; cbucket_t sensor2 = {sensorKey2, UINT16, (uint8_t*)&sensorValU16_2, 1613343689}; uint16_t sensorValU16_3 = 0xBBBB; char sensorKey3[] ="sensorRef3"; cbucket_t sensor3 ={sensorKey3, UINT16, (uint8_t*)&sensorValU16_3, 1613343689}; uint16_t sensorValU16_4 = 0xCCCC; char sensorKey4[] ="sensorRef4"; cbucket_t sensor4 ={sensorKey4, UINT16, (uint8_t*)&sensorValU16_4, 1613343691}; int main(void) { char keyOutT[32] = {0}; char valOutT[32] = {0}; int8_t status = 0; uint32_t timeStmp = 0; //Initialize drivers //atmel_start_init();
{ "domain": "codereview.stackexchange", "id": 40955, "lm_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, database, circular-list, embedded", "url": null }
ros, ros-lunar, ros-kinetic, ros-indigo Originally posted by StormFalcon32 on ROS Answers with karma: 1 on 2017-08-16 Post score: 0 Original comments Comment by jayess on 2017-08-16: I would say that Kinetic has pretty good support. I use both Indigo and Kinetic daily and have found that many (most) of the packages that work with Indigo work with Kinetic. The current recommendation is to use Kinetic. See also wiki/Distributions. There will still be a difference in the nr of packages supported by both Indigo and Kinetic, but that is something that is true of all ROS distributions (ie: Hydro and Indigo showed a similar difference). And as @jayess hints at: if you need something that is not available on Kinetic, chances are high that building from source in a Catkin workspace -- which you will need to create for your own work anyway -- will work, as the differences between Kinetic and Indigo are relatively minor for a lot of things. The wiki/kinetic/Migration page has info on that.
{ "domain": "robotics.stackexchange", "id": 28629, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-lunar, ros-kinetic, ros-indigo", "url": null }
javascript, linked-list, functional-programming, immutability Use the n as an upper limit, and return the empty list/Nil. Use n as a strict limit, and fill up the surplus cons with Nil in the head. Throw an error that the index is out of bounds. The first solution is most DWIM, it would seem to me. Your piece function does not document if the from and to bounds are inclusive or exclusive. Because you will drop(from, xs), the from index is not included in the output. The to is exclusive as well. This counterintuitive behaviour is not made clear in the documentation! Your removeOne is even weirder by using one-based indexing instead of zero-based indexing, like piece does. Interestingly, you don't have an indexing function, e.g. at(1, lst(0, 1, 2)) === 1. Summary Your code looks fine, but you haven't carefully considered (or tested) the actual behaviour of your functions. When writing complex code, a few well-chosen test cases can help detect errors early.
{ "domain": "codereview.stackexchange", "id": 4767, "lm_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, linked-list, functional-programming, immutability", "url": null }
c# Sorry for the mess. But here i have a rendering loop, and while not ideal, it does the work currently. So, it only runt after the receiving thread has told it to(right after it has written to the MemoryStream). And i also have a Bool just for safety. And then it does it´s device things, and finally reads the Texture from the MemoryStream. And then, draws it. So that´s basically what the MemoryStream is used for. 1 Threads writes, 1 Threads reads, pretty much like that. Hope this is the information needed. EDIT 2: So here it is currently with, the MemoryStream outside the loop, and using write, and reset the position right before the write. So the MemoryStream will only be as big, as the biggest written data at one time. using (texturestream = new MemoryStream()) { while (checkBox1.Checked && tt1.Connected) {
{ "domain": "codereview.stackexchange", "id": 4362, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#", "url": null }
C = πd; C = 2πr. Repeat the above and note how the radius is always half the diameter no matter what the size of the circle. Diameter or Radius of a Circle Given Circumference. Find the arc of the corresponding minor segment of the circle. In a circle of radius 12 cm., a chord subtends an angle of 1 2 0 o at the centre. An error occurred trying to load this video. We can then use our algebra skills to simplify and rearrange that equation, depending on what we need it for. succeed. Write the standard form of the equation of the circle with center that also contains the point . 4. This formula reads, “Area equals pi are squared.” Find the radius, circumference, and area of a circle if its diameter is equal to 10 feet in length. 1. The radius of the circle that passes through the three non-collinear points P 1, P 2, and P 3 is given by = | → − → | ⁡, where θ is the angle ∠P 1 P 2 P 3.This formula uses the law of sines.If the three points are given by their coordinates (x 1,y 1), (x 2,y
{ "domain": "heforshe.is", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232879690035, "lm_q1q2_score": 0.812511612043548, "lm_q2_score": 0.8267118026095991, "openwebmath_perplexity": 568.4685986959778, "openwebmath_score": 0.7638993263244629, "tags": null, "url": "https://heforshe.is/hallmark-gold-btiss/viewtopic.php?1f4a6a=radius-of-circle-formula" }
field-theory, gauge-theory, symmetry-breaking, yang-mills $$F_{\mu\nu}=\left(\frac{1}{8}\rm{Tr}([\partial_{\mu}\hat{\Phi},\partial_{\nu}\hat{\Phi}]\hat{\Phi}) + \partial_{\mu}a_{\nu} - \partial_{\nu}a_{\nu} \right)\hat{\Phi}. $$ I haven't been able to find the solution for $A_\mu$, nor could I find this form for $f_{\mu\nu}$ through substitution of the correct result and algebraic manipulations, even though it should be straightforward. I'd like some with those manipulations, if possible. Also, as a secondary question, I'd be glad if someone could explain what the condition $D_{\mu}\hat{\Phi}$ means, as in why should it be satisfied in regions other than the vacuum? First we need some identities, using the conventions for $su(2)$ from the question: \begin{align} [[A,B],C] &= 2A\ \mathrm{Tr}(BC) - 2B\ \mathrm{Tr}(AC), \\ [[A,B],[C,D]] &= 2A\ \mathrm{Tr}(C[D,B]) - 2B\ \mathrm{Tr}([A,C]D). \end{align}
{ "domain": "physics.stackexchange", "id": 58294, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "field-theory, gauge-theory, symmetry-breaking, yang-mills", "url": null }
quantum-mechanics, quantum-spin, topological-order, quasiparticles http://arxiv.org/abs/hep-th/0507118 Quantum ether: photons and electrons from a rotor model, Michael Levin, Xiao-Gang Wen; Spin-1/2 Fermi statistics from rotors In fact, every lattice QCD or lattice QED is a model where spin-1/2 emerge from something with no spin. But in lattice QCD or lattice QED, Fermi statistics is added by hand. Not only spin-1/2, almost everything can emerge from interacting qubits. Wheeler's "it from bit" represents a deep desire to unify matter and information. In fact, it happend before at a small scale. We introduced electric field to informationally (or pictorially) describe Coulomb law. At this stage, the electric field is just information (bit). But later, electric field became real matter with energy and momentum, and even a particle associated with it.
{ "domain": "physics.stackexchange", "id": 19766, "lm_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-spin, topological-order, quasiparticles", "url": null }
ros, rosmake, rospackage, rosbuild, package Title: Moving packages to different directory Hi all, I was working on a package in a folder (~/workspace/Mypackage) the package was originally at this place when i came. I work on it and now that is ready I want to move it to (~/svn/stacks/Mypackage) this in order to update the svn repository with my modifications. I copy the entire folder, delete the CMakeCache.txt ("find -name CMakeCache.txt -delete") in this folder. Update the address of myPackage at .bashrc, then i do rosmake and it didn't complain. I run my package and it works fine. But this happen while mi original package is also in the original place, i mean, while i have the 2 copies of my package (one in svn folder and the other in workspace folder) all work fine, i can run it without problems (if i do "roscd myPackage" it gets me to the package at svn folder and if i do "env | grep ROS" it returns ROS_ROOT=/opt/ros/diamondback/ros ROS_PACKAGE_PATH=/home/jose/svn/stacks:/opt/ros/diamondback/stacks
{ "domain": "robotics.stackexchange", "id": 6784, "lm_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, rosmake, rospackage, rosbuild, package", "url": null }
c#, array I think the remove bytes method is fine, but the way I search for the wilcard pattern and copy the array seems a bit clunky. Credit to the author of the wildcard search code which can be found here. You aren't using braces {} for the outer loops body which is bad, bad, bad. You should always use them although they are optional it just will make your code less error prone. If you decide not to use them, you should stick to your style. Right now you are mixing them. Using a guard clause is a good idea, but if one needs to scroll to the right to see each condition its suboptimal. Use some vertical space to group related code together makes your code much more readable and easier to maintain.
{ "domain": "codereview.stackexchange", "id": 15938, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, array", "url": null }
energy, explosions, batteries, energy-storage Gunpowder has $3\,\rm MJ/kg$ or so. It means you have to add about $35\%$ to get the right estimate for the mass of equivalent gunpowder. If you could release the energy from the batteries very quickly, the explosion could be equally devastating as the corresponding gunpowder and TNT except that batteries can't release energy this quickly.
{ "domain": "physics.stackexchange", "id": 4650, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "energy, explosions, batteries, energy-storage", "url": null }
javascript, ecmascript-6, dom, snake-game //======================== // Dom //======================== const maxSpeedDom = document.getElementById("maxspeed"), maxSpeedDomStyle = maxSpeedDom.style, lagdom = document.getElementById("lag"), lagdomstyle = lagdom.style, highScoreDom = document.getElementById("highscore"), highScoreDomStyle = highScoreDom.style, scoredom = document.getElementById("score"), speeddom = document.getElementById("speed"), gameOverDom = document.getElementById("gameover"), gameOverDomStyle = gameOverDom.style; //======================== // Snake //======================== class Snake { constructor(){ this.segments = [ new Location(7,1,5), new Location(6,1,5), new Location(5,1,5) ]; this.direction = "forwards"; this.nextDirection = "forwards";
{ "domain": "codereview.stackexchange", "id": 30575, "lm_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, ecmascript-6, dom, snake-game", "url": null }
c++, performance, multithreading, processing hsize_t offset[2] = {0,1}; hsize_t count[2] = {coord_dimension,2}; coords_space.selectHyperslab(H5S_SELECT_SET,count,offset); hsize_t offset_output[2] = {0,0}; hsize_t dim_output[2] = {coord_dimension,2}; DataSpace output_space(2, dim_output); output_space.selectHyperslab(H5S_SELECT_SET,dim_output,offset_output); coords_ds.read(entry->position, PredType::NATIVE_DOUBLE, output_space,coords_space); f.close(); return entry; } void Reader::threaded_read(promised_entries_t entries) { for (int i = 0; i < files.size(); i++) { entries[i].set_value(this->read(files[i])); } } future_entries_t Reader::read_all() { future_entries_t zukunft; for(int i = 0; i < files.size(); i++) { std::promise<DataEntry*> pr; zukunft.push_back(pr.get_future()); entry_promises.push_back(std::move(pr)); } reader_thread = std::thread(&Reader::threaded_read, this, std::move(entry_promises)); return zukunft; }
{ "domain": "codereview.stackexchange", "id": 40017, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, performance, multithreading, processing", "url": null }