text
stringlengths
1
1.11k
source
dict
matlab, discrete-signals, continuous-signals, periodic Title: Confused about the period of a discretised time-series I have managed to confuse myself about the periods of discretised time series. It is all rather embarrassing. This is one period extracted from my continuous signal (radians on y, time on x): To use it in my calculations I use a discretised vector of N points. The above signal has a period of $T=0.95s$. The discretised version A has $N=100$ and the angle, over time, is indexed from 1 to 100. Q1: is the period of my angle vector $[\theta_1,\ldots,\theta_{100}]$; $T=100$? Now suppose I need to standardise my data as such, incl the index: % standardise training inputs m = mean(A); s = std(A); x(:,1) = 1/s(2) * (A(:,2) - m(2)); % index x(:,2) = 1/s(1) * (A(:,1) - m(1)); % velocity
{ "domain": "dsp.stackexchange", "id": 4729, "lm_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, discrete-signals, continuous-signals, periodic", "url": null }
c#, performance, generics, lambda, rags-to-riches GetterCache = new ReadOnlyDictionary<string, Func<T, object>>(properties.Select(propertyInfo => new { PropertyName = propertyInfo.Name, PropertyGetAccessor = propertyInfo.GetGetAccessor<T>(includeNonPublic) }).Where(a => a.PropertyGetAccessor != null) .ToDictionary(a => a.PropertyName, a => a.PropertyGetAccessor)); SetterCache = new ReadOnlyDictionary<string, Action<T, object>>(properties.Select(propertyInfo => new { PropertyName = propertyInfo.Name, PropertySetAccessor = propertyInfo.GetSetAccessor<T>(includeNonPublic) }).Where(a => a.PropertySetAccessor != null) .ToDictionary(a => a.PropertyName, a => a.PropertySetAccessor)); CloneableProperties = Array.AsReadOnly(GetterCache.Keys.Intersect(SetterCache.Keys).ToArray());
{ "domain": "codereview.stackexchange", "id": 23639, "lm_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, generics, lambda, rags-to-riches", "url": null }
gravity, black-holes, waves rocking, how long it takes to swing from left to right and back again, I got a joyous answer. About an hour. The same as the observed time between giant waves, a time chosen by Chris without knowing my science interpretation. The first explanation for the giant waves, in my science interpretation, is a sloshing of the planet's oceans as the planet rocks under the influence of Gargantua's tidal gravity. A similar sloshing, called "tidal bores," happens on Earth, on nearly flat rivers that empty into the sea. When the ocean tide rises, a wall of water can go rushing up the river; usually a tiny wall, but occasionally respectably big. ... But the moon's tidal gravity that drives this tidal bore is tiny—really tiny—compared to Gargantua's huge tidal gravity! My second explanation is tsunamis. As Miller's planet rocks, Gargantua's tidal forces may not pulverize its crust, but they do deform the crust first this way and then that, once an hour, and those
{ "domain": "physics.stackexchange", "id": 21144, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gravity, black-holes, waves", "url": null }
physical-chemistry, thermodynamics A similar problem occurs as we approach pure products: $\Delta_\mathrm{r} G ⟶ ∞$ when $Q⟶∞,ξ⟶max$ (vertical slope asymptotic to a line at ξ = max). Can anyone reconcile this graph with the equation to calculate $\Delta_\mathrm{r} G$? G is a finite quantity for ξ = 0 or max. The slope of the graph is vertical on the extremes, though. This is because the chemical potential for reagents approaches negative infinity on one side, and that of the product positive infinity on the other side. (A vertical or infinite slope does not mean that the function value has to be infinite - a half-circle or the letter U is an example to illustrate). The interpretation is that (unless $\Delta_r G^\circ$ is of extremely large magnitude), there are always a least a couple molecules of solute or gas species at equilibrium. The sketch of the graph could be made more accurate by adjusting the slope at the ends accordingly. For a graph of $\Delta_r G$, see here: https://chemistry.stackexchange.com/a/115544
{ "domain": "chemistry.stackexchange", "id": 11999, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "physical-chemistry, thermodynamics", "url": null }
6 This is a linear programming feasibility problem (since you don't have an objective function to minimize or maximize.) You can simply use an objective function of $0$ and hand this off to any reasonable LP solver. You'll either get back a solution or the bad news that the problem is infeasible. 6 In general, one cannot expect rk4 to maintain quadratic invariants of the system, it simply doesn't do that. Methods that do maintain specific invariants have to be specially devised — this usually goes by the name of geometric integration. Symplectic integrators are the most common kind of these methods, although not for your problem. See, for example, the ... 6
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.959762057376384, "lm_q1q2_score": 0.8157700806122608, "lm_q2_score": 0.8499711718571775, "openwebmath_perplexity": 289.44155997139995, "openwebmath_score": 0.9629617929458618, "tags": null, "url": "https://scicomp.stackexchange.com/tags/constrained-optimization/hot" }
I am going to give a shot at answering your question with one practical example. From the mtcars dataset in R{datasets}, we can run a logistic regression to model the variable am Transmission (0 = automatic, 1 = manual) - i.e. whether a particular model of car has automatic or manual transmission - using mpg (miles per gallon) and qsec (quarter mile time) as explanatory variables. In case you are not familiar with the dataset, this is its head: mpg cyl disp hp drat wt qsec vs am gear carg Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4 Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4 Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1 Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1 So you would use a call such as: Call: glm(formula = as.factor(am) ~ mpg + qsec, family = "binomial", data = mtcars)
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9796676454700795, "lm_q1q2_score": 0.816381140146415, "lm_q2_score": 0.8333245911726382, "openwebmath_perplexity": 1525.7675051447802, "openwebmath_score": 0.6128089427947998, "tags": null, "url": "https://stats.stackexchange.com/questions/200454/binary-logistic-regression-interpretation-of-explanatory-variables" }
bash, linux, installer if "$@" then printf "${green}Step %s: SUCCESS${nocolor}\n" "$step" else err=$? printf "${red}Step %s: FAILED${nocolor}\n" "$step" >&2 exit $err fi } This function is then used as: i=0 do_action $((++i)) "configure packages" dpkg --configure -a do_action $((++i)) "fix broken dependencies" apt-get install --fix-broken do_action $((++i)) "update cache" apt-get update do_action $((++i)) "upgrade packages" apt-get upgrade do_action $((++i)) "upgrade distribution" apt-get dist-upgrade do_action $((++i)) "remove unused packages" apt-get --purge autoremove do_action $((++i)) "clean up" apt-get autoclean
{ "domain": "codereview.stackexchange", "id": 28292, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bash, linux, installer", "url": null }
number-theory PS. In your trivial examples, n = 4 = 2 * 2, the solution was $2^{2-1} 3^{2-1} = 6$, and with n = 6 = 3 * 2, the solution was $2^{3-1} 3^{2-1} = 12$. PS. Assume you have a more moderately sized n, let's say an n that is the product of 10 primes, making P = 10th prime = 29. We have $2^5<29$, $3^3<29$, $5^2<29$, but $7^2 > 29$. Therefore the only possible factors with an exponent that is not a prime -1 are: $2^{4-1}$, $2^{9-1}$, $2^{6-1}$, $2^{8-1}$, $2^{10-1}$, $2^{25-1}$, $3^{4-1}$, $3^{9-1}$, $3^{6-1}$, and $5^{4-1}$.
{ "domain": "cs.stackexchange", "id": 10333, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "number-theory", "url": null }
q# Title: $S^{\dagger}$ gate in Q# I would like to implement $S^{\dagger}$ gate in Q# and I would like the best way to do it, is it correct to say that $S^{\dagger}$ is equivalent to R1( -Pi()/2 , q) ? Is it also correct to say that $S^{\dagger}$ is equivalent to Rz( -Pi()/2 , q) but with a global phase ? Thank you. It is correct. Since you have $R_1(\theta) = \begin{bmatrix}1 & 0\\ 0 & e^{i\theta}\end{bmatrix}$ and $R_z(\theta) = \begin{bmatrix}e^{-i\theta/2} & 0\\ 0 & e^{i\theta/2}\end{bmatrix}$ just using the value of $\theta = -\pi/2$ gives you $R_1(-\pi/2) = \begin{bmatrix}1 & 0\\ 0 & -i\end{bmatrix} = S^{\dagger}$ and $R_z(-\pi/2) = e^{i\pi/4}\begin{bmatrix}1 & 0\\ 0 & -i\end{bmatrix}$ which works exactly the same as $S^{\dagger}$ but with a global phase of $e^{i\pi/4}$.
{ "domain": "quantumcomputing.stackexchange", "id": 2127, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "q#", "url": null }
graph-theory, ds.data-structures, terminology Title: Graph nodes preserving changes to the overall graph I remember reading about a kind of Graph data structure, where every change to the the graph could be preserved. I don't remember exactly neither the name, neither a good description (if it was the graph that remembered the changes, or each node who kept the changes of its childs). It was on Wikipedia about 2-1.5 years ago, I was reading about version control. I would really appreciate if someone could help me find the name of this data sctructure. Thanks Fraser, the paper is J. R. Driscoll, N. Sarnak, D. D. Sleator, R. E. Tarjan, Making Data Structures Persistent, Journal of Computer and System Sciences, Vol. 38, No. 1, 1989. I believe you are thinking of persistent data structures. http://en.wikipedia.org/wiki/Persistent_data_structure
{ "domain": "cstheory.stackexchange", "id": 586, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "graph-theory, ds.data-structures, terminology", "url": null }
c#, security, asp.net-mvc // This doesn't count login failures towards account lockout // To enable password failures to trigger account lockout, change to shouldLockout: true var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false); switch (result) { case SignInStatus.Success: return RedirectToLocal(returnUrl); case SignInStatus.LockedOut: return View("Lockout"); case SignInStatus.RequiresVerification: return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = model.RememberMe }); case SignInStatus.Failure: default: ModelState.AddModelError("", "Invalid login attempt."); return View(model); } } Only focusing on this part
{ "domain": "codereview.stackexchange", "id": 16193, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, security, asp.net-mvc", "url": null }
python, beginner, python-2.x, roman-numerals BUG: If an integer less than 0 is passed, there is no warning about being too small a number Therefore, if a negative number is passed in at runtime, it outputs nothing and no errors. We can fix this in one line of code - we just change your == check to a <= check (less than or equal to): if num <= 0: return "Number too small" Descriptive Parameters Normally, you should name an parameter for a function in a more descriptive way. While n can be assumed to be a number, it would be better to have num instead of n as an parameter name for getRomanNumerals to better describe what that is. My two cents, of course, but in more complex functions where n could lose meaning, you'd be better off with a more descriptive parameter name so you don't lose track of what n does. Rogue Semicolon! On line 47, you have a rogue trailing semicolon. While this doesn't affect running of your program, such semicolons are not necessary.
{ "domain": "codereview.stackexchange", "id": 23895, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-2.x, roman-numerals", "url": null }
# When gambling, do I get my money's worth? (Or: Does the amount I lose per bet determine the number of bets until I lose all my money?) This question came up when I asked on Puzzling.SE, How long will my money last at roulette? The basic question is: if I take $$\20$$ to a roulette table which has a house edge of $$1/37$$, and I bet $$\10$$ on each spin until I run out of money, what's the average amount of time before I lose all of my money? The reasoning used in a couple of the answers is: • I start with $$\20$$ and I bet $$\10$$ per spin. • The expected value of amount I lose on each spin is $$\frac{\10}{37}$$. • Therefore, the expected value of the number of spins required in order to lose all my money is $$\20 / \left (\frac{\10}{37} \right) = 74$$. However, one of the commenters pointed out that this argument needs some additional justification, writing:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9572777987970315, "lm_q1q2_score": 0.8229370245146373, "lm_q2_score": 0.8596637523076225, "openwebmath_perplexity": 318.06617164325655, "openwebmath_score": 0.8852806091308594, "tags": null, "url": "https://math.stackexchange.com/questions/3120878/when-gambling-do-i-get-my-moneys-worth-or-does-the-amount-i-lose-per-bet-de" }
physical-chemistry, thermodynamics, entropy Title: Entropy change of surroundings and system The entropy change of the surroundings can be calculated by the equation $dS_{sur}=\frac{dq}{T_{sur}}$ regardless of the path (irreversible or reversible). The argument is that because the surroundings may be approximated as either constant volume or constant pressure, the heat absorbed/released by it is equal to the internal energy or enthalpy change, respectively. As both are state functions, it does not matter if the path taken was reversible or not, the changes would be the same for both, so $dU_{sur,rev}=dU_{sur,irrev}$ and $dH_{sur,rev}=dH_{sur,irrev}$. However, $dH=dq$ for constant pressure, and as per definition $dS=\frac{dq_{rev}}{T}$, the initial equation follows.
{ "domain": "chemistry.stackexchange", "id": 15513, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "physical-chemistry, thermodynamics, entropy", "url": null }
python, programming-challenge, time-limit-exceeded, graph, depth-first-search paths = [] # pqueue def enumerateAllPaths(u, goal, visited, path, pathcost, depthLimit): visited[u] = True path.append(u) if u == goal: heapq.heappush(paths, (pathcost, len(path), path)) elif depthLimit == 0: path.pop() visited[u] = False return else: for v,c in adj[u]: if not visited[v]: enumerateAllPaths(v, goal, visited, path, pathcost + c, depthLimit - 1) path.pop() visited[u] = False visited = [False for s in range(len(n))] path = [] enumerateAllPaths(src, dst, visited, path, 0, K + 1) # (length of path, pathcost, path) bestcost = 2**63 - 1 # best cost decreases if a better path is found if paths: pathcost, pathlen, path = heapq.heappop(paths) bestcost = pathcost
{ "domain": "codereview.stackexchange", "id": 29773, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, programming-challenge, time-limit-exceeded, graph, depth-first-search", "url": null }
quantum-field-theory, particle-physics, antimatter, chirality, helicity Title: Chirality/helicity of anti-particles (again) Questions (very) closely related to this one have been posted dozens of times, but the joint information (including even lecture notes and books) is incredibly contradictory, so I state my specific doubt again. Take for instance the line of thought that ends with the conclusion that the decay $\pi^0 \to e^+ e^-$ is chirality suppressed: Taking the rest frame of the pion, conservation of momentum and angular momentum tell us that the helicity of both end-state particles must be the same, so consider, for example, they to be left-handed $$ \text{Hel}(e^+)=\text{Hel}(e^-)=L $$ Here, since $M_\pi \gg m_e$, the electrons are ultra-relativistic, so that helicity and chirality become interchangable.
{ "domain": "physics.stackexchange", "id": 83304, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, particle-physics, antimatter, chirality, helicity", "url": null }
quantum-field-theory, particle-physics, antimatter It is of course a huge simplification, but if you think of electrons and positrons as similar to the two sides of a twisted rubber band, you end up with a surprisingly good feel for why matter and antimatter are dangerous when placed close together. Like the sides of the rubber band, both electrons and positrons store energy, are mirror images of each other, and "unravel" each other if allowed to touch, releasing their stored energy. If you could mix large quantities of both, the result would be an unraveling whose accompanying release of energy would be truly amazing (and very likely fatal!) to behold. Now, given all of that, how "real" is antimatter? Very, very real. Its signatures are everywhere! This is especially true for the positron (antimatter electron), which is the easiest form of antimatter to create.
{ "domain": "physics.stackexchange", "id": 34372, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, particle-physics, antimatter", "url": null }
c++, sfml //Physics //AI return 0; } int App::renderLoop() { Window.clear(); Window.display(); return 0; } Just as it was nicely put by @David in his answer, you will want to split responsibilities into separate classes, if your intention is to build more on top of this. A good thing to keep in mind when designing is the Single Responsibility Principle. Design each class to do just one thing, but do this one thing very well. Code Review: I didn't see an Include Guard in your header file. If you don't have one, you'll definitely have to add it. App is meant to be inherited from, so it should have a virtual destructor. If you are targeting C++11, you can declare a default virtual destructor, since you currently are not performing any manual cleanup: virtual ~App() = default;
{ "domain": "codereview.stackexchange", "id": 11766, "lm_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++, sfml", "url": null }
population with a standard deviation, has a standard deviation of: MCQ 11.68 In sampling with replacement is equal to: MCQ 11.69 When sampling is done with or without replacement, E( is equal to: MCQ 11.70 In case of sampling with replacement, Ε (S²) is equal to: MCQ 11.71 I'd like to sample from a discrete distribution without replacement (i.e., without repetition). Compare your calculations with the population parameters. Taking the other aspects of the situation as given; if the sampling is without replacement, we call it (multivariate) hypergeometric. General Ideas and De nitions General Ideas Three mains de nitions. 9.
{ "domain": "netcup.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9532750413739075, "lm_q1q2_score": 0.8064158082227431, "lm_q2_score": 0.8459424334245617, "openwebmath_perplexity": 1030.2916650443512, "openwebmath_score": 0.40271544456481934, "tags": null, "url": "http://hosting126194.a2fe2.netcup.net/kevl1/898acc-sampling-with-replacement-distribution" }
c, matrix, opengl Prefer to avoid names starting with double underscore (__MATH_MAT4FSCALAR_H__). This notation is usually reserved for compiler extensions and Standard Library internals. Steer clear from them to avoid a name collision with your own code. In this case, simple MATH_MAT4FSCALAR_H would be just fine. I don't see any reason for not making iData a mat4 as well. Then also take two matrices in mMat(). By the way, mMat tells me nothing. copyMatrix would be the logical name for that function if it took two matrices and copied b over a. If you leave the second param as double array, then perhaps setMatrix will make more sense. Avoid casting the return value of malloc, unless you need to compile the code as C++. In C the cast from void* to whatever is implicit, so that only adds boilerplate and maintenance overhead. You might also consider using the variable instance in the sizeof on mallocs to avoid repeating the types on the left and right, E.g.:
{ "domain": "codereview.stackexchange", "id": 14999, "lm_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, matrix, opengl", "url": null }
ruby class LuhnyBinChecker def initialize(number) @number = number end Try to keep your methods pure without i/o, and collect the i/o in some portion that is dedicated to it. It helps later while you refactor the code. It is also nicer to not to rely on member variables too much, and preserve the referential transparency of functions where possible. def check arr = digits(@number) puts "Checker: doubling every second number from the right.." arr = doubleSecond(arr) puts "Checker: calculating the sum.." getResult(sumNumbers(arr)) end Always be on the lookout for things you can refactor and reuse. def digits(n) n.to_s().scan(/\d/).map{ |c| c.to_i } end
{ "domain": "codereview.stackexchange", "id": 1911, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ruby", "url": null }
graph-theory Assume for contradiction that $n_1 = o(n)$. Then there are at least $n - 10 n_1 = n - o(n)$ typical nodes in $G$, and at least $\Omega(n)$ nodes in $G$ have degree at least three. It follows that at least one of the $n_1$ leaves, say $u$, has two edges to typical vertices, say $v_1$ and $v_2$. But then by adding edges $(u, v_1)$ and $(u, v_2)$ to $T$, and removing one edge from $v_1$ and one from $v_2$ (thereby making a neighbor of each a leaf in the new tree), we can create a spanning tree with more leaves than $T$, contradicting the choice of $T$. So $n_1 = \Omega(n)$. The non-leaf vertices of $T$ form a connected dominating set, whose complement (the leaves) has size $n_1 = \Omega(n)$. $~~~~~\Box$
{ "domain": "cstheory.stackexchange", "id": 5516, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "graph-theory", "url": null }
reinforcement-learning, reinforce #-------------------------------------------- # Calculate Loss #-------------------------------------------- ret_tensor = torch.FloatTensor(returns).unsqueeze(1) if self.with_baseline: ret_tensor = ret_tensor - ret_tensor.mean() ret_tensor = ret_tensor.to(device) log_probs = torch.cat(self.log_probs) loss = - torch.sum(log_probs * ret_tensor) #-------------------------------------------- # Gradient Descent #-------------------------------------------- optimizer.zero_grad() loss.backward() optimizer.step() Your baseline value is a mean of the returns of a single episode. This is correlated too much with the chosen actions for that episode. Instead, use a baseline value which is a longer-running mean over many more episodes. For instance, use something like this: if self.with_baseline: baseline += 0.01 * (ret_tensor.mean() - baseline) ret_tensor -= baseline and declare baseline = 0.0 at the start.
{ "domain": "ai.stackexchange", "id": 3873, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, reinforce", "url": null }
electromagnetism, electric-fields, voltage, conventions, electromagnetic-induction from 5:45 to 13:45 : youtube.com/watch?v=t2micky_3uI, link suggested by @Ofek Gillon in the comment of the answer. I will try to put a rigorous derivation of R.L circuit without using at all any results that comes from conservative fields. In practice I will never make use of the notion of electric potential which mainly makes sense for electrostatics because field is conservative. I will only work with electromotive forces.
{ "domain": "physics.stackexchange", "id": 64492, "lm_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, electric-fields, voltage, conventions, electromagnetic-induction", "url": null }
javascript, object-oriented, array, react.js, react-native because spread syntax only creates a shallow copy of the array or object. This should never be done in React. (See end of answer for how to fix it - create the new obj no matter what, then either push it to the new array, or replace the existing object in the array, without mutating the existing object in the array) Dot notation Most people prefer to read and write using dot notation in JS when possible - it's more concise and easier to read. ESLint rule: dot-notation. You can use .payload instead of ["payload"]. Property/variable naming The rowId refers to the same thing as the itemNbr, which looks to refer to the same thing as the id in the rowDataTracker array. It's good to be consistent with variable names and properties when possible - consider picking one and sticking with it. If you use the variable name itemNbr, you can use it shorthand in the object literal: const obj = { itemNbr, // ...
{ "domain": "codereview.stackexchange", "id": 39362, "lm_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, object-oriented, array, react.js, react-native", "url": null }
- Do you want the function itself or how to figure out how to get the function if, say the rules change a little? –  Mitch Aug 31 '11 at 21:07 Both preferably... –  nzifnab Aug 31 '11 at 21:08 Since the function's second forward difference $\Delta^2 f$ is constant, $f(n)$ will be quadratic as $an^2+bn+c$. Write $f(n)=m$ for $n=1,2,3$ and $m$ the given values and you get a $3\times3$ linear system solvable with a simple matrix inversion. –  anon Aug 31 '11 at 21:11 There's not enough information. Where is the data from? –  Qiaochu Yuan Aug 31 '11 at 21:17 I feel that I've provided plenty of data. For the first number pattern the first 10 numbers are: 1, 3, 13, 31, 57, 91, 133, 183, 241, 307 I gave you the way I generate the numbers, using a programmatic loop that iterates n times. –  nzifnab Aug 31 '11 at 21:22
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.989181552941771, "lm_q1q2_score": 0.8285582100905867, "lm_q2_score": 0.8376199572530448, "openwebmath_perplexity": 336.7166379480665, "openwebmath_score": 0.6916125416755676, "tags": null, "url": "http://math.stackexchange.com/questions/61029/function-for-number-patterns" }
performance, c, memory-management, reinventing-the-wheel malloc.h #ifndef MALLOC_H_ # define MALLOC_H_ # include <unistd.h> # include <string.h> # include <stdio.h> # define UNUSED 0 # define USED 1 typedef struct s_list { size_t size; int is_used; void *addr; int head; struct s_list *prev; struct s_list *next; } t_list; void *malloc(size_t size); void put_in_list(t_list **list, size_t size, void *addr); void free(void *ptr); void make_circle(t_list **list); void show_alloc_mem(); void *realloc(void *ptr, size_t size); size_t get_size(void *ptr); void re_init_list(); void *find_block(size_t size); int is_in_list(void *ptr); #endif /* !MALLOC_H_ */ 1. Performance This memory management implementation maintains a single doubly-linked list of memory blocks. The main causes of the performance problems are as follows:
{ "domain": "codereview.stackexchange", "id": 13155, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, c, memory-management, reinventing-the-wheel", "url": null }
quantum-field-theory, hilbert-space, field-theory, antimatter, unitarity Note that the negative energy states you obtain in this theory should not be interpreted as antiparticles, since they carry the same charge as the $b$ particles. These states involve removing one of the antiparticles in the filled Dirac sea. If one wants to deal with an antiparticle wave function, you should define a "positron vacuum" by $\Psi^{\dagger}(t,x)| 0 \mathbf{p}\rangle = 0$ and work with that instead. (As an exercise, couple the U(1) Noether current of the original Dirac QFT to a gauge field, and keep track of the relative sign that $\psi_e$ and $\psi_p$ couple to it.)
{ "domain": "physics.stackexchange", "id": 83986, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, hilbert-space, field-theory, antimatter, unitarity", "url": null }
These are solved by antidifferentiation. This might introduce extra solutions. Logistic Equation. First, we give a new definition of a solution of an impulsive stochastic differential equation (ISDE), which. The efficiency of the systems generated by logistic model and models obtained by differential equations (Strategy A and Strategy B) was also compared to the efficiency of the system estimated by the Clutter model (Strategy C). Stability of the steady-states in the Gompertz model. logistic model was fitted to estimate the volumetric yield as a function of age, site index and basal area. Differential equation is a differential equation. The logistic model has been applied to the natural growth of the halibut population in certain areas of the Pacific Ocean. This discrete equivalent logistic equation is of the Volterra convolution type, is obtained by use of a functional-analytic method, and is explicitly solved using the -transform method. You can write a book review and share your
{ "domain": "helferkreis-spickel.de", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.985718063977109, "lm_q1q2_score": 0.8214231006350755, "lm_q2_score": 0.8333245891029457, "openwebmath_perplexity": 509.1634386176583, "openwebmath_score": 0.7554548978805542, "tags": null, "url": "http://epwp.helferkreis-spickel.de/logistic-differential-equation-example.html" }
$$10xy = 12y + 4x$$ You can find y in terms of x or x in terms of y. • You can try substitution. May be that is better option. – Kanwaljit Singh Mar 26 '17 at 3:55 Just to provide another way. Use polar coordinates $$x=\rho \cos(\theta) \qquad y=\rho \sin(\theta)$$ to make the equations to be $$\frac{5 \left(\rho ^2+1\right) \cos (\theta )}{\rho }=12$$ $$\frac{5 \left(\rho ^2-1\right) \sin (\theta )}{\rho }=4$$ So,$$\cos(\theta)=\frac{12 \rho }{5 \left(\rho ^2+1\right)}\qquad \sin(\theta)=\frac{4 \rho }{5 \left(\rho ^2-1\right)}$$ Now, using $$\sin^2(\theta)+\cos^2(\theta)=1 \implies \frac{16 \rho ^2}{25 \left(\rho ^2-1\right)^2}+\frac{144 \rho ^2}{25 \left(\rho ^2+1\right)^2}=1$$ Now, let $t=\rho ^2$ to have $$\frac{16 t}{25 \left(t -1\right)^2}+\frac{144 t}{25 \left(t+1\right)^2}=1$$ Reduce to same denominator to get $$25 t^4-160 t^3+206 t^2-160 t+25=0$$ where you can notice the symmetry of coefficients.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9796676484382338, "lm_q1q2_score": 0.8612716370519906, "lm_q2_score": 0.8791467580102418, "openwebmath_perplexity": 445.6603965269178, "openwebmath_score": 0.9215060472488403, "tags": null, "url": "https://math.stackexchange.com/questions/2203287/system-of-equation-complicated" }
javascript, jquery, require.js I wouldn't worry about this too much. If you don't want the API consumer to inject additional properties through config object, use the construct st-boost suggested. If you don't want the consumer to access the Playlist internals at all, contain it in a closure and only expose functions that do work on this object. That said, however, JavaScript's properties as a language encourage a different mindset than the one you might have when working with languages that have extensive access control capabilities, like Java or C#. There, it is considered the API designer's responsibility to prevent any possible misuse of the API. In JavaScript, the mindset is more "junk in, junk out", and it's more of the caller's responsibility to ensure that he's not doing anything stupid, simply because JavaScript gives him more power to do stupid things.
{ "domain": "codereview.stackexchange", "id": 2710, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, require.js", "url": null }
c++, linux, serial-port void discardBufferedData() const; protected: virtual void flush(); virtual void applyTermiosSettings(); private: //! tty*-like file that's mapped to the UART peripheral. std::string UARTport; //! UART's communication baud rate. speed_t baud; //! File descriptor used for performing `write(...)` operations. int fd_write; int fd_write_break; //! File descriptor used for performing `read(...)` operations. int fd_read; //! File descriptor used for logging debug data. int fd_debug; //! Structure used for setting the port's baud rate. struct termios settings; }; #endif UARTIOHandler.cpp: #include "UARTIOHandler.h" UARTIOHandler::UARTIOHandler(std::string port, speed_t baud): AbstractIOHandler{ }, UARTport{ port }, baud{ baud }, fd_write{ 0 }, fd_write_break{ 0 }, fd_read{ 0 }, fd_debug{ 0 }, settings() {
{ "domain": "codereview.stackexchange", "id": 21914, "lm_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++, linux, serial-port", "url": null }
organic-chemistry, nomenclature, hydrocarbons of groups: ethyl before dimethyl. The "d" of dimethyl is not involved in alphabetizing. The numbering is correct because the one-to-one comparisons of locants is {1,2,4 < 1,3,4}. The correct name is 4-ethyl-1,2-dimethylcyclohexane. For a brief set of IUPAC rules applicable to this question see, https://www2.chemistry.msu.edu/faculty/reusch/VirtTxtJml/nomen1.htm
{ "domain": "chemistry.stackexchange", "id": 14308, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, nomenclature, hydrocarbons", "url": null }
c++, object-oriented, snake-game Title: Console Snake Game in C++ with Classes I would appreciate some criticsm on my code so that I could improve it. I tried making the Snake game in OOP but don't think I did it right. Any suggestions would be appreciated. The code is is commented in my language which isn't english hope that won't be a problem :) Here is the code: #include <iostream> #include <cstdlib> #include <ctime> #include <vector> #include <conio.h> #include <windows.h> using namespace std; //Mihael Petricevic enum objects {EMPTY, WALL, SNAKE_HEAD, SNAKE_TAIL, FRUIT}; objects** Map; //KONSTANTE const int m_x = 40; const int m_y = 10; class GameObject { public: //INHERITED BY CHILD CLASSES virtual void update() = 0; }; class Snake : public GameObject { public: void update(); private: int _x = 19; int _y = 4; int _x_old, _y_old; int _direction = 3; int _tsize = 0;
{ "domain": "codereview.stackexchange", "id": 31805, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented, snake-game", "url": null }
algorithms, np-hard, probability-theory, propositional-logic, monte-carlo Well, I can check if this random assignment satisfies any other clauses than $C_i$. But how can I use the result? My Googling yielded this page: http://theoryapp.com/dnf-counting-and-the-monte-carlo-method/ But this is even more confusing for me. Instead of choosing the clause $C_i$ uniformly, the site tells us to "pick up a clause $C_i$ with probability $P_i=\frac{\left|S_i\right|}{\sum_{j=1}{l}\left|S_j\right|}$, where $S_i$ is the collection of assignments satisfying $C_i$ and $l$ is the amount of clauses in $\phi$ and then pick up an assignment from $S_i$." But then we are told to "Check whether this assignment satisfies $\phi$. Finally, count the number of satisfying samples; denote the count by $M$". This is nonsense, each assignment that satisfies clause $C_i$ for any $i$ must necessary satisfy the whole formula? Admittedly, this basic course on probability and statistics is the first course where I feel like a total idiot.
{ "domain": "cs.stackexchange", "id": 10362, "lm_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, np-hard, probability-theory, propositional-logic, monte-carlo", "url": null }
quantum-computing I don't know of any serious arguments that $\mathsf{BQP = P}$, except from those people that believe in much bigger complexity class collapses (which are a minority of the community). The most serious arguments I have heard against quantum computing come from stances closer to the physics and argue that $\mathsf{BQP}$ does not correctly capture the nature of quantum computing. These arguments typically say that macroscopic coherent states are impossible to maintain and control (e.g., because there is some yet-unknown fundamental physical roadblock), and thus the operators that $\mathsf{BQP}$ relies on cannot be realized (even in principle) in our world.
{ "domain": "cstheory.stackexchange", "id": 2781, "lm_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-computing", "url": null }
quantum-mechanics, quantum-entanglement, faster-than-light, decoherence As an aside, your scheme sounds somewhat similar to an algorithm for quantum key distribution called E91 (developed by Artur Ekert in 1991, hence the name; for details, see https://en.wikipedia.org/wiki/Quantum_key_distribution). It's a way to distribute a shared secret key, using multiple sets of entangled photons, that will break if anyone tries to eavesdrop on the transmission. E91 relies on classical communication between the two participants in order to compare their measurement results and detect eavesdropping.
{ "domain": "physics.stackexchange", "id": 63739, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, quantum-entanglement, faster-than-light, decoherence", "url": null }
quantum-mechanics, homework-and-exercises, wavefunction, boundary-conditions The first part of your question has to do with the eigenfunctions in the infinite square well, whereas the second with a time dependent evolution of a wave function. The latter is not an eigenfunction, but can be expanded in them, which is the point of the problem, and can be done. The problem is badly posed and you were right to question it, but, after all, it is just an exercise problem, not real scientific research.
{ "domain": "physics.stackexchange", "id": 65547, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, homework-and-exercises, wavefunction, boundary-conditions", "url": null }
java, android Title: Error registering rosandroid client Hello everyone, i'm trying to create a rosjava client to connect to a c++ service, but when the client is being registered the following warning is showed. 02-28 10:28:06.275: W/DefaultChannelPipeline(335): An exception was thrown by a user handler while handling an exception event ([id: 0x406087c0] EXCEPTION: java.nio.channels.UnresolvedAddressException) 02-28 10:28:06.275: W/DefaultChannelPipeline(335): org.ros.exception.RosRuntimeException: java.nio.channels.UnresolvedAddressException 02-28 10:28:06.275: W/DefaultChannelPipeline(335): at org.ros.internal.transport.ConnectionTrackingHandler.exceptionCaught(ConnectionTrackingHandler.java:81) 02-28 10:28:06.275: W/DefaultChannelPipeline(335): at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:533) 02-28 10:28:06.275: W/DefaultChannelPipeline(335): at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:157)
{ "domain": "robotics.stackexchange", "id": 13115, "lm_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, android", "url": null }
slam, navigation, slam-gmapping, gmapping, move-base Title: Doubt about Localization/tf with slam_gmapping and use it for move_base navigation Hello, I have been using slam_gmapping package to have localization frame of my differential robot and use it for the move_base package for path planing. But here I doubt on something about transformation frames which I couldn't see in gmapping tutorials. Normally there are two things: one is that there is a frame we attach to the system ( this is just a definition), another thing is our estimate of their location and transformation among them. In my system I have the transformations (tf tree)as followed: /map --> /odom --> /base_link --> /laser_link I am giving the odometry data to base_link; but after localization there is no newly created localized frame of my robot base. So in which way the move_base navigation package is getting a guess of my robot position as a result of my SLAM node? I hope I could open my question clearly.
{ "domain": "robotics.stackexchange", "id": 11273, "lm_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, slam-gmapping, gmapping, move-base", "url": null }
earth-history, planetary-science, meteorite, planetary-formation For practical reasons, my answer will focus on Mars and Venus, as according to an article specific on the topic, Dynamical and collisional constraints on a stochastic late veneer on the terrestrial planets (Raymond et al. 2013), that asserts that the late veneer was
{ "domain": "earthscience.stackexchange", "id": 294, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "earth-history, planetary-science, meteorite, planetary-formation", "url": null }
type-theory, functional-programming, model-checking in haskell is productive, since there is an infinite number of prime numbers and so computing primes will always eventually produce a cons constructor. There has been a number of works on using types to check for productivity of a given definition. One nice overview is Abel, Iteration and Coiteration Schemes for Higher-Order and Nested Datatypes from 2005.
{ "domain": "cstheory.stackexchange", "id": 2914, "lm_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-theory, functional-programming, model-checking", "url": null }
c# public double Commissie(uint werknemerId) { for (int i = 0; i < werknemers.Count; i++) { if (werknemerId == werknemers[i].Id) { return werknemers[i].Commissie; } } throw new KeyNotFoundException(); } public override string ToString() { string res = ""; string Id;
{ "domain": "codereview.stackexchange", "id": 13625, "lm_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 }
va ha bounded extrema. Domain: (-∞, ∞) Range: [a,a] Linear Function f(x)=x. mitchellla. Edit. They also show an increasing curve that resembles the graph of a square root function. The domain of a function is the set of all real values of x that will give real values for y . The range is the set of possible output values shown on the $$y$$-axis. Now that we understand how important it is for us to master the different types of parent functions, let’s first start to understand what parent functions are and how their families of functions are affected by their properties. Domain and range » Tips for entering queries. Watch Queue Queue This means that the domain and range of y = √x are both [0, ∞). This quiz is incomplete! See more ideas about maths algebra, teaching algebra, math classroom. Identify the parent function of the following functions based on their graphs. Equation of parent … This particular relation is an algebraic function, since there is only one for each . In determining
{ "domain": "hotexl.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995733060719, "lm_q1q2_score": 0.8006716453363397, "lm_q2_score": 0.8289388125473629, "openwebmath_perplexity": 586.696601516674, "openwebmath_score": 0.416177362203598, "tags": null, "url": "http://hotexl.com/nllcq/domain-and-range-of-parent-functions-5b7ed9" }
python, python-3.x, game, homework, dice Other than that, you really need to strengthen your DRY (don't repeat yourself) skills. Writing a handful of functions for repeated code would be a good start.
{ "domain": "codereview.stackexchange", "id": 32688, "lm_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, game, homework, dice", "url": null }
ros, ros-canopen setting /run_id to 987657f0-162c-11e7-bac4-40167ea4b96c process[rosout-1]: started with pid [30725] started core service [/rosout] process[arm/robot_state_publisher-2]: started with pid [30743] process[arm/driver-3]: started with pid [30744] process[arm/arm_controller_spawner-4]: started with pid [30745] process[arm/cob_control_mode_adapter_node-5]: started with pid [30746] process[arm/joint_states_relay-6]: started with pid [30756] [ INFO] [1490976645.569315452]: waitForService: Service [/arm/controller_manager/load_controller] has not been advertised, waiting... [ INFO] [1490976645.717129775]: Using fixed control period: 0.010000000 [ INFO] [1490976650.576247797]: waitForService: Service [/arm/controller_manager/load_controller] has not been advertised, waiting... [ INFO] [1490976655.590050833]: waitForService: Service [/arm/controller_manager/load_controller] has not been advertised, waiting...
{ "domain": "robotics.stackexchange", "id": 27482, "lm_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-canopen", "url": null }
Mark the ending point, $\,E\,$, on the number line. Divide the interval from STARTING POINT to ENDING POINT into four equal parts, to make it easier to draw in the basic cycle. $\,k = 5\,$ $\displaystyle\text{period} = \frac{2\pi}{k} = \frac{2\pi}{5}$ $\displaystyle E := S + \frac{2\pi}{k} = \frac{3}{5} + \frac{2\pi}{5}$ STEP 4:   DRAW IN THE BASIC CYCLE; basic sine cycle basic cosine cycle As discussed in the next section, amplitude is the distance from the $x$-axis to the highest (or lowest) part of the graph. The amplitude of $\,y = \sin x\,$ and $\,y = \cos x\,$ is $\,1\,$. Vertical scaling by a factor of $\,a\,$ causes the amplitude to change to $\,|a|\,$. Vertical scaling by a factor of $\,-1\,$ causes reflection about the $x$-axis (i.e., a ‘flip’). basic sine cycle, flipped basic cosine cycle, flipped Draw in the basic cosine cycle, flipped. The amplitude is $\,7\,$.
{ "domain": "onemathematicalcat.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9919380079950704, "lm_q1q2_score": 0.8244423730282319, "lm_q2_score": 0.8311430415844385, "openwebmath_perplexity": 1725.3995421861334, "openwebmath_score": 0.9181989431381226, "tags": null, "url": "http://www.onemathematicalcat.org/Math/Precalculus_obj/graphGeneralSineCosine.htm" }
python, python-3.x, array, matrix (Thanks @Graipher for simplifying line.strip().split(" ") to line.split().) Minor things There is an official coding style guide for Python called PEP8. I suggest to check it out. There is a command line tool that can check your code. There are some redundant parentheses here and there. I suggest to remove them. The pep8 tool can pinpoint them for you. The default start value of range(...) is 0, so instead of range(0, 4) you can write simply range(4).
{ "domain": "codereview.stackexchange", "id": 27298, "lm_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, array, matrix", "url": null }
5. Dec 23, 2014 ### haruspex Dr Math's explanation of Matti's error at that link is wrong. Matti's error is the same as yours in this thread. As I posted above, you are counting some possibilities twice over. In the poker hand example, Matti is counting hands with two Aces twice. E.g. suppose the hand is DA, CA, HK, HQ, HJ. Matti counts DA, plus the other four cards, then counts CA plus the other four cards. Hands with three Aces Matti counts three times, etc. 6. Dec 23, 2014 ### Ray Vickson First: sorry, my previous response was for choosing 6 courses, not 7. But my final objection stands: you need to choose courses, not days. Let's look at the case of choosing 6 courses (which I will do now in another way); the case of choosing 7 course is a bit more involved, as it needs consideration of more cases, but I will leave that up to you to pursue.
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9744347860767304, "lm_q1q2_score": 0.8339711310999235, "lm_q2_score": 0.8558511488056151, "openwebmath_perplexity": 503.4503317982973, "openwebmath_score": 0.7053491473197937, "tags": null, "url": "https://www.physicsforums.com/threads/probability-theory-question.788759/" }
or 3, the coe cients a, band ctogether with the source term fare given functions on. Different source functions are considered. The code poisson_2d. 2D Poisson-type equations can be formulated in the form of (1) ∇ 2 u = f (x, u, u, x, u, y, u, x x, u, x y, u, y y), x ∈ Ω where ∇ 2 is Laplace operator, u is a function of vector x, u,x and u,y are the first derivatives of the function, u,xx, u,xy and u,yy are the second derivatives of the function u. Poisson Solvers William McLean April 21, 2004 Return to Math3301/Math5315 Common Material. The result is the conversion to 2D coordinates: m + p(~,z) = pm V(R) -+ V(r,z) =V(7). the full, 2D vorticity equation, not just the linear approximation. 1 Introduction Many problems in applied mathematics lead to a partial di erential equation of the form 2aru+ bru+ cu= f in. I use center difference for the second order derivative. nst-mmii-chapte. Solving a 2D Poisson equation with Neumann boundary conditions through discrete Fourier cosine
{ "domain": "marcodoriaxgenova.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9923043544146898, "lm_q1q2_score": 0.8673506481763438, "lm_q2_score": 0.8740772368049822, "openwebmath_perplexity": 682.703101573481, "openwebmath_score": 0.7900996208190918, "tags": null, "url": "http://marcodoriaxgenova.it/jytu/2d-poisson-equation.html" }
organic-chemistry, reactivity, nucleophilic-substitution Beyond six-membered rings, things get very complicated quickly. You could apply the same approach, but the number of possible conformations quickly rises from 8-membered and above. It becomes difficult to take all the possible factors and conformations into account, so without high-level calculations, it is difficult to make predictions. If you have access, the reactivity of 3-6 member cycloalkyl chlorides was included in a publication by Rablen et. al..[1] It includes calculated energy barriers for SN2 reactions of these cycloalkyl chlorides with cyanide ion as nucleophile. Reference:
{ "domain": "chemistry.stackexchange", "id": 10802, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, reactivity, nucleophilic-substitution", "url": null }
discrete-signals, fourier-transform, homework, fourier, dtft Title: DTFT Pairs confusion When I am in the DT Fourier Domain, and I want to come back to the time domain, which pair do I use? Asking because both pairs have the exact same "form" in the Fourier domain, and that is what is tripping me up. Do I just use pair 2 when I want to go into the Fourier domain and then I have to use pair 1 when I want to come back?? Or is there more to it than that? I would really recommend that you compute the DTFT of the sequences $x_1[n]=a^nu[n]$ and $x_2[n]=-a^nu[-n-1]$. This is very straightforward if you use the formula for the geometric series: $$\sum_{n=0}^{\infty}q^n=\frac{1}{1-q},\qquad |q|<1\tag{1}$$ It will be important to consider the magnitude of $a$. Note that it's not for nothing that the table in your question specifies a condition on $|a|$.
{ "domain": "dsp.stackexchange", "id": 9848, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "discrete-signals, fourier-transform, homework, fourier, dtft", "url": null }
python, game, python-2.x, pygame, minecraft debug_game_data = int(sys.argv[1]) current_version = "0.5.0" WIDTH = 700 HEIGHT = 700 pygame.init() pygame.display.set_caption("Builder {}".format(current_version)) screen = pygame.display.set_mode((WIDTH, HEIGHT)) FONT = pygame.font.SysFont("monospace.ttf", 13) clock = pygame.time.Clock() mouse_pos = pygame.mouse.get_pos key_pressed = pygame.key.get_pressed mouse_x = 0 mouse_y = 1 TILE_SIZE = 25 round_tile_size = lambda x: ( 1+(x-1)/TILE_SIZE)*TILE_SIZE if x%TILE_SIZE>=10 else ( x/TILE_SIZE)*TILE_SIZE
{ "domain": "codereview.stackexchange", "id": 15319, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, game, python-2.x, pygame, minecraft", "url": null }
python def mu_heatmap(self, ax: Axes) -> Axes: ax.set_title(self.name) return sns.heatmap( self.without_state, # The data to plot ax=ax, # Axes to draw on cmap=self.COLORMAP, # What colors to plot the heatmap as annot=True, # Should the values be plotted in the cells? # The maximum value of the legend. All higher vals will be same color vmax=1, # The minimum value of the legend. All lower vals will be same color vmin=-1, # The center value of the legend. With divergent cmap, where white is center=0, square=True, # Force cells to be square linewidths=.5, # Width of lines that divide cells # Extra kwargs for the legend; in this case, shrink by 50% cbar_kws={'shrink': .5}, )
{ "domain": "codereview.stackexchange", "id": 40514, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python", "url": null }
qiskit, quantum-circuit, qiskit-runtime Title: Does qiskit perform linear algebra for each shot? If the noise of the hardware is not considered, and measurements are performed at the end of the circuit, can the final state be obtained by performing linear algebra only once? And then, Monte Carlo simulations are used to obtain multiple samples? I'm not sure if Qiskit supports this method. If it does, how can I write the code? I want to set a large shotnum, it's time-consuming right now. You can certainly ask Qiskit to return you a statevector, a $2^n$ length vector giving the probability of each result. You can then get the samples yourself. I wrote this helper function once. from qiskit.quantum_info import Statevector from qiskit import Aer
{ "domain": "quantumcomputing.stackexchange", "id": 4653, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "qiskit, quantum-circuit, qiskit-runtime", "url": null }
c++, reinventing-the-wheel, vectors void insert(iterator position, unsigned count, const value_type &val) { if (position.is_valid_ptr2()) { for (int i = 0; i < size(); ++i) { if (position == seq_end) { while (count--) { push_back(val); } } else if(position == mem_start) { while (count--) { push_front(val); } } else { this_t holder; holder.allocate(capacity() + count); holder.seq_end = std::uninitialized_copy(mem_start, position, holder.mem_start); holder.seq_end = std::uninitialized_fill_n(holder.seq_end, count, val);
{ "domain": "codereview.stackexchange", "id": 14216, "lm_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++, reinventing-the-wheel, vectors", "url": null }
string-theory, spacetime, spacetime-dimensions Question 1: However, this explains only why F-Theory needs to be 12-dimensional. Why does one of these extra infinitesimal dimensions need to be temporal, though. Question 2: I've also heard that F-Theory isn't exactly a 2-time theory. However, that doesn't make sense to me, as, since the metric signature needs to be $(-1,-1,1,1,1,1,1,1,1,1,1,1)$, i.e. mostly plus, with 2 temporals and 10 spatials. Or am I missing something obvious, here? You can't really assign "the only correct signature" to the two extra infinitesimal dimensions of F-theory, so the signature is 11+1. The uniform signature of both of these dimensions is also needed for the moduli space to be $SL(2,R)/SO(2,R)$. Note that $SO(2,R)$ in the denominator is only a symmetry if they have the same signature.
{ "domain": "physics.stackexchange", "id": 11588, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "string-theory, spacetime, spacetime-dimensions", "url": null }
First a CWE; I've removed units here for clarity and confirmed the behavior is the same. g = 9.81; m = 2; ρ = 2; v0 = 6; Solve[{ Fw == m g, Fw Sin[Θ] == m an, an == v^2/ρ, -ρ g Sin[Θ] == 1/2 (v^2 - v0^2) }, {Θ, v, Fw, an}]] yields $$\{\{\theta \to 0.658108,v\to -3.4641,\text{Fw}\to 19.62,\text{an}\to 6.\},\\\{\theta \to 0.658108,v\to 3.4641,\text{Fw}\to 19.62,\text{an}\to 6.\}\}$$ where the $$v<0$$ case should be eliminated. Note that in each of these examples I've tried Solve, Reduce, Simplify, FullSimplify, v>0, and v ∈ PositiveReals I've tried with the first line as Assuming[v > 0, Simplify@Solve[{ which warned me about inverse functions, so I used Reduce and saw those extra solutions on the domain of $$\sin^{-1}$$. So I added a constraint Assuming[{v > 0, 0 <= Θ < 2 π}, Simplify@Reduce[{ and I tried using without Assuming FullSimplify[Reduce[{ ... }, {Θ, v, Fw, an}], {v ∈ PositiveReals, 0 <= Θ < 2 π}]
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9559813538993889, "lm_q1q2_score": 0.8047696163163022, "lm_q2_score": 0.8418256412990658, "openwebmath_perplexity": 2102.0916978581213, "openwebmath_score": 0.4632478654384613, "tags": null, "url": "https://mathematica.stackexchange.com/questions/221133/why-does-restricting-the-domain-not-eliminate-this-solution" }
machine-learning, python, predictive-modeling, supervised-learning Question 3 : Are there other conclusions to draw from this plot? or other ways of extracting information from the possible feature? and can I decide just by looking at this plot wether nb_enfants is a good predictor or not? then i went on and 'manually' picked features i liked ( That's how i roll ). Just kidding, i picked features that would logically have an impact on the prediction ( I know there are ways to spot features unseen to the naked eye, but i think i'm not on that statistical level of displaying data and extracting informations from, any advice on how to do that is welcome ) Question 4 : What's a better indicator to a good predictor in my case?
{ "domain": "datascience.stackexchange", "id": 4871, "lm_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, python, predictive-modeling, supervised-learning", "url": null }
homework-and-exercises, newtonian-mechanics, work, power, displacement I proved it using dimensional homogeneity. Power has dimensions $${[ML^2T^{-3}]}.$$ As it is constant and mass M is also constant, So, $${[L^2T^{-3}]}$$is constant. Hence ${L^2}\propto{T^3}$ So, L $\propto{T^{3/2}}$ But this method feels like a trick proof or maybe not work in all situations (for example, here we had constant mass, but in other times we may not have that) I feel that there is probably a better and concrete method through calculus. Can someone please help me out here. Any help will be greatly appreciated. Is this the sort of thing you're looking for? If the power is applied from time $t=0$, when the object is at rest, then at time $t$, $$\frac12 m v^2 =Pt.$$ Writing $v=\frac{ds}{dt}$, separating variables and preparing to integrate, $$\int_0^{s_1} ds =\int_0^{t_1} \sqrt{\frac{2Pt}{m}} dt$$ So $$s_1=\frac23 \sqrt{\frac{2P}{m}} t_1^{\ 3/2}$$ We can now drop the '1' subscript. It has served its purpose.
{ "domain": "physics.stackexchange", "id": 79265, "lm_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, work, power, displacement", "url": null }
organic-chemistry, elimination Accordingly, the first step of the gem-dihalocyclopropane (I) with alkyllithium can be depicted as a halogen-lithium inter-conversion with formation of a 1-lithio-1-halocyclopropane derivative II. The reaction is dependent on the nature of both halide and the lithium reagent, but its mechanism is not fully understood (Ref.2). For example, bromides react much more readily that the corresponding chlorides, and butyl lithium is generally much more reactive than methyllithium. It is expected that intermediate II would readily eliminate lithium halide as discussed in Ref.1. This may occur by two different mechanisms: (i) Pathway $\color{blue}{\bf{a}}$: Concerted elimination and ring openig to an allene; or (ii) Pathway $\color{maroon}{\bf{b}}$: An $\alpha$-eleminatin to the carbene intermediate III (Ref.2). The author comments that the pathway $\color{blue}{\bf{a}}$ may well be the way by which allenic product has been formed, although it appears that cyclopropyl anions have considerable
{ "domain": "chemistry.stackexchange", "id": 13913, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, elimination", "url": null }
stellar-evolution, nucleosynthesis Base on my question previously, I assume we are talking about the alpha process here. And when I check the Wikipedia of the Alpha Process, it says that the alpha process ends at $^{56}_{28}\mathrm{Ni}$ due to photodisintegration, but as the suggests, the process should produce $^{209}_{83}\mathrm{Bi}$. The question is, why do Bismuth, an atom with atomic number $83$ are produced here? Shouldn't atom like $^{}_{82}\mathrm{Pb}$ with even atomic number being produced here? Bismuth is produced via the s-process. It is the slow absorption of neutrons that can produce heavier elements beyond the peak of the binding energy per nucleon curve at iron. The alpha process isn't capable of producing much of anything beyond nickel.
{ "domain": "astronomy.stackexchange", "id": 5552, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "stellar-evolution, nucleosynthesis", "url": null }
quantum-mechanics, statistical-mechanics, greens-functions, propagator Title: Simple Green's function question: Propagator for stationary particle? Suppose the probability a particle transitions into a state of interest at time $t$ having position $x$ is $$\omega(x,t).$$ Once a particle enters this state it does not leave it, nor does its position change within it. I would like to express the probability that a particle is found in this state of interest at position $x$ and time $t$. This involves the propagator or Green's function $g(x,t)$: $$ p(x,t) = \int_{-\infty}^x dx' \int_{-\infty}^t dt' \omega(x',t') g(x-x',t-t').$$
{ "domain": "physics.stackexchange", "id": 60501, "lm_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, statistical-mechanics, greens-functions, propagator", "url": null }
newtonian-mechanics, angular-momentum, rotational-dynamics, conservation-laws, centrifugal-force In that case, since the body maintains its angular velocity in the absence of any external torque, is it correct to say that a person sitting inside a spinning spaceship will experience "artifical gravity" forever, without any intervention or additional torque required? Assume there is just that one person sitting there, there are no other people who are walking about or moving, etc. Also, the spaceship is in empty space with no gravitational influence from any other body.
{ "domain": "physics.stackexchange", "id": 78172, "lm_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, angular-momentum, rotational-dynamics, conservation-laws, centrifugal-force", "url": null }
condensed-matter, crystals, microscopy Also, it's very helpful when you discuss delocalized states in the crystal, for example conduction electrons in a metal. Regarding the Brilloin Zone, this is mostly a geometrical tool to better organize the reciprocal space. Hope this clarifies a bit, and I would say that this is only the tip.
{ "domain": "physics.stackexchange", "id": 21424, "lm_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, crystals, microscopy", "url": null }
#1: r = ap - 5 (3 variables R,A,P) #2: r = p + 6 (2 variables R,P) #3: r = 3p + b (3 variables R,B,P) 1) a = 2 allows us to reduce equation #1 to the variables r and p, which are the same two variables as equation #2. Thus we have simultaneous equations. As soon as we verify that the equations are different, we know that we can solve for both variables. Once we know r and p, we can substitute in equation #3 to solve for b. Sufficient. 2) r = 17 allows us to do the same thing, more or less. It reduces equation #2 to only one variable, allowing us to solve for p. Once we have p (and r), we can use equation #3 to solve for b. Sufficient. Attachments Screen Shot 2015-07-23 at 10.36.05 AM.png [ 189.38 KiB | Viewed 7691 times ] Screen Shot 2015-07-23 at 10.31.01 AM.png [ 30.94 KiB | Viewed 7666 times ] Kudos [?]: 1770 [4], given: 794 Director Joined: 10 Mar 2013 Posts: 591 Kudos [?]: 478 [2], given: 200
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 1, "lm_q1q2_score": 0.855851148805615, "lm_q2_score": 0.855851148805615, "openwebmath_perplexity": 3598.533793648166, "openwebmath_score": 0.6089481711387634, "tags": null, "url": "https://gmatclub.com/forum/in-the-xy-plane-the-straight-line-graphs-of-the-three-equations-above-207707.html" }
astrophysics, planets, hydrogen, jupiter Title: What is the precise internal structure of Jupiter? I've been trying to find out exactly where the layers of molecular hydrogen, and metallic hydrogen are precisely, inside Jupiter, in kilometres from the centre. Ideally with an error margin of 1-10kms. I'm a newbie at astronomy, physics, and chemistry, so the more detailed the explanation, the better. How have we gone about guessing, what factors are used to do so? What is the most recent data? EDIT: try not to quote me easily accessible vague research, I've already done google searches! Thank you :) Here is an excellent article on the topic:
{ "domain": "physics.stackexchange", "id": 82704, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "astrophysics, planets, hydrogen, jupiter", "url": null }
Corollary: $$\sum_u \left| p_k(u-1,v) - p_k(u,v) \right| = 2 p_k(0,v).$$ Proof: The above lemma tells us the signs of all the absolute values; the sum is \begin{multline*} \cdots + (p_k(-1,v) - p_{k}(-2,v)) + (p_k(0,v) - p_{k}(-1,v)) + \\ (p_k(0,v) - p_k(1,v)) + (p_k(1,v) - p_k(2,v)) + \cdots = 2 p_k(0,v). \qquad \square\end{multline*} So, in order to prove $(\ast)$, we must show that $\lim_{k \to \infty} \sum_v p_k(0,v)=0$. In other words, we must show that the coefficient of $x^0$ in $\left( \frac{x}{8}+\frac{3}{4} + \frac{x^{-1}}{8} \right)^k$ goes to $0$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787853562027, "lm_q1q2_score": 0.8628705033175621, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 159.1409040993619, "openwebmath_score": 0.9740303754806519, "tags": null, "url": "http://math.stackexchange.com/questions/51926/a-stronger-version-of-discrete-liouvilles-theorem" }
genetics, molecular-biology, molecular-genetics, homework, gene Title: Should I consider one or two DNA chains to find how many nucleotides are in a gene? I am trying to solve an exercise. How many nucleotides does a gene contain if information about 287 amino acids is encoded in it? What is the molecular mass and length of this gene?
{ "domain": "biology.stackexchange", "id": 11044, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, molecular-biology, molecular-genetics, homework, gene", "url": null }
aerodynamics, bernoulli-equation Fortunately there is an equation that deals with pressure gradients perpendicular to the air flow. It doesn't have a name, but was derived at the same time as Bernoulli's equation so it's been around for centuries. It is: $$\frac{dp}{dz} = \frac{\rho v^2}{R}$$ where $p$ is the pressure, $dp/dz$ is the pressure gradient perpendicular to the air flow, $\rho$ is the density of the fluid, $v$ is the velocity and $R$ is the radius of curvature of the airflow. (BTW, the derivation of this formula is just a straightforward application of Newton's 2nd law to the kinematics of centripetal acceleration - Physics 101 stuff) This equation shows that whenever air follows a path that is curved there are pressure gradients perpendicular to the airflow, the tighter the curvature the higher the pressure gradients, and for straight flow (R -> infinity) there is zero pressure gradients and therefore no lift.
{ "domain": "physics.stackexchange", "id": 71255, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "aerodynamics, bernoulli-equation", "url": null }
quantum-field-theory, particle-physics, hilbert-space, symmetry-breaking, goldstone-mode Edit 1: I found that Ryder's QFT textbook (p. 292) as well as Nair's QFT textbook (p. 246) use the same completeness relation $1=\sum_n |n\rangle\langle n|$, i.e. the proof goes along the same lines as the one in I&Z. But why do they choose this completeness relation? Edit 2: Maybe the answer is to take the following (off-shell) completeness relation: $$1=\sum_n \int \frac{\text{d}^4 p}{(2\pi)^4} |p \rangle\langle p |$$ since this would not give an $E(\vec p)$ in the denominator...? Edit 3: Another reference that uses $1=\sum_n|n\rangle\langle n|$: arXiv link (page 5) and one that uses $1=\int\frac{d^3 p}{(2\pi)^3}|p\rangle\langle p|$: arxiv link (page 19).
{ "domain": "physics.stackexchange", "id": 79996, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, particle-physics, hilbert-space, symmetry-breaking, goldstone-mode", "url": null }
ros2 I mean, when we select a particular RMW interface, then can ROS2 not know from it that which RMW we are trying to use ? c) Lastly, I raised this question hoping that the maintainers of ROS2 code might know the protocols that the RMWs, which are supported by ROS2 (by actually having their rmw interface). If not about all, any clue for default RMW atleast ?
{ "domain": "robotics.stackexchange", "id": 35947, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2", "url": null }
quantum-mechanics, hilbert-space, wavefunction As for the evolution, notice that if QM were to describe particle annihilation, it should also be able to describe particle creation because it is time-reversible. However, you can't give a wavefunction a interpretation of two particles at once. It only tells you how to find a single particle. From a more mathematical point of view, saying that $\psi = 0$ at any time (e.g., after annihilation) determines the whole evolution of the state. Notice that evolving the Schrödinger equation to any time with $\psi(0,x) = 0$ can only lead to $\psi(t,x) = 0$. Hence, wanting to describe the state of the system with a single wavefunction will also prevent one from getting $\psi(t_0,x) = 0$ at any particular time $t_0$, unless the wavefunction vanishes at all times.
{ "domain": "physics.stackexchange", "id": 91758, "lm_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, hilbert-space, wavefunction", "url": null }
nlp, pytorch, transformer, sequence-to-sequence, text-generation Unfortunately, Pytorch's official documentation on the function isn't exactly very thorough at this point (April 2021), in terms of the expected dimensions of each tensor and when it does or doesn't make sense to use each of the optional arguments.
{ "domain": "datascience.stackexchange", "id": 9433, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nlp, pytorch, transformer, sequence-to-sequence, text-generation", "url": null }
slam, navigation, qt Originally posted by Andre on ROS Answers with karma: 1 on 2016-08-22 Post score: 0 A bit harsh maybe, but could you please use the search (or Google) before posting? We already have quite a few QAs about this exact issue: RGBDSlam_V2 Error with make (although I wouldn't recommend what the (accepted) answer suggests) Compiler errors while making rgbdslam on Nvidia Jetson TK1 (mentions TK1, but issue is similar) to list a few. The answer to that last question seems to suggest this can be worked around. And the author is apparently aware of this as well: see felixendres/rgbdslam_v2#17 fi. Originally posted by gvdhoorn with karma: 86574 on 2016-08-22 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 25573, "lm_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, qt", "url": null }
Suppose the $a_n$ are non-negative. To prove that the series diverges to $+\infty$, it is enough to prove that for every $N\in\Bbb N$, there exists $N'>N$ such that $$\sum_{n=N}^{N'}\frac{a_n}{a_0+\cdots+a_n}\geq \frac12$$ So fix $N>0$, and notice that for every $M>N$ $$\sum_{n=N}^{M}\frac{a_n}{a_0+\cdots+a_n}\geq\sum_{n=N}^{M}\frac{a_n}{a_0+\cdots+a_{M}}=\frac{a_N+\cdots+a_{M}}{a_0+\cdots+a_{M}}=1-\frac{C}{a_0+\cdots+a_{M}}$$ where $C=a_0+\cdots+a_{N-1}$ is a constant. The second term is of the form "constant over something that tends to infinity" and so tends to $0$, and eventually we get a minoration by $\frac12$, showing that the series diverges to infinity.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806535200601, "lm_q1q2_score": 0.8295147880163356, "lm_q2_score": 0.8459424373085145, "openwebmath_perplexity": 185.88869333102082, "openwebmath_score": 0.9335778951644897, "tags": null, "url": "https://math.stackexchange.com/questions/1135536/if-sum-n-0-infty-a-n-diverges-prove-that-sum-n-0-infty-fraca-n" }
models That's the whole reason why we have the theory of general relativity, which is a more fundamental, more encompassing theory of gravity, which, by the way, reduces to — or matches — Newtonian gravity in non-relativistic scenarios. You don't throw away what worked before; you throw away the parts that were wrong, and produce a refinement. All of science is like this
{ "domain": "physics.stackexchange", "id": 80921, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "models", "url": null }
python, game-of-life, pygame This may be better as board = [[False] * THE_SIZE for _ in range(THE_SIZE)] You have two stray semicolons. Trash 'em. Your check if event.type == pygame.QUIT: pygame.quit() break Doesn't actually work. You need to fully exit, not just uninitialize SDL. Actually, there isn't much point running pygame.quit at all. I suggest just doing return from a main function. I personally don't like comments at the end of lines, but if you must at least space them properly (gap of two spaces and a space after the hash). This is overcomplicated: if board[r][c]: if neighborcount < 2: tempboard[r][c] = False if neighborcount > 3: tempboard[r][c] = False if neighborcount == 2 or neighborcount == 3: tempboard[r][c] = True elif not board[r][c]: if neighborcount == 3: tempboard[r][c] = True Some ifs are exclusive, so should be elifs, but there's also no point doing if neighborcount == 2 or neighborcount == 3: tempboard[r][c] = True
{ "domain": "codereview.stackexchange", "id": 12795, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, game-of-life, pygame", "url": null }
machine-learning, neural-network, optimization Is Newton's method really needed if Gradient Descent can be modified to rectify all the problems faced during machine learning? Existence of vanishing gradient problem depends on the choice of "activation function" and the "depth" of network. Newton method and gradient descent would both face this problem for a function like Sigmoid, since in the flat extremes of Sigmoid both first and second order derivatives are small and exponentially vanishing by depth. In other words, the problem is solved for both methods by the choice of function. As a side note, 1st- and 2nd-order derivatives of Sigmoid go to zero at the same rate. Here is a graph of Sigmoid and its derivatives; zoom into the extremes. Historical note. Newton method predates the vanishing gradient problem (which was faced after the introduction of Backpropagation in 60s) by centuries.
{ "domain": "datascience.stackexchange", "id": 4840, "lm_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, neural-network, optimization", "url": null }
mitochondria, energy-metabolism Muscle fatigue as we know it can be attributed to different mechanisms that happen at different stations. Neural (central) fatigue Metabolic (peripheral) fatigue Neural fatigue happens because the muscle stops listening, specifically because the frequency of electric stimulation is not high enough to maintain contraction. It can happen because of exhaustion of neurotransmitter (acetylcholine) stores for example. That is to say, the rate of release and breakdown of acetylcholine by acetylcholinesterase is greater than the rate of its formation and packaging into vesicles. Neural fatigue is what limits activity time in well-trained athletes. It's not associated with pain. Athletes work on increasing the capacity of their neurons to keep firing at a high frequency by training. Metabolic fatigue on the other hand happens because the muscle gives up, specifically because of $\ce{Ca^{2+}}$ not doing its job being too little or ineffective. substrate shortage.
{ "domain": "biology.stackexchange", "id": 12305, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mitochondria, energy-metabolism", "url": null }
universe However, our Universe happens to be dominated by dark energy, which accelerates the expansion without boundaries. This unfortunately means that the light leaving today from a galaxy 17 Glyr away will be carried away by the expansion faster than it can travel toward us. In contrast, the light emitted today from a galaxy 15 Glyr away will travel in our direction, but will nonetheless initially move away from us due to the expansion. However, its journey toward us makes this expansion rate smaller and smaller (since the expansion rate increases with distance from us), and after a period of time it will have traveled so far that it has overcome expansion and starts decreasing its distance from us and eventually reach us after 100 Gyr or so.
{ "domain": "astronomy.stackexchange", "id": 1383, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "universe", "url": null }
Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email. _________________ SVP Status: The Best Or Nothing Joined: 27 Dec 2012 Posts: 1858 Location: India Concentration: General Management, Technology WE: Information Technology (Computer Software) Followers: 44 Kudos [?]: 1832 [1] , given: 193 ### Show Tags 30 May 2015, 04:41 Estimate, you don't need to divide here to get the answer: 12X<=600 --> X<=50, But we rounded up, so the real number must be <50 --> 49 (C) _________________ When you’re up, your friends know who you are. When you’re down, you know who your friends are. 800Score ONLY QUANT CAT1 51, CAT2 50, CAT3 50 GMAT PREP 670 MGMAT CAT 630 KAPLAN CAT 660 Senior Manager Affiliations: Target Test Prep Joined: 04 Mar 2011 Posts: 388 Followers: 21 Kudos [?]: 133 [0], given: 2
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995703612219, "lm_q1q2_score": 0.8475544473884177, "lm_q2_score": 0.8774767826757122, "openwebmath_perplexity": 10713.094819188147, "openwebmath_score": 0.34232771396636963, "tags": null, "url": "http://gmatclub.com/forum/a-club-collected-exactly-599-from-its-members-if-each-139646.html#p1125532" }
moveit, ros-indigo Original comments Comment by Lileping on 2017-01-03: Thanks a lot.I will wait for it. I am hurry to use moveit to control real UR5.The universal robot pkg needs moveit_kinematics. Comment by F4bich on 2017-01-25: Currently I can't run sudo apt-get install ros-indigo-moveit nor sudo apt-get install ros-indigo-moveit-full. I tested it on multiple mashines. Is this still a problem with the official public repo or is it something on my side? Comment by 130s on 2017-01-28: Looking at the package status on buildfarm, moveit seems released without issues. moveit_full will become available on the next public release (watch this thread or similar). Comment by bhavyadoshi26 on 2017-01-29: @F4bich, I have the same problem. sudo apt-get install ros-indigo-moveit is not being located. Comment by 130s on 2017-01-29: @F4bich @bhavyadoshi26 I've opened a ticket for discussing the issue more. Please consider providing more info there.
{ "domain": "robotics.stackexchange", "id": 26627, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "moveit, ros-indigo", "url": null }
c, library, ascii-art, dynamic-loading /include/whimsy.h #ifndef _whimsy_font_ #define _whimsy_font_ #include <core.h> int whimsy_allowed(int c); int whimsy_index(int c); int whimsy_init(void); int whimsy_exit(void); int whimsy_print(const char* s); struct font whimsy = { .allowed = whimsy_allowed, .index = whimsy_index, .init = whimsy_init, .exit = whimsy_exit, .print = whimsy_print }; #endif /Makefile uninstall: @echo Uninstalling library; \ rm /usr/lib/libaarts.so -f; \ cd /usr/include \ rm whimsy.h core.h StarStrips.h -f install: lib @echo Installing library; \ cp include/*.h /usr/include/; \ cp libaarts.so /usr/lib/ lib: @cd fonts; \ make sharedlib; \ mv ascii-arts.so ../libaarts.so clean: @rm *.so -f; \ cd fonts; \ rm *.o -f; \ cd ../demo; \ rm *.d -f; demos: @cd demo; \ make whimsy
{ "domain": "codereview.stackexchange", "id": 15856, "lm_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, library, ascii-art, dynamic-loading", "url": null }
rviz, roslaunch, ros-kinetic Originally posted by Void with karma: 71 on 2019-11-21 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by aPonza on 2020-02-11: I have a MotionPlanning display active and I still face the error. I attached a screenshot to the question displaying both RViz with an active MotionPlanning display and the terminal showing the error (the actual 3D view is grey due to a wall). Comment by Void on 2020-04-21: I'm not sure in that case.
{ "domain": "robotics.stackexchange", "id": 32248, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rviz, roslaunch, ros-kinetic", "url": null }
quantum-mechanics, harmonic-oscillator, quantum-states Title: How do we know which term to attach a phase factor to in a state equation? I need to find the state of a particle in a one-dimesional harmonic oscillator where a measurement of the energy yields the values $\hbar\omega\over 2$ or $3\omega\hbar\over 2$, each with a probability of one-half at time t. I would have thought that the state would be $\big|\psi(0)\big>= {1\over \sqrt2}\big|0\big>+{1\over \sqrt2}\big|1\big>$. However the right equation is $\big|\psi(0)\big>= {1\over \sqrt2}\big|0\big>+{1\over \sqrt2}e^{-i\phi}\big|1\big>$. I know that the $e^{-i\phi}$ is a relative phase factor, but I can't figure out where it came from.
{ "domain": "physics.stackexchange", "id": 52517, "lm_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, harmonic-oscillator, quantum-states", "url": null }
image-processing, matlab, computer-vision, detection figure;imshow(edge(bw));imellipse(gca,[center.x-radius center.y-radius 2*radius 2*radius]); title('Final solution (Shown on edge image)'); figure;imshow(im);imellipse(gca,[center.x-radius center.y-radius 2*radius 2*radius]); title('Final solution (Shown on initial image)'); end
{ "domain": "dsp.stackexchange", "id": 548, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "image-processing, matlab, computer-vision, detection", "url": null }
java, beginner, image, animation // Not sure why I need the ImageTypeSpecifier, but it doesn't work without it ImageTypeSpecifier img_type = ImageTypeSpecifier.createFromBufferedImageType(BufferedImage.TYPE_INT_ARGB); Full marks for honest commenting, but you may not have realised that you're making a dangerous assumption. What if the image isn't of TYPE_INT_ARGB? The more robust way of doing this would be to create a fresh IIOMetadata for each image, using new ImageTypeSpecifier(img) to create an appropriate ImageTypeSpecifier for each one. The disposalMethod is hard-coded to "none". It would be nice to make this configurable, preferably via an enum rather than raw strings, in particular because using "doNotDispose" opens up the possibility of optimising the images to use transparency on areas which don't change. (And on the subject of exposing nice types rather than cryptic raw data, Java 8 provides Duration, which is nicer than raw centiseconds).
{ "domain": "codereview.stackexchange", "id": 17377, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, image, animation", "url": null }
python Usage: ~: python3 module_reloading_console.py Welcome to ModuleReloadingConsole >>> import test >>> test.foo 23 >>> test.foo # in the meanwhile change foo to '42' in test.py 42 Because I am really new to Python I want to now which improvements you have for the above code. Are there common Python conventions I have not considered? marginal note: this code recipe (automatically upgrade class instances on reload()) would be a good improvement. Maybe also this article about dynamically reloading a python code might improve the code... Automatic tools PEP8: I'd say your code's OK style wise, but this is what the checker said: 1:1: E266 too many leading '#' for block comment 19:40: E261 at least two spaces before inline comment 27:80: E501 line too long (86 > 79 characters) 29:80: E501 line too long (82 > 79 characters) 31:80: E501 line too long (82 > 79 characters)
{ "domain": "codereview.stackexchange", "id": 13629, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python", "url": null }
rosbag That's not a bug in rosbag, but a general design decision in Unix. As long as rosbag is still running, you can try to recover the file from /proc/pid/fd, otherwise maybe this will help (more information here). BTW: If you delete /home/data before starting rosbag, you'll get an error saying that the file is not writable; only if you delete it while rosbag is recording, you'll lose the data.
{ "domain": "robotics.stackexchange", "id": 13924, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rosbag", "url": null }
python, mysql, pygame #Function for refreshing the screen def refreshScreen(): W.Draw() T.Draw(W.WINDOW) pygame.display.update() #Object Initialization W = Window([919, 919], "The Periodic Table", (255, 255, 255)) T = Table() #Fetch from database for Element in fetchFromDatabase("SELECT * FROM periodictable"): T.Layout.append([Element[5], Element[6]]) T.ElementTexts.append(Element[1]) T.ElementColors.append(Element[7]) #Main Loop Run = True while Run: # FPS Limiter W.CLOCK.tick(30) if W.GetUserActions(): Run = False T.GenerateGrid() T.LaunchSimulation() refreshScreen() pygame.quit() #--------------------------------------------------------------------------------------------------------
{ "domain": "codereview.stackexchange", "id": 38824, "lm_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, mysql, pygame", "url": null }
I noticed that computing $d''(x)=0$ gives me the result after 3 iterations. Why does finding the root of the second derivative of $d$ give the result when my problem is to minimize $d$? You can define your objective function as $h(x) = x^4+x^2-2\,x+1$ $h'(x) = 4\,x^3+2\,x-2$ $h''(x) = 12\,x^2+2$ We can see that $h''$ is strictly positive, so you do not have to worry about it, you only need to find the point where $h'=0$. So, using Newton's Method: $x_0=0.5\\ x_1 = x_0-\frac{h'(x_0)}{h''(x_0)} = 0.5 - \frac{0.5+1-2}{3+2} = 0.6\\ x_2 = x_1-\frac{h'(x_1)}{h''(x_1)} = 0.6 - \frac{0.864+1.2-2}{4.32+2} = 0.5899$ Since you are not getting the right result, probably there is an implementation error.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9820137895115189, "lm_q1q2_score": 0.8118423817292084, "lm_q2_score": 0.8267117940706734, "openwebmath_perplexity": 108.9649225429707, "openwebmath_score": 0.985815703868866, "tags": null, "url": "https://math.stackexchange.com/questions/2343513/use-newtons-method-to-approximate-x-accurate-to-within-10-4-that-produc" }
Learn more about the differences between permutations and combinations, or explore hundreds of There are different types of permutations and combinations, but the calculator above only considers the case The calculator provided computes one of the most typical concepts of permutations where. Suppose we number the people from 1 through 4 and think of the set A = {1,2,3,4}. Users should hear and feel a click when they finish turning the lock. Each combination is played as if it were a single selection on a single ticket. In how many different ways can the letters of the word 'CORPORATION' be arranged so that the vowels always come together? Number of groups, each having 3 consonants and 2 vowels = 210. I am trying to find a code for excel that I can use to list all possible combinations of the numbers/symbols 0-9, #, and * or just numbers 0-12 in 6 digit combinations. - Combination Play costs for LOTTO 6/49:$88, $14,$56 or $168 - You win on a Combination Play ticket the same as on a
{ "domain": "frauenarztpraxis-schorndorf.de", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9724147225697743, "lm_q1q2_score": 0.832242259214479, "lm_q2_score": 0.8558511506439708, "openwebmath_perplexity": 466.3527600399682, "openwebmath_score": 0.4867722988128662, "tags": null, "url": "http://eka.frauenarztpraxis-schorndorf.de/how-many-combinations-with-7-numbers.html" }
solar-system, astrophysics Title: What is the solar system orientation to its direction of travel? I saw the picture and seem incorrectly drawn. Its shows the the edge of the solar system leading facing the Heliosheath. It would not be like NASA to post something as incorrect as this. The solar system should at 60 degrees to the direction of travel? I'm not sure maybe this picture is correct? https://solarsystem.nasa.gov/news/784/nasas-voyager-2-probe-enters-interstellar-space/ This is Venus, high in the morning sky, amid the faint pillar of light called the Zodiacal Light. The glow is sunlight reflected off cometary dust in the inner solar system. Above is the centre of the Galaxy area of Sagittarius. Alan Dyer Since the Zodiacal Light lies in the ecliptic plane, the orientation of the Solar system in the Galaxy is something like this:
{ "domain": "astronomy.stackexchange", "id": 3540, "lm_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, astrophysics", "url": null }
beginner, c Then in smorse() a loop similar to: for( size_t i = 0; str[i]; i++ ) { printf( "%s ", master[ tolower( str[i] ) ] ); } puts( "" ); where the tolower() is from the header file: ctype.h in main(), these statements: printf("%s\n", smorse("sos")); printf("%s\n", smorse("daily")); printf("%s\n", smorse("programmer")); printf("%s\n", smorse("bits")); printf("%s\n", smorse("three")); can be replaced with: smorse( "sos" ); smorse( "daily" ); etc.
{ "domain": "codereview.stackexchange", "id": 36119, "lm_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, c", "url": null }
ros, manifest.xml, eclipse This will cause my header files from src to be exported (I'm not following the convention to place header files in an include directory, so maybe you'll have to replace src with include), a library directory added to linker's knowledge and a library libMyLib.so (or .o) placed in one of the above declared directories to be linked. Originally posted by tom with karma: 1079 on 2011-08-02 This answer was ACCEPTED on the original site Post score: 2
{ "domain": "robotics.stackexchange", "id": 6317, "lm_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, manifest.xml, eclipse", "url": null }
machine-learning, neural-network, deep-learning, accuracy, research Title: How do we know a neural network test accuracy is good enough when results vary with different runs? In every paper I read about prediction models, the training accuracy and the test accuracy (sometimes also the validation accuracy) is stated as a discrete number. However, in experience, depending on how the weights are initialized, different training runs result in different testing results. How does a standard data science researcher pinpoint the accuracy metric to be written in a paper, and how does ze get certain about its validness? So, the question is about how to report test accuracy, etc, when you see variation over executions. As @Nikos M. has eluded to, you typically train and test the model at least 3 times and then report the average test evaluation metrics (along with the standard deviation to show the level of variation). This is why you are seeing 'discrete' values reported in papers, this is because they are averaged over x train/test runs.
{ "domain": "datascience.stackexchange", "id": 7980, "lm_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, neural-network, deep-learning, accuracy, research", "url": null }
The derivative of the arcsine function of x is equal to 1 divided by the square root of (1-x 2):. You da real mvps! I prefer to rearrange and use Implicit differentiation as I always get the inverse derivatives muddled up, and this way I do not need to remember the inverse derivatives. What is Derivatives? What is the derivative of the arcsine function of x? Examples : arctan(0) returns 0 Derivative arctangent : Replace all occurrences of with . So we could write that right up here. sinh x = cosh x Proof: csch x = - coth x csch x Proof: cosh x = sinh x Proof: sech x = - tanh x sech x Proof: tanh x = 1 - tanh 2 x Proof: coth x = 1 - coth 2 x Proof Those with hyperlinks have proofs. Taking the derivative of the second expression implicitly gives: solving for the derivative gives: (1) This is correct but unsatisfying - we want the derivative in terms of x. Derivative of inverse tangent. A reference triangle is constructed as shown, and this can be used to complete the expression of the
{ "domain": "ppc-com.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.975576914916509, "lm_q1q2_score": 0.819225069619418, "lm_q2_score": 0.839733963661418, "openwebmath_perplexity": 1355.793883436179, "openwebmath_score": 0.8261556029319763, "tags": null, "url": "http://84-sports.ppc-com.net/st-joseph-lyttaq/derivative-of-arctan-824255" }
newtonian-mechanics, forces, vectors, free-body-diagram, string Therefore, for each block, Newton's second law looks like this: $$\sum F_1=T-m_1g=m_1a_1$$ $$\sum F_2=T-m_2g=m_2a_2$$ Now, due to how the masses are linked, it must be that $a_1=-a_2$ (since if one goes up the other goes down. This can also be "derived" if you consider the fact that the length of the rope connecting the masses must be constant). For simplicity let's say $a_1=-a_2=a$. Then we can change our equations to be $$T-m_1g=m_1a$$ $$T-m_2g=-m_2a$$ Solving for the acceleration we find that: $$a=\frac{(m_2-m_1)g}{m_1+m_2}$$
{ "domain": "physics.stackexchange", "id": 51766, "lm_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, forces, vectors, free-body-diagram, string", "url": null }
acceleration Title: Can the law of the acceleration be applicable to a man falling from plane? Is acceleration law $a = \Delta v/\Delta t$ applicable on somebody who is falling from an air plane? Does the acceleration increase when some body is at some altitude and does his speed increases by $9.81 m/s$ every second (because of the gravity of the average earth) ? Yes speed will increase $9.8$ m/s every second provided that there is no other force acting as resistance to the fall. In reality air resistance depends on speed and the faster someone falls the more the resistance of the air around them. Eventually any object falling through the atmosphere will reach 'terminal velocity' the speed at which the force downwards of gravity is balanced exactly by a force upwards of wind resistance.
{ "domain": "physics.stackexchange", "id": 19374, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "acceleration", "url": null }