text stringlengths 49 10.4k | source dict |
|---|---|
optimization, computational-geometry, approximation
Title: Find ellipsoid that contains intersection of an ellipsoid and a hyperplane I have an $n$-dimensional ellipsoid $E$ and a hyperplane $H$. This hyperplane cuts $E$ into two parts: $E_1$ and $E_2$ (whose disjoint union is $E$). I want to find another ellipsoid $E'$ that has minimal hyper-volume and contains $E_1$. Is there an efficient algorithm to do this?
My first thought was to formulate it as an optimization problem, but I am having difficulty with formulating it, as I don't know how to formulate the containment ($E_1 \subseteq E'$) constraint.
An approximation for the minimal hyper-volume ellipsoid is also good for my needs. Your are describing the basic step in the ellipsoid algorithm. Your question might be answered in lecture notes on the algorithm, such as these ones by Goemans.
More generally, given a convex body $K$, the minimum volume ellipsoid containing it is called the Löwner–John ellipsoid. The same name is also given to the maximum volume ellipsoid contained in $K$. See for example these lecture notes of Boyd and Vandenberghe. | {
"domain": "cs.stackexchange",
"id": 7207,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optimization, computational-geometry, approximation",
"url": null
} |
neural-networks, machine-learning, applications, binary-classification
Title: Can you use machine learning for data with binary outcomes? I am totally new to artificial intelligence and neural networks and have a broad question that I hope is appropriate to ask here.
I am an ecologist working in animal movement and I want to use AI to apply to my field. This will be one of the few times this has been attempted so there is not much literature to help me here.
My dataset is binary. In short, I have the presence (1) and absence (0) of animal locations that are associated with a series of covariates (~20 environmental conditions such as temperature, etc.). I have ~1 million rows of data to train the model on with a ratio of 1:100 (presence:absence).
Once trained, I would like a model that can predict if an animal will be in a location (or give a probability) based on new covariates (environmental conditions).
Is this sort of thing possible using AI?
(If so, where should I be looking for resources? I write in R, should I learn Python?) Of course, you can use AI (especially Deep Learning) in your application. Your covariates will be the input to your AI model and the model should predict the probability of presence. The model has no problem with binary data and binary data is common in this field.
Also, note that the 1:100 ratio is not good and the network will probably learn to output absence for any input (this way it gets 99% accuracy but really it's not doing anything). So, you should probably balance them (using almost the same data, or telling the network to pay more attention to presence data (by weighting the related loss)).
I think nowadays you can find Deep Learning in any popular coding language. But most of the DL community uses Python and it's really easy to learn. If you want to learn Deep Learning there are a lot of sources on the internet. But I suggest you the Deep Learning courses of Deeplearning.ai in Coursera (If you have a lot of time) and CS231n of Stanford university on youtube (If you have time). | {
"domain": "ai.stackexchange",
"id": 2515,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-networks, machine-learning, applications, binary-classification",
"url": null
} |
# Tag Info
8
In Shamir's scheme is a secret sharing scheme, that is, someone that has fewer shares than is required get no information about the secret. For example, if we have a system where we require 3 shares to reveal the shared secret, then someone with 2 shares cannot be able to reconstruct it. This is true if we make the shared secret the zero-th coefficient; ...
7
It's simply not secure. Sure, it "works", in the sense that you can generate shares and reconstruct the secret from a sufficient number of them, but the essential security property of Shamir's secret sharing — namely, that knowing less than the required threshold number of shares reveals no information about the secret — does not hold. Since ...
7
The point is that the dealer generating the update needn't know what the shared secret is. If we had a dealer that remembered what the shared secret was (or we asked enough people to contribute their shares so that the dealer could reconstruct it), then yes, the dealer could generate new shares. However, this would require is a dealer that did know the ...
7
No, the Runge phenomenon is known not to affect Shamir's scheme. Remember, the point of Shamir's scheme is not actually to form an approximation over an interval; instead, it's to encode a secret in a randomly chosen polynomial, and then divide up clues to that polynomial so that, with enough clues (shares), someone can reconstruct the entire polynomial ...
6
Some additional points on poncho's excellent answer: If the attacker can eventually steal all shares ever distributed, then nothing can provide secrecy. So we have to assume some constraint on how many shares can be compromised, or the rate of compromise. The solution outlined in the article has the property that, once new shares are distributed (and none ...
6
We simply have to trust this party because this scheme requires a trusted dealer (a party that distributes the shares to the secret to the participants - this can be you or some other party - but if its you you should trust yourself). We can use verifiable secret sharing, that allows the parties to check whether the shares they have obtained are consistent, ...
6 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9688561667674652,
"lm_q1q2_score": 0.8094633771553592,
"lm_q2_score": 0.8354835371034369,
"openwebmath_perplexity": 927.1952608122466,
"openwebmath_score": 0.6775510311126709,
"tags": null,
"url": "http://crypto.stackexchange.com/tags/shamir-secret-sharing/hot"
} |
quantum-mechanics, operators, mathematical-physics, group-theory, lie-algebra
Regarding the last case, a way to see that central extensions of Lie algebras produce projective representations of the groups is the following. Let $u$ be a particular irreducible representation of the centrally-extended Lie algebra; that is, $u(T_a)$ and $u(C)$ are operators acting on some vector space, and we have $[u(T_a), u(T_b)] = f^c{}_{ab}u(T_c) + h_{ab}u(C)$, $[u(T_a),u(C)]=0$. Now consider two group elements of the original group $G$, say $g$ and $g'$; suppose they can be written as $g = \exp \lambda^aT_a$ and $g' = \exp\lambda'^aT_a$. Now define operators $U(g) = \exp \lambda^au(T_a)$ and $U(g') = \exp \lambda'^au(T_a)$. It can then be shown that these operators provide a representation of the group $G$, but it is a projective representation, that is,
$$
U(g)U(g') = \omega(g,g')U(gg')
$$
where $\omega(g,g')$ is a numerical factor. One way to see this is to make use of the Baker–Campbell–Hausdorff (BCH) formula. Since the representation $u$ is irreducible, and $u(C)$ commutes with everything, by Schur's (2nd) Lemma it is a numerical constant, i.e. $u(C)$ acts as a constant on the representation space. It is then not difficult to ascertain that all factors involving $u(C)$ can be pulled out of the BCH expansion and collected into the term $\omega(g,g')$, which is thus indeed a numerical factor. | {
"domain": "physics.stackexchange",
"id": 96345,
"lm_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, operators, mathematical-physics, group-theory, lie-algebra",
"url": null
} |
filters, discrete-signals, filter-design, impulse-response, linear-phase
Title: Linear phase with a non-integer delay? Let's say you are given a frequency domain specification for a filter design.
As a simple example, let's use an ideal (brickwall) LPF. Now the impulse response of an ideal LPF is a $\operatorname{sinc}(\cdot)$ function which is infinite length and not causal. So to make it feasible you truncate it and shift it to the right. Now this shifting corresponds to a linear phase in the frequency response as follows:
$$H(e^{j\omega}) e^{-j\omega n_0}$$
Now if this $n_0$ is an integer then we do not have any problems in the time domain impulse response $h[n - n_0]$. But what if $n_0$ is not an integer which is entirely possible so how does that translate to the impulse response which cannot be defined for a non integer $n_0$ shift.
So what happens to the impulse response? If you design a lowpass filter by windowing and shifting the impulse response of an ideal lowpass filter
$$h[n]=\frac{\sin(\omega_0n)}{\pi n}\tag{1}$$
then there's no other option than shifting the impulse response by an integer number of samples.
However, if for some reason you want a lowpass filter with a non-integer but constant delay, you could start with a delayed ideal lowpass filter:
$$h[n]=\frac{\sin(\omega_0(n-n_0))}{\pi (n-n_0)}\tag{2}$$
In this case the delay $n_0$ can be any real number. You can obtain an implementable filter by truncating/windowing the impulse response in $(2)$ such that it is causal and has a finite length. But note that in general the resulting filter won't have an exactly linear phase, but it will approximate a linear phase. | {
"domain": "dsp.stackexchange",
"id": 12241,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "filters, discrete-signals, filter-design, impulse-response, linear-phase",
"url": null
} |
ros, navigation, fixed-frame, robot-localization
All that aside, though, I think you might not be using this correctly. Why do you need two instances? Your odom frame is meant to be continuous, yet rtabmap will almost certainly give you positions that jump around a small amount. Perhaps you should give me more information about what you're trying to do. As it is, your map EKF instance is probably interfering with the operation of rtabmap.
EDIT 1 in response to comments
It's not that the second instance is needed per se, but if you want to control your robot without it constantly changing direction when the pose jumps (and it will), you'll want to have two instances. For instance 1, fuse just the IMU and visual odometry data (just use the velocity). What is the LIDAR providing? I don't see that in your launch file.
My advice would be to start with the odom frame EKF, and add one sensor at a time. Make sure you are completely satisfied that it's behaving, then introduce another sensor. When you're done fusing all the continuous sensors into the odom instance, add the second map instance, and again, start with one sensor. Debugging these kinds of things gets very difficult when you have this many sensor sources, so it's critical to make sure each component is working and configured correctly.
Originally posted by Tom Moore with karma: 13689 on 2016-02-11
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by Wagner2x on 2016-02-15:
Sorry for the delay. We are fusing a 2d lidar, visual odometry, IMU, and gps information. It was my understanding that since we were using the gps that we needed the second instance of RL. | {
"domain": "robotics.stackexchange",
"id": 23684,
"lm_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, navigation, fixed-frame, robot-localization",
"url": null
} |
dynamic-programming, approximation, sets, greedy-algorithms, set-cover
For the above toy problem, the greedy approximation I've implemented, if presented with a set like $\{b, c, g, h\}$, produces $[\{c, g\}, \{b\}, \{h\}]$ instead of the smaller list $[\{b, c\}, \{g, h\}]$.
Has this sort of problem been well studied? Is there a known non-approximate algorithm given the additional constraints, that would be better than naive dynamic programming? A well-known name for the version of set cover where extra elements are not allowed would also be useful. Your problem is hardly easier than the general set cover problem. | {
"domain": "cs.stackexchange",
"id": 12875,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dynamic-programming, approximation, sets, greedy-algorithms, set-cover",
"url": null
} |
performance, vba, excel
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
Function LastRow(sh As Worksheet)
On Error Resume Next
LastRow = sh.Cells.Find(What:="*", _
After:=sh.Range("A1"), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
End Function try replacing your copies with this. Does this improve performance?
DestSh.Cells(Last + 1, "A").Resize(CopyRng1.Rows.Count, CopyRng1.Columns.Count).Value = CopyRng1.Value
DestSh.Cells(Last + 1, "B").Resize(CopyRng2.Rows.Count, CopyRng2.Columns.Count).Value = CopyRng2.Value
DestSh.Cells(Last + 1, "C").Resize(CopyRng3.Rows.Count, CopyRng3.Columns.Count).Value = CopyRng3.Value
DestSh.Cells(Last + 1, "D").Resize(CopyRng4.Rows.Count, CopyRng4.Columns.Count).Value = CopyRng4.Value
DestSh.Cells(Last + 1, "E").Resize(CopyRng5.Rows.Count, CopyRng5.Columns.Count).Value = CopyRng5.Value
DestSh.Cells(Last + 1, "F").Resize(CopyRng6.Rows.Count, CopyRng6.Columns.Count).Value = CopyRng6.Value
Last = LastRow(DestSh)
DestSh.Cells(Last + 1, "F").Resize(CopyRng7.Rows.Count, CopyRng7.Columns.Count).Value = CopyRng7.Value | {
"domain": "codereview.stackexchange",
"id": 31737,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, vba, excel",
"url": null
} |
# one-line notation for permutations
One-line notation is a system for representing permutations on a collection of symbols by words over the alphabet consisting of those symbols. First we show how the notation works in an example, and then we show that the notation can be made to work for any symmetric group.
First consider the permutation $\pi=(134)(25)$ in the symmetric group $\mathfrak{S}_{5}$. Here $\pi$ is written in cycle notation, so $\pi(1)=3$, $\pi(2)=5$, $\pi(3)=4$, $\pi(4)=1$, and $\pi(5)=2$. We can record this information in the following table:
$\begin{array}[]{clllll}i&1&2&3&4&5\\ \pi(i)&3&5&4&1&2\end{array}$
Finally, we read off the one-line notation as the second row of the table. Thus we write $\pi=35412$.
Now we define one-line notation for arbitrary finite symmetric groups. Let $X$ be a set of finite cardinality $n$ and let $\mathfrak{S}_{X}$ be the group of permutations on $X$. Fix once and for all a total order $<$ on $X$. Using this order, we may say that
$X=\{x_{1}
For an arbitrary $\pi\in\mathfrak{S}_{X}$, the one-line notation for $\pi$ is then
$\pi=\pi(x_{1})\pi(x_{2})\cdots\pi(x_{n}).$ | {
"domain": "planetmath.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9875683498785867,
"lm_q1q2_score": 0.814212497780172,
"lm_q2_score": 0.8244619199068831,
"openwebmath_perplexity": 273.93045441342247,
"openwebmath_score": 0.9865347146987915,
"tags": null,
"url": "https://planetmath.org/onelinenotationforpermutations"
} |
# TrigonometryUsing of Jensen's Inequality to prove cosA+cosB+cosC less than or equal to 3/2 (where A+B+C=pi)
#### anemone
##### MHB POTW Director
Staff member
Hi,
Given $A+B+C=\pi$, I need to prove $cosA+cosB+cosC\leq \frac{3}{2}$.
I wish to ask if my following reasoning is correct.
First, I think of the case where A and B are acute angles, then I can use the Jensen's Inequality to show that the following is true.
$cos\frac{A+B}{2}\geq \frac{cosA+cosB}{2}$
Carrying on with the working, I get
$sin\frac{C}{2}\geq \frac{cosA+cosB}{2}$
$2sin\frac{C}{2}\geq cosA+cosB$
$cosA+cosB\leq 2sin\frac{C}{2}$
$cosA+cosB+cosC\leq 2sin\frac{C}{2}+cosC$
$cosA+cosB+cosC\leq 2sin\frac{C}{2}+1-2sin^2C$
Completing square the RHS to obtain
$cosA+cosB+cosC\leq -2(sin\frac{C}{2}-\frac{1}{2})^2+\frac{3}{2}$
Now, it's obvious to see that $cosA+cosB+cosC\leq \frac{3}{2}$
My question is, can I solve the question by thinking A and B are acute angles and ignore the angle C right from the start so that I can let f(x)=cosx and notice that the curve of f(x)=cos x in the interval $x\in (0,\frac{\pi}{2})$ take the convex shape which in turn I can apply the Jensen's inequality without a problem?
Thanks. | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357549000773,
"lm_q1q2_score": 0.8379088773528197,
"lm_q2_score": 0.8558511506439708,
"openwebmath_perplexity": 695.9239556090874,
"openwebmath_score": 0.9018501043319702,
"tags": null,
"url": "https://mathhelpboards.com/threads/using-of-jensens-inequality-to-prove-cosa-cosb-cosc-less-than-or-equal-to-3-2-where-a-b-c-pi.466/"
} |
bond, metal, ionic-compounds, covalent-compounds
Title: Metallic character of bonds? Why in discussions of percent character of bonds, are only ionic and covalent bondings discussed? Do bonds not have a partial metallic character, and are either metallic and ionic-covalent? One could think of the Fermi surface and conduction bands as an expression of the degree of metallic bonding, where metals such as aluminum or silver have overlapping empty and filled bands, allowing for electrical conduction, while semiconductors have a small gap between filled and conduction bands, offering more resistance.
As @Mithoron states, metallic bonding is a bulk property. Metals behave differently as nanoparticles -- for example, bulk silver is reflective, but nanometer particles of it are black, as in photographs. | {
"domain": "chemistry.stackexchange",
"id": 9947,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bond, metal, ionic-compounds, covalent-compounds",
"url": null
} |
Another way is to prove $$\int_\mathbb{R}\dfrac{a}{\pi}\dfrac{e^{ikx}}{a^2+x^2}=\exp -a|k|$$for $a>0$, by noting we're just trying to compute the characteristic function of a Cauchy distribution. The inversion theorem implies we need only check this characteristic function gives the right pdf. To prove $$\int_\mathbb{R}\exp (-ikx-a|k|)dk=\dfrac{2a}{a^2+x^2},$$write the left-hand side as the sum of integrals either side of $k=0$. The left-hand side is then $$\dfrac{1}{a+ix}+\dfrac{1}{a-ix},$$as required. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.985271386582759,
"lm_q1q2_score": 0.8451343773348451,
"lm_q2_score": 0.8577681122619885,
"openwebmath_perplexity": 261.87126933998155,
"openwebmath_score": 0.9765316843986511,
"tags": null,
"url": "https://math.stackexchange.com/questions/2734148/what-are-different-ways-to-compute-int-0-infty-frac-cos-xa2x2dx"
} |
evaporation
Title: How much does lighting of room effect evaporation? Suppose there is a wet floor under normal conditions, how much can we alter the rate of evaporation of the wet floor by trying out different types of lights ex. Incandascnet, cfl, fluorescent etc ? I assume that these lighting solutions produce all types of EM waves but they must have distributed it unsymmetrically over the spectrum, now waterhas the frequency that equals that of microwave so my first guess was that turning on the light which emits maximum microwave would produce the fastest results. But then incandescent bulb produces lots oh heat which can heat up the water and then make it evaporate, how to compare and what would be the best solution ? I strongly suspect that the choice of bulb will make no noticeable difference in evaporation rate. The total energy density striking the floor due to a 100 W bulb, even assuming that all of the energy is converted to light, is on the order of 120 $\mu \mbox{W}/\mbox{cm}^2$, which is tiny, and real bulbs are only on the order of 1% to 5% efficient, with most of the rest of the energy carried away as heat via convective cooling of the lamp surface by air. So, it's probably more like at most 20 $\mu \mbox{W}/\mbox{cm}^2$, and in either case, this is a tiny power density.
In contrast, you need power densities on the order of 10,000 $\mu \mbox{W}/\mbox{cm}^2$ to be able to see radiation make a noticeable color change on thermal-sensitive liquid crystal sheets, and those are thin, unlike the floor, which is thick and thus can also dissipate heat via conductive cooling. So the radiation due to a single light bulb is unlikely to have any impact on the heating and subsequent evaporation of water on a wet floor. | {
"domain": "physics.stackexchange",
"id": 11244,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "evaporation",
"url": null
} |
-
Hermite's Identity is a nice way to solve this. Thanks. But I am not able to understand the other method.. – Maverickgugu Aug 29 '11 at 8:28
I can get case 1 when $0 \le \{x\} < 1/2$. but am not able grasp the other case.. – Maverickgugu Aug 29 '11 at 8:36
I'd imagine you figured it out by now, but suppose $x = n + r$ where $n \in \mathbb{Z}$ and $1/2 \le r < 1$. Then $2\lfloor x \rfloor = 2n, \lfloor 2x \rfloor = 2n+1, 2\lfloor x \rfloor + 1 = 2n+1$. – azjps Aug 30 '11 at 7:23
Thanks!! It looks so obvious now.. :) – Maverickgugu Aug 31 '11 at 13:12
Hint: let $n = \lfloor{x\rfloor}$, so $n \le x < n+1$. What about $2x$?
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9653811601648193,
"lm_q1q2_score": 0.8044758666142418,
"lm_q2_score": 0.8333245973817158,
"openwebmath_perplexity": 1127.982066400933,
"openwebmath_score": 0.9587783217430115,
"tags": null,
"url": "http://math.stackexchange.com/questions/60465/2-lfloor-x-rfloor-leq-lfloor-2x-rfloor-leq-2-lfloor-x-rfloor-1"
} |
python
prev.x = square.x
prev.y = square.y
if event.key == pygame.K_RETURN: # start pathfind from S to E
drawing = False
solution = breadthFirstSearch(array,(start.x,start.y),(end.x,end.y))
print(solution)
if event.key == pygame.K_s: #place a start marker
start.x = square.x
start.y = square.y
if event.key == pygame.K_e: #place an end marker, the goal
end.x = square.x
end.y = square.y
if event.key == pygame.K_r: #reset after route find
start.x = None
start.y = None
end.x = None
end.y = None
solution = []
array = build_matrix(screen_height,screen_width)
if event.key == pygame.K_d: # delete a node
drawing = False
for tup in reversed(array[square.x][square.y]): #iterate through all neighbour adjacencies
neighbour = coordinate(tup[0],tup[1])
array[neighbour.x][neighbour.y].remove((square.x,square.y)) #from the deleted square from the neighbour
array[square.x][square.y].clear() #remove all neighbour information from deleted square
#remove start marker if start tile was deleted
if square.x == start.x and square.y == start.y:
start.x = None
start.y = None
#remove end marker if end tile was deleted
if square.x == end.x and square.y == end.y:
end.x = None
end.y = None
if event.key == pygame.K_SPACE: #Raise 'pen' off the grid
if drawing == True:
print("pen up")
drawing = False
else:
print("pen down")
drawing = True | {
"domain": "codereview.stackexchange",
"id": 41222,
"lm_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
} |
quantum-field-theory, energy-conservation, s-matrix-theory
Title: What is the energy-conserving delta function I am reading about the S-matrix in QFT (Standard Model book by Burgess and Moore) and I came across the energy-conserving delta function, which is factored out of the S-matrix. I would greatly appreciate if someone would explain me, or give a reference to an explaination of what is energy-conserving delta function and why do we factor it out. It's just a way of saying that the S-matrix only connects initial states to final states that have the same energy and momentum. With finitely many states the S-matrix is a finite matrix, and the $m$:th element in the $n$:th row is non-zero if the time evolution of the $n$:th initial state has an $m$:th state component. In an energy conserving theory, it is necessary for this that $E(n) = E(m)$, thus we can say that $$S_{nm} \propto \delta_{E(n) E(m)}$$
where this is the Kronecker delta $\delta_{xy} =\begin{cases}1 & x = y \\ 0 & x \neq y\end{cases}$.
The generalization to the case of a continuous spectrum of states is $$S(i \to f) \propto \delta(E(i) - E(f))$$
where this is the Dirac delta, $$\int_D \delta(x)f(x) \, dx = \begin{cases}f(0) & 0 \in D \\
0 & 0 \notin D\end{cases}. $$ | {
"domain": "physics.stackexchange",
"id": 23443,
"lm_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, energy-conservation, s-matrix-theory",
"url": null
} |
gravity, black-holes, stars, stellar-evolution
Title: When a star becomes a black hole, does its gravitational field become stronger? I've seen in a documentary that when a star collapses and becomes a black hole, it starts to eat the planets around.
But it has the same mass, so how does its gravitational field strength increase? Actually, it doesn't have the same mass, it has significantly less mass than its precursor star. Something like 90% of the star is blown off in the supernova event (Type II) that causes the black holes.
The Schwarzschild radius is the radius at which, if an object's mass where compressed to a sphere of that size, the escape velocity at the surface would be the speed of light $c$; this is given by
$$
r_s=\frac{2Gm}{c^2}
$$
For a 3-solar mass black hole, this amounts to about 10 km. If we measure the gravitational acceleration from this point,
$$
g_{BH}=\frac{Gm_{BH}}{r_s^2}\simeq10^{13}\,{\rm m/s^2}
$$
and compare this to the acceleration due to the precursor 20 solar mass star with radius of $r_\star=5R_\odot\simeq7\times10^8$ m, we have
$$
g_{M_\star}=\frac{Gm_\star}{r_\star^2}\simeq10^3\,{\rm m/s^2}
$$
Note that this is the acceleration due to gravity at the surface of the object, and not at some distance away. If we measure the gravitational acceleration of the smaller black hole at the distance of the original star's radius, you'll find it is a lot smaller (by a factor of about 7). | {
"domain": "physics.stackexchange",
"id": 28447,
"lm_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, stars, stellar-evolution",
"url": null
} |
filters, digital-communications, filter-design, digital-filters
Title: Design RRC filter I have designed a RRC filter, as below :
clear all; clc;
Ts = 8.1380e-06; %sampling rate
Nos = 24; %upsampling factor
alpha = 0.5; %Rollback
t1 = [-6*Ts:Ts/Nos:-Ts/Nos];
t2 = [Ts/Nos:Ts/Nos:6*Ts];
r1 = (4*alpha/(pi*sqrt(Ts)))*(cos((1+alpha)*pi*t1/Ts)+(Ts./(4*alpha*t1)).*sin((1-alpha)*pi*t1/Ts))./(1-(4*alpha*t1/Ts).^2);
r2 = (4*alpha/(pi*sqrt(Ts)))*(cos((1+alpha)*pi*t2/Ts)+(Ts./(4*alpha*t2)).*sin((1-alpha)*pi*t2/Ts))./(1-(4*alpha*t2/Ts).^2);
r = [r1 (4*alpha/(pi*sqrt(Ts))+(1-alpha)/sqrt(Ts)) r2]; | {
"domain": "dsp.stackexchange",
"id": 9260,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "filters, digital-communications, filter-design, digital-filters",
"url": null
} |
python, python-3.x, web-scraping, tkinter, selenium
def validate_text():
global entry
string = entry.get()
#label_2.configure(text=string)
string = string.title() # capitalize first letter of entry to match database
if string not in poke_list: # ensure the user is typing in valid input, if not create a validation loop by reiterating user to give valid pokemon name or id.
label_2.configure(text="That pokemon was not found, please try again: ") # validation look/error trap
string = string.title()
if string in poke_list:
print("Searching for {} ... ".format(string))
print("{} Found!".format(string))
poke_stats = df.loc[df['Name'] == string] # return pokemon stats to user if successfully located
label_2.configure(text=poke_stats)
#phsyical properties
label_1 = tk.Label(window, text="Welcome to the Universal Pokedex! This program contains the statistics of all the pokemon stored in the official Pokemon Database. \n Begin by entering a pokemon name below.", bg='red', font=("Cambria", 25))
label_1.place(relx=0, rely=0.05, relwidth=1, relheight=0.1)
label_2 = tk.Label(window, text="Enter a pokemon name to see a list of its stats: ", bg='#5CB3FF', font=("Courier", 20))
label_2.place(relx=0, rely=0.78, relwidth=1, relheight=0.1)
img1 = ImageTk.PhotoImage(Image.open("images/johto-starters.gif"))
img2 = ImageTk.PhotoImage(Image.open("images/pokeball.gif")) | {
"domain": "codereview.stackexchange",
"id": 43584,
"lm_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, web-scraping, tkinter, selenium",
"url": null
} |
cosmology, acceleration, space-expansion, dark-energy
Title: How can the effects of dark energy be distinguished from the effects of the acceleration of the universe from the big bang? This is a conceptual question and has probably been asked before in many guises and forms. Mine has a little twist to it.
I realize the Hubble Law tells us the farther back in time and space we look the faster the universe appears to be receding from us and the more of a red shift is observed...after all we are looking back and getting closer to when the universe first began the acceleration.
It normally would be accelerating faster farther back in time so how can one distinguish between that acceleration and what is happening now?
They only thing I can come up with is that acceleration between us and a closer "spot" in space is faster then can be explained given the acceleration that is observed much farther in the past. In other words the acceleration as you look farther back in time is actually slower than expected as compared from us to closer locations.
So the standard candles are the mechanism to get at the acceleration from us to a "close" object. Comparing the expansion rate given by Hubble the closer object is moving faster than it should given the speed of the object farther back in time so we conclude we are speeding up relative to the past. According to the Hubble's Law, distant galaxies recede from us with the speed directly proportional to the distance. The law says nothing about acceleration. According to the current $\Lambda\text{CDM}$ cosmological model, since the Big Bang, the universe has gone through the phases of a brief initial expansion and inflation, then radiation dominance for about 70,000 years, then mater dominance for most of its life, and now is in the phase of a dark energy dominance. "Matter dominance" implies gravitational attraction and deceleration. "Dark energy dominance" implies acceleration due to the repulsive effect of the dark energy.
First, the universe accelerated initially in a fraction of a second to tremendous speeds, then it was decelerating due to gravity for billions of years, and now when the gravity is reduced by increased distances, the universe is accelerating again pushed by the dark energy. You can see the applicable solution of the Friedmann equations with the scale factor and acceleration chart in my earlier answer. | {
"domain": "physics.stackexchange",
"id": 52050,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cosmology, acceleration, space-expansion, dark-energy",
"url": null
} |
rim, a hub, and spokes. The area moment of inertia takes only shape into account, not mass. When a composite area can be divided into a group of simple areas, such as rectangles, triangles, and circles, the moment of inertia of the composite area about a particular axis is the sum of the moments of inertia of the simple areas, each about this same axis. Ignited Minds 22,385 views. This proves too be much more expensive and makes me hate bolts in such cases. Body constructed of a number of simple shapes: • Add moments of inertia of each shape about the desired axis to get the total moment of inertia. A T O A A P P S. You'd like to know how to calculate the area moment of inertia along the neutral axis at the centroid. Inventor has a function for moments but it rotates the center plane to something like VxV in the link below. In this section, we show how to calculate the moment of inertia for several standard types of objects, as well as how to use known moments of inertia to find the moment of inertia for a shifted axis or for a compound object. The polar moment of inertia of any shape (complex or otherwise) is the sum of any two complimentary second moments of area (at right-angles to each other) i. Large rectangle 150 mm 420 mm 520 mm 60 mm 60 mm 60 mm 150 mm + 150 mm = 300 mm 200 mm + 200 mm = 400 mm x 400 mm y Small rectangle 300 mm y x 200 mm 60 mm. Note that the load P is applied 400 mm from the flange of the tee shape. Moments of inertia about a common axis are additive so: The 'official' answer is wrong. 1 9 a 5m 2 b = 5 18 m pr = I y 5m 2 = rp 512 ≤¢ y9 9 ` 2 m 0 = pr 9 I y = L dI y = L 2 m. Bending Inertia of a hollow wing (eq 14) Numerical method 5. If the mass moment of inertia of a body about an axis passing through the body’s mass center is known, then the moment of inertia about any other parallel axis may be determined by using the parallel axis theorem, I= I G + md2 where • I G = mass moment of | {
"domain": "iwno.pw",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9899864296722662,
"lm_q1q2_score": 0.8093876454789207,
"lm_q2_score": 0.8175744850834648,
"openwebmath_perplexity": 484.2467828558053,
"openwebmath_score": 0.5768759846687317,
"tags": null,
"url": "http://awgr.iwno.pw/moment-of-inertia-composite-shapes.html"
} |
to arrive at this conclusion. In a two dimensional plane, the graph of this type of function is a straight, horizontal line. The derivative of this type of function is just zero. For example, the function y(x) = 4 is a constant function because the value of y(x) is 4 regardless of the input value x (see image). C++ is similar to C but has more features than C. Therefore, it is called a subset of C language. In calculus, the constant of integration, often denoted by , is a constant added to the end of an antiderivative of a function () to indicate that the indefinite integral of () (i.e., the set of all antiderivatives of ()), on a connected domain, is only defined up to an additive constant. A constant function is a function of the form f(x) = c, where c is a constant. A function becomes const when the const keyword is used in the function’s declaration. Constant member function is an accessory function which cannot modifying values of data members. ( variables and constant both carries some defined value but difference comes with their accessibility and value constant can be define as 1 define constant_name constant_value or 2 const constant_name constant_value the second way is faster A constant function is a special type of linear function that follows the form f(x) = b 'b' is the y-intercept of the line and is just a constant; A constant function is a linear function whose slope is 0; No matter what value of 'x' you choose, the value of the function will always be the same Online Help: Math Apps: Functions and Relations.Retrieved from https://www.maplesoft.com/support/help/Maple/view.aspx?path=MathApps%2FConstantFunction on May 24, 2019. For example, y = 10 is a form of constant function. Varsity Tutors © 2007 - 2021 All Rights Reserved, CBEST - The California Basic Educational Skills Test Courses & Classes, SAT Subject Test in World History Test Prep, International Sports Sciences Association Test Prep. Award-Winning claim based on CBS Local and Houston Press awards. Consider constants as having a variable raised to the power zero. It perform constant operation. Now we shall prove this constant function with the help of the definition of derivative or differentiation. | {
"domain": "paulcupido.nl",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9871787853562028,
"lm_q1q2_score": 0.8559193116136021,
"lm_q2_score": 0.8670357632379241,
"openwebmath_perplexity": 447.6038189694047,
"openwebmath_score": 0.7129285931587219,
"tags": null,
"url": "https://www.paulcupido.nl/l3zg73/11ba1e-what-is-constant-function"
} |
Mathematica to find the eigenvalues and eigenvectors of an operator. Same eigenvalue a complete basis eigenfunctions to be orthogonal or not the given are! = f.... we seek the eigenfunctions to be orthogonal eigenfunction for d/dx is f ( ). A ( self-adjoint ) Sturm-Liouville operator has orthogonal eigenvectors, a ( self-adjoint ) Sturm-Liouville operator has orthogonal eigenvectors a... To understand how to find the eigenvalues and eigenvectors of an eigenfunction for d/dx is f ( )... Eigenfunctions interchangeably because functions are eigenfunctions of Hermitian operators are orthogonal we wish to prove eigenfunctions... Ekx is an eigenfunc-tion, with the same eigenvalue ), we can also look at the to! If a are eigenfunctions of the operator d 2/dx, again any ekx is an eigenfunc-tion, with same. Eigenvectors ( eigenfunctions ) for the second derivative operator L defined in x= [ 1! Is the same eigenvalue function multiplied by a constant number these solutions do not go to zero infinity. Of vectors -- what we technically call -- a complete basis information construct! Of an operation is the same eigenvalue corresponds to the two eigenfunctions have the same eigenvalue kind! To zero at infinity so they are not normalizable to one particle two... By a constant number same eigenvalues, the linear combination also will be eigenfunction. Type of vectors 3x ) ( nothing special about the three here ), must... Multiplying the eigenfunction by a constant number thus we have shown that eigenfunctions of eigenfunctions... Thus we have shown that eigenfunctions of the operator d/dx complete basis given two,. The matrix of the eigenfunctions of the Hermitian operator form a complete basis on eigenfunctions in way... Some basis eigenfunction with the same eigenvalue called ‘ eigenfunctions ’ | {
"domain": "bullies2buddies.info",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9811668662546613,
"lm_q1q2_score": 0.8067047348003024,
"lm_q2_score": 0.8221891327004133,
"openwebmath_perplexity": 543.4626258310159,
"openwebmath_score": 0.954338550567627,
"tags": null,
"url": "https://bullies2buddies.info/9egzorx/how-to-find-eigenfunctions-of-an-operator-6b4b1c"
} |
# Given a number $n \in \Bbb{N}$. In how many ways can $n$ be written as $\prod_{i=1}^{k}n_i$ such that $n1|n2|\ldots|n_k|n$? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9907319863454374,
"lm_q1q2_score": 0.8099971847846592,
"lm_q2_score": 0.8175744761936438,
"openwebmath_perplexity": 309.64216325964475,
"openwebmath_score": 0.8410868048667908,
"tags": null,
"url": "https://math.stackexchange.com/questions/955649/given-a-number-n-in-bbbn-in-how-many-ways-can-n-be-written-as-prod-i"
} |
organic-chemistry, stereochemistry, isomers, chirality
I tried to put the plane as it is a mirror on a plane where $\ce{C^*-C^*-Cl-OH}$ squire overlap. The particular stereoisomer representing both Fischer projection and sawhorse structure (with your 'plane of symmetry') is $(2R,3S)$-3‐chlorobutan‐2‐ol, so I drew that particular isomer first. Now look at my sawhorse structure below that particular structure. The $\ce{C^*-C^*-Cl-OH}$ squire is on the plane so that those groups and atoms do not count on symmetry. The only countable groups are two methyl groups and two hydrogen residues. If you consider the plane as a mirror (which dissects each $\ce{H-C^*-CH3}$ angle), you would see both $\ce{CH3}$-groups are in the front of the mirror and hydrogen residues are inside of the mirror (resembling mirror images). As a result, we can conclude that the mirror is not a plane of symmetry because each $\ce{H}$ atom can't be the mirror image of adjacent $\ce{CH3}$ group. Therefore, both carbon atoms marked with $\color{red}{red}$ $\color{green}{green}$ circles are chiral centers. As a result, there are 4 stereoisomers for 3‐chlorobutan‐2‐ol: $(2R,3S)$-, $(2S,3R)$-, $(2R,3R)$-, and $(2S,3S)$- where first two and last two isomers are enanthiomers of each other (as indicated in the diagram). | {
"domain": "chemistry.stackexchange",
"id": 13877,
"lm_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, stereochemistry, isomers, chirality",
"url": null
} |
rcservo, pwm
During a single RC frame, the a 6-channel receiver cycles through every every servomotor, putting one "RC PWM" pulse at a time on each of its 6 outputs.
Only one of its outputs is ever active at any one time -- there is no overlap of its pulses.
With a typical 50 Hz 6-channel transmitter,
when all the control sticks are pushed to turn all the servos all the way counterclockwise, the receiver spits out | {
"domain": "robotics.stackexchange",
"id": 1831,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rcservo, pwm",
"url": null
} |
gazebo
Title: Error when using SetAngle
This is the error I get:
T* boost::shared_ptr::operator->() const [with T = gazebo::physics::Joint]: Assertion `px != 0' failed.
Can anybody tell me what it means?
Originally posted by jarevalo on Gazebo Answers with karma: 33 on 2013-01-14
Post score: 0
I found out... Never mind.
I was using the same pointer name for two different joints without realizing.
Originally posted by jarevalo with karma: 33 on 2013-01-14
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 2915,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gazebo",
"url": null
} |
python, performance, game, pygame, minecraft
You are making several mistakes here, first you are using nested for loops to iterate through two entire iterables, while nested for loops can have legitimate uses, it is not the case here, you need to use itertools.product to get rid of one unnecessary nesting.
Then you are repeatedly assigning these variables surface = 0; bedrock = 16; soil_amount = 3 inside the loop, the variables aren't mutated at all within the loop, they don't belong in a loop. This is completely pointless and hinders performance. They need to be moved outside of the loop. Or better yet, since you are using a class, they need to be become class variables, since they won't ever change (I guess).
Then the elif ladder, this is completely inefficient. Here you have three exact matches, (0, 3, 16), and three values for each of them (2, 3, 7). This is the perfect opportunity to use a dict, like this: {0: 2, 3: 3, 16: 7}, you can then check if a key is present by using in operator and get the corresponding value by querying the dict.
Then you have three explicit conditions, 0 < x < 3, 3 < x < 16 and 16 < x, with another implicit one that can only be tested if x is negative. What you are trying to do here is to find the closest element in the list [0, 3, 16] that is less than x. You can use bisect.bisect to find the index of that element (plus one).
Putting it all together, the code becomes:
class Chunk:
surface = 0
bedrock = 16
ground = 3
starts = (surface, ground, bedrock)
levels = dict(zip(starts, (2, 3, 7)))
block_sizes = (1, 3, 4, 0) | {
"domain": "codereview.stackexchange",
"id": 44690,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, game, pygame, minecraft",
"url": null
} |
fourier-transform
Example: Have you ever noticed that each of your phone's number buttons
sounds different when you press during a call and that it sounds the same for every phone model? That's because they're each composed of two different sinusoids which can be used to uniquely identify the button. When you use your phone to punch in combinations to navigate a menu, the way that the other party knows what keys you pressed is by doing a Fourier transform of the input and looking at the frequencies present.
Apart from some very useful elementary properties which make the mathematics involved simple, some of the other reasons why it has such a widespread importance in signal processing are:
The magnitude square of the Fourier transform, $\vert X(f)\vert^2$ instantly tells us how much power the signal $x(t)$ has at a particular frequency $f$.
From Parseval's theorem (more generally Plancherel's theorem), we have
$$\int_\mathbb{R}\vert x(t)\vert^2\ dt = \int_\mathbb{R}\vert X(f)\vert^2\ df$$
which means that the total energy in a signal across all time is equal to the total energy in the transform across all frequencies. Thus, the transform is energy preserving.
Convolutions in the time domain are equivalent to multiplications in the frequency domain, i.e., given two signals $x(t)$ and $y(t)$, then if
$$z(t)=x(t)\star y(t)$$
where $\star$ denotes convolution, then the Fourier transform of $z(t)$ is merely
$$Z(f)=X(f)\cdot Y(f)$$
For discrete signals, with the development of efficient FFT algorithms, almost always, it is faster to implement a convolution operation in the frequency domain than in the time domain.
Similar to the convolution operation, cross-correlations are also easily implemented in the frequency domain as $Z(f)=X(f)^*Y(f)$, where $^*$ denotes complex conjugate.
By being able to split signals into their constituent frequencies, one can easily block out certain frequencies selectively by nullifying their contributions. | {
"domain": "dsp.stackexchange",
"id": 2491,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fourier-transform",
"url": null
} |
climate-change, climate, paleoclimatology, carbon-cycle
Title: Did climate cool down when underground hydrocarbons stocks formed? As far as I understand, the dominant theory of modern climate change says that recent warming is mainly caused by the massive burning of hydrocarbons that used to be stored in solid form mostly underground as petroleum, coal, etc.
This suggests that the reverse process should contribute to a cooling of the climate (or to a slowed down warming if other processes are at play at the same time).
In particular, a cooling should have occurred throughout the period when the stocks of underground hydrocarbons were formed by the "pilling" of organic remains.
My questions: | {
"domain": "earthscience.stackexchange",
"id": 1061,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "climate-change, climate, paleoclimatology, carbon-cycle",
"url": null
} |
recurrence-relation
Title: prove upper bound of the recurrence $ T(n) =T(n-\sqrt{n})+1 $ i want to prove upper bound of the following recurrence $ T(n) =T(n-\sqrt{n})+1 $ is $ O(\sqrt{n})$. Define a sequence by $n_0 = n$, $n_{i+1} = n_i - \sqrt{n_i}$. Let $\ell$ be the maximal index such that $n_\ell \geq n/2$. For $i \leq \ell$ we have $\sqrt{n_i} \geq \sqrt{n/2}$, and so $n/2 \leq n_\ell \leq n - \ell \sqrt{n/2}$. It follows that $\ell \leq \sqrt{n/2}$. | {
"domain": "cs.stackexchange",
"id": 17147,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "recurrence-relation",
"url": null
} |
If we take $F_1=F_2=1$, then we certainly have that $5|F_5=5$. Let's look at the Fibonacci numbers, reduced modulo $5$:
$F_1\equiv 1\\ F_2\equiv 1\\ F_3\equiv 2\\ F_4\equiv 3\\ F_5\equiv 0\\ F_6\equiv 3\\ F_7\equiv 3\\ F_8\equiv 1\\ F_9\equiv 4\equiv -1\\ F_{10}\equiv 0\\ F_{11}\equiv -1\\ F_{12}\equiv -1\\ F_{13}\equiv -2\\ F_{14}\equiv -3\\ F_{15}\equiv 0\\ F_{16}\equiv -3\\ F_{17}\equiv -3\\ F_{18}\equiv -1\\ F_{19}\equiv -4\equiv 1\\ F_{20}\equiv 0\\$
After this, the pattern begins to repeat, and it appears that $F_{n+20}\equiv -F_{n+10}\equiv F_n$ for all $n$. This, together with $F_5\equiv F_{10}\equiv 0\pmod 5$ is sufficient to establish your claim.
You don't have to define the Fibbonacci sequence recursively
You could say:
$F_n = \frac{\phi^n + \phi'^n}{\phi - \phi'}$
where $\phi = \frac {1 + \sqrt 5}{2}$ and $\phi' = \frac {1 - \sqrt 5}{2}$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357604052424,
"lm_q1q2_score": 0.8340922629845622,
"lm_q2_score": 0.8519528057272543,
"openwebmath_perplexity": 266.91510341407013,
"openwebmath_score": 0.9994779229164124,
"tags": null,
"url": "https://math.stackexchange.com/questions/2522234/let-f-n-be-the-n-th-fibonacci-number-prove-or-disprove-5-f-5k-for-al"
} |
a.
Part(a)(i) caused problems for some candidates who failed to realize that the integral can only be tackled by the use of partial fractions. Even then, the improper integral only exists as a limit – too many candidates ignored or skated over this important point. Candidates must realize that in this type of question, rigour is important, and full marks will only be awarded for a full and clearly explained argument. This applies as well to part(b), where it was also noted that some candidates were confusing the convergence of the terms of a series to zero with convergence of the series itself.
b.
## Question
The exponential series is given by $${{\text{e}}^x} = \sum\limits_{n = 0}^\infty {\frac{{{x^n}}}{{n!}}}$$ .
Find the set of values of x for which the series is convergent.
[4]
a.
(i) Show, by comparison with an appropriate geometric series, that
${{\text{e}}^x} – 1 < \frac{{2x}}{{2 – x}},{\text{ for }}0 < x < 2{\text{.}}$
(ii) Hence show that $${\text{e}} < {\left( {\frac{{2n + 1}}{{2n – 1}}} \right)^n}$$, for $$n \in {\mathbb{Z}^ + }$$.
[6]
b.
(i) Write down the first three terms of the Maclaurin series for $$1 – {{\text{e}}^{ – x}}$$ and explain why you are able to state that
$1 – {{\text{e}}^{ – x}} > x – \frac{{{x^2}}}{2},{\text{ for }}0 < x < 2.$ | {
"domain": "iitianacademy.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9923043510009422,
"lm_q1q2_score": 0.8203497102801243,
"lm_q2_score": 0.8267117940706735,
"openwebmath_perplexity": 1986.0596788137618,
"openwebmath_score": 0.9119042158126831,
"tags": null,
"url": "https://www.iitianacademy.com/ib-dp-maths-topic-9-2-tests-for-convergence-comparison-test-limit-comparison-test-ratio-test-integral-test-hl-paper-3/"
} |
homework-and-exercises, newtonian-mechanics, lagrangian-formalism, constrained-dynamics
\mathbf F = (N-mg\cos\theta)\hat{\mathbf r} + mg\sin\theta\hat{\boldsymbol\theta}.
\end{align}
Notice that we do not yet know what $N$, the normal force, is. The normal force is complicated in this problem because it will turn out to depend on the velocity of the mass, a feature that you can immediately tell is missing from your original work.
Now, in order to write down Newton's Laws, we need the acceleration in spherical coordinates which is an awful mess in general. But notice that since the mass is constrained to the surface of the sphere, and since there are no forces in the tangential direction, provided the mass starts at the top of the sphere, we will have
\begin{align}
\dot r = 0, \qquad \dot \phi = 0.
\end{align}
The first of these equations is a constraint we impose by virtue of the particle remaining on the sphere at all times ($r(t) = R$), the second can be argued purely mathematically from Newton's Laws, but it should be clear from the physical argument above, so we omit that step. The result is a drastic simplification in the expression for acceleration in spherical coordinates:
\begin{align}
\mathbf a = -R\dot\theta^2\hat{\mathbf r} +R\ddot\theta \hat{\boldsymbol\theta}.
\end{align}
These terms should actually look quite familiar. The first is just the centripetal acceleration, and the second is the tangential acceleration in the $\theta$ direction. Compare these to the standard expressions $a_r = -R\omega^2$ and $a_\theta = R\alpha$. If we now use Newton's Second Law, then we find
\begin{align}
N - mg\cos\theta = -mR\dot\theta^2, \qquad g\sin\theta = R\ddot\theta.
\end{align} | {
"domain": "physics.stackexchange",
"id": 18238,
"lm_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, lagrangian-formalism, constrained-dynamics",
"url": null
} |
ros, subscribe, publish
Title: How can I realize subscribing to subtopics
I have a message that consists of two (or more) submessages:
my_msgs/VehicleData:
sensor_msgs::NavSatFix gps
gps_msgs::GPSFix gps_fix
When I publish the message as /vehicle I can afterwards use these three commands:
$ rostopic echo /vehicle<br>
$ rostopic echo /vehicle/gps
$ rostopic echo /vehicle/gps_fix
All the commands return the specific submsgs.
When I now use the rqt_marble_plugin it doesn't display the /vehicle/gps submessage. Internally this program searches for NavSatFix topics but it doesn't find this one.
Can I somehow fix this?
I would like to be able to publish this VehicleData msg and subscribe either to the whole topic or to subtopics.
Originally posted by wepmaschda on ROS Answers with karma: 1 on 2014-07-18
Post score: 0
AFAIK there is not automatic way to do this. The subtopic concept does not really exist in ROS. Every node subscribes to topics and has to take care of accessing the composing messages itself. The rostopic tool works some magic to allow echoing only part of a message like in your example.
However, you might be able to use rostopic to republish the NavSatFix messages on a different topic (see the comment to this answer: http://answers.ros.org/question/58995/is-there-a-way-to-recompose-messages-from-command-line/?answer=59004#post-id-59004)
rostopic echo /vehicle/gps | rostopic pub /vehicle_gps_only sensor_msgs/NavSatFix
Originally posted by demmeln with karma: 4306 on 2014-07-18
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 18666,
"lm_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, subscribe, publish",
"url": null
} |
c++, file-system, c++17, wrapper
Title: Wrap that uses filesystem in C++ This is a wrap that queries the number of files and folder from a given directory, also list the folders and files into a vector. I have posted another wrap in this discussion that do the same things and following some really good suggestions I created another this time using filesystem.
The filesystem I used is this implementation I found on GitHub because the filesystem I tried to use in codeblocks kept throwing errors even the filesystem from GCC 9.2.
I didn't implement a cache mechanism because I don't know how to yet.
wrap.h
#ifndef WRAP_H_INCLUDED
#define WRAP_H_INCLUDED
#include <string>
#include <vector>
#include <ghc/filesystem.hpp>
namespace dir
{
class Wrap
{
private:
Wrap() {}
enum mode {FOLDER = 0, FILE_};
int number_of_entities_in_directory(std::string file_path, mode type_);
std::vector<std::string> entities_in_directory(std::string file_path, mode type_);
int number_of_entities_in_directory_recursively(std::string file_path, mode type_);
std::vector<std::string> entities_in_directory_recursively(std::string file_path, mode type_);
public:
static int number_of_files_in_directory(std::string file_path);
static int number_of_folders_in_directory(std::string file_path);
static void files_in_directory(std::string file_path, std::vector<std::string>& files);
static void folders_in_directory(std::string file_path, std::vector<std::string>& folders); | {
"domain": "codereview.stackexchange",
"id": 36950,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, file-system, c++17, wrapper",
"url": null
} |
Madhava's correction terms (14th century), might as well have been used. This appears to be quite an ancient game!
Regarding the generic continued fraction for Ln(2), if no term of the original series is taken, that is, if n = 0, then the resulting continued fraction will be equivalent to the original series itself. A WP 34S program takes about 20 seconds to evaluate all 10000 terms though.
Cheers,
Gerson.
Edited to fix a couple of typos.
P.S.: As shown above, the very slowly convergent Brouncker's formula (equivalent to the Gregory series) can be sped up by a simple weighted mean, although not nearly as effectively as the other methods. Anyway, 3000 terms would give 15 correct digits. The plain series or continued fraction would require 10^14 terms to yield the same accuracy.
Code:
10 DEFDBL A-Z
15 CLS: KEY OFF
20 T=1000
25 WHILE T<3001
30 N=T-1: GOSUB 100: P1=B
35 N=T: GOSUB 100: P2=B
40 PI=(P1*T+P2*(T+1))/(2*T+1)
45 PRINT USING"####";N;:PRINT" ";
50 PRINT USING"#.###############";P1;: PRINT" ";
55 PRINT USING"#.###############";P2;: PRINT" ";
60 PRINT USING"#.###############";PI
65 T=T+125
70 WEND
90 END
100 I=2*N-1
110 R=0
120 WHILE I>0
130 R=I*I/(R+2)
140 I=I-2
150 WEND
160 R=R+1
170 B=4/R
180 RETURN
This is a GW BASIC version of the Turbo Pascal code above. | {
"domain": "hpmuseum.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9706877692486436,
"lm_q1q2_score": 0.8250566281136977,
"lm_q2_score": 0.8499711794579723,
"openwebmath_perplexity": 739.0489867315196,
"openwebmath_score": 0.7081336379051208,
"tags": null,
"url": "https://www.hpmuseum.org/forum/thread-916-post-9447.html"
} |
forces, free-body-diagram, equilibrium, statics, structural-beam
And if it is because they are acting on the whole body, then why will
force P (which is also considered to be acting on the whole body in
figure II) be not shown in the free body diagram of A ?
Because load P is not applied to pin A. The influence of load P at pin A is accounted for if, as I said above, you eliminate member AC and replace it with the force it exerts on pin A.
The above being said, you would obviously need more info on the diagram (lengths of members, angles, etc.) in order to determine the reactions. Then, depending on exactly what is being asked, it may be easiest to use Fig II and evaluate it by setting the sum of the vertical forces equal to zero, sum of horizontal forces equal to zero, and the sum of the moments equal to zero. Regarding the last, pick a point that eliminates as many variables (unknown forces) as possible. That would be the moments about a point where unknown forces pass through the point and therefore contribute no moment.
Would the answer to the question, 'On what is Ay acting on ?', be pin
A or the whole truss ?
It depends on what it is that you are looking at.
From the perspective of a FBD on pin A, $A_y$ is the vertical force that member AC exerts on pin A.
From the perspective of a FBD on the entire truss, $A_y$ is the vertical force that pin A exerts on member AC.
Per Newton's third law, the vertical force that member AC exerts on pin A is equal and opposite to the vertical force that pin A exerts on member AC.
That clears things quite a bit. But then, from the perspective of the
FBD of the entire truss, Ax and Bx are forces acting on different
members (different bodies) (Fig. II). So how can horizontal
equilibrium equation be applied ? – | {
"domain": "physics.stackexchange",
"id": 60008,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "forces, free-body-diagram, equilibrium, statics, structural-beam",
"url": null
} |
ros, ros2, colcon
Title: ros2 difference between colcon test and launch_test
What are appropriate use cases for each one?
Originally posted by avzmpy on ROS Answers with karma: 83 on 2021-04-26
Post score: 0
launch_test is a command that is provided by the launch_testing package. It can be used to run tests that are described/set up using a launch file, e.g.
$ launch_test path/to/my_launch_test.py
The test must be set up in a very specific way. The Python launch file must define a generate_test_description() function that returns a LaunchDescription. I don't think this file needs to be part of a package; it might be able to just be a standalone file. For example:
def generate_test_description():
return launch.LaunchDescription([
launch.actions.ExecuteProcess(
cmd=[path_to_process],
),
# Start tests right away - no need to wait for anything in this example.
# In a more complicated launch description, we might want this action happen
# once some process starts or once some other event happens
launch_testing.actions.ReadyToTest()
])
See this README: https://github.com/ros2/launch/blob/3a5c9df2e384271637ac029f48f020b7916498d6/launch_testing/README.md.
colcon test is a command that runs all tests for a given package (or given packages): C++ tests (e.g. defined as a CMake test in a CMakeLists.txt using ament_add_gtest(...)), or Python tests (e.g. defined as a CMake test in a CMakeLists.txt using ament_add_pytest_test(...) or just a Python file under a test/ directory in a pure Python package). E.g.
$ colcon test --packages-select my_package | {
"domain": "robotics.stackexchange",
"id": 36370,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros2, colcon",
"url": null
} |
c++, iterator
template <typename T> __forceinline
void enumerator<T>::_fwd_erase(list_fwd & fwd_itr)
{
delete *fwd_itr;
fwd_itr = m_item_list.erase(fwd_itr);
}
template <typename T> __forceinline
void enumerator<T>::_rvs_erase()
{
delete *m_rvs_itr;
m_rvs_itr = m_item_list.erase(m_rvs_itr);
}
template <typename T> __forceinline
void enumerator<T>::_rvs_erase(list_rvs & rvs_itr)
{
delete *rvs_itr;
rvs_itr = m_item_list.erase(rvs_itr);
}
template <typename T> __forceinline
bool enumerator<T>::fwd_erase_current()
{
if (m_flag_first_item)
{
_fwd_erase();
return true;
}
else
{
return false;
}
}
template <typename T> __forceinline
bool enumerator<T>::rvs_erase_current()
{
if (m_flag_first_item)
{
_rvs_erase();
return true;
}
else
{
return false;
}
}
template <typename T>
template <typename U, typename ... arg_list> __forceinline
void enumerator<T>::emplace_back(arg_list ... arg_tail)
{
m_item_list.push_back(new U(arg_tail ...));
if (! m_flag_first_item)
{
m_flag_first_item = true;
m_fwd_itr = m_item_list.begin();
m_rvs_itr = m_item_list.rbegin();
}
}; | {
"domain": "codereview.stackexchange",
"id": 26693,
"lm_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++, iterator",
"url": null
} |
performance, haskell, comparative-review
size_t bytes_read;
size_t current_buffer_size = 400;
char *buffer = calloc(current_buffer_size, 1);
long cnt = 1;
while ((bytes_read = getline(&buffer, ¤t_buffer_size, f)) > 0) {
if (feof(f)) break;
buffer[ bytes_read - 2 ] = 0;
printf("%s;%ld\n", buffer, cnt++);
}
fclose(f);
return 0;
}
And the Java code below does the job in 30 seconds:
package test.perf.numadr;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class NumAdr {
static public void main(String[] args) {
BufferedReader br = null;
try {
String sCurrentLine;
br = new BufferedReader(new FileReader("myfile.csv"));
int cnt = 1;
String lineWithId;
while ((sCurrentLine = br.readLine()) != null) {
lineWithId = sCurrentLine + ";" + cnt;
cnt++;
System.out.println(lineWithId);
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (br != null)br.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
}
For each test, I print the result to stdout and redirect to a result file.
My Haskell code is 3 times slower than the Java code and 9 times than the C code.
As I'm a beginner in Haskell, I think my Haskell code is not the best.
How can I improve my program? I think your program needs to be more Haskell-style (and shorter). Here is my rewrite:
import qualified Data.ByteString.Lazy.Char8 as L | {
"domain": "codereview.stackexchange",
"id": 7642,
"lm_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, haskell, comparative-review",
"url": null
} |
regression, optimization, gan, generative-models
Simply directly optimize a GAN with an additional loss term maximizing $f$:
$$ \mathcal{L}(G) = (1-\eta)\mathbb{E}_{x\sim G}[\log D(x)] + \eta \mathbb{E}_{x\sim G}[R(x)] $$
for the generator. We can optimize $D$ and $R$ in the standard way together. In other words, we are telling $G$ to generate $x\in X$ that balance realism and high $f$, with the balance controlled by $\eta\in[0,1]$. When $\eta=0$, it is a regular GAN (not caring about $f$); when $\eta=1$, the critic is not used at all and there is no regard for realism - $G$ will learn to generate random samples that maximize $f$ without caring about how realistic they are (i.e., without matching the true distribution $p(x)$).
Separately, train the regressor $R$ and the GAN generator $G$. Then we can generate a high $f$ data point by gradient descent in the GAN latent space, i.e. doing:
$$ u_t \leftarrow u_{t-1} +\xi \nabla_u R(G(u_{t-1})) $$
so that our output $x=G(u_T)$ has high $f(x)$. Since $u$ is in the GAN latent space, we expect $x$ to be realistic as well.
In both of these simple scenarios, we are using the GAN to maintain realism, while maximizing $f$. Notice that if we don't care about realism then the GAN is not needed at all. Simply generating samples does not make a model a GAN: there are many generative models, such as Deep Boltzmann machines, VAEs, etc... that can do this. What sets GANs apart is adversarial learning, where two networks work against each other, and it's not clear that's happening in the case you described.
I think this question is somewhat relevant to yours as well. | {
"domain": "datascience.stackexchange",
"id": 5571,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "regression, optimization, gan, generative-models",
"url": null
} |
electromagnetism, magnetic-fields
$\Phi$ is especially important for electrical engineers designing motors, generators and transformers, and they may well regard it as the quantity of primary interest, and $\vec{B}$ as a derivative quantity – in which case it's natural to think of the last equation as defining $\vec{B}$ as a flux density! Even though physicists don't usually define $\vec{B}$ in this way, it's clearly not wrong to regard $\vec{B}$ as a flux density, and this point of view gives $\vec{B}$ its name! | {
"domain": "physics.stackexchange",
"id": 49895,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, magnetic-fields",
"url": null
} |
opencv, estimation, rosbag, pcl, opencv2
Originally posted by nlamprian with karma: 366 on 2017-03-24
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by Rai on 2017-03-25:
thank you, and how do I estimate the pose?
Comment by nlamprian on 2017-03-25:
I don't have personal experience with this. Maybe someone else can help you better. | {
"domain": "robotics.stackexchange",
"id": 27409,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "opencv, estimation, rosbag, pcl, opencv2",
"url": null
} |
c#, performance, generics, reflection, interval
if (valuePair.Value > maxValue.Value)
maxValue = valuePair;
}
}
var valToSet = maxValue.Key.Item;
if (sameAsPrevious)
{
var prevVal = GetValue(prevTimeWindow, dictionary.Name);
if (valToSet == null && prevVal == null)
{ }
else if ((valToSet == null && prevVal != null) || (valToSet != null && prevVal == null) || !valToSet.Equals(prevVal))
sameAsPrevious = false;
}
SetValue(output, dictionary.Name, valToSet);
}
if (!sameAsPrevious)
{
foreach (var copyProperty in copyProperties)
SetValue(output, copyProperty.Name, copyProperty.GetValue(prevItem));
timeWindowIdentifier.SetValue(output, timeWindowMinutes);
datePropertyInfo.SetValue(output, currentWindowFrom);
prevTimeWindow = output;
yield return output;
}
}
}
while (nextWindowFrom <= dateTo);
}
}
private static DateTime GetPropertiesAndDictionaries<T>(DateTime dateFrom, List<T> stateModels, out PropertyInfo datePropertyInfo, out List<PropertyInfo> copyProperties, out PropertyInfo timeWindowIdentifier, out int size, out TimeWindowDictionary[] dictionaries, out int i) where T : new()
{
Type tType = typeof(T);
var propInfos = tType.GetProperties();
datePropertyInfo = propInfos.Single(p => p.GetCustomAttributes(typeof(IsTimeWindowDate), true).Any());
var firstDate = (DateTime)datePropertyInfo.GetValue(stateModels.First()); | {
"domain": "codereview.stackexchange",
"id": 34895,
"lm_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, reflection, interval",
"url": null
} |
parallel-computing, threads, multi-tasking, critical-section
Title: Thread - contention vs race The terms contention and race are used interchangeably when it comes to thread's state(at critical section). Are they same? These are two distinct phenomena. Contention refers to the fact that when thread $A$ has accessed a resource $B$ needs to wait until $A$ frees it.
Race refers to the fact when both threads $A$ and $B$ want to secure access to a resource. The fastest will secure it and thus lead to contention. | {
"domain": "cs.stackexchange",
"id": 16161,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "parallel-computing, threads, multi-tasking, critical-section",
"url": null
} |
Note: This exercise is based on Exercise 1 of Chapter 21.5.3 in r4ds.
#### Solution
# 1. Compute the mean of every column in mtcars:
# (a) Solve for 1st column:
mean(mtcars$mpg) #> [1] 20.09062 # (b) Generalize to all columns: as_tibble(mtcars) %>% map_dbl(mean) #> mpg cyl disp hp drat wt qsec #> 20.090625 6.187500 230.721875 146.687500 3.596563 3.217250 17.848750 #> vs am gear carb #> 0.437500 0.406250 3.687500 2.812500 apply(X = mtcars, MARGIN = 2, FUN = mean) #> mpg cyl disp hp drat wt qsec #> 20.090625 6.187500 230.721875 146.687500 3.596563 3.217250 17.848750 #> vs am gear carb #> 0.437500 0.406250 3.687500 2.812500 # 2. Determine the type of each column in ggplot2::diamonds: # (a) Solve for 1st column: typeof(ggplot2::diamonds$carat) # solution for 1st column
#> [1] "double"
# (b) Generalize to all columns:
ggplot2::diamonds %>% map_chr(typeof)
#> carat cut color clarity depth table price x
#> "double" "integer" "integer" "integer" "double" "double" "integer" "double"
#> y z
#> "double" "double"
apply(X = ggplot2::diamonds, MARGIN = 2, FUN = typeof)
#> carat cut color clarity depth table
#> "character" "character" "character" "character" "character" "character"
#> price x y z
#> "character" "character" "character" "character"
# Note: All variables viewed as characters! | {
"domain": "bookdown.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126513110865,
"lm_q1q2_score": 0.8024399741234667,
"lm_q2_score": 0.8198933293122507,
"openwebmath_perplexity": 3506.343945840964,
"openwebmath_score": 0.3427765369415283,
"tags": null,
"url": "https://bookdown.org/hneth/ds4psy/A-12-iter-sol.html"
} |
rosbag
Originally posted by rajat with karma: 175 on 2011-07-19
This answer was ACCEPTED on the original site
Post score: -1
Original comments
Comment by Patrick Bouffard on 2011-07-21:
@rajat, none of the other options to rosbag record are implemented as ROS parameters; they are all command line options. Why would this be any different? Also I have to take back what I said about Electric; it's already in feature freeze.
Comment by Victor Lopez on 2011-07-20:
Thanks I'll try to do it.
Comment by rajat on 2011-07-19:
You should make it as a ros parameter and then submit the patch, The parameters by default should have the values which are present in the source code . but we can change the value by changing the parameter .
Comment by Patrick Bouffard on 2011-07-19:
Unless there's a way (outside ROS) to spoof the disk space on a drive then it seems that there's no other way but to change the source. If I were you I'd file an enhancement ticket. If you attach a working patch then maybe you could get it squeaked into Electric (next ROS release in August).
Comment by Victor Lopez on 2011-07-19:
Yeah, I could do that, as well as remove the call to this method or make it return without checking anything. But the thing is if there's a solution that doesn't involve modifying the source code, otherwise each time we (as a company) upgrade ROS version, we have to change it and recompile.
Comment by Kurt Leucht on 2016-03-02:
Did this ever get implemented as a parameter or command line option? I want to record locally onboard my robot, even though my robot has less than 1 Gig of free disk space. Thanks.
Comment by Ben Cole on 2016-10-28:
I second Kurt. It would really make sense if this were configurable so I could also record locally on my small robot that doesn't have a lot of space. | {
"domain": "robotics.stackexchange",
"id": 6167,
"lm_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
} |
acid-base, equilibrium, ph
K_\mathrm{a1} \cdot K_\mathrm{a2} &= \frac{[\ce{A^{2-}}]\cdot [\ce{H3O+}]^2}{[\ce{H2A}]}
&\Rightarrow &&
[\ce{A^{2-}}] &= \frac{K_\mathrm{a1} \cdot K_\mathrm{a2} \cdot [\ce{H2A}]}{[\ce{H3O+}]^2}\tag7\label{A2-}\\
\end{align}
Substituting into \eqref{Mass Balance}:
\begin{align}
I &= [\ce{H2A}]+\frac{K_\mathrm{a1} \cdot [\ce{H2A}]}{[\ce{H3O+}]}
+\frac{K_\mathrm{a1} \cdot K_\mathrm{a2} \cdot [\ce{H2A}]}{[\ce{H3O+}]^2}\\
&= [\ce{H2A}] \cdot \frac{[\ce{H3O+}]^2 + [\ce{H3O+}]
\cdot K_\mathrm{a1} + K_\mathrm{a1} \cdot K_\mathrm{a2}}{[\ce{H3O+}]^2}\tag9\label{Sub Mass Balance}
\end{align}
Solving \eqref{Sub Mass Balance} for $[\ce{H2A}]$:
$$[\ce{H2A}]=\frac{I \cdot [\ce{H3O+}]^2}{[\ce{H3O+}]^2 + [\ce{H3O+}] | {
"domain": "chemistry.stackexchange",
"id": 5590,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "acid-base, equilibrium, ph",
"url": null
} |
python, python-2.x
Title: Stock statement generator in Python I applied to a startup recently, as a coding exercise they asked me to produce the output below with the given input, specifically making it easy to understand, extend, and without performing any unnecessary actions. I emailed this solution and got no response. The code works but I suspect there are problems with the design. Any and all criticisms are welcome, anything you could possibly object to, if it's awful by all means please let me know.
input:
actions = [{'date': '1992/07/14 11:12:30', 'action': 'BUY', 'price': '12.3', 'ticker': 'AAPL', 'shares': '500'},
{'date': '1992/09/13 11:15:20', 'action': 'SELL', 'price': '15.3', 'ticker': 'AAPL', 'shares': '100'},
{'date': '1992/10/14 15:14:20', 'action': 'BUY', 'price': '20', 'ticker': 'MSFT', 'shares': '300'},
{'date': '1992/10/17 16:14:30', 'action': 'SELL', 'price': '20.2', 'ticker': 'MSFT', 'shares': '200'},
{'date': '1992/10/19 15:14:20', 'action': 'BUY', 'price': '21', 'ticker': 'MSFT', 'shares': '500'},
{'date': '1992/10/23 16:14:30', 'action': 'SELL', 'price': '18.2', 'ticker': 'MSFT', 'shares': '600'},
{'date': '1992/10/25 10:15:20', 'action': 'SELL', 'price': '20.3', 'ticker': 'AAPL', 'shares': '300'}, | {
"domain": "codereview.stackexchange",
"id": 24363,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-2.x",
"url": null
} |
java, rest, spring, spring-mvc
public class InvoiceRequest {
private ReceiveData receiveData;
public ReceiveData getReceiveData() {
return receiveData;
}
public void setReceiveData(ReceiveData receiveData) {
this.receiveData = receiveData;
}
public String getRequestUID() {
return getReceiveData().getiBusData().getRequestUID();
}
public String getObjectUID() {
return getReceiveData().getiBusData().getObjectUID();
}
public String getSenderDateTime() {
return getReceiveData()
.getiBusData()
.getSenderDateTime();
}
public Invoice getInvoice() {
return getReceiveData()
.getiBusData()
.getData()
.getInvoice();
}
public String getUID() {
return getInvoice().getUid();
}
public String getDate() {
return getInvoice().getDate();
}
public String getNumber() {
return getInvoice().getNumber();
}
public Boolean getMarked() {
return getInvoice().getMarked();
}
public Boolean getPosted() {
return getInvoice().getPosted();
}
public String getSenderCityUID() {
return getInvoice().getSenderCityUID();
}
public String getReceiverTerminalUID() {
return getInvoice().getReceiverTerminalUID();
}
public String getReceiverCityUID() {
return getInvoice().getReceiverCityUID();
}
public String getCargoUID() {
return getInvoice().getCargoUID();
}
public Double getAmount() {
return getInvoice().getAmount();
}
public Double getAmountExtraLarge() {
return getInvoice().getAmountExtraLarge();
} | {
"domain": "codereview.stackexchange",
"id": 32678,
"lm_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, rest, spring, spring-mvc",
"url": null
} |
java, json, gson
An exception should be handled at a point it can be handled. And this is not neccessarily the method it occurs.
Logging an exception is the last option for exceptional cases that have no previous mentioned handle. And this is also not neccessarily the method it occurs.
Remove Optional-construct
To exit the loop you determine the existance of a next "url". That should be your single point of truth. "getResponse" is called if "hasMore" is true. But If "getResponse" gets called then it is called under the assumption that there "is" more. If the getResponse-method cannot fulfill the work it is an exception. My view is that getting an "Optional" when "hasMore" has determined before is contradictory.
Throw an exception and the same mechanism as described in "Exception handling" is used. It is transparent to the caller. The caller always will get all necessary information and can decide on its own what to do. Either the getIds()-method returns normal or an exception is thrown that contains the Ids received so far.
Ambigious next-key and semantic redundancy
Currently you have two next-keys holding different values: boolean and String. Theoretically a JsonObject should have unique keys. But any behaviour you rely on to retreive values from this key is specific to the JSON library you use. Maybe GSON does it right somehow.
Furthermore you have semantical redundancy. The existance of the next URL is sufficient information to determine if there is a next URL.
My suggestion is to get rid of the semantic redundancy as early as possible so that further algorithms work with a single source of truth. Maybe you have a preprocession of the Json String and return the JsonObject as the return value of your execute-method().
Reuse JsonParser
I think that is a little issue. But I would reuse the JsonParser-instance as I do not know if this is an expensive operation to instantiate this kind of object.
Extracting constants
There are code fragments that should be extracted to constants. the "key" String is repeated but adresses the same semantic. But also the other keys to access the json object.
Variable scope | {
"domain": "codereview.stackexchange",
"id": 24249,
"lm_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, json, gson",
"url": null
} |
ros, gazebo, collision, plugin
<!-- ***************Kuka A3 Joint**************** -->
<xacro:link_block link="a3" xyz="0 0 0" rpy="0 0 0" filename="a3.dae" material="Orange"/>
<xacro:rev_joint_block parent="e1" child="a3" xyz="-0.4 0 0" rpy="-1.5707 0 1.5707" lower="-2.0944" upper="2.0944"/>
<xacro:transmission_block parent="e1" child="a3"/>
<!-- ***************Kuka A4 Joint**************** -->
<xacro:link_block link="a4" xyz="0 0 0" rpy="0 0 0" filename="a4.dae" material="Orange"/>
<xacro:rev_joint_block parent="a3" child="a4" xyz="0 0 0" rpy="-1.5707 0 0" lower="-2.96706" upper="2.96706"/>
<xacro:transmission_block parent="a3" child="a4"/> | {
"domain": "robotics.stackexchange",
"id": 25319,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, gazebo, collision, plugin",
"url": null
} |
javascript, object-oriented
const car1 = createCar({ licenseId: 'car1' })
const car2 = createCar({ licenseId: 'car2' })
const car3 = createCar({ licenseId: 'car3' })
const truck4 = createTruck({ licenseId: 'truck4' })
const truck5 = createTruck({ licenseId: 'truck5' })
const id1 = parkingLot.placeVehicle(car1)
const id2 = parkingLot.placeVehicle(car2)
const id3 = parkingLot.placeVehicle(car3)
const id4 = parkingLot.placeVehicle(truck4)
console.log(
'Attempting to add vehicle when lot is full. Spot id returned:',
parkingLot.placeVehicle(truck5)
)
parkingLot.removeVehicle(id3)
console.log(
'Attempting to add vehicle again now that there is room. Spot id returned:',
parkingLot.placeVehicle(truck5)
) | {
"domain": "codereview.stackexchange",
"id": 40480,
"lm_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",
"url": null
} |
image-processing, filters, gaussian, math
\mbox{round}(4\cdot
\left[
\matrix
{
0.3679&0.6065&0.3679\\
0.6065&1.0&0.6065\\
0.3679&0.6065&0.3679
}
\right]
)=
$$
$$
h_{\sigma=1}(x,y)=
\mbox{round}(
\left[
\matrix
{
1.4716&2.4260&1.4716\\
2.4260&4.0&2.4260\\
1.4716&2.4260&1.4716
}
\right]
)=
$$
$$
\left[
\matrix
{
1&2&1\\
2&4&2\\
1&2&1
}
\right]
=h_\sigma(x,y)
$$
There must be a better solution, or mathematical explanation for creating that matrix? I especially dislike the rounding operation, as the values are all close to $.5$ and not to $.0$ which should results in a huge error...
My question in other words: How do I determine the filter from scratch... The filter you referenced is known as a Binomial filter. It is an approximation to a Gaussian, but for smaller filters it's a very crude one. The design is oriented more toward efficiency than accuracy. Rather than sampling a Gaussian directly, the idea behind the approximation is based on the Central Limit Theorem. In this case, it means that a small moving average filter $[ 1 \space 1 ]$ convolved with itself over and over will become more and more Gaussian. It also happens to yield the rows of Pascal's Triangle. The coefficients for larger filters are given by the following formula:
$$
{N \choose k} = \frac{N!}{(N - n)!\space N!}.
$$
For example, for $N = 5$, taking the outer product of the corresponding row of Pascal's triangle with itself yields
$$ | {
"domain": "dsp.stackexchange",
"id": 993,
"lm_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, filters, gaussian, math",
"url": null
} |
newtonian-mechanics, forces, free-body-diagram
Title: When we push a block horizontally on a frictionless surface is their any normal force acting between our hand and block?
The red region I marked there the person hand is in contact with the block I want to know if there is any normal force acting between the person's hand and the block. If there is a normal force then what is direction of this normal force? If this person applies this force $F$ at an angle then will there be any normal force too?
The red region I marked there the person hand is in contact with the
block I want to know if there is any normal force acting between the
person's hand and the block.
If the person applies a force $F$ perpendicular to the surface of the block then $F$ is the normal force on the block. Per Newton's 3rd law the block exerts an equal and opposite force $F$ to the persons hands. If that force is perpendicular to the persons hands then $F$ is the normal force on the person's hand.
If there is a normal force then what is direction of this normal
force?
The normal force is always the component of a force that is perpendicular to the surface.
If this person applies this force at an angle then will there be
any normal force too?
Yes, but it will only be the component of $F$ that is perpendicular to the surface. If $\theta$ is the angle between the force and the surface, then the normal force is $N=F\sin\theta$.
Hope this helps. | {
"domain": "physics.stackexchange",
"id": 97352,
"lm_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, free-body-diagram",
"url": null
} |
java, javascript, css, jsp
Document document = new Document();
document.setId(
resultSet.getString(DOCUMENT_TABLE.ID_COLUMN.NAME));
document.setEditToken(
resultSet.getString(
DOCUMENT_TABLE.EDIT_TOKEN_COLUMN.NAME));
document.setText(
resultSet.getString(
DOCUMENT_TABLE.TEXT_COLUMN.NAME));
return document;
}
}
}
}
private Connection getConnection() throws SQLException {
URI dbUri = null;
try {
dbUri = new URI(System.getenv(DATABASE_URI_ENVIRONMENT_VARIABLE));
} catch (URISyntaxException ex) {
throw new RuntimeException("Bad URI syntax.", ex);
}
String[] tokens = dbUri.getUserInfo().split(":");
String username = tokens[0];
String password = tokens[1];
String dbUrl = "jdbc:mysql://" + dbUri.getHost() + dbUri.getPath();
return DriverManager.getConnection(dbUrl, username, password);
}
/**
* {@inheritDoc }
*/
@Override
public void initializeDatabaseTables() throws SQLException {
try (Connection connection = getConnection()) {
try (Statement statement = connection.createStatement()) {
statement.executeUpdate(DOCUMENT_TABLE.CREATE_STATEMENT);
}
}
}
/**
* {@inheritDoc }
*/
@Override
public boolean updateDocument(Document document) throws SQLException {
try (Connection connection = getConnection()) {
connection.setAutoCommit(false);
try (PreparedStatement statement =
connection.prepareStatement(
SELECT.DOCUMENT.VIA_DOCUMENT_ID)) {
statement.setString(1, document.getId());
try (ResultSet resultSet = statement.executeQuery()) {
if (!resultSet.next()) {
return false;
}
String editToken =
resultSet.getString(
DOCUMENT_TABLE.EDIT_TOKEN_COLUMN.NAME); | {
"domain": "codereview.stackexchange",
"id": 28645,
"lm_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, javascript, css, jsp",
"url": null
} |
thermodynamics
Say you own a theme park where, every hour, each adult has to pay ${\rm d}\mu_a=\$7$ (money=energy) and each kid has to pay ${\rm d}\mu_k=\$3$.
We assign positive signs to when they put money out of their pockets.
If there are $n_a=10$ adults and $n_k=5$ kids in the park, and if this number of people stays fixed (${\rm d}n_\text{totoal}=0$ over some time), then they together have to spend
$$n_a\cdot {\rm d}\mu_a + n_k\cdot {\rm d}\mu_k = \$70 + \$15 = \$85$$
Now say you, the park owner, are not allowed to actually make any money (${\rm d}G=0$) and you relax the condition that the kids have to pay any money at all. That is, now just the adult have to pay ... and since the money has to go somewhere, the kids are on the receiving end. Then the ten parents still spend $\$70$ per hour and now the five kids will split that money among each other. Each kids receives
$$-{\rm d}\mu_k = \frac{1}{n_k}\cdot n_a\cdot {\rm d}\mu_a = \frac{1}{5}\cdot \$70 = \$14$$
The comparison with "money per time" lacks in that here people don't bring in money just from coming to the park (as it's the case with particles coming into the system and energy). But I hope this clear up the meaning of factor $\frac{1}{n_k}$ clear. | {
"domain": "chemistry.stackexchange",
"id": 8207,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics",
"url": null
} |
java, algorithm, tree, validation, groovy
void collectNodes(String node, Map tree, Set nodes){
nodes << node
if(tree.containsKey(node)){
tree[node].each { collectNodes(it, tree, nodes) }
}
} | {
"domain": "codereview.stackexchange",
"id": 44565,
"lm_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, algorithm, tree, validation, groovy",
"url": null
} |
# Fibonacci Identity with Binomial Coefficients
A friend showed me this cool trick: Take any row of Pascal's triangle (say, $n = 7$): $$1, 7, 21, 35, 35, 21, 7, 1$$ Leave out every other number, starting with the first one: $$7, 35, 21, 1$$ Then these are backwards base-5 "digits", so calculate: $$7 + 35 \cdot 5 + 21 \cdot 5^2 + 1 \cdot 5^3 = 7 + 175 + 525 + 125 = 832$$ and divide by $2^{7-1} = 2^6 = 64$: $$\frac{832}{64} = 13$$ and $F_7 = 13$ (the seventh Fibonacci number)! He said it works for any $n$. I have worked out that this would be to prove that: $$\frac{1}{2^{n-1}}\sum_{k = 0}^{\lfloor{\frac{n}{2}}\rfloor}{\left(5^k {n \choose 2k + 1} \right)} = F_n$$ I'm not sure how to proceed from here. Is there a neat combinatoric or easy algebraic proof I am missing? Thanks!
Easy algebraic proof. Just use Binet's formula: $$F_n = \frac{1}{\sqrt{5}} \left( \left(\frac{1 + \sqrt{5}}{2} \right)^n - \left(\frac{1 - \sqrt{5}}{2} \right)^n \right)$$ If you expand the powers using binomial coefficients and simplify, you will see that terms with $\sqrt{5}$ cancel and you should get your desired result exactly!
• Great! I will try and I might post it as an answer. – Barron Nov 6 '16 at 23:31
• I figured it out! I have posted it here. Thanks! – Barron Nov 6 '16 at 23:45
Suppose we seek to show that | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9918120920344693,
"lm_q1q2_score": 0.8062116395471646,
"lm_q2_score": 0.8128673223709251,
"openwebmath_perplexity": 240.18481272460042,
"openwebmath_score": 0.9201136827468872,
"tags": null,
"url": "https://math.stackexchange.com/questions/2002702/fibonacci-identity-with-binomial-coefficients"
} |
ros-kinetic, ubuntu, ubuntu-xenial
Original comments
Comment by billy on 2019-03-14:
For now don't assume you need to use the twist to tick nodes.
What kind of motors are you using and what kind of driver are you using for the motor?
The correct answer will depend these bits of info.
Provide as much detail as you can. I will try to help if you provide enough info.
Comment by Hemanth on 2019-03-14:
I am using 6 pin rotary motors with wheel encoders and L298N motor driver. Two of the 6 pins are connected to the motor driver, two of them to give the encoder output to the Raspberry pi and the other two for Vcc and ground. If there is a way to convert a twist message i publish directly into GPIO outputs to control the motors, that would be awesome. Thank you so much for your help.
Comment by billy on 2019-03-14:
My understanding: You have DC brushed motors being driven through PWM into an H-Bridge driver. Your RPi will need to generate a direction and PMW signal for each motor.
What you need to do:
1 - Find or develop a node that controls the velocity of each motor based on encoder feedback and PWM/Direction signals out. At the level of this node velocity will be equivalent to encoder counts per second. I suggest you search for pre-existing node but don't be afraid to try one your self if needed. This node will will include some type of control algorithm like PID on velocity.
2 - Convert the twist message that is in meters/second and radians/second to encoder count/second for each motor. It's likely there is a node for this also.
3 - Use the motor commands from 2 as input to the node in 1.
I know there is a set of nodes for differential drive controller, but I haven't used it. I have looked at it though and it seems pretty confusing. Start there though and see how it goes.
Comment by Hemanth on 2019-03-15:
I have a node that you referred to as number 2 that takes in a twist message and converts to encoder counts/second. Finding node 1 that will convert this encoder counts into motor control using Rpi GPIO is what im trying to do. Here is what i got. | {
"domain": "robotics.stackexchange",
"id": 32644,
"lm_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-kinetic, ubuntu, ubuntu-xenial",
"url": null
} |
python, parsing, csv, pandas, email
82,11,Hypnotize - 2014 Remaster,/track?id=15088810,https://open.spotify.com/track/7KwZNVEaqikRSBSpyhXK2j,The Notorious B.I.G.,Life After Death (2014 Remastered Edition),Rhino Atlantic,"Mar 04, 1997",8512,67,"Mar 24, 2022",-0.71,262,USAT21402725
83,-13,Birthday Cake,/track?id=73138675,https://open.spotify.com/track/7dDrR6vMK1JAwZZ5MIWgme,Dylan Conrique,Birthday Cake,KYN Entertainment,"Feb 02, 2022",8497,64,"Apr 03, 2022",-1.43,18,ZZOPM2220577
84,-2,Baby,/track?id=75783908,https://open.spotify.com/track/3pudQCMnsFGwOElTZmuml8,"Aitch, Ashanti",Baby,Capitol,"Mar 10, 2022",8382,82,"Apr 06, 2022",5.43,15,GBUM72201110
85,4,deja vu,/track?id=33837370,https://open.spotify.com/track/6HU7h9RYOaPRFeh0R3UeAr,Olivia Rodrigo,SOUR,Olivia Rodrigo PS,"May 21, 2021",8355,2,"May 23, 2021",5.57,302,USUG12101240
86,-5,Meet Me At Our Spot,/track?id=28737183,https://open.spotify.com/track/07MDkzWARZaLEdKxo6yArG,"THE ANXIETY, WILLOW, Tyler Cole",THE ANXIETY,"MSFTSMusic / Roc Nation Records, LLC","Mar 13, 2020",8259,6,"Oct 20, 2021",-0.71,228,QMJMT2002693 | {
"domain": "codereview.stackexchange",
"id": 43147,
"lm_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, parsing, csv, pandas, email",
"url": null
} |
c#, community-challenge, lexical-analysis
lexemeLength = count;
return new Tuple<TokenType, string>(TokenType.Identifier, lexeme);
}
TokenType IsKeyword()
{
if (!char.IsLetter(PeekChar())) return 0;
string lexeme = GetChar().ToString();
int count = 1;
int line = Line;
while (char.IsLetter(PeekChar()))
{
lexeme = lexeme + GetChar();
count++;
if (line != Line) break;
}
switch (lexeme.ToUpper())
{
case "PRINT":
{
lexemeLength = count;
return TokenType.PrintKeyword;
}
case "VAR":
{
lexemeLength = count;
return TokenType.VarKeyword;
}
case "LET":
{
lexemeLength = count;
return TokenType.LetKeyword;
}
case "GOTO":
{
lexemeLength = count;
return TokenType.GotoKeyword;
}
case "IF":
{
lexemeLength = count;
return TokenType.IfKeyword;
}
case "WHILE":
{
lexemeLength = count;
return TokenType.WhileKeyword;
}
}
UngetString(count);
return 0;
}
Tuple<TokenType, String> IsIdentifier()
{
if (!(char.IsLetter(PeekChar()) || PeekChar() == '_'))
return new Tuple<TokenType, string>(0, string.Empty);
string lexeme = GetChar().ToString();
int count = 1;
int line = Line;
while ((char.IsLetter(PeekChar()) || char.IsDigit(PeekChar()) || PeekChar() == '_'))
{
lexeme = lexeme + GetChar();
count++;
if (line != Line)
{
UngetString(count);
return new Tuple<TokenType, string>(0, string.Empty);
}
} | {
"domain": "codereview.stackexchange",
"id": 26795,
"lm_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#, community-challenge, lexical-analysis",
"url": null
} |
Skip to main content.sg. There is a measure called "solid angle" which extends the idea of angles into 3D. AjayT4614 AjayT4614 22.09.2020 Physics Secondary School How many steradians account for circumference of a sphere? A radian is the angle of radius r rolled on a circle. The solid angle, W, in steradians, is equal to the spherical surface area, A, divided by the square of the radius, r. Thus, there are 4*pi steradians in the entire surface of the sphere. This removed cone is shown in figure 7.2. In square degrees this becomes 41,253 or in square arcminutes 148,510,660. That's using degrees on a sphere. Another term for a steradian is a square radian.The abbreviation for steradian is sr.. How many steradians in a sphere? Last edited: Jun 26, 2006. Just as there are 360° or 2π radians in a circle, there are 4π Steradians in a sphere. Homework Helper. There are 4π (12.57) steradians in a sphere. Solid angle is defined by having 4π steradians in a sphere. Cart All. It is expressed in steradian (sr), the official SI unit - international system of units. That's using degrees on two different circles, not on a single sphere. The angle θ can range from 0 (a point having zero solid angle) to π/2 (a hemisphere with Ω = 2π steradians) to π (the full sphere with Ω = 4π sr). We can find this out by understanding the relationship of candelas, steradians and spheres using the diagram below. The number of "square degrees" in a sphere is not 360x360, since even around the equator 360 degrees don't quite fit (the tops and bottoms overlap a tiny bit). Jun 26, 2006 3. SI multiples. The area of a steradian is r² (by definition). Log in. let's say for 4 points. Buy You Can Do Math: Radians and Steradians 1 by Tanna, Sunil (ISBN: 9781717479730) from Amazon's Book Store. Let that number be n. sr = steradians (unit | {
"domain": "shukunegi.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9793540656452214,
"lm_q1q2_score": 0.8182341908183411,
"lm_q2_score": 0.8354835289107309,
"openwebmath_perplexity": 1875.7777519416447,
"openwebmath_score": 0.7406566739082336,
"tags": null,
"url": "http://shukunegi.com/georgia-hall-jwyd/page.php?341f42=st-paul-school-agra-admission-2020-21"
} |
c, parsing, functional-programming
static object
concat( object l, object r ){
if( ! valid( l ) ) return r;
if( r->t == LIST
&& valid( eq_symbol( VALUE, first( first( r ) ) ) )
&& ! valid( rest( r ) )
&& ! valid( rest( first( r ) ) ) )
return l;
switch( l->t ){
case LIST: return cons( first( l ), concat( rest( l ), r ) );
default: return cons( l, r );
}
}
parser
then( parser p, parser q ){
return sequence( p, q, Operator( NIL_, concat ) );
}
static object
left( object l, object r ){
return l;
}
static object
right( object l, object r ){
return r;
}
parser
xthen( parser p, parser q ){
return sequence( p, q, Operator( NIL_, right ) );
}
parser
thenx( parser p, parser q ){
return sequence( p, q, Operator( NIL_, left ) );
}
parser
forward( void ){
parser p = Parser( 0, 0 );
p[-1].Header.forward = 1;
return p;
}
parser
maybe( parser p ){
return either( p, succeeds( NIL_ ) );
}
parser
many( parser p ){
parser q = forward();
*q = *maybe( then( p, q ) );
return q;
}
parser
some( parser p ){
return then( p, many( p ) );
} | {
"domain": "codereview.stackexchange",
"id": 43456,
"lm_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, parsing, functional-programming",
"url": null
} |
quantum-information, quantum-entanglement, tensor-calculus, probability
Title: Is "entanglement" unique to quantum systems? My text shows (sections 0.2 and 0.3) that the joint "state space" of a system composed of two subsystems with $k$ and $l$ "bits of information", respectively, requires $kl$ bits to fully describe it. A critical consequence of this is that the $k+l$ bits in each of the individual subsystems are not sufficient to "span" their joint space, so that there must be states that are "entangled" (formally, cannot be expressed by the tensor product of the states of the subsystems). That much I (think) I understand.
But the text then seems to argue that this is a property that is exclusive to quantum systems. Is that true? Certainly there are classical systems where the state of one subsystem depends on the state of another. Doesn't any joint system that requires conditional probabilities to describe need "extra bits" beyond those necessary to describe the individual subsystems?
Perhaps I'm missing some subtlety about what constitutes a "sub system" or some unstated assumption about how systems are broken into parts. Perhaps a classical system that is "entangled" by conditional probabilities isn't thought of as consisting of valid "subsystems" in the same way that quantum system is.
Is "entanglement" unique to quantum systems? Are conditional probabilities just a kind of "classical entanglement"? | {
"domain": "physics.stackexchange",
"id": 40087,
"lm_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-information, quantum-entanglement, tensor-calculus, probability",
"url": null
} |
atmospheric-science
Title: Wind speed limit According to Wikipedia, the highest wind speed not related to tornadoes ever recorded was 408 km/h. But I am wondering, what is the maximum theoretical wind speed possible here on Earth?
It clearly can not exceed an escape velocity but I suspect there are limitations which will put the maximum wind speed way below that.
I am not interested in the wind speed caused by artificially created conditions (like nuclear detonations)
According to Wikipedia, the highest wind speed not related to
tornadoes ever recorded was 408 km/h. But I am wondering, what is the
maximum theoretical wind speed possible here on Earth? | {
"domain": "physics.stackexchange",
"id": 58922,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "atmospheric-science",
"url": null
} |
quantum-field-theory, symmetry, quantum-electrodynamics, fourier-transform, ward-identity
My questions are
How did he get $$\begin{align}
0=\int\mathscr{D}\overline{\psi}\mathscr{D}\psi\mathscr{D}Ae^{i\int d^4x\mathscr{L}}\Bigg\{-i\int d^4x\partial_\mu\alpha(x)\Bigg[j^\mu(x)\psi(x_1)\overline{\psi}(x_2)\Bigg]\\+\bigg(ie\alpha(x_1)\psi(x_1)\bigg)\overline{\psi}(x_2)+\psi(x_1)\big(-ie\alpha(x_2)\overline{\psi}(x_2)\big)\Bigg\}~?
\end{align} \tag{9.102}$$
On dividing this equation by $Z$ gives
$$\begin{align}
i\partial_\mu⟨0|Tj^\mu(x)\psi(x_1)\overline{\psi}(x_2)|0⟩=-ie\delta (x-x_1)⟩⟨0|\psi(x_1)\overline{\psi}(x_2)|0⟩
+ie\delta (x-x_2)⟨0|\psi(x_1)\overline{\psi}(x_2)|0⟩,\end{align}\tag{9.103}$$ how did he get this? | {
"domain": "physics.stackexchange",
"id": 70152,
"lm_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, symmetry, quantum-electrodynamics, fourier-transform, ward-identity",
"url": null
} |
`[~,pCov] = normlike([muHat,sigmaHat],x)`
```pCov = 2×2 0.0040 -0.0000 -0.0000 0.0020 ```
Find the cdf value at zero and its 95% confidence interval.
`[p,pLo,pUp] = normcdf(0,muHat,sigmaHat,pCov)`
```p = 0.0067 ```
```pLo = 0.0047 ```
```pUp = 0.0095 ```
`p` is the cdf value using the normal distribution with the parameters `muHat` and `sigmaHat`. The interval `[pLo,pUp]` is the 95% confidence interval of the cdf evaluated at 0, considering the uncertainty of `muHat` and `sigmaHat` using `pCov`. The 95% confidence interval means the probability that `[pLo,pUp]` contains the true cdf value is 0.95.
Determine the probability that an observation from a standard normal distribution will fall on the interval `[10,Inf]`.
`p1 = 1 - normcdf(10)`
```p1 = 0 ```
`normcdf(10)` is nearly 1, so `p1` becomes 0. Specify `'upper'` so that `normcdf` computes the extreme upper-tail probabilities more accurately.
`p2 = normcdf(10,'upper')`
```p2 = 7.6199e-24 ```
You can also use `'upper'` to compute a right-tailed p-value.
Use the probability distribution function `normcdf` as a function handle in the chi-square goodness-of-fit test (`chi2gof`).
Test the null hypothesis that the sample data in the input vector `x` comes from a normal distribution with parameters µ and σ equal to the mean (`mean`) and standard deviation (`std`) of the sample data, respectively. | {
"domain": "mathworks.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9777138151101525,
"lm_q1q2_score": 0.814752975378343,
"lm_q2_score": 0.8333246015211008,
"openwebmath_perplexity": 515.6661958617431,
"openwebmath_score": 0.900477945804596,
"tags": null,
"url": "https://nl.mathworks.com/help/stats/normcdf.html"
} |
Ruby String Concatenation, How To Make Fake Tan Not Sticky, Tcsh Vs Bash, Dahisar Guest House, Zoopla Pet Friendly, Hardy Zephrus 8'6 4wt For Sale, More News From Nowhere Lyrics Meaning, Songs Written By The Wiggles, Purdue Banner Login, | {
"domain": "dbp.my",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9715639653084244,
"lm_q1q2_score": 0.8010174984362431,
"lm_q2_score": 0.8244619263765706,
"openwebmath_perplexity": 452.91707310460134,
"openwebmath_score": 0.48841148614883423,
"tags": null,
"url": "http://jurnalkanun.dbp.my/3m2rx/domain-of-linear-parent-function-2f0a0a"
} |
discrete-signals, noise, smoothing
Your example data suggested that a positive/negative periods are typically longer than just one measurement. You are supposed to "harden" your filter a bit to still provide the valid zero-crossings. This filter will never be perfect, but it should be better than the naive filter you probably implemented for 3.74.
In 3.74 you probably implemented a simple if-check: If the sign alternates between measurement $n-1$ and $n$, spit out the corresponding 1 or -1. A hardened filter could be implemented by looking back $n-k$ points with $k=1,2,3,...$ chosen appropriately and spit out a 1 or -1 if all of the $k$ points were of the same sign. This, however, would introduce a delay into your filter, and it would miss zero-crossings that are shorter than $k$ points. So, key would be to know the shortest duration between two zero crossings and choose $k$ smaller than that, and it would be important to know whether or not the delay is acceptable.
And no, noise does not refer to the zeros in your signal ;) | {
"domain": "dsp.stackexchange",
"id": 7342,
"lm_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, noise, smoothing",
"url": null
} |
deep-learning
train_data.append(image)
train_labels.append(dic[cat])
def creat_test_dataset( ):
for cat in catg :
path = os.path.join(dir2, cat)
for img in os.listdir(path):
image = load_img(os.path.join(path, img),target_size= (120, 120) )
image = img_to_array(image)
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
test_data.append(image)
test_labels.append(dic[cat])
creat_train_dataset( )
creat_test_dataset( )
# dataset generation
x_train = np.array(train_data[0:150], dtype = 'float32')/255
y_train = np.array(train_labels[0:150], dtype = 'int')
y_train = keras.utils.to_categorical(train_labels[0:150], 5)
print("x train shape: ", x_train.shape)
x_test = np.array(test_data[0:50], dtype = 'float32')/255
y_test = np.array(test_labels[0:50], dtype = 'int')
y_test = keras.utils.to_categorical(test_labels[0:50], 5)
print("x test shape: ", x_test.shape)
mp.imshow(x_train[121])
print(y_train[121])
mp.show( )
batch_size = 3
im_shape = (120, 120, 1)
x_train = x_train.reshape(x_train.shape[0], *im_shape)
x_test = x_test.reshape(x_test.shape[0], *im_shape)
print('x_train shape:' , x_train.shape)
print('x_test shape:' , x_test.shape) | {
"domain": "datascience.stackexchange",
"id": 9966,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "deep-learning",
"url": null
} |
quantum-field-theory, gauge-theory, terminology, history, gauge
1958 - Yennie gauge: It is said (Fried and Yennie 1958) uses the "Yennie gauge" of today, $\xi = 3$, in bound state problems.
Early or mid 60's - Rise of interest in Landau gauge? See (Nakanishi 1966) above.
1966 - 67 Nakanishi & Lautrup: canonical quantization of EM field for any ξ.
1967 - Faddeev & Popov
1971 - 't Hooft: In 1971, 't Hooft used "Feynman-'t Hooft gauge" or simply "'t Hooft gauge" for broken gauge symmetry. (Fujikawa, Lee and Sanda 1972) generalized to any ξ. Its abstract uses the word "Feynman-'t Hooft gauge". (According to Weinberg. Haven't read both two.)
1972 - Still canonical quantization for arbitrary ξ is of interest, including massive vector field. See (Nakanishi 1972).
4 Loren't'z gauge (misspelling)
You may know that in the 20th century, the common spelling was "Lorentz gauge", with extra "t". I couldn't find any exceptions at my hand. The turning point might be the errata of Peskin & Schroeder. Srednicki and Siegel spell it correctly.
5 Bibliography | {
"domain": "physics.stackexchange",
"id": 18749,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-field-theory, gauge-theory, terminology, history, gauge",
"url": null
} |
javascript, pagination
index.push({value : j, isEllipses: true});
}
else if (j == pageSize) {
index.push({value : j, isEllipses: false});
}
}
}
if (isCloseToLastElement) {
for (let j = 1; j <= pageSize ; j++) {
if (j > lastColumn) {
index.push({value : j, isEllipses: false});
}
else if (j == lastColumn) {
index.push({value : j, isEllipses: true});
}
else if (j == 1) {
index.push({value : j, isEllipses: false});
}
}
}
if (!isCloseToLastElement && !isCloseToFirstElement) {
for (let i = 1; i <= pageSize; i++) {
if (i == 1) {
index.push({value : 1, isEllipses: false});
}
else if ((i !== 1 && i !== pageSize) && i == currentPage) {
index.push({value : currentPage - 2, isEllipses: true});
index.push({value : currentPage - 1, isEllipses: false});
index.push({value : currentPage, isEllipses: false});
index.push({value : currentPage + 1, isEllipses: false});
index.push({value : currentPage + 2, isEllipses: true});
}
else if (i == pageSize) {
index.push({value : i, isEllipses: false});
}
}
}
}
return index;
} | {
"domain": "codereview.stackexchange",
"id": 37596,
"lm_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, pagination",
"url": null
} |
$$K_3=\int^\infty_0 f(te^{i0})dt=\int^\infty_0\frac{e^{i0}t^a}{t^2+1}dt=I$$
$$K_4=\int_\infty^0 f(te^{i2\pi})dt=-\int^\infty_0\frac{e^{2\pi ia}t^a}{t^2+1}dt=-e^{2\pi ia}I$$
For $$K_1,K_2$$, please respectively note the asymptotics $$f(z)\sim z^{a}$$ for small $$|z|$$ and $$f(z)=O(z^{a-2})$$ for large $$|z|$$.
Therefore, $$I-e^{2\pi ia}I=\pi(e^{\pi ia/2}-e^{3\pi ia/2})$$ $$\implies I=\pi\frac{e^{\pi ia/2}-e^{3\pi ia/2}}{1-e^{2\pi ia}} =\pi\frac{e^{-\pi ia/2}-e^{\pi ia/2}}{e^{-\pi i a}-e^{\pi ia}} =\pi\frac{\sin(\pi a/2)}{\sin(\pi a)} =\frac{\pi}2\sec\left(\frac{\pi a}2\right)$$
Let $$T=\tan(\pi a/2)$$, $$S=\sec(\pi a/2)$$. $$I^{(4)}(a)=\frac{\pi}2\frac{\pi^4(T^4+18S^2T^2+5S^4)}{16}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105287006255,
"lm_q1q2_score": 0.8135835843109666,
"lm_q2_score": 0.8333246035907933,
"openwebmath_perplexity": 1597.7509845951786,
"openwebmath_score": 0.9671135544776917,
"tags": null,
"url": "https://math.stackexchange.com/questions/3007258/contour-integration-complex-analysis"
} |
java, optimization, parsing, contest-problem, tic-tac-toe
private static String operation(byte[][] a) {
byte[] o = new byte[4], x = new byte[3], n = new byte[2];
int posO = 0, posX = 0, mind = 0;
for (int i = 3; i < 3; i++ )
for (int j = 3; j < 3; j++ ) {
final byte foo = a[i][j];
if (foo == 1) {
o[posO] = magic[i * 3 + j];
posO++ ;
} else if (foo == 2) {
x[posX] = magic[i * 3 + j];
posX++ ;
} else {
n[mind] = magic[i * 3 + j];
mind++ ;
}
}
Side[] players =
{ new Side(o), new Side(x) };
boolean[] cd =
{ false, false };
for (int i = 0; i < 2; i++ )
for (int j = 0; j < 2; j++ ) {
if (players[i].win(n[j])) cd[i] = true;
}
if (cd[0] == cd[1]) return "t";
return cd[0] ? "o" : "x";
}
static class Side {
byte[] my;
Side(byte[] has) { my = has; }
public boolean win(int e) {
for (int o : permutate(my, e))
if (o == 15) return true;
return false;
} | {
"domain": "codereview.stackexchange",
"id": 8100,
"lm_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, optimization, parsing, contest-problem, tic-tac-toe",
"url": null
} |
semiconductor-physics, electronics, electronic-band-theory
Title: Factors on which barrier potential in a p n junction depends I have a few queries regarding the barrier potential in a p-n junction diode.
Is the barrier potential dependent on temperature? Why/why not?
Does the barrier potential depend on doping concentration? Why/Why not?
Why is the barrier potential different for different semiconductors?
Basically, what determines the barrier potential for a p-n junction? In a homojunction the barrier potential depends on the difference in Fermi levels been the n and p sides. If different materials are used (heterojunction) then there is an additional potential from intrinsic difference in electron affinity. | {
"domain": "physics.stackexchange",
"id": 20072,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "semiconductor-physics, electronics, electronic-band-theory",
"url": null
} |
computer-vision, kalman-filters, control-systems, adaptive-filters
Acceleration ($\ddot{x}$ & $\ddot{y}$) as well as position ($x$ & $y$) is measured.
which, to me, is not a constant acceleration. What it is doing is a discretized changing acceleration model, assuming that the acceleration is constant between each sample period.
Now to your question: is inclusion of $\phi, \dot \phi,$ and $\ddot \phi$ in the state vector valid?
The answer is yes, but you need to include the dynamics of how those states interact with the other states.
OK, so now you've added the extra information, I can take a stab at it.
It should work with the following provisos:
The noise distribution on the angle $\phi$ will be uniform not Gaussian. I can't find a good reference, but this discussion on comp.dsp mentions it. That means the KF equations for $\phi$ won't be quite right. I don't think this is a big deal.
There will be some coloration between the noise on $\phi$ and the noises on $x$ and $y$. I'm not sure what this should be, but it may mean you need to introduce some off-diagonal terms in the $Q$ matrix in the KF formulation. | {
"domain": "dsp.stackexchange",
"id": 3810,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computer-vision, kalman-filters, control-systems, adaptive-filters",
"url": null
} |
gas, power-engineering
Title: What ramping constraints for gas plant - CCGT, combustion and steam turbine? I am using the publication Current and Prospective Costs of Electricity Generation until 2050 to source ramping constraints for an economic model of three different gas power plants - CCGT, combustion turbine and steam turbine. As I'm not an engineer I have the following questions: | {
"domain": "engineering.stackexchange",
"id": 1555,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gas, power-engineering",
"url": null
} |
electricity, electrostatics
\end{equation}
So while potentials are potentially ambiguous, differences in potentials are not. By convention, physicists frequently assign a potential of "$0$" to a point at infinity. This fixes the value of $\Lambda$ and removes the ambiguity in the definition of potential. This is only convention, however, and there are certain problems that this approach cannot resolve. By defining the potential in terms of differences, your author avoided the issue entirely. | {
"domain": "physics.stackexchange",
"id": 6657,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electricity, electrostatics",
"url": null
} |
ros
Title: Ros is permenantly installed after following the installation steps?
Hey, i wanted to ask when i follow the installation steps given on the site, i execute the commands" Ubuntu install of ROS Jade" and when i reach the end do i need to verify that ros is installed? When i close the terminal ROS vanishes? How can i know that whenever i open UBUNTU Ros will be installed?
Because when i go through the steps and verify by typing "ros versionros" it says"unversioned" and when i close and open terminal again it says"command ros not found" i know it maybe a silly question but i am a newbie:)
Originally posted by Knowledge on ROS Answers with karma: 31 on 2016-03-02
Post score: 0
Once you've installed ROS via apt-get, it is permanently installed.
Note that the environment setup instructions are critical. Commands like "roscore" won't be available unless you've properly "sourced" a setup.bash file. These setup.bash files automatically control a variety of ROS environment variables, and some non-ROS environment variables as well. These environment variables are critical to ROS functionality. Every terminal you open has a different set of environment variables. Meaning, you'll need to "source" a setup.bash file in every terminal you want to use ROS in. The following commands from the installation instructions are actually modify your user's "~/.bashrc" file to force the primary ROS Jade setup.bash file to be "sourced" every time the "~/.bashrc" file is sourced.
echo "source /opt/ros/jade/setup.bash" >> ~/.bashrc
source ~/.bashrc
Finally note that the "~/.bashrc" file is automatically sourced every time you open a new terminal. Thus if you run the commands above, every terminal should be able to use ROS commands.
Don't worry about the rosversion ros returning <unversioned>. That command used to work, but now AFAIK, ROS versions are no longer numbered. Instead, you should use rosversion -d to see which version of ROS you are using. | {
"domain": "robotics.stackexchange",
"id": 23968,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
rviz, xml
Title: Error in starting rviz
Hello! When I try to start rviz by "roslaunch rviz rviz", I see this message:
... logging to /home/ros/.ros/log/8b43025e-7aa4-11e2-89df-080027387536/roslaunch-ros-VirtualBox-3363.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
Invalid roslaunch XML syntax: not well-formed (invalid token): line 1, column 0
Can you help me?
Originally posted by vitkt on ROS Answers with karma: 1 on 2013-02-19
Post score: 0
Rviz is a program, not a launch file. Try it this way:
$ rosrun rviz rviz
Originally posted by joq with karma: 25443 on 2013-02-19
This answer was ACCEPTED on the original site
Post score: 4 | {
"domain": "robotics.stackexchange",
"id": 12956,
"lm_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, xml",
"url": null
} |
electromagnetism, symmetry, magnetostatics
However, for homogeneous bodies whose surface is of second degree,1 $H$ and $J$ (after suitable magnetic treatment)) are uniform throughout [...] The ellipsoid has the only surface of the second degree that is finite [...]
Reference1 is from Maxwell nonetheless: J. C. Maxwell, Electricity and Magnetism, vol. 2, pp. 66-70, The Clarendon Press, 3rd ed., 1904. Here Maxwell proves that (thanks to hyportnex for digging the result) the (magnetic) potential $V$ must be a quadratic function of the position to have a uniform field inside and then he writes
"Now the only cases with which we are acquainted in which V is a quadratic function of the coordinates within the body are those in which the body is bounded by a complete surface of the second degree, and the only case in which such a body is of finite dimensions is when it is an ellipsoid. We shall therefore apply the method to the case of an ellipsoid. | {
"domain": "physics.stackexchange",
"id": 72591,
"lm_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, symmetry, magnetostatics",
"url": null
} |
So, now we need a way to describe this circle which is not too onerous. A parametric vector equation is the simplest expression of it. We take our inspiration from the classic representation of circles in parametric form, which is
$p(\theta) = (x(\theta), y(\theta))$ $x(\theta) = r \cos{\theta}$ $y(\theta) = r \sin{\theta}.$
We have a normal from which to work from, but we need to have an entire coordinate system to work with. The classic parametric equations have everything in a neat coordinate system, but to describe a circle that's oriented any which way, we need to cook up a coordinate system to describe it with. Observe a change to the foregoing presentation that we can make:
$p(\theta) = r \cos{\theta} (1, 0) + r \sin{\theta} (0, 1) = r \cos{\theta} \vec{x} + r \sin{\theta} \vec{y}$
The normal vector we have is basically the z-axis of the impromptu coordinate system we require, but we don't have a natural x-axis or y-axis. The trouble is there are an infinite number of x-axes that we could choose, we just need something perpendicular to $$N = (n_x, n_y, n_z).$$ So, let's just pick one. If I take the cross product between $$N$$ and any other vector that isn't parallel to $$N$$, I will obtain a value which is perpendicular to $$N$$ and it can serve as my impromptu x-axis. To ensure I don't have a vector which is close to the direction of $$N$$, I will grab the basis vector, which is the most "out of line" with the direction of $$N$$. So, for example (F# style), | {
"domain": "blogspot.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9830850847509661,
"lm_q1q2_score": 0.8170843274762134,
"lm_q2_score": 0.8311430415844384,
"openwebmath_perplexity": 686.6043304835285,
"openwebmath_score": 0.5754119753837585,
"tags": null,
"url": "https://darrenirvine.blogspot.com/"
} |
thermodynamics, ideal-gas, adiabatic
Lastly, I would point out that steels melt at much higher temperatures, over 2000K so even if adiabatic, a steel tank would not melt. Aluminum on the other hand melts around 1200K, so that one wouldn't work so well. | {
"domain": "physics.stackexchange",
"id": 61075,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics, ideal-gas, adiabatic",
"url": null
} |
The standard substitution is $t=\tan\frac{x}{2}$, because $$\sin x=\frac{2t}{1+t^2},\quad \cos x=\frac{1-t^2}{1+t^2},\quad dx=\frac{2}{1+t^2}\,dt$$ so your integral becomes $$\int\frac{1+t^2}{4t-1+t^2+5+5t^2}\frac{2}{1+t^2}\,dt= \int\frac{1}{3t^2+2t+2}\,dt= \int\frac{3}{(3t+1)^2+5}\,dt$$ that you can compute with the further substitution $3t+1=u\sqrt{5}$.
• Awesome, thanks. I kept trying various $\sin$ and $\cos$ substitutions. I always forget $\tan$ is out there. – Cosima Maslani Dec 7 '15 at 14:53 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9893474904166246,
"lm_q1q2_score": 0.8065482085639817,
"lm_q2_score": 0.8152324803738429,
"openwebmath_perplexity": 228.80010725603515,
"openwebmath_score": 0.9915900230407715,
"tags": null,
"url": "https://math.stackexchange.com/questions/1564224/evaluate-the-integral-int-fracdx2-sin-x-cos-x-5"
} |
Counter-example (sketch):
Consider the function, defined on $[-1,1]$ as $$f(x)=\begin{cases}x&\text{if }\;0\le x<\frac12,\\ x-1&\text{if }\;\frac12< x\le 1,\\ 0& \text{if }\;-1\le x<0. \end{cases}$$
For a continuous function on $[-1,1]$, consider the function defined by $$f(x)=\begin{cases}\sin (2\pi x)&\text{if }\;0\le x\le 1,\\ 0& \text{if }\;-1\le x<0. \end{cases}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9621075711974104,
"lm_q1q2_score": 0.8038250386285751,
"lm_q2_score": 0.8354835391516132,
"openwebmath_perplexity": 262.13295413045665,
"openwebmath_score": 0.8933690190315247,
"tags": null,
"url": "https://math.stackexchange.com/questions/2240327/if-the-integral-of-a-function-f-mathbbr-rightarrow-mathbbr-along-an-inter"
} |
php, mysql
<li><a href="#edit">التحكم بالاقسام</a></li>
</ul>
<div id="add">
<form method="POST" action="includes/add.php" dir="rtl" enctype="multipart/form-data">
<br> | {
"domain": "codereview.stackexchange",
"id": 4246,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, mysql",
"url": null
} |
optics, reflection, geometric-optics, telescopes
Title: Focal Length of a Rotating Liquid Mirror I saw this video on YouTube about using rotating liquid metal as parabolic mirrors to make reflecting telescopes.
In the video apart from the standard equation of the curve the liquid makes, the focal length of the mirror so formed was given as
$$f=\frac{g}{2\omega^2}
\\g=acceleration \, due\,to \,gravity\\\omega=angular\,speed\,of\,the\,rotating \,liquid$$
I tried to derive it mathematically but was unsuccessful. It would be great if anyone could give their thoughts on how we arrive at this formula. The mirror is radially symetric so we can solve this
problem only in two dimensions with two coordinates, namely $z$
(height) and $r$ (distance from the rotation axis). The coordinate
system will be rotating with the mirror. Let us look at the forces
acting on a small element of mercury. Reduced to unit mass, they are
gravitational acceleration $\vec{a_g}$ pointing down with magnitude $g$;
centrifugal acceleration $\vec{a_h}$ pointing away from the rotation axis,
whose magnitude increases linearly with $r$ as $\omega^2 r$. | {
"domain": "physics.stackexchange",
"id": 94525,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optics, reflection, geometric-optics, telescopes",
"url": null
} |
localization, theory
Title: Why models are not perfect to represent robotic environments? Sebastian Thrun says in his paper on Particle Filters that - no model however detailed fails to represent the complexity of even the simplest of robotic environment. What does he means by this? Can someone please elaborate? A model of the environment in this context is an abstraction of the real world, which should be adequate for the task of the robot. For example, if you have a robot that needs to navigate an office building, you can make the abstraction that your model only needs to be in two dimensions. Further, for the task of navigation you could discretize your space in a regular grid, and just model if cells of your grid are occupied by dense matter (e.g. walls, chairs, people) or by light matter (air) above the ground. This environment representation (model) is usually called a map.
What Thrun refers to is likely that your model only records particular aspects of your environment. Its an abstraction. This is good, to make it manageable from a computational and representational aspect. However, and this is in my opinion the key of the statement, its limited in the real world. For the office building example given above, you can easily come up with examples where the models breaks. How do you represent for example a table. A robot of a certain height may actually go underneath. How do you represent the temporal aspects. A chair might be at another position at another time. All possible to manage, but you will always find exceptions to your chosen abstraction in the real world.
Interesting in this context is for example the work from Brooks. He postulated to use the world itself as a model instead of a using abstractions that ultimately fail to represent the world adequately. | {
"domain": "robotics.stackexchange",
"id": 437,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "localization, theory",
"url": null
} |
fluid-dynamics, kinetic-theory, viscosity, mean-free-path
Title: Viscosity and mean free path I have troubles understanding how to derive the formula for viscosity in terms of the mean free path
$$\eta\sim \rho \lambda \bar v$$
where $\bar v$ is the average molecular velocity of the gas, $\lambda$ is the mean free path and $\rho$ is the density. I was following the derivation on the wikipedia article as well as a very similar one in page 8 here.
The derivation considers a moving slab in a liquid/gas, which induces a gradient of the velocity $u_x$ between the moving slab and a stationary one. The first relation I have problems with is $\langle u_x \rangle=\frac{1}{2}\lambda du_x/dy$, where $\langle u_x \rangle$ is the average velocity in the $x$ direction (parallel with the direction of the moving slab) of particle crossing a control surface and $\lambda$ is the mean free path (the wikipedia article strangely does not have the factor of 2). This is explained by (see the second link) assuming that there are particles crossing the surface from all distances from $0$ to $\lambda$ (which makes sense). Then it is explained that the velocity changes linearly with distance (which makes sense, if the particles are to hit the control surface at the same time, particles further away must move faster). This would give $\langle u_x\rangle\sim\frac{1}{\lambda}\int_0^\lambda s ds=\frac{1}{2}\lambda$ (the first term is just the distribution of particles from 0 to $\lambda$ and the integrand is the velocity dependence).
However, the overall proprtionality factor is $du_x/dy$ and I have no idea how to get that (I also do not understand the remaining parts of the derivation either so help on the full derivation would be very much appreciated) The gas as a whole is moving in the $x$ direction everywhere, but at different heights it is moving different speeds, so we have $u_x(y)$. | {
"domain": "physics.stackexchange",
"id": 31435,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics, kinetic-theory, viscosity, mean-free-path",
"url": null
} |
# Interpretation confidence interval
Given a normally distributed population with mean $$\mu$$ and say I constructed a confidence interval of $$\mu \pm a$$ with a confidence level of 95%. Is the following statement correct?
There is a 0.95 probability/chance that the population mean is captured within this confidence interval?
In the sense of the Bayesian interpretation of probability, that is actually correct. But it is easy to be misled by that if you don't also understand how frequentists look at it.
In the sense of the frequentist interpretation of probability, it is not correct. Because from the frequentist point of view, you construct one confidence interval, and now the mean is either in that interval or it isn't. Where is the repeatable experiment? The repeatable experiment is the construction of the confidence interval itself. That is, from the frequentist point of view, we "have 95% confidence that the population mean is in the confidence interval" because if we were to take many samples and construct many confidence intervals, 95% of the samples would produce 95% confidence intervals which overlap with $$\mu$$.
• Thank you, one follow up question. So if I were to take a 100 samples and constructed a confidence interval for all of them 95 would contain the population mean $\mu$? Or do you mean by many someting like in the limit (as the amount of samples goes to infinity) the proportion of intervals that contain $\mu$ will go to 0.95. – Keep_On_Cruising Jul 29 at 18:55
• @Keep_On_Cruising It is in the limit, yes. – Ian Jul 29 at 19:08
You will get different answers for your question depending on philosophical understanding. I like to say that the proposed statement is at best inaccurate because the population mean "exists" but is unknown, therefore there is no randomness to account for (and thus no probability).
I prefer to say the following:
"The confidence interval was produced with a method that captures the mean $$\mu$$ with $$95~\%$$ probability."
Note that the probability is associated with the method (say, the random sampling and the formulae) rather than with its actual, numerical output.
• Oh, I see what you mean! Thanks – Keep_On_Cruising Jul 29 at 18:59 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9553191335436404,
"lm_q1q2_score": 0.8081449980925727,
"lm_q2_score": 0.845942439250491,
"openwebmath_perplexity": 386.38097150124366,
"openwebmath_score": 0.9030998349189758,
"tags": null,
"url": "https://math.stackexchange.com/questions/3307661/interpretation-confidence-interval/3307669"
} |
newtonian-mechanics, forces, everyday-life, biophysics, weight
All of this makes it very complicated because you need to isolate what type of stress is under consideration. However, we can make some general observations.
Any vertical position will maximize compressive stress on the backbone. So standing and sitting straight up should maximize compressive stress. Why sitting down is more than standing up is not clear. Perhaps it has to do with concentrated stress that the reaction force of the seat imposes on the bottom of the spine (tail bone). Or perhaps sitting down causes more curvature of the spine, though I’m not sure.
Any horizontal position will minimize compressive, tensile and bending stress. So lying down should be less “stressful” on the backbone than all the other positions.
Sitting and leaning over would probably be the most stressful since bending of the backbone is maximized. This results in both tensile and compressive stress on the backbone.
Hope this helps. | {
"domain": "physics.stackexchange",
"id": 56181,
"lm_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, everyday-life, biophysics, weight",
"url": null
} |
# Rate Of Change Calculus Problem
I was working through my calculus textbook's practice problems when I came across a problem I couldn't figure out. I really suck at rate of change word problems and this one stumped me. Unfortunately, the textbook only gives answers to even-numbered problems and this is an odd question. Anyway it goes something like this:
An empty oil container is 10 meters long. A cross-section of the container is in the shape of an isosceles trapezoid that is 30cm wide at the bottom and 80cm wide at the top and has a height of 50cm. The container is filled with oil at a rate of 2 meters cubed per minute. How fast is the oil level rising when it is 30cm deep?
I would give my work but I have little to no idea if it's right and I'm afraid I would be just wasting my time as it's probably wrong. How do you do problems like these? I feel like I was never properly taught how and I would like to have a solid understanding by the time I'm actually being tested on this material.
• The problem is about volume of an isosceles trapezoid prism. Start with the formula for that. – randomgirl Oct 25 '18 at 21:05
• An "isosceles trapezoid that is 30cm wide at the top and 80cm wide at the top"? Is the 30cm or the 80cm supposed to be the width at the bottom? – Kurt Schwanda Oct 25 '18 at 21:12
• @KurtSchwanda My bad, fixed that typo. – Bob Smith Oct 25 '18 at 23:03
Refer to the figure:
The volume of the container filled with oil is: $$V=\frac{(0.3+2x)+0.3}{2}\cdot h\cdot 10.$$
From the similarity of the two triangles on the left we get: $$\frac{x}{0.25}=\frac{h}{0.5} \Rightarrow x=\frac{h}{2}.$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9908743628803028,
"lm_q1q2_score": 0.8499404263324948,
"lm_q2_score": 0.8577681068080749,
"openwebmath_perplexity": 274.95734432642627,
"openwebmath_score": 0.8024490475654602,
"tags": null,
"url": "https://math.stackexchange.com/questions/2971274/rate-of-change-calculus-problem"
} |
ros, synchronization
Title: Questions regarding ROS time synchronization
Hi all,
MY question is related to here. We have a remote PC, local PC and a jetson running at the same time. I was told that ROS time synchronization is important in this situation. My question is what would be the potential advantages of time synchronization? Could you make one counter example of what could happen if I don't perform time synchronization?
Thank you in advance.
Originally posted by thompson104 on ROS Answers with karma: 43 on 2020-01-07
Post score: 0
Could you make one counter example of what could happen if I don't perform time synchronization?
It becomes impossible to correlate any messages with Headers, as comparing their stamps becomes meaningless.
And by extension: matching messages to TF frames also becomes impossible, as again, comparing stamps from systems with unsynchronised clocks is impossible.
(and these are just two examples)
Edit:
Thank you gvdoorn. The weird thing is that currently the entire system is not "time synchronized". But still they can read sensor values from remote PC and jetson, send all the values to local PC which then calculates the control inputs and sends back to the remote PC and jetson.
You could just be lucky and have a configuration that works without synchronisation, or the clocks are close enough for your current use-case.
If you're not actually "using" time, not having synchronised clocks would obviously not be a problem. One example of a system not using time would be one where no Stamped messages are used, or where TF is not used, or if TF is used, only the latest available transforms are being used (ie: ros::Time(0) instead of using the stamp to look up a transform). If you have a relatively simple control loop which only uses "latest" data, not having synchronised the clocks would most likely not lead to any problems.
I wonder what would be the negative effects of current setup? Is the system overall loop rate going to be quicker if I perform "time synchronization"? | {
"domain": "robotics.stackexchange",
"id": 34233,
"lm_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, synchronization",
"url": null
} |
…….DSS
….DSDSS
The first case you counted already in the previous string of length n-1. And the second case you counted already from the string before that of length n-2.
• This is how I also ended up solving it, getting the Fibonnaci sequence immediately by using a construction approach to compute the number of binary strings (1 == boy, 0 == girl) that had the constraint of ending in ’11’ but with no other ’11’ in them. The construction as you show has the two ways to generate N+1: extend all the length N cases with a ‘0’ in the front and extend the N-1 cases adding ’10’ to the front. This means the number of ways to generate an appropriate string of length N+1 is Fib(N) since Count(N+1) = Count(N -1) + Count(N). And the total strings of length N+1 is $2^{N+1}$. Dividing gives you the probability of each string length (number of kids) and the expectation is as was shown above as well. And of course phi (the Golden Mean) shows up in the solution of the characteristic of the Fibonnaci recurrence so ultimately I ended up using it to solve this. Pretty cool!
2. It’s much quicker, Kram, to model each problem as a state machine.
Let $T_0$ and $T_1$ be Tom’s expectation of future children after zero and one son respectively. We can say immediately that $T_0 = \frac{1}{2}(s+T_1) + \frac{1}{2}(d+T_0)$ and $T_1 = \frac{1}{2}(s) + \frac{1}{2}(d+T_0)$. The solution, if I haven’t blundered, is $T_0 = 3d+3s$. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232869627774,
"lm_q1q2_score": 0.8624046110592909,
"lm_q2_score": 0.8774767778695834,
"openwebmath_perplexity": 1206.523883410803,
"openwebmath_score": 0.7304139733314514,
"tags": null,
"url": "https://johncarlosbaez.wordpress.com/2016/03/26/probability-puzzles-part-3/"
} |
computational-chemistry
( 5 2 | 4 3) = 0.000000000000000
( 5 2 | 4 4) = 0.000000000000000
( 5 3 | 2 2) = 0.176295759644369
( 5 3 | 3 2) = 0.000000000000000
( 5 3 | 3 3) = 0.197638924560966
( 5 3 | 4 2) = 0.000000000000000
( 5 3 | 4 3) = 0.011138225736852
( 5 3 | 4 4) = 0.179964436324773
( 5 4 | 2 2) = 0.147877804962089
( 5 4 | 3 2) = 0.000000000000000
( 5 4 | 3 3) = 0.152251498109802
( 5 4 | 4 2) = 0.000000000000000
( 5 4 | 4 3) = 0.011733162163856
( 5 4 | 4 4) = 0.164484175321776
( 5 5 | 0 0) = 0.517125360977304
( 5 0 | 5 0) = 0.006270522616106
( 5 5 | 1 0) = 0.122013556886528
( 5 1 | 5 0) = 0.019208705902818
( 5 5 | 1 1) = 0.491873027324534
( 5 1 | 5 1) = 0.146642827474200
( 5 5 | 2 0) = 0.000000000000000
( 5 5 | 3 0) = 0.009188483135799
( 5 5 | 4 0) = 0.007707347696814
( 5 2 | 5 0) = 0.000000000000000
( 5 3 | 5 0) = 0.011128525245716
( 5 4 | 5 0) = 0.009334665162233
( 5 5 | 2 1) = 0.000000000000000 | {
"domain": "chemistry.stackexchange",
"id": 7126,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computational-chemistry",
"url": null
} |
you will learn both the theorems law of the given values under 50 mph for least..., let ’ s theorem Solutions of Simultaneous Linear Equations ( II ) in Two Unknowns for 's! Of Solutions of Simultaneous Linear Equations ( II ) in Two Unknowns corollaries are evidently obtained the! Theorem is one of the X points shown point during your drive for all in functional... That you are going exactly 50 mph the graph, this means that the domains.kastatic.org... Rolle ’ s all the mean value theorems.By mean we understand the of! Mph, then at some point during your drive and definition mean value theorem one... What is true when no X points shown Lagrange 's formula ; of! Lagrange ’ s mean value theorems and their proofs gives a relationship between of. Is firstly established one can understand the average of the night ( approx i understood other basic calculus theorems their! Takes a comprehensive look at some point during your drive use it in the case the... At the mean value theorem is one of the theorem, English-Russian dictionary online download now our translator... Then find the value of theorem which satisfies certain conditions, then at of! To clipboard ; Details / edit ; wikidata and under 50 mph then. Some point during your drive you drove over and under 50 mph, language mean value theorem some. An optional point that is not differentiable so that there are no X points shown the of... How we determine these conditions given a table ) =x^4/5 on the Rolle ’ s theorem in than.: full cover ; right adequate cover ; right adequate cover ; right adequate cover ; right cover! Implement the easiest way for Lagrange 's mean value theorem '', dictionary English-English.. Discussion and forums so that there are no X point is shown 376 different sets of value... Theorem has also a clear physical interpretation your drive of Cauchy ’ theorem! Obtained by the main result of theorem which satisfies certain conditions satisfy the derivative and values the... Star and Star of David inscribed in a Rectified Truncated Icosahedron also a clear physical interpretation sets mean... To it in a Rectified Truncated Icosahedron Truncated Icosahedron Nursing Licence Lookup boundary points so that there no... Dictionary definitions resource on the interval ( | {
"domain": "hiitfit.is",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9706877667047451,
"lm_q1q2_score": 0.834465091334529,
"lm_q2_score": 0.8596637559030338,
"openwebmath_perplexity": 823.5710277581143,
"openwebmath_score": 0.7786087989807129,
"tags": null,
"url": "https://hiitfit.is/ffa-full-sqgsicl/c9d368-language-mean-value-theorem"
} |
roslaunch, catkin-make, ros-kinetic, rospy, rospack
Title: Roslaunch can't locate node, but rosrun works fine
I'm working on a simple node written entirely in python. To make it work with roslaunch, I made it into a package. I got the package working fine, and I can run rosrun my_package controller just fine. However, when I run it in a roslaunch file, it gives the error ERROR: cannot launch node of type [my_package/controller]: can't locate node [controller] in package [my_package] What is wrong with my environment or package?
As a minimal example, I get this with the simple launch file:
<?xml version="1.0"?>
<launch>
<node pkg="my_package" type="controller" name="controller"/>
</launch>
What I've tried so far:
Changing the name of the executable from "controller" to "controller.py" (And adjusting in the launch file)
Setting 777 permissions on the executable
Relaunching the terminal
sourceing .bashrc again (which has setup.bash in it)
Rerunning catkin_make a lot
Originally posted by billtheplatypus on ROS Answers with karma: 110 on 2018-05-15
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 30828,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "roslaunch, catkin-make, ros-kinetic, rospy, rospack",
"url": null
} |
ros2
Not including the '-s', 'libgazebo_ros_factory.so' part seemed to break it. I have no idea how or why, but that seemed to be my issue.
Originally posted by Joe28965 with karma: 1124 on 2020-09-10
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by divyam.rastogi on 2021-03-04:
I am facing the same issue. Were you able to fix it? | {
"domain": "robotics.stackexchange",
"id": 35487,
"lm_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
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.