text stringlengths 1 1.11k | source dict |
|---|---|
On the other hand, $\chi_{\mathbb Q}$ is not in $\mathcal B_1$, since it is discontinuous everywhere while Baire class one functions are continuous on a comeager set.
### 6 Responses to 414/514 Simple examples of Baire class one functions
1. Thanks to Stuart Nygard for suggesting the much easier argument for derivatives being $\mathcal B_1$ than the messier approach I suggested in lecture.
(Proofs of the closure of $\mathcal B_1$ under uniform limits, of the continuity fact, and of the claim about characteristic functions, will be provided in lecture.)
2. Monica says:
Sorry I am a bit confused .. Is this saying that we are setting f_n(b) = f(b) = g'(b)? So by taking it as the derivative, it approaches b but never passes it, or touches it?
• Hi Monica.
By construction, each $f_n$ is continuous. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842216454103,
"lm_q1q2_score": 0.8107757080612475,
"lm_q2_score": 0.8175744761936437,
"openwebmath_perplexity": 239.1850504518624,
"openwebmath_score": 0.9760693311691284,
"tags": null,
"url": "https://andrescaicedo.wordpress.com/2014/10/06/414514-simple-examples-of-baire-class-one-functions/"
} |
factoring
[I need this, in a practical case, to size a target array] I assume you want to know the maximum possible bits that a product of two numbers might have. Under that assumption, let the first number $a$ have $m$ bits, and the second number $b$ have $n$ bits.
Then, $$a \leq 2^{m} - 1 $$
Similarly, $$b \leq 2^{n} - 1$$
Then, the product is:
$$a \cdot b \leq 2^{m+n} - 2^m - 2^n + 1$$
Now, both $2^m$ and $2^n$ are greater than $1$ (since $n, m > 0$).
So, $$a \cdot b < 2^{m+n} - 1$$
Therefore, at most $m+n$ bits are sufficient for the product of the two numbers. Of course, lesser bits might suffice. Also, the sign bit is not included in the computation, and each of $a$, $b$, and $a \cdot b$ might have a separate sign bit.
If you really need to optimize on space, you can check $a$ and $b$ for special cases. Some cases could be: | {
"domain": "cs.stackexchange",
"id": 824,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "factoring",
"url": null
} |
quantum-field-theory, renormalization
$$
is the physical value of the inverse propagator (i.e. the 2-point vertex function evaluated at the minimum of the potential).
If we evaluate $\Gamma[\phi]$ in constant field, we obtain by definition the effective potential $\Gamma[\phi]\big|_{\phi\, {\rm cst.}}=\Omega V(\phi)$, ($\Omega$ is the (space-time) volume) and thus
$$
V(\phi)=V(\bar \phi)+\frac12
\left(\frac1\Omega\int_{x,y}\Gamma^{(2)}_{ij}(x,y)\right)(\phi_i-\bar\phi_i)(\phi_j-\bar\phi_j)+\cdots$$
which gives us
$$
\frac{\partial^2 V}{\partial \phi_i\partial\phi_j}\bigg|_{\bar\phi}=\frac1\Omega\int_{x,y}\Gamma^{(2)}_{ij}(x,y)=\Gamma^{(2)}_{ij}(p=0),
$$
which is the inverse propagator at zero momentum.
Edit : Note that functional derivation and evaluation at constant field do not commute, that is
$$
\frac{\delta^2\Gamma}{\delta\phi_i(x)\delta\phi_j(y)}\bigg|_{\phi=\varphi} \neq \frac{\partial^2}{\partial \varphi_i\partial \varphi_j}\left(\Gamma[\phi]|_{\varphi}\right),
$$
where $\varphi$ is a constant field. | {
"domain": "physics.stackexchange",
"id": 42457,
"lm_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, renormalization",
"url": null
} |
• It's a really nice theorem and you should write down your proof. Should it go into your paper on geometric analysis? I don't know, but I wouldn't see a reason why not. – darij grinberg Apr 23 '15 at 19:29
• @darij: Yes, of course we will prove it in the paper if there is no reference. It just looks too natural to be unknown. – Sergei Ivanov Apr 23 '15 at 20:14
• Notice that your lemma generalizes Hall's theorem (just declare all boys to be 1st class and all girls to be 2nd class). – darij grinberg Apr 24 '15 at 0:38
• Great question (and answer!). Have you already uploaded your article? I would be interested in seeing it! – Dominic van der Zypen Jun 23 '15 at 9:53
• @Dominic van der Zypen: Yes we have just finished it. It is on arxiv.org/abs/1506.06781 – Sergei Ivanov Jun 24 '15 at 13:54
In this answer I sketch an easy proof of your lemma and then give some references.
The easy proof uses Knaster's fixed point theorem: | {
"domain": "mathoverflow.net",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9683812327313545,
"lm_q1q2_score": 0.8172121873115343,
"lm_q2_score": 0.8438951104066295,
"openwebmath_perplexity": 472.7488374182081,
"openwebmath_score": 0.8109885454177856,
"tags": null,
"url": "https://mathoverflow.net/questions/203725/an-unfair-marriage-lemma/203742"
} |
Radix sort. Following is a simple implementation of Radix Sort. The lower bound for Comparison based sorting algorithm (Merge Sort, Heap Sort, Quick-Sort .. etc) is Ω(nLogn), i.e., they cannot do better than nLogn. We can use Bucket sort as the stable sort algorithm for performing Radix sort. Clearly, the number of pass/iteration depends on the size of the highest individual number. Sorting by next digit (10s place) gives: [*Notice that 802 again comes before 2 as 802 comes before 2 in the previous list.] Radix sort is an integer sorting algorithm that sorts data with integer keys by grouping the keys by individual digits that share the same significant position and value (place value).Radix sort uses counting sort as a subroutine to sort an array of numbers. I tried that, and for me it only gave me performance benefits if the input data is between 1024 and 4096 elements large. acknowledge that you have read and understood our, GATE CS Original Papers and Official Keys, ISRO CS | {
"domain": "a2zwebsolutions.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9372107896491796,
"lm_q1q2_score": 0.8039095196060109,
"lm_q2_score": 0.8577681013541611,
"openwebmath_perplexity": 1185.4432293064933,
"openwebmath_score": 0.27756467461586,
"tags": null,
"url": "http://a2zwebsolutions.com/ewt4yla/dca0ba-number-of-comparisons-in-radix-sort"
} |
solid-state-physics, material-science, stress-strain
If it helps, and you like caramel candy, you see the same thing as you pull on a caramel - it takes a certain level of applied strain, then the caramel starts to neck down, and continuing to pull the caramel apart takes less and less applied stress for the increase in strain. | {
"domain": "physics.stackexchange",
"id": 70660,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "solid-state-physics, material-science, stress-strain",
"url": null
} |
Taking the negative sign for the square root leads to the same equation.
Finally, for the vertical and horizontal tangents, these occur at $x=\pm a$; the horizontal tangents are $y=\pm b$. Their intersections occur at $(\pm a,\pm b)$, which lie on the circle given above. So the locus of such points is contained in the circle $x^2+y^2 = a^2+b^2$. | {
"domain": "bootmath.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9875683465856102,
"lm_q1q2_score": 0.807410673665153,
"lm_q2_score": 0.8175744761936437,
"openwebmath_perplexity": 243.15812359350682,
"openwebmath_score": 0.9079578518867493,
"tags": null,
"url": "http://bootmath.com/the-locus-of-two-perpendicular-tangents-to-a-given-ellipse.html"
} |
molecular-biology, dna, lab-techniques, dna-sequencing
HPLC purification
If you are generating your own primers and not buying the plate from PacBio it is better to get HPLC purified oligos. The idea behind using HPLC purified primers is that the oligo synthesis may produce truncated products (primers with deletions usually towards the 5' region) in little concentrations. According to IDT, each base addition has an approximate error rate of 1%. Therefore, longer products have a higher probability of deletions; the number of expected errors would be 0.01 × length of the primer. For a 46nt primer (16nt barcode + 30nt universal sequence), the percentage of deletion-free products would be ~63% (Poisson probability of no deletions). So, you can expect 27% truncated products with approximately 1.2 deletions per product†. Therefore there is some likelihood that the truncated products may mess up your barcode. However, the probability of the deletions specifically in the barcode regions would be less than this estimate.
5' NH4-C6 modification | {
"domain": "biology.stackexchange",
"id": 9552,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "molecular-biology, dna, lab-techniques, dna-sequencing",
"url": null
} |
algorithms, assignment-problem
This procedure is completed in $O(n)$.
Now, if we choose an item/toy from bin $i$, $1\le i < d$, then the second toy can only be in bin $d-i$. We can scan the bins as follows: check if bins $d-1$ and $1$ are empty. If both are not empty, then return the items stored in the two bins.
If either or both are empty, continue by checking bins $2$ and $d-2$.
This procedure can be completed in $O(d)$, and hence the entire procedure is completed in time $O(n+d)$.
If $d = o(n^{2})$, then this algorithm satisfies our requirements.
If not, we would have see how to improve it. | {
"domain": "cs.stackexchange",
"id": 4264,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, assignment-problem",
"url": null
} |
fasta, python, genbank
output_handle.close()
input_handle.close()
it results in
31 for seq_feature in seq_record.features :
32 if seq_feature.type=="CDS" :
---> 33 assert len(seq_feature.qualifiers['translation'])==1
34 output_handle.write(">%s from %s\n%s\n" % (
35 seq_feature.qualifiers['locus_tag'][0],
KeyError: 'translation'
How could this be fixed? One can get it to work by using SeqIO.InsdcIO.GenBankCdsFeatureIterator:
from Bio import SeqIO
file_name = 'NC_000913.3.gb'
# stores all the CDS entries
all_entries = []
with open(file_name, 'r') as GBFile:
GBcds = SeqIO.InsdcIO.GenBankCdsFeatureIterator(GBFile)
for cds in GBcds:
if cds.seq is not None:
cds.id = cds.name
cds.description = ''
all_entries.append(cds)
# write file
SeqIO.write(all_entries, '{}.fasta'.format(file_name[:-3]), 'fasta') | {
"domain": "bioinformatics.stackexchange",
"id": 575,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fasta, python, genbank",
"url": null
} |
Does this look familiar? If you've studied representation theory, it should. The linearized version of this fact is called Frobeius reciprocity. Let $G\textrm{-}\mathsf{Rep}$ be the category of linear representations of $G$, and then define the restriction functor $\mathrm{Res}_H^G:G\textrm{-}\mathsf{Rep}\to H\textrm{-}\mathsf{Rep}$. Frobenius reciprocity (the categorical version of it, as opposed to the more standard, decategorified, character-theoretic version of it) states that restriction has a left adjoint called induction $\mathrm{Ind}_H^G$, so $\hom_G(\mathrm{Ind}_H^GV,W)\cong\hom_H(V,\mathrm{Res}_H^GW)$ canonically for all representations $V$ of $G$ and $W$ of $H$.
An explicit construction is $\mathrm{Ind}_H^GV\cong \Bbb C[G]\otimes_{\Bbb C[H]}V$, the linearized analogue of $G\times_H\Omega$! | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765604649331,
"lm_q1q2_score": 0.8387140668780337,
"lm_q2_score": 0.8558511506439708,
"openwebmath_perplexity": 155.53451680501013,
"openwebmath_score": 0.9920793771743774,
"tags": null,
"url": "https://math.stackexchange.com/questions/1244728/left-g-sets-category"
} |
algorithms, algorithm-analysis, spanning-trees
and the incidence matrix is
$$ B=\left[\begin{array}{ccc} 1 & 1 & 0 \\ -1 & 0 & 1 \\ 0 & -1 & -1 \end{array}\right]. $$
Note that the inner product of two distinct rows of $B$ is $-1$ if the corresponding nodes are adjacent, and 0 if they are not. The inner product of a row of $B$ with itself equals the degree of the corresponding node. (Just use the definition of $B$.) This is why $L=B\cdot B^\top$.
Assuming the graph is connected, the rank of $B$ is exactly $n-1$ where $n$ is the number of nodes of the graph. It is not $n$ because if you sum all rows, you get a zero vector. It is $n-1$ because the number of independent columns of $B$ is $n-1$: if you take any subset of columns corresponding to the set of edges of any spanning tree of the graph, these columns will be independent; the only way to have a dependent set of columns is when the edges selected contain a cycle. | {
"domain": "cs.stackexchange",
"id": 15379,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, algorithm-analysis, spanning-trees",
"url": null
} |
python, classes, library, python-2.x
hero.xpToLVL = (hero.LVL * 100 + 500) - hero.XPSinceLVL
if hero.xpToLVL <= 0:
hero.LVL += 1
hero.XPSinceLVL = 0
hero.statPoints += 5
print
print 'You have gained a level! You are now level,', str(hero.LVL) + '!'
classList = ['', 'Warrior', 'Rogue', 'Healer', 'Wizard', 'Monk']
classLevels = [0, hero.WarLVL, hero.RogLVL,
hero.HeaLVL, hero.WizLVL, hero.MonLVL]
if (classLevels[hero.curClass] * 100 + 500) - (hero.APSinceLVL) <= 0:
hero.APSinceLVL = 0
classLevels[hero.curClass] += 1
print 'You have gained a class level! You are now a level', classLevels[hero.curClass], classList[hero.curClass] + '!'
print
print hero.xpToLVL, 'experience left for level', (hero.LVL + 1), 'and', int((classLevels[hero.curClass] * 100 + 500) - (hero.APSinceLVL)), 'left for', classList[hero.curClass], 'level', str(classLevels[hero.curClass]) + '.' | {
"domain": "codereview.stackexchange",
"id": 6037,
"lm_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, classes, library, python-2.x",
"url": null
} |
openni, ros-hydro, libopenni, openi-tracker, ros-groovy
Original comments
Comment by georgebrindeiro on 2013-09-19:
That's exactly what I did yesterday and it worked fine. Thanks for documenting the answer though, I had done it only on the associated github issue.
Comment by ubisum on 2013-10-22:
hi.
i'm just a kinux/ros newbie. could you tell how to do all this?
thanks.
Comment by Seanny123 on 2013-11-04:
Is there an option where I don't do that? I need my current PCL and Openni installation... Can you link to the github bug you reported?
Comment by georgebrindeiro on 2013-11-06:
Seanny123, here's the GitHub issue I reported:
https://github.com/ros-drivers/openni_camera/issues/19
(ROS Answers keeps adding a trailing tag to my link, no idea why)
Comment by georgebrindeiro on 2013-11-06:
Why do you need your current PCL/OpenNI installations, though? If your problem is unrelated, I suggest you create a new issue.
Comment by AlexR on 2015-02-04: | {
"domain": "robotics.stackexchange",
"id": 15495,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "openni, ros-hydro, libopenni, openi-tracker, ros-groovy",
"url": null
} |
parsing, regex, rust, natural-language-processing
:param s: the string to be tokenized
:type s: str
:param sep: the token separator
:type sep: str
:rtype: iter(tuple(int, int))
"""
if len(sep) == 0:
raise ValueError("Token delimiter must not be empty")
left = 0
while True:
try:
right = s.index(sep, left)
if right != 0:
yield left, right
except ValueError:
if left != len(s):
yield left, len(s)
break
left = right + len(sep)
def regexp_span_tokenize(s, regexp):
r"""
Return the offsets of the tokens in *s*, as a sequence of ``(start, end)``
tuples, by splitting the string at each successive match of *regexp*. | {
"domain": "codereview.stackexchange",
"id": 17070,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "parsing, regex, rust, natural-language-processing",
"url": null
} |
bacteriology, thermodynamics
(No assistence of microbes needed).
Bonus: Chlorophyll contains magnesium at the molecule core, which facilitates the green color. There were some creative people, who were upset, that the canned cucumbers are not green enough, so they added some copper-containing molecule during canning. It replaced magnesium and was more stable, so beautiful bright green cucumbers were on the market for a while. However, they turned out to be slightly poisonous and are not sold anymore.
Bonus 2: Most varieties of peas change color also naturally as they rippen. The seeds become yellow. The chlorophyll gets degraded in plant metabolism. The chloroplasts, i.e. the cell organelles responsible for photosynthesis change function to become storage organelles called leucoplasts.
(Edit: Ooops, I first wrote that chlorophyll supposedly contains iron. That was wrong, it is magnesium. Iron is present in a similar die called heme, which makes blood red. Probably I am getting too old :-) ) | {
"domain": "biology.stackexchange",
"id": 1735,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bacteriology, thermodynamics",
"url": null
} |
arduino, communication, usb, c++
/* or the compact way */
for (int i = 56; i >= 0; i -= 8)
result->y |= buf[cur++] << i;
return 0;
}
So far, we dealt with unsigned numbers. How would you handle signed numbers? 2's complement representation is quite ubiquitous, so one could think of sending the signed number as if it were unsigned, relying on the fact that the sender and the receiver both use 2's complement representation. If you cannot rely on this, there are a variety of things one could do. One simple way would be to use an extra byte for the sign:
size_t serialize_int32_t(int32_t data, unsigned char *buf, size_t buf_len)
{
size_t len = 0;
/* we need 5 bytes for int32_t, so buffer should have enough size */
if (buf_len < 5)
return 0;
if (data < 0)
{
buf[len++] = 1;
data = -data;
}
else
buf[len++] = 0; | {
"domain": "robotics.stackexchange",
"id": 696,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "arduino, communication, usb, c++",
"url": null
} |
special-relativity, faster-than-light
Communicating the information mechanically through the rod would definitely not beat a beam of light. As you say, if it were to propagate faster than c then it would violate causality.
Would the rotation propagate through the rod in a wave form?
Yes. It is a shear wave. Typically shear waves in a solid propagate at a speed far slower than the speed of longitudinal waves in the same material. And the speed of longitudinal waves is orders of magnitude slower than c.
This is just a thought experiment, so let's assume that the rod is made from an absolutely rigid material and there are no spring effects or other purely mechanical effects.
You cannot talk about mechanical waves without those details. They are essential to the question. | {
"domain": "physics.stackexchange",
"id": 64877,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, faster-than-light",
"url": null
} |
beginner, c, linked-list, pointers
if (!list)
{
return 0;
}
new_node = malloc(sizeof *new_node);
if (!new_node)
{
return 0;
}
new_node->datum = datum;
if (list->size == 0)
{
list->head = new_node;
list->tail = new_node;
}
else
{
new_node->next = list->head;
list->head = new_node;
}
list->size++;
return 1;
}
int singly_linked_list_push_back(singly_linked_list_t* list, int datum)
{
singly_linked_list_node_t* new_node;
if (!list)
{
return 0;
}
new_node = malloc(sizeof *new_node);
if (!new_node)
{
return 0;
}
new_node->datum = datum;
if (list->size == 0)
{
list->head = new_node;
list->tail = new_node;
}
else
{
list->tail->next = new_node;
list->tail = new_node;
}
list->size++;
return 1;
} | {
"domain": "codereview.stackexchange",
"id": 27648,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "beginner, c, linked-list, pointers",
"url": null
} |
c++, performance, c++11, collections, skip-list
While getting the max value of an unsigned type this way "works", it's kinda hacky. For clarity you should really do return std::numeric_limits<size_type>::max();.
// ------------element access
mapped_type& operator[] (const key_type& key)
{
return find(key)->second;
}
mapped_type& operator[] (key_type&& key)
{
return find(key)->second;
}
Given the stated intention of matching the mapping interface, shouldn't these functions insert the key and a value-initialized value if the find fails?
// ------------modifiers
std::pair<iterator, bool> insert(const value_type& value);
size_type erase(const key_type& key); // search for an element and erase it from the skip list
I'd say you're missing some very important overloads:
// *very* important for efficient insertions
auto insert(value_type&&) -> std::pair<iterator, bool>;
// *very* important for efficient removals
auto erase(const_iterator) -> iterator;
auto erase(iterator) -> iterator; | {
"domain": "codereview.stackexchange",
"id": 31334,
"lm_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, c++11, collections, skip-list",
"url": null
} |
whence (because this is a negatively oriented path) the Residue Theorem says
$$\oint \left(\frac{1}{1+ix} + \frac{1}{1-ix}\right)\log(1+ix) \mathrm{d}x = -2\pi i (i\log(2)) = 2\pi\log(2).$$
Because the integrand on the circle is $$o(\log(R)/R)$$ which grows vanishingly small as $$R\to\infty,$$ in the limit we obtain
$$\int_{-\infty}^\infty \frac{1}{2}\left(\frac{1}{1+ix} + \frac{1}{1-ix}\right)\log(1+ix) \mathrm{d}x = \pi\log(2).$$
The second term of the integrand is equal to the first (use the substitution $$x\to -x$$), whence $$H=2(\pi\log(2)) = 2\pi\log(2),$$ just as before. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9777138177076645,
"lm_q1q2_score": 0.8082875422376342,
"lm_q2_score": 0.8267117919359419,
"openwebmath_perplexity": 338.6085351712381,
"openwebmath_score": 0.9399994611740112,
"tags": null,
"url": "https://stats.stackexchange.com/questions/99986/entropy-of-cauchy-lorentz-distribution"
} |
In this variant, we compute the straight lines connected 2 pairs of points, and then check that the third point fits the same line.
collinear1(p1,p2,p3)
ans =
1
dbtype collinear1
1 function tf = collinear1(p1,p2,p3)
2 m = slope(p1,p2);
3 b = intercept(p1,p2);
4 tf = (m*p3(1)+b) == p3(2);
5 end
6 function m = slope(p1,p2)
7 m = (p2(2)-p1(2))/(p2(1)-p1(1));
8 end
9 function b = intercept(p1,p2)
10 m = slope(p1,p2);
11 b = -p1(2)+m*p1(1);
12 end
### Method 2 - Method 1 Modified
There's a flaw in method one in the case where the points are collinear and lie on a vertical line, i.e., where there are repeated x values. Then the denominator we calculate will have the differences of two x values that are the same, resulting in division by 0 and a non-finite slope. First, let's see what happens with the first algorithm and vertically aligned points.
q1 = [0 1];
q2 = [0 3.5];
q3 = [0 -7.2];
collinear1(q1,q2,q3)
ans =
0 | {
"domain": "mathworks.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9825575152637946,
"lm_q1q2_score": 0.8187893519123565,
"lm_q2_score": 0.8333246035907933,
"openwebmath_perplexity": 2463.922503319065,
"openwebmath_score": 0.564433217048645,
"tags": null,
"url": "http://blogs.mathworks.com/loren/2008/06/06/collinearity/"
} |
c#, design-patterns
Seems a more robust and flexible design would be a simple ICommand with decorators - here over a classic DelegateCommand base class implementing ICommand:
public class PreExecuteCommandDecorator : DelegateCommand
{
private readonly DelegateCommand _command;
private readonly Action<object> _action; | {
"domain": "codereview.stackexchange",
"id": 23078,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, design-patterns",
"url": null
} |
mobile-robot, control
On the contrary, stable system is more tolerant towards unpredictable behavior since it is in fact stable.
Am I right to think about it from this perspective? What exactly is the need for deriving the EOM of systems (a) and (b) above? What are the advantages? How does it affect the programming of such systems?
Edited:
Some examples of the climbing robot that I'm talking about: | {
"domain": "robotics.stackexchange",
"id": 857,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mobile-robot, control",
"url": null
} |
analytical-chemistry, solutions, ph, stability, dye
Title: Why don't universal indicator solutions react with themselves? Universal indicator is a pH indicator made of a solution of
water, 1-propanol, phenolphthalein, sodium hydroxide, methyl red, bromothymol blue, sodium bisulfite, and thymol blue | {
"domain": "chemistry.stackexchange",
"id": 16410,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "analytical-chemistry, solutions, ph, stability, dye",
"url": null
} |
performance, sql, sql-server, cursor
FINAL COMPLETED AND WORKING CODE (executes in 15 seconds):
SET NOCOUNT ON
GO
SET ARITHABORT ON
GO
SET ANSI_PADDING ON
GO
DECLARE @TopCount int = 5;
SELECT [DistinctTop].[PartNumber]
,[DistinctTop].[PatternCode]
,[DistinctTop].[LanguageCode]
FROM (SELECT [PartNumber]
,[PatternCode]
,[LanguageCode]
,RANK() OVER
(PARTITION BY [PatternCode] ORDER BY [PartNumber]) AS RowRank
FROM PartNumberInfo) AS [DistinctTop]
WHERE [DistinctTop].[RowRank] <= @TopCount
ORDER BY [DistinctTop].[PatternCode]; RANK()
In the past I have found that for these purposes, using RANK() is the way to go.
In all honesty, I don't know how cursors perform, in comparison.
SELECT *
FROM (
select *, RANK() OVER (PARTITION BY PatternCode ORDER BY PartNumberInfo.Foo) AS RowRank
FROM PartNumberInfo
) AS Bar
WHERE Bar.RowRank < 5 | {
"domain": "codereview.stackexchange",
"id": 6667,
"lm_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, sql, sql-server, cursor",
"url": null
} |
java, array, tic-tac-toe, simulation
System.out.println("clicked");
// these while loops will loop through the rows this one being the last row
while (counter > 0){
// before the last row we go through the second row
while (counter > 3){
// before the second row we go through the first row (first 3 colmns)
while (counter > 6){
// label which row you're in
System.out.println("Row 1");
// get a random number between one and two to assign to this box
// these numbers will stand for the X or O on the bord
r = new Random();
xAndO = r.nextInt(2)+1; | {
"domain": "codereview.stackexchange",
"id": 22635,
"lm_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, array, tic-tac-toe, simulation",
"url": null
} |
javascript, optimization, jquery, css3
if( $descendants.length > 0 ) {
queue.push( $descendants );
$(this).data( "descendants", $descendants ).addClass( "parent" );
}
// Causes item siblings to have a flattened DOM lineage.
$(this).parent().detach().appendTo( $columns ).addClass( "column" );
});
}
}
/** Hide all columns, except the first. */
function collapse() {
$(".column:gt(0)").addClass( "collapsed" );
}
})(jQuery);
$(document).ready( function() { $("div.columns").millerColumns(); });
@charset "utf-8";
/**
*
* Cascading columns styling.
*
*/
div.columns {
float: left;
width: 100%;
height: 200px;
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
background-color: #949494;
}
/* Display the lists as columns in blocks. */
ul.column {
display: inline-block;
vertical-align: top;
overflow: hidden;
margin: 0 auto;
border-right: 1px solid #666;
background-color: white;
white-space: normal; | {
"domain": "codereview.stackexchange",
"id": 11377,
"lm_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, optimization, jquery, css3",
"url": null
} |
python
def bin_to_base64(binary):
return base64.b64encode(bytes([int(binary[i * 8:8 + i * 8], 2) for i in range(len(binary) // 8)])).decode()
def ascii_to_bin(string):
return decimal_to_binary(ascii_to_decimal(string))
def bin_to_decimal(binary, length=8):
b = [binary[i * length:length + (i * length)] for i in range(len(binary) // length)]
decimal = [int(i, 2) for i in b]
# returns an list of ints
return decimal
def decimal_to_binary(decimal, length=8):
output = ''
for i in range(len(decimal)):
output += str(bin(decimal[i])[2:].zfill(length))
# returns a string
return output
def ascii_to_decimal(string):
# returns a list of ints
return [ord(i) for i in string]
def bin_to_ascii(binary):
x = bin_to_decimal(binary)
s = ''
for i in x:
s += chr(i)
# returns a string
return s | {
"domain": "codereview.stackexchange",
"id": 41124,
"lm_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
} |
terminology, group-theory, definition, representation-theory
Title: Anti-triplet representation What is the anti-triplet representation of a group?
Specifically, what is the anti-triplet representation of $SU(3)$? A mathematician will give more detailed and rigorous answer. From the physicist point of view, representation corresponds to the way the object transforms under a symmetry group $G$. Let us assign upper index to the object $a^{i}$, that transforms like a column under $G$:
$$
a^{i} \rightarrow U_j^{i} \ a^{j}
$$
This we will call the fundamental representation. For the case of $SU(N)$ the fundamental representation is a column of $N$-elements. The object with the lower index $b_i$ we will regard as transforming in antifundamental representation (it will reside in the dual vector space to the fundamental).
$$
b_i \rightarrow (U^*)_{i}^{ j} b_j
$$ | {
"domain": "physics.stackexchange",
"id": 68989,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "terminology, group-theory, definition, representation-theory",
"url": null
} |
java
Now you have all you need to create your new files.
BTW: have a look at the File javadoc... | {
"domain": "codereview.stackexchange",
"id": 2987,
"lm_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",
"url": null
} |
matlab, wavelet
Title: Reconstruction of a signal using 1D discrete wavelet There is a signal of $50\textrm{ Hz}$ and $120\textrm{ Hz}$ corrupted with noise. The sampling rate is $1000\textrm{ Hz}$. Here I used a 3-level DWT to extract this two components of the signal respectively. The figure is the power density spectrum of signal reconstructed from the detailed coefficient. My question is, why there is a unknown frequency component ($129.9\textrm{ Hz}$) in it?
clear all
Fs = 1000; % Sampling frequency
T = 1/Fs; % Sampling period
L = 1024; % Length of signal
t = (0:L-1)*T; % Time vector
S = 0.7*sin(2*pi*50*t) + sin(2*pi*120*t);
X = S + 2*randn(size(t));
plot(1000*t(1:50),X(1:50))
title('Signal Corrupted with Zero-Mean Random Noise')
xlabel('t (milliseconds)')
ylabel('X(t)')
f = Fs*(0:(L/2))/L;
h=boxcar(L);
P1=psd(X,L,Fs,h);
plot(f,P1)
title('Single-Sided Amplitude Spectrum of X(t)')
xlabel('f (Hz)')
ylabel('|P1(f)|')
ylim([0 300]) | {
"domain": "dsp.stackexchange",
"id": 4425,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "matlab, wavelet",
"url": null
} |
molecular-biology, cell-biology, proteins, cell-membrane
Title: What is meant by "opposing plasma membrane" with respect to cell adhesion molecules? I am reading the Handbook of Neurochemistry and Molecular Neurobiology and I am learning about cell adhesion molecules (CAMs) and I have come across the following:
CAMs are involved in homo‐ or heterophilic interactions with molecules
positioned on opposing plasma membranes, and such interactions are
referred to as trans‐interactions. In addition, CAMs are often
involved in homo‐ or heterophilic interactions with other
membrane‐associated molecules positioned in the same plasma membrane.
Such membrane‐lateral interactions are referred to as
cis‐interactions. | {
"domain": "biology.stackexchange",
"id": 11236,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "molecular-biology, cell-biology, proteins, cell-membrane",
"url": null
} |
quantum-field-theory, topological-field-theory, wilson-loop
References:
[I] "Generalized Global Symmetries" by Gaitto et al (https://arxiv.org/abs/1412.5148 [page 14]).
[II] "Non-Invertible Global Symmetries and Completeness of the Spectrum" by Ben Heidenreich et al. (https://arxiv.org/abs/2104.07036 [page 16]) Fact of life: In $d$ a dimensions, a $p$-dimensional closed manifold can link with a $q$ dimensional closed manifold if $p+q+1=d$. (cf. wiki: linking number) $\newcommand{\S}{\mathbb{S}}\newcommand{\R}{\mathbb{R}}$
This fact of life implies that $\S^1$ can link with a closed $(d-2)$-dimensional closed manifold, such as $\S^{d-2}$. | {
"domain": "physics.stackexchange",
"id": 90689,
"lm_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, topological-field-theory, wilson-loop",
"url": null
} |
ros, tutorial, build
CMake Error at ros_tutorials/rospy_tutorials/CMakeLists.txt:112 (add_rostest):
Unknown CMake command "add_rostest".
-- Configuring incomplete, errors occurred!
See also "/home/pra-dan/ros/overlay_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/pra-dan/ros/overlay_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
What's wrong here ?
Originally posted by pra-dan on ROS Answers with karma: 3 on 2020-10-28
Post score: 0
try
sudo apt install ros-noetic-rostest
or replace noetic with whatever version you use.
Originally posted by bob-ROS with karma: 525 on 2020-10-28
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by pra-dan on 2020-10-28:
It worked. Thanks | {
"domain": "robotics.stackexchange",
"id": 35682,
"lm_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, tutorial, build",
"url": null
} |
quantum-field-theory, special-relativity, statistical-mechanics, unruh-effect
Title: Does the Unruh effect really describe a thermal bath? If we consider a free (massless scalar) field $\phi$ in Minkowski space and look at it in Rindler coordinates (which correspond to what an accelerated observer sees), we find that the action of the field can be described by another free field $\tilde\phi$ related to the former one by a Bogolyubov transform.
The Unruh effect then says that the vacuum state of $\phi$ contains particles of the field $\tilde \phi$. Specifically
$$<0_M| b^\dagger_kb^{\mathstrut}_k|0_M> = (\exp(2\pi \Omega_k/a)+1)^{-1}$$
Where $b^\dagger_k$ are the ladder operators of the free field $\tilde \phi$, $\Omega_k = |k|$, and $a$ is the acceleration described by the Rindler coordinates. Since this expression is the same as the expectation value of the particle number for a thermal bath of temperature $T=a/2\pi$, the conclusion seems to be that an accelerated observer sees the Minkowski vacuum as a thermal state. | {
"domain": "physics.stackexchange",
"id": 22827,
"lm_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, special-relativity, statistical-mechanics, unruh-effect",
"url": null
} |
homework-and-exercises, electromagnetism, magnetic-fields, electric-circuits, electric-current
In C the radial link might as well not be there. The loops are independent and will both have clockwise currents induced in them. So C is wrong.
I hope that a few more stack exchangers will take an interest in this question. | {
"domain": "physics.stackexchange",
"id": 58745,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electromagnetism, magnetic-fields, electric-circuits, electric-current",
"url": null
} |
when the input is a single unity-valued sample (an impulse) preceded and followed by zero-valued samples. signal into its frequency component, to demodulate the signal which was modulated at the transmitter side, to convert digital signals into analog signals and to limit the bandwidth of a signal. To plot the step response, type. (code) Read Analog from Arduino into Matlab. The duration of simulation is determined automatically to display the transient behavior of the response. The file contains 62 page(s) and is free to view, download or print. To specify a frequency vector that ranges from zero to your sampling frequency, include both the frequency vector and the sampling frequency value in the parameter list. Gowthami Swarna. MATLAB provides the capabilities to create analysis routines, %% Convert the 16-Port to 4-Port S-Parameters %% Calculate the Frequency Response. Now I have an input signal that is 3 seconds long at 48k samples/second. Desired length of the baseband-equivalent | {
"domain": "agenziafunebretassoni.it",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9539660949832346,
"lm_q1q2_score": 0.8108436814776405,
"lm_q2_score": 0.8499711737573762,
"openwebmath_perplexity": 1101.8294530208088,
"openwebmath_score": 0.6673231720924377,
"tags": null,
"url": "http://txck.agenziafunebretassoni.it/convert-impulse-response-to-frequency-response-matlab.html"
} |
python, python-3.x, matrix, formatting, latex
Class
Maybe a class is not the right tool here. A possible alternative would be to move what's done in __init__ into a "private" (read name starts with _) helper function and get rid of the class. | {
"domain": "codereview.stackexchange",
"id": 36246,
"lm_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, matrix, formatting, latex",
"url": null
} |
newtonian-mechanics, electrostatics, work, potential-energy
Instead, what is really happening is that, for every kind of PE that a specific form can be defined, we would select their contributions out from the WET and choose to consider them separately. Then, we would consider changes in the total energy as the new definition of work. | {
"domain": "physics.stackexchange",
"id": 97232,
"lm_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, electrostatics, work, potential-energy",
"url": null
} |
After showing the audience how the trick works, I’ll then ask an audience member to come forward and repeat the trick that I just performed. Then I’ll move on to the final act of my routine, which I’ll present in tomorrow’s post.
My Mathematical Magic Show: Part 5a
Last March, on Pi Day (March 14, 2015), I put together a mathematical magic show for the Pi Day festivities at our local library, compiling various tricks that I teach to our future secondary teachers. I was expecting an audience of junior-high and high school students but ended up with an audience of elementary school students (and their parents). Still, I thought that this might be of general interest, and so I’ll present these tricks as well as the explanations for these tricks in this series. From start to finish, this mathematical magic show took me about 50-55 minutes to complete. None of the tricks in this routine are original to me; I learned each of these tricks from somebody else. | {
"domain": "meangreenmath.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9881308772060158,
"lm_q1q2_score": 0.800859241766462,
"lm_q2_score": 0.8104789155369047,
"openwebmath_perplexity": 561.9858966346235,
"openwebmath_score": 0.6907413005828857,
"tags": null,
"url": "https://meangreenmath.com/tag/magic-trick/page/2/"
} |
homework-and-exercises, renewable-energy
Title: Solar Thermal/Solar Photo-voltaic calculations This is my final high school assignment. I'm asked to prepare a research document on Solar Thermal and Solar Photo-voltaic, to prove that these two are feasible alternative power sources to power the country (Australia) in 10 years time. To simplify it, I'm only doing a small region in Australia, which in this case is Alice Springs.
I'm looking to show some basic calculations that can help with my thesis. This is the part where I need help with, so what should my calculations be about?
What are the necessary equations for this kind of topic?
I need some help on where to start my research into the calculations. This will be a simplified guide, as this is high-school level (I'm assuming that means ages ~ 12-16). | {
"domain": "physics.stackexchange",
"id": 5103,
"lm_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, renewable-energy",
"url": null
} |
java, performance, functional-programming, homework, hangman
Title: Hangman game background image possibly inefficient I'm making a Hangman game and it seems that my code doesn't provide me much freedom with using layouts. I added an image to my JFrame then I added a JPanel to my image which I'm using for all the JLabels and JTextFields but it seems to me that it's inefficient because in order to change the layout of my JTextFields or JLabels I have to change the layout of my image which messes up the entire looks of the game.
How can I make this code more efficient and give myself more freedom to change the layouts of my JLabels and JTextFields without messing everything up?
/*PACKAGE DECLARATION*/
package Game;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
/************************
* GAME MECHANICS CLASS *
* **********************/
public class GameStructure { | {
"domain": "codereview.stackexchange",
"id": 5427,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, performance, functional-programming, homework, hangman",
"url": null
} |
• @achillehui...you are right..i had tottaly forgotten the two relations with limsup and liminf you mention..how can we overcome hte possibilty that the sequence is unbounded without finding an explicit formula? Dec 28 '17 at 12:48
• The map $x \mapsto 1 + \frac{2}{x}$ send $(0,\infty)$ to $(1,\infty)$, the next iteration send it to $(1,3)$. If you start from any $a_1 \in (0,\infty)$, you have $a_n \in (1,3)$ for all $n > 2$. Dec 28 '17 at 12:52 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987946220128863,
"lm_q1q2_score": 0.8397258139639752,
"lm_q2_score": 0.8499711794579722,
"openwebmath_perplexity": 184.0808531461026,
"openwebmath_score": 0.9705471992492676,
"tags": null,
"url": "https://math.stackexchange.com/questions/2582895/finding-the-limit-of-a-recursive-sequence"
} |
quantum-mechanics, wavefunction, schroedinger-equation, fourier-transform, superposition
Title: Confusion about superposition of bound and scattering states in QM My understanding is that bound states are solutions to the Schrodinger equation where $\lim_{x\to\pm\infty} V(x)=0$ and $\min V(x)\leq E \leq 0$, in which case there are discrete allowed energies. In the scattering case, $E\geq 0$ and there are no limitations on allowed energies.
So let's say you have an arbitrary wavefunction in such a potential. Logically, it would be
$\Psi(x)=\sum_{bounded} C_n\psi_{n}+\int_{k_0}^{\infty} dk e^{ikx}\phi(k)$
where $k_0$ is the first $k$ such that $E\geq0$ and $\phi(k)$ is the fourier transform of $\Psi(x)$. | {
"domain": "physics.stackexchange",
"id": 91859,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, wavefunction, schroedinger-equation, fourier-transform, superposition",
"url": null
} |
general-relativity, gravity, black-holes
Would the gravitational field allow me to track the mass on its journey from the event horizon to the singularity? Would this allow me to observe what is going on inside the black hole?
To clarify: At some point in time there are two distinct gravitational fields, one for the approaching object and one for the singularity. At a later time there is just the gravitational field for the singularity. It is the nature of the transition in the gravitational field that I am specifically interested in. This problem can be (and has been) studied numerical. One can simulate the gravitational field of a small massive object dropping radially into a (much larger) Schwarzschild black hole. This was done, for example, in arXiv:1012.2028 by Mitsou. (This is simply the first one I found, there are more, and probably much earlier.) | {
"domain": "physics.stackexchange",
"id": 61692,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, gravity, black-holes",
"url": null
} |
computational-physics, fourier-transform, data-analysis, laplace-transform
Title: Difference between Fourier and Laplace transforms in analyzing data I have a set of displacement-time graphs from an experiment to convert to the frequency domain. Both the Fourier and Laplace transform seem to do this, so what's the difference between them (difference in end result, not the mathematical difference) Also, is there even a way to perform a Laplace transform and output a graph? The Fourier transform will better represent your data if there are oscillations in the displacement- time graphs and you want the period of those oscillations. The Laplace transform will better represent your data if it is made up of decaying exponentials and you want to know decay rates and other transient behaviors of your response. | {
"domain": "physics.stackexchange",
"id": 45011,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computational-physics, fourier-transform, data-analysis, laplace-transform",
"url": null
} |
special-relativity, group-representations, conventions, poincare-symmetry
Title: Notation for Translation Group Generators The generators of the translation group $T(4)$ are given below:
$P_0 \equiv -i \begin{pmatrix}
0 & 0 & 0 & 0 & 1 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0
\end{pmatrix};$
$P_1 \equiv -i \begin{pmatrix}
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0
\end{pmatrix};$
$P_2 \equiv -i \begin{pmatrix}
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0
\end{pmatrix};$
$P_3 \equiv -i \begin{pmatrix}
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 \\
0 & 0 & 0 & 0 & 0
\end{pmatrix};$
with $P_\mu = g_{\mu\nu}P^\nu$ with metric sign convention: $(+,-,-,-)$. | {
"domain": "physics.stackexchange",
"id": 15334,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, group-representations, conventions, poincare-symmetry",
"url": null
} |
30-60-90 triangle. To convert the number from negative to positive the minus operator (-) can be used. It will perform addition, subtraction, multiplication, division, raising to power, and also will find the polar form, conjugate, modulus and inverse of the complex number. We use $$\theta$$ to indicate the angle of direction … Enter real numbers for x. You can assign a value to a complex number in one of the following ways: 1. For calculating modulus of the complex number following z=3+i, enter complex_modulus(3+i) or directly 3+i, if the complex_modulus button already appears, the result 2 is returned. The equation for absolute value is given as. For this problem, the distance from the point 8 + 6i to the origin is 10 units. Solve an absolute value equation using the following steps: Get the absolve value expression by itself. Polar form of complex numbers. The absolute value of a complex number corresponds to the length of the vector. Some complex numbers have absolute value 1. | {
"domain": "co.za",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9825575142422757,
"lm_q1q2_score": 0.8144800611915987,
"lm_q2_score": 0.8289388146603365,
"openwebmath_perplexity": 712.5041068294182,
"openwebmath_score": 0.7335454225540161,
"tags": null,
"url": "http://analyticalsolutions.co.za/sx445b3a/absolute-value-of-complex-numbers-calculator-7fb181"
} |
a circular curve, cross section mn and pq remain plane and normal to longitudinal lines (plane remains plane can be established by experimental result). Show that maximum shear stress in a beam of rectangular section is 1. We will now consider the distribution of shear stresses, τ, associated with the shear force, V. (a) Determine the maximum shear stress in the rectangular cross section. Pure Torsion of Homogeneous Sections A review of shear stress under torsion alone and of torsional stiffness seems a desirable beginning prior to considering structural shapes in locations where the warping of the cross-section is restrained. 6T 7"= (Dj + dt)(D I - dO 2 5. Where Is The Maximum Shear Stress On A Circular Cross. Therefore the bar is said to be subject to direct stress. member of non-circular cross section, equilibrium of the element AB requires FA=FB t At A∆x =t bt b∆y (by using shear equivalent) q=τt=constant shear flow Analogy: (1) the distribution of shear stress τ in the transverse | {
"domain": "laquintacolonna.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9865717452580315,
"lm_q1q2_score": 0.8133908373489247,
"lm_q2_score": 0.8244619220634456,
"openwebmath_perplexity": 1143.035002803819,
"openwebmath_score": 0.7363621592521667,
"tags": null,
"url": "http://laquintacolonna.it/iafe/maximum-shear-stress-formula-for-circular-cross-section.html"
} |
catkin-make
[ 86%] Built target chomp
[ 86%] Built target common_representation_interface
[ 87%] Built target sampling_planners
[ 89%] Built target curvature_constrained_state_spaces
[ 91%] Built target speed_profile
[ 92%] Built target sbpl_common
[ 92%] Built target yagsbpl_ompl
Linking CXX executable /home/alex/planner_examples_ws/devel/lib/curvature_constrained_state_spaces/curvature_constrained_state_spaces_example_bvp_solver
Linking CXX executable /home/alex/planner_examples_ws/devel/lib/curvature_constrained_state_spaces/curvature_constrained_state_spaces_example_clothoid_path
Linking CXX executable /home/alex/planner_examples_ws/devel/lib/curvature_constrained_state_spaces/curvature_constrained_state_spaces_example_distance
Linking CXX executable /home/alex/planner_examples_ws/devel/lib/curvature_constrained_state_spaces/curvature_constrained_state_spaces_example_dubins_feasible_path_generator | {
"domain": "robotics.stackexchange",
"id": 26246,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "catkin-make",
"url": null
} |
quantum-mechanics, operators, hilbert-space, quantum-optics, linear-algebra
First, it may be helpful to recognize that your Hamiltonian can be written in terms of a position operator $\hat X$ as:
$$
\hat H = \alpha + \beta\hat X + \gamma \hat X^2\;,
$$
since
$$
\hat X \propto \hat a + \hat a^\dagger\;.
$$
Therefore, your Hamiltonian is like a shifted simple harmonic oscillator, but with no kinetic term.
You can shift the creation operators like:
$$
\hat b = \hat a + \delta\;,
$$
where $\delta$ is a number (not an operator), and where the shift can be chosen to put the Hamiltonian into the form:
$$
\hat H = \epsilon + \zeta (\hat b^\dagger + b)^2
$$
$$
=\epsilon + \eta {\hat Y}^2\;,
$$
where
$$
\hat Y \propto (\hat b + \hat b^\dagger)
$$
where $\epsilon$ and $\zeta$ are numbers.
Therefore, eigenstates of the Hamiltonian are eigenstates of the $\hat Y$ operator, which can be written in the form:
$$
\left|y\right>\propto e^{\sqrt{2}~yb^\dagger-(b^\dagger)^2/2}\left|0\right>\;.
$$
and where:
$$
\hat H |y\rangle = |y\rangle(\epsilon + \eta y^2)\;.
$$ | {
"domain": "physics.stackexchange",
"id": 93949,
"lm_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, hilbert-space, quantum-optics, linear-algebra",
"url": null
} |
black-hole, accretion-discs
This is only significant closer to the black hole, at $r\lesssim 100M$. At larger radii, the disk shape is due to the direction of the angular momentum of the matter instead.
[1] Black Holes: The Membrane Paradigm, ed. by Kip S. Thorne, Richard H. Price, and Douglas A. Macdonald. | {
"domain": "astronomy.stackexchange",
"id": 656,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "black-hole, accretion-discs",
"url": null
} |
Poisson solvers and finite elements in two dimensions. Poisson’s Equation in 2D Analytic Solutions A Finite Difference A Linear System of Direct Solution of the LSE Classification of PDE Page 3 of 16 Introduction to Scientific Computing Poisson’s Equation in 2D Michael Bader 2. The book NUMERICAL RECIPIES IN C, 2ND EDITION (by PRESS, TEUKOLSKY, VETTERLING & FLANNERY) presents a recipe for solving a discretization of 2D Poisson equation numerically by Fourier transform ("rapid solver"). a second order hyperbolic equation, the wave equation. The computational region is a rectangle, with Dirichlet boundary conditions applied along the boundary, and the Poisson equation applied inside. 2 Solution of Laplace and Poisson equation Ref: Guenther & Lee, §5. Figure 65: Solution of Poisson's equation in two dimensions with simple Neumann boundary conditions in the -direction. In the case of one-dimensional equations this steady state equation is a second order ordinary differential equation. 2D | {
"domain": "marcodoriaxgenova.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9923043544146898,
"lm_q1q2_score": 0.8673506481763438,
"lm_q2_score": 0.8740772368049822,
"openwebmath_perplexity": 682.703101573481,
"openwebmath_score": 0.7900996208190918,
"tags": null,
"url": "http://marcodoriaxgenova.it/jytu/2d-poisson-equation.html"
} |
general-relativity, gravity, black-holes
So I attempted to integrate like this
$$ \int_{0}^{\phi}d\phi = \int_{p(0)}^{p(r)} \frac{-1}{\rho + p} dp$$
$$ e^\phi = \frac{3(1-2M/R)^{1/2} - (1-2Mr^2/R^3)^{1/2}}{3(1-2M/R)^{1/2}-1}.$$
This does not match the correct answer. I believe am missing an integration constant somewhere. You can not integrate the equations like this. Pressure is not constant and when you tried to change the variables in $$(\rho + P(r))\frac{d \phi}{d r}=-\frac{d P}{d r} \tag{1}$$ form $r$ to $\phi$ you ignored that fact. In $\phi$ it would look like $$(\rho + P(r(\phi))=-\frac{d P}{d \phi},$$
which does not lead anywhere nice because we have no clue how $r(\phi)$ or $P(\phi)$ look like.
What you need to do is integrate (1) in $r\equiv \tilde r$:
$$\frac{d \phi}{d \tilde r}=-\frac{1}{(\rho + P(\tilde r))}\frac{d P}{d \tilde r} \tag{2}.$$ | {
"domain": "physics.stackexchange",
"id": 58635,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, gravity, black-holes",
"url": null
} |
A bijection of a function is all actual output values f is one to one and onto,... And have both conditions to be true surjective function properties and have both to... F is one to one, since f is invertible/bijective f⁻¹ is,! The definition only tells us a bijective function has an inverse function function occurs when f is,... A is unique, so f 1: B! a as follows it turns out that is. So far: bijective = 1-1 and onto Solution to start: since f is bijective, by showing is... There exists a 2A such that f is bijective and finding the inverse map of an isomorphism again... Bijective function has an inverse function be true output, namely 4 we fill -2! That it is ) give the same output, namely 4 to start since! Injective as well as surjective function properties and have both conditions to be is the inverse of a bijective function bijective since. Has an inverse function well-de ned a Piecewise function is all possible output values a such! Has an inverse function 1-1 and onto an | {
"domain": "livefreechallenge.org",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9399133531922388,
"lm_q1q2_score": 0.8132356768838448,
"lm_q2_score": 0.865224091265267,
"openwebmath_perplexity": 601.4878680362862,
"openwebmath_score": 0.9078974723815918,
"tags": null,
"url": "http://livefreechallenge.org/grfu8o0/is-the-inverse-of-a-bijective-function-bijective-7f506b"
} |
$$\frac{|f(x)-T_n(x)|}{|\sin(x)|} \leq \frac{|x|^{n+1}}{(n+1)! |\sin(x)|}$$
which is very awkwardly behaved near the zeroes of $\sin$ except for $0$. You can avoid the difficulty by restricting attention to the domain $[-\pi/2,\pi/2]$ and using periodicity to extract values elsewhere.
In the case of $\sin$ and also $\cos$, you can get a slightly better estimate than this one by using the alternating series error estimate, which says that if you have a sequence of positive numbers $a_n$ decreasing to zero, then $\left | \sum_{n=N}^\infty (-1)^n a_n \right | \leq a_N$. For $f=\sin$ you can use this to show that given an odd number $k$:
$$|f(x)-T_k(x)| \leq \frac{|x|^{k+2}}{(k+2)!}$$
provided $|x|<k+2$.
• Thanks, this helped me out. Now I know what to look for anyway. :) – Nick_2440 Oct 9 '17 at 18:36
The power series for $\sin(x)$ and $\cos(x)$ for positive $x$ are enveloping. This means that the sum is between any two consecutive partial sums. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9653811631528336,
"lm_q1q2_score": 0.8186120971898254,
"lm_q2_score": 0.8479677545357568,
"openwebmath_perplexity": 152.80571901256528,
"openwebmath_score": 0.9395543336868286,
"tags": null,
"url": "https://math.stackexchange.com/questions/2464759/error-bounds-of-taylor-expansion-for-sine"
} |
java, game, swing, tetris
private final Map<String, Color> colors = Map.ofEntries(
entry(I, Color.cyan),
entry(O, Color.yellow),
entry(J, Color.blue),
entry(L, Color.orange),
entry(T, Color.magenta),
entry(S, Color.green),
entry(Z, Color.red)
);
The fact that colors and shapes have the same cardinality suggests that there's a class there that you need to capture, having members for points and color.
The expression grid.get(y)[x] needs to go into a variable for reuse.
Don't new Integer(1); just write 1.
This predicate:
if (x + p.x == -1 || x + p.x == X || y + p.y >= Y || (y + p.y > -1 && grid.get(y + p.y)[x + p.x] != null)) {
should be line-separated:
if (x + p.x == -1
|| x + p.x == X
|| y + p.y >= Y
|| (y + p.y > -1 && grid.get(y + p.y)[x + p.x] != null)
) { | {
"domain": "codereview.stackexchange",
"id": 43439,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, game, swing, tetris",
"url": null
} |
ros, service
Originally posted by Kevin1719 on ROS Answers with karma: 58 on 2022-02-16
Post score: 0
In my service server, where I find available stations, I called another service to assign goal destination to robots, so when the 'station' service is called, it calls the 'assign' service and then return to receive the queued request, at this time, the previous 'assign' service doesn't finish yet, so it will not return the goal as a 'busy' station, that's why I have the conflict.
In order to do this, I added a element called 'success' in my 'goal' service, so that if this service is done, 'success' is set to True, and the 'station' service will have to wait for this condition to happens to returns a response.
Originally posted by Kevin1719 with karma: 58 on 2022-02-17
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 37449,
"lm_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, service",
"url": null
} |
haskell, programming-challenge
parseInt :: String -> Int
parseInt = read
Theses functions are useless. It's useful when you're writing the code and it's not done yet, but Haskell can actually deduce the types based on what the other functions parameters type, like getLoafDimensions need an int, so readLn must return an int, otherwise it wouldn't compile
Your tuplefy function can be simplified by removing the case of, which is basically the same as this form of pattern matching
tuplefy :: [a] -> (a, a)
tuplefy [a, b] = (a, b)
tuplefy _ = error "each line of input must consist of 2 integer values."
By the way, the error message is wrong, because that function can accept a list of any type
Both readLn and getLine are defined in the prelude, so you don't need to import them, so you don't need to import System.IO | {
"domain": "codereview.stackexchange",
"id": 15118,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "haskell, programming-challenge",
"url": null
} |
quantum-mechanics, quantum-spin, pauli-exclusion-principle
The wave function may look as if the electrons have opposite spin, but actually the spins are the same if measured at an axis 90° from z.
EDIT:
The spin eigenvectors
of different axes are not independent from each other.
$$
\begin{align}
\left|\strut\uparrow\right\rangle &= \frac{1}{\sqrt 2}\left(\left|\strut x_+\right\rangle + \left|\strut x_-\right\rangle \right)\\
\left|\strut\downarrow\right\rangle &= \frac{1}{\sqrt 2}\left(\left|\strut x_+\right\rangle - \left|\strut x_-\right\rangle \right)
\end{align}
$$
Substitute that into your definition of $\left|\strut\psi\right\rangle$ and you will get
$$
\begin{align} | {
"domain": "physics.stackexchange",
"id": 36640,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, quantum-spin, pauli-exclusion-principle",
"url": null
} |
aerospace-engineering
The Concorde's Russia counterpart, the Tupolev Tu-144, had the same issue.
These are the only two supersonic airliners to have been built, so there is, admittedly, a small sample size. The Tu-144 has also been derisively called "the Concordski", as some claim that its designers stole plans from the Concorde. So there are clear similarities.
However, there are some supersonic airliners on the drawing board. Will they, too, have high angles of attack when landing? As a follow-up question: Will they, too, be fitted with droop noses? The basic problem is that a wing that works well in supersonic flight does not work well in low speed flight. The principles of how higher pressure is created below the wing relative to above the wing is quite different between the two flight regimes. Aircraft intended for supersonic cruise have to have wings that work well in supersonic flight. However, these aircraft have to eventually land, which will be done at well below supersonic speed. | {
"domain": "engineering.stackexchange",
"id": 165,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "aerospace-engineering",
"url": null
} |
(I see that Xander Henderson commented to this effect while I was typing.)
• Jinx! It seems we had the same thought at the same time. ;) – Xander Henderson Sep 5 '17 at 16:39 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.978051749483894,
"lm_q1q2_score": 0.8085669227734242,
"lm_q2_score": 0.8267118004748677,
"openwebmath_perplexity": 132.06239181738894,
"openwebmath_score": 0.879890501499176,
"tags": null,
"url": "https://math.stackexchange.com/questions/2417889/measurable-set-can-be-written-as-countable-union-of-measurable-sets"
} |
java, mergesort, rags-to-riches
@Override
public int compare(ByteBuffer bufferOne, ByteBuffer bufferTwo) {
return getString(bufferOne).compareTo(getString(bufferTwo));
}
}
private static final FixedRecordSortFile.RecordParser STRINGPARSER = new StringParser();
private static final FixedRecordSortFile.RecordParser INTPARSER = new IntParser();
private static final void buildIntFile(final Path path, final long count) {
Random r = new Random();
try (DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(Files.newOutputStream(path)))) {
for (long i = 0; i < count; i++) {
dos.writeInt(r.nextInt());
}
} catch (IOException e) {
e.printStackTrace();
}
} | {
"domain": "codereview.stackexchange",
"id": 9391,
"lm_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, mergesort, rags-to-riches",
"url": null
} |
c++
Use the appropriate smart pointer type
The code, as written, abuses std::shared_ptr because no two objects should ever actually share the same Expression. For that reason, what you really should use instead is std::unique_ptr, but that makes things a bit more complex. In particular, we can no longer freely make copies (or they wouldn't be unique!) so we must use C++ move semantics. It's all perhaps a bit much for a beginner, but here's how one would rewrite the relevant portions of the class declaration.
std::unique_ptr<Expression> left;
std::unique_ptr<Expression> right;
Expression(std::string symbol, std::unique_ptr<Expression> &&left, std::unique_ptr<Expression> &&right); | {
"domain": "codereview.stackexchange",
"id": 40453,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++",
"url": null
} |
vacuum, space
Title: What is in space? I was recently on a chat server having a random discussion about science stuff and someone I was talking to then made the comment that "space is not a complete vacuum and it's full of plasma / matter".
That got me thinking ... ok so I don't expect that the bulk of space is totally empty but if I took a "cube volume of the space outside the ISS" (or further out for scientific accuracy) ... do we know what would be observed inside that cube in terms of "real particles" from the standard model?
I'm thinking that there would be some amount of photons (light) and possibly some other stuff, by the other guys claim of "plasma being everywhere" raised some weirdness in my head I couldn't resolve.
He followed that up with "we live in an electric universe".
Does anyone have a professional / academic viewpoint on this (i'm no physics grad though so go easy on me)?
EDIT: | {
"domain": "physics.stackexchange",
"id": 53426,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vacuum, space",
"url": null
} |
fourier-transform, power-spectral-density
Title: Keeping track of units for spectral energy of discrete signals The energy of a continuous signal $x(t)$ recorded between $t=0$ and $t=T$ (namely $x(t \notin [0, T]) = 0$) is defined as
$$E = \int_0^T |x(t)|^2\, dt.$$
In most signal processing texts I met, the formula for the energy of the same signal sampled at $N$ regular steps separated by $\Delta t$ is given as
$$E_N = \sum_{n=0}^{N-1} |x_n|^2,$$
which implies an implicit normalisation of the signal.
As I would like to keep track of the physical units, I am inclined to use
$$E_N = \sum_{n=0}^{N-1} |x_n|^2 \Delta t.$$
Now, Parseval's identity gives, in the continuous case,
$$E = \int_0^T |x(t)|^2\, dt = \int_{-\infty}^\infty |\hat{x}(f)|^2\, df,$$
where $\hat{x}$ is the Fourier transform of $x$.
This leads to define the /energy density/ as
$$e(f) = |\hat{x}(t)|^2.$$
I would translate this in the discrete case as
$$E_N = \sum_{n=0}^{N-1} |x_n|^2 \Delta t = \Delta t^2 \sum_{k=0}^{N-1} a_k^2 \Delta f,$$ | {
"domain": "dsp.stackexchange",
"id": 3484,
"lm_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, power-spectral-density",
"url": null
} |
java, algorithm, interview-questions, rags-to-riches
new int[]{36, 6, 43, 42, 17, 49, 2, 37, 10, 16, 19, 38, 25, 40, 40, 18, 19, 32, 7, 37, 13, 25, 41, 43},
new int[]{47, 39, 34, 16, 10, 19, 13, 33, 16, 2, 15, 38, 34, 24, 43, 44, 5, 13, 5, 0, 37, 5, 44, 9, 38},
new int[]{18, 29, 31, 36, 2, 48, 43, 41, 37, 36, 46, 7, 3, 21, 36, 9, 44, 7, 6, 11, 38, 42, 13, 9, 18, 24},
new int[]{7, 41, 6, 10, 29, 6, 12, 7, 32, 23, 27, 30, 2, 6, 14, 15, 26, 46, 30, 45, 41, 18, 31, 2, 16, 29, 44},
new int[]{15, 38, 2, 42, 2, 45, 2, 37, 42, 45, 15, 21, 32, 0, 48, 29, 5, 26, 17, 46, 42, 10, 43, 27, 47, 43, 28, 33},
new int[]{18, 41, 10, 42, 20, 31, 37, 38, 8, 44, 8, 17, 13, 0, 49, 48, 43, 45, 24, 25, 47, 38, 34, 3, 4, 19, 11, 8, 36},
new int[]{9, 29, 41, 4, 0, 4, 38, 41, 35, 44, 48, 2, 1, 21, 2, 30, 28, 10, 18, 47, 7, 14, 41, 38, 25, 31, 17, 9, 9, 8}, | {
"domain": "codereview.stackexchange",
"id": 10140,
"lm_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, interview-questions, rags-to-riches",
"url": null
} |
c++, beginner
}
else if (answerType == 'n')
{
cout << "Your total is " << total << endl;
}
cout << "Thank you for visiting Junelle's Cafe" << endl;
while (1);
return 0;
} Don't. Repeat. Yourself.
That's an essential principle. You repeat the "do you want XY" cycle over and over manually. That's not only error prone, but also hard to maintain. For example, let's say you want to ask the customer how many items they want. Then you would have to add or change your input handling for every single item.
Maybe you want to use
15 bagels
200 coffee
1 water
1 donut | {
"domain": "codereview.stackexchange",
"id": 29360,
"lm_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++, beginner",
"url": null
} |
power-spectral-density, signal-power, software-defined-radio, measurement
Title: What a SDR can (and cannot) tell about a received signal's power/energy I'm rather new to SDR and I'm still wrapping my head around understanding how it functions. I greatly appreciate it if you guys can help me understand what's going on.
From what I've gathered, an SDR is not an instrument capable of measuring a signal's power/energy and it needs some specific calibration to correctly measure power/energy. Is that true? If that's the case, what exactly am I seeing when I display the signal in a spectrum analyzer (in terms of amplitude)? I can see the signal apart from the noise, so there's an SNR (which never seems to make sense). How did the SDR produce a signal SNR exactly? And if there are 2 signals with 2 different receiving power, would the ratio between the 2 SNRs be correct or not? Will I get the correct power spectrum density with an SDR if I use DFT?
Again, I'm new so I might get everything wrong, so please feel free to correct me. Thank you so much for your time. | {
"domain": "dsp.stackexchange",
"id": 11202,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "power-spectral-density, signal-power, software-defined-radio, measurement",
"url": null
} |
ros
But this latest nodelet gives me back the following errors:
[ WARN] [1349944791.310821026]: [image_transport] Topics '/image_rect' and '/camera_info' do not appear to be synchronized. In the last 10s:
Image messages received: 288
CameraInfo messages received: 0
Synchronized pairs: 0 | {
"domain": "robotics.stackexchange",
"id": 11294,
"lm_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
} |
organic-chemistry, physical-chemistry, acid-base, ph
Followings are some other insights to drastic changes in $\mathrm{p}K_\mathrm{a}$ values of some concerned organic acids. According to the Ref.1, it seems the value of apperent $\mathrm{p}K_\mathrm{a}$ of an organic acid in DMSO is depended in so many conditions such as cation of the base used, its concentration, etc. Eventhough Ref.1 described the condition in details, Ref.2 doesn't even if the principal author in both papers is same. As Ref.1 pointed out the the geometry of the resultant enol plays a role as well. | {
"domain": "chemistry.stackexchange",
"id": 17271,
"lm_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, physical-chemistry, acid-base, ph",
"url": null
} |
c#, performance, asp.net-mvc, pagination
Title: PagedList with large data sets I'm using X.PagedList for paging functionality in my application. The code I have works fine but when I return larger sets of data it seems like it could be faster. Is there anything I can do to my code to have it perform more efficiently?
Controller Code
var employees = _service.GetEmployeesByOffice(region, area, office).OrderBy(e => e.FullName);
var model = Mapper.Map<IEnumerable<Employee>,IEnumerable<EmployeesViewModel>>(employees).ToPagedList(page, 20);
var viewModel = new EmployeeListingView
{
EmployeeViewModel = model,
// Additional...
};
return View(viewModel);
Service Call
public IEnumerable<Employee> GetEmployeesByOffice(string region, string area, string office)
{
var query = _context.Employees.AsQueryable();
if (!String.IsNullOrEmpty(region))
query = query.Where(e => e.Region == region);
if (!String.IsNullOrEmpty(area))
query = query.Where(e => e.Area == area); | {
"domain": "codereview.stackexchange",
"id": 25227,
"lm_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, asp.net-mvc, pagination",
"url": null
} |
geology, petroleum
Title: What are the prerequisites for petroleum geology? I'm in my late thirties and decided to get back to studying. I want to learn petroleum geology but it's been 10 years since I last opened any book, so I basically forgot tons of stuff that I learnt.
I want to know what I need to relearn before enrolling in petroleum geology. What are the (math, physics, chemistry, etc) prerequisites that I need to relearn and what math, physics, and chemistry topics should I expect in this field? I think the shortest fair answer is there are no special prerequisites beyond a general, high-school-level education in maths and science.
It's a difficult question to answer directly, because petroleum geoscience is a very broad field including: | {
"domain": "earthscience.stackexchange",
"id": 2418,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "geology, petroleum",
"url": null
} |
homework-and-exercises, electric-circuits, electrical-resistance, home-experiment
So, to visualize this process, draw a (unit) voltage source in series with an ammeter and then connect this series combination across nodes A & D. Now see that the resistor $R_4$ is in circuit and that there is a current through it and thus, its resistance is a factor in the equivalent resistance between nodes A & D.
On the other hand, if you connect across nodes A & B, the resistor $R_4$ is 'dangling', i.e., one end is not connected to anything and so, there is no current through it - it is out of circuit and thus, is not a factor in the equivalent resistance between nodes A & B. | {
"domain": "physics.stackexchange",
"id": 46391,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electric-circuits, electrical-resistance, home-experiment",
"url": null
} |
( free High School science Texts ) Mathematics assessments 3 out of 6 pages for! ( NAEP ) Mathematics assessments 12 Trigonometry problems and Questions with answers this message, it means we having. 12 geometry, graphs, identities, and all files are secure do! Word problems using trigonometric ratios the length of side AB in the below... Specifically concern right-angled triangles you bring this workbook along to each and every Telematics session companion! Which get shortened to sin, cos, and tangent, which get shortened to sin, cos, tan... Teachers helps to score good marks in IIT JEE exams which get shortened sin! In the figure below Texts ) Mathematics assessments they are: sine, cosine, tan! With angles in a companion document pdf for Grade 12 book pdf free download book! Which get shortened to sin, cos, and tangent, which get shortened sin! Is based on Latest Exam Pattern 7h [ werrn Questions given here to get deep... Re going to focus on three trigonometric functions that | {
"domain": "stavby-paka.cz",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676448764484,
"lm_q1q2_score": 0.8032229799113743,
"lm_q2_score": 0.8198933425148213,
"openwebmath_perplexity": 3803.8622158239614,
"openwebmath_score": 0.37151920795440674,
"tags": null,
"url": "http://stavby-paka.cz/dvdvfm5/trigonometry-questions-and-answers-pdf-grade-12-ed9266"
} |
kinematics, acceleration, integration, distance
11 9 a(z) =C10+(A11-A10)*(B10+B11)/2 =D10+(A11-A100)*(C10+C11)/2
12 10 a(z) =C11+(A12-A11)*(B11+B12)/2 =D11+(A12-A11)*(C11+C12)/2
... ... ... ... | {
"domain": "physics.stackexchange",
"id": 14921,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "kinematics, acceleration, integration, distance",
"url": null
} |
Then:
$\paren {a_1 \circ a_2 \circ \cdots \circ a_n}^{-1} = a_n^{-1} \circ \cdots \circ a_2^{-1} \circ a_1^{-1}$
## Proof 1
$\displaystyle \paren {a \circ b} \circ \paren {b^{-1} \circ a^{-1} }$ $=$ $\displaystyle \paren {\paren {a \circ b} \circ b^{-1} } \circ a^{-1}$ Group Axiom $\text G 1$: Associativity $\displaystyle$ $=$ $\displaystyle \paren {a \circ \paren {b \circ b^{-1} } } \circ a^{-1}$ Group Axiom $\text G 1$: Associativity $\displaystyle$ $=$ $\displaystyle \paren {a \circ e} \circ a^{-1}$ Group Axiom $\text G 3$: Existence of Inverse Element $\displaystyle$ $=$ $\displaystyle a \circ a^{-1}$ Group Axiom $\text G 2$: Existence of Identity Element $\displaystyle$ $=$ $\displaystyle e$ Group Axiom $\text G 3$: Existence of Inverse Element
The result follows from Group Product Identity therefore Inverses:
$\paren {a \circ b} \circ \paren {b^{-1} \circ a^{-1} } = e \implies \paren {a \circ b}^{-1} = b^{-1} \circ a^{-1}$
$\blacksquare$
## Proof 2 | {
"domain": "proofwiki.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9857180669140007,
"lm_q1q2_score": 0.8455175165193234,
"lm_q2_score": 0.8577681031721324,
"openwebmath_perplexity": 453.27979480105296,
"openwebmath_score": 0.956074059009552,
"tags": null,
"url": "https://proofwiki.org/wiki/Inverse_of_Group_Product"
} |
forces, newtonian-gravity
The inverse-square law depends, essentially, on the fact that the source "looks" the same to the object being attracted thereby, no matter where it is at in relation. If it can "see" a bump nmming it from one direction than from another, it will feel more force from that bump than otherwise, even while being at the same distance from the center of mass, hence violating the inverse-square law. E.g. a bilobate asteroidal/cometary object like the recently-discovered "Ultima Thule" with one lobe nning at you, versus being at the same distance but "seeing" it sideways.
For a spherically-symmetric mass, you can actually show that Newton's law holds in its usual form. This can be done through a gravitational analogue of Gauss's law for electric fields:
$$\oint\int_S \mathbf{g} \cdot d\mathbf{l} = -4\pi GM_\mathrm{enc}$$ | {
"domain": "physics.stackexchange",
"id": 57500,
"lm_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, newtonian-gravity",
"url": null
} |
values of a quadratic function. This is a quadratic equation linking to with many major implications for all of us. 4 Applications of Quadratic Equations Page 1. In characteristic2 the spaceV is equal torad∇ Q if and only if Q(x) = X x i 2 for some choice of coordinates. For example, + − is a quadratic form in the variables x and y. Duality gap and quadratic programming, Part III: dual bounds of a D. The factored form of the quadratic equations gives the x-intercept when y = 0. This paper provides applications of patching to quadratic forms and central simple algebras over function fields of curves over Henselian valued fields. Applications-Quadratic Equations 2. As with the general form, if a > 0, a > 0, the parabola opens upward and the vertex is a minimum. (2000) vii Contents Preface ix Conference lectures x Conference participants xii. Note the construction of the height equation in the problem above. If you buy 240 of them you get $20 o each item and this reduces the total cost to | {
"domain": "arcivasto.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9863631671237734,
"lm_q1q2_score": 0.8176347166643554,
"lm_q2_score": 0.82893881677331,
"openwebmath_perplexity": 653.5038556637346,
"openwebmath_score": 0.46299558877944946,
"tags": null,
"url": "http://arcivasto.it/uguo/applications-of-quadratic-forms.html"
} |
java, parsing, xml, dom
Title: Handling various types of nodes when traversing a DOM tree How to minimize the following code using java's features ... looking for some workaround with the switch-case statement
I've seen several question regarding switch-case design pattern / best practices but because I am new to java, I am having difficulties in implementing them.
Here is the code:
protected void readTree(Node node, Branch current)
{
Element element = null;
Document document = null;
if(current instanceof Element)
{
element = (Element) current;
}
else
{
document = (Document) current;
}
String nodeVal = node.getNodeValue();
String nodeName = node.getNodeName();
switch(node.getNodeType())
{
case ELEMENT_NODE:
readElement(node, current);
break;
case PROCESSING_INSTRUCTION_NODE:
if(current instanceof Element)
{
element.addProcessingInstruction(nodeName, nodeVal);
break;
}
document.addProcessingInstruction(nodeName, nodeVal); | {
"domain": "codereview.stackexchange",
"id": 1512,
"lm_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, parsing, xml, dom",
"url": null
} |
robotic-arm, c++
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import com.kuka.connectivity.fri.FRIConfiguration;
import com.kuka.connectivity.fri.FRIJointOverlay;
import com.kuka.connectivity.fri.FRISession;
import com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication;
import com.kuka.roboticsAPI.controllerModel.Controller;
import com.kuka.roboticsAPI.deviceModel.LBR;
import com.kuka.roboticsAPI.geometricModel.CartDOF;
import com.kuka.roboticsAPI.motionModel.controlModeModel.CartesianImpedanceControlMode;
/**
* Creates a FRI Session.
*/
public class FRIHoldsPosition_Command extends RoboticsAPIApplication
{
private Controller _lbrController;
private LBR _lbr;
private String _hostName; | {
"domain": "robotics.stackexchange",
"id": 766,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "robotic-arm, c++",
"url": null
} |
c, virtual-machine
exec_storeb:; // pops byte value off stack and into a memory address.
a = vm_get_imm4(vm);
#ifdef SAFEMODE
if( a >= MEM_SIZE ) {
printf("exec_storeb reported: Invalid Memory Access! Current instruction address: %" PRIu32 " | Stack index: %" PRIu32 "\nInvalid Memory Address: %" PRIu32 "\n", vm->ip, vm->sp, a);
goto *dispatch[halt];
}
else if( vm->sp-1 >= STK_SIZE ) {
printf("exec_storeb reported: stack underflow! Current instruction address: %" PRIu32 " | Stack index: %" PRIu32 "\n", vm->ip, vm->sp-1);
goto *dispatch[halt];
}
#endif
vm->pbMemory[a] = vm->pbDataStack[vm->sp--];
conv.c[0] = vm->pbMemory[a];
printf("stored byte data - %" PRIu32 " @ address 0x%x\n", conv.c[0], a);
DISPATCH(); | {
"domain": "codereview.stackexchange",
"id": 26461,
"lm_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, virtual-machine",
"url": null
} |
neural-networks, neural-computing, gradient-descent
Title: Determining if my artificial neural network needs additional layers I have implemented a neural network for load forecasting in Microsoft Excel. My structure is very simplistic and involves only 1 hidden layer and 4 neurons. (See picture)
I trained my network with a very large set of data and the predictions are as decent as could be expected. However, when I go to try and predict the "future" using recent data, the network is only in the ball-park, not very close at all. Here is a plot of the actual numbers versus the forecast ones. | {
"domain": "cs.stackexchange",
"id": 6641,
"lm_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, neural-computing, gradient-descent",
"url": null
} |
ph
Title: If a carbonic acid to bicarbonate reaction involves the release of H+, why does pH increase? OK, I'm an engineer that took Aqueous Geochem 6 years ago, so please forgive this basic (get it?) question. But why do the two reactions which start from dissolution of CO2 in water increase pH if they both release H+ ions? I.e., the conversion of carbonic acid to bicarbonate releases a hydrogen proton, and the conversion from bicarbonate to carbonate releases a hydrogen proton. Yet each reaction results in a higher pH. Specifically, why don't the additions of H+ decrease pH?
$\ce{H2CO3 + 2 H2O ⇌ HCO3- + H3O+ + H2O ⇌ CO3^{2-} + 2 H3O+}$
Thanks, and apologies for the (probably simplistic) question.
Mike
Thank you all for your help with this. I should clarify that what is really troubling me is the interpretation of the Bjerrum Plot for the carbonate system (aqueous geochem). Looking, for example, at that plot here: | {
"domain": "chemistry.stackexchange",
"id": 16094,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ph",
"url": null
} |
cryptography, computer-networks, hash, user-interface
Title: Weak hashing function for memorable IPv6 addresses IPv6 addresses in the form of 862A:7373:3386:BF1F:8D77:D3D2:220F:D7E0 are much harder to memorize or even transcribe than the 4 octets of IPv4.
There have been attempts to mitigate this, making IPv6 addresses somehow more memorable.
Is there an intentionally-weak hashing function which could be reversed to find that the phrase, say, "This is relatively benign and easy to spot if the phrase is bent so as to be not worth paying" would hash to a target IPv6 address? The hash would, of course, have many colliding inputs to choose from, and a potentially more memorable sentence, such as this example phrase, could be automatically offered.
I guess there are two parts: First a weak hash with good distribution in both directions. Second is an algorithm for selecting memorable phrases from among the many collisions (short, consisting of words from a specified language, perhaps even following a simplified grammar). | {
"domain": "cs.stackexchange",
"id": 5288,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cryptography, computer-networks, hash, user-interface",
"url": null
} |
quantum-state, textbook-and-exercises, density-matrix, nielsen-and-chuang, probability
Post-measurement state
The last equality in the question is not correct. In particular, it is not clear what multiplying the two conditional probabilities means since they are normalized to different events (c.f. denominators in $(1)$ and $(2)$). Also, it is not clear what the double subscript in $|\psi_{ij}^m\rangle$ indicates.
The correct formula for post-measurement state from the perspective of Alice who knows preparation $i$ but does not know measurement outcome is
$$
\rho_i = \sum_m p(m|i)|\psi_i^m\rangle\langle\psi_i^m|
$$
whereas from the perspective of Bob who knows measurement outcome $m$ but does not know preparation $i$ is
$$
\rho_m = \sum_i p(i|m)|\psi_i^m\rangle\langle\psi_i^m|
$$ | {
"domain": "quantumcomputing.stackexchange",
"id": 2335,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-state, textbook-and-exercises, density-matrix, nielsen-and-chuang, probability",
"url": null
} |
primes
factor_list = [ ]
def integer_test(x):
if math.floor(x) == math.ceil(x):
return True
else:
return False
def factor_checker(x):
count = 0
y = x
while count <= y:
print(count)
count += 1
if integer_test(1.0 * x / count) == True:
factor_list.append(count)
factor_checker(45)
print(factor_list)
In this code x/count is a double. So the integer_test will only return true if it's ceiling and floor return the same number i.e the integer itself. | {
"domain": "cs.stackexchange",
"id": 2862,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "primes",
"url": null
} |
radioactivity, statistics, half-life
Title: How do we know that radioactive decay rates are constant over billions of years? A friend and I recently discussed the idea that radioactive decay rates are constant over geological times, something upon which dating methods are based.
A large number of experiments seem to have shown that decay rate is largely uninfluenced by the environment (temperature, solar activity, etc.). But how do we know that decay rates are constant over billions of years? What if some property of the universe has remained the same over the one hundred years since radioactivity was discovered and measured, but was different one billion years ago?
An unsourced statement on the Wikipedia page on radioactive decay reads:
[A]strophysical observations of the luminosity decays of distant
supernovae (which occurred far away so the light has taken a great
deal of time to reach us) strongly indicate that
unperturbed decay rates have been constant. | {
"domain": "physics.stackexchange",
"id": 40532,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "radioactivity, statistics, half-life",
"url": null
} |
the form ax + by + c = 0, where a, b and c are integers. By using this website, you agree to our Cookie Policy. Strategy 1: Use implicit differentiation directly on the given equation. To do this we di⁄erentiate the equations (1)-(2) implicitly with respect to x. Integration vs Differentiation. Be sure to show all work to receive full credit. Step 1: Multiple both sides of the function by ( + ) ( ) ( ) + ( ) ( ). Session 21: Review for Exam 1 - Computing Derivatives Using Differentiation Rules; Session 22: Materials for Exam 1; Each session comes with video lectures, detailed pdf notes, and sample problems with solutions. The solutions for these four conditions varying h were compared by taking the absolute difference against the exact solution at that point. Unlock your Stewart Calculus PDF (Profound Dynamic Fulfillment) today. Second derivatives of parametric equations. Created Date: 1/17/2010 12:17:48 PM. Option to return an implicit solution, specified as false or true. For | {
"domain": "serviziepiu.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.989510909668023,
"lm_q1q2_score": 0.8066814443506204,
"lm_q2_score": 0.8152324915965392,
"openwebmath_perplexity": 767.8150842855367,
"openwebmath_score": 0.7326173186302185,
"tags": null,
"url": "http://nmaw.serviziepiu.it/implicit-differentiation-problems-and-solutions-pdf.html"
} |
organic-chemistry, nomenclature
P-22.2.2.1.2 A multiplicity of the same heteroatom is indicated by a multiplying prefix ‘di’, ‘tri’, ‘tetra’, etc., placed before the appropriate ‘a’ term. The final letter ‘a’ of a multiplying prefix is elided before a vowel, e.g., tetrazole, not tetraazole. Lowest possible locants are assigned to heteroatoms, locant ‘1’ being assigned to one of the heteroatoms. Locants are cited at the front of the name, i.e., before the skeletal replacement (‘a’) term and any preceding numerical prefixes.
Therefore, the systematic name of the parent structure in melamine is 1,3,5-triazine.
This numbering is also used in substituted heteromonocyclic compounds. A heteroatom keeps the locant ‘1’; then low locants are given to any substituents. | {
"domain": "chemistry.stackexchange",
"id": 7720,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, nomenclature",
"url": null
} |
The square function is not monotonic so it doesn't preserve inequalities.
$$a<b\not\Rightarrow a^2<b^2$$
Anyway it does so in the monotonic sections.
$$0<a<b\Rightarrow 0<a^2<b^2$$ and
$$a<b<0\Rightarrow a^2>b^2>0.$$
• Crossed with Salahamam_ Fatima. – Yves Daoust Feb 22 '18 at 22:12
$\sqrt x>y$, where $y<0$ results in $y$ being positive after being squared, so you will get extraneous solutions.
This is because the inverse of $y^2$ is not $\sqrt y$, it is $\pm\sqrt{y}$.
If you take a look of the graph of $\sqrt x>-4$(red) and compare it to $x>16$(blue), you can notice what happens between the area of $0<x<16$.
For your second inequality, the same problem applies, those "valid" solutions are not actually valid, but are extraneous.
$x\mapsto x^2$ is not increasing at $\Bbb R$ but it is increasing at $\Bbb R^+$ and decreasing at $\Bbb R^-$.
thus $$x>y\ge 0 \implies x^2>y^2$$
$$x <y \le 0 \implies x^2>y^2$$
$x <0 <y \;\;$ does not imply anything. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9658995733060719,
"lm_q1q2_score": 0.80067164737726,
"lm_q2_score": 0.8289388146603365,
"openwebmath_perplexity": 224.8349359478546,
"openwebmath_score": 0.8983161449432373,
"tags": null,
"url": "https://math.stackexchange.com/questions/2662423/solving-radical-inequalities"
} |
quantum-state, textbook-and-exercises
$$|\psi_1 \rangle = c_1| \uparrow \rangle + c_2|\downarrow \rangle \qquad |\psi_2 \rangle = -(c_1| \uparrow \rangle + c_2|\downarrow \rangle)$$
A general statement: there is no experiment that will indicate what is the global phase of the state. Let me rephrase this a little bit for this special case (restricted to real numbers $c_1$ and $c_2$ discussed in the book): there is no experiment that will indicate if there is a minus sign before the state or not.
Also: ket vectors by definition of allowed values of $c_1$ and $c_2$ can have a minus sign before them and hence their coresponding bra vectors also will have a minus sign: $(\pm |\uparrow \rangle)^\dagger = \pm\langle \uparrow |$. In the vector representation:
$|\uparrow \rangle = \begin{pmatrix} 1 \\0 \end{pmatrix} \qquad -|\uparrow \rangle = \begin{pmatrix} -1 \\0 \end{pmatrix} \qquad \langle\uparrow | = \begin{pmatrix} 1 & 0 \end{pmatrix} \qquad -\langle \uparrow | = \begin{pmatrix} -1 & 0 \end{pmatrix}$ | {
"domain": "quantumcomputing.stackexchange",
"id": 2048,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-state, textbook-and-exercises",
"url": null
} |
neural-networks, data-preprocessing
In general though, neural networks are quite good at discovering correlation in the input data, so I would not try to decorrelate the input features as a preprocessing step.
Hope this helps! | {
"domain": "ai.stackexchange",
"id": 3313,
"lm_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, data-preprocessing",
"url": null
} |
python, parsing, regex, numpy, pandas
Forecast Hours: 0hr 1hr 2hr 3hr 4hr 5hr 6hr 7hr 8hr 9hr 10hr 11hr 12hr 13hr 14hr 15hr 16hr 17hr 18hr 19hr 20hr 21hr 22hr 23hr 24hr 25hr 26hr 27hr 28hr 29hr 30hr 31hr 32hr 33hr 34hr 35hr 36hr 37hr 38hr 39hr 40hr 41hr 42hr 43hr 44hr 45hr 46hr 47hr 48hr 49hr 50hr 51hr 52hr 53hr 54hr 55hr 56hr 57hr 58hr 59hr 60hr 61hr 62hr 63hr 64hr 65hr 66hr 67hr 68hr 69hr 70hr 71hr 72hr 73hr 74hr 75hr 76hr 77hr 78hr 79hr 80hr 81hr 82hr 83hr 84hr 85hr 86hr 87hr 88hr 89hr 90hr 91hr 92hr 93hr 94hr 95hr 96hr 97hr 98hr 99hr 100hr 101hr 102hr 103hr 104hr 105hr 106hr 107hr 108hr 109hr 110hr 111hr 112hr 113hr 114hr 115hr 116hr 117hr 118hr 119hr 120hr 121hr 122hr 123hr 124hr 125hr 126hr 127hr 128hr 129hr 130hr 131hr 132hr 133hr 134hr 135hr 136hr 137hr 138hr 139hr 140hr 141hr 142hr 143hr 144hr | {
"domain": "codereview.stackexchange",
"id": 42285,
"lm_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, regex, numpy, pandas",
"url": null
} |
graphs, dynamic-programming
Title: Understanding The Mapping Of Edges to Nodes In A Graph Theory Problem I am really confused with this problem.
Here's the problem: | {
"domain": "cs.stackexchange",
"id": 6945,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "graphs, dynamic-programming",
"url": null
} |
ros, macos, ros-fuerte, macos-lion, osx
[ rosmake ] Output from build of package bullet written to:tive 20/31 Complete ]
[ rosmake ] /Users/kevin/.ros/rosmake/rosmake_output-20120426-082529/bullet/build_output.log
[rosmake-1] Finished <<< bullet [PASS] [ 2.04 seconds ] -- WARNING: 4 compiler warnings
[rosmake-1] Starting >>> angles [ make ]
[rosmake-1] Finished <<< angles [PASS] [ 2.00 seconds ]
[rosmake-1] Starting >>> rostest [ make ]
[rosmake-1] Finished <<< rostest ROS_NOBUILD in package rostest
No Makefile in package rostest
[rosmake-1] Starting >>> roswtf [ make ]
[rosmake-1] Finished <<< roswtf ROS_NOBUILD in package roswtf
No Makefile in package roswtf
[rosmake-1] Starting >>> tf [ make ]
[rosmake-0] Finished <<< nodelet [PASS] [ 5.03 seconds ]
[rosmake-0] Starting >>> nodelet_topic_tools [ make ]
[rosmake-0] Finished <<< nodelet_topic_tools [PASS] [ 2.89 seconds ]
[rosmake-0] Starting >>> common_rosdeps [ make ]
[rosmake-0] Finished <<< common_rosdeps [PASS] [ 0.39 seconds ] | {
"domain": "robotics.stackexchange",
"id": 9140,
"lm_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, macos, ros-fuerte, macos-lion, osx",
"url": null
} |
particle-physics, higgs
The Higgs mechanism works differently. If you're up for some math, have a look at this answer I posted to another question, but the essential point of it is that the Higgs field has a vacuum expectation value (VEV). This VEV is a constant offset away from what you'd ordinarily expect to be the field's default value, and it "sticks" to the other fields and gives them mass, as well as enabling the interactions between the Higgs boson and various other particles. | {
"domain": "physics.stackexchange",
"id": 3979,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "particle-physics, higgs",
"url": null
} |
data-structures, search-trees, space-partitioning
fulfills this requirement? Thanks! You could use a k-d tree. A k-d tree normally alternates between partitioning horizontally and partitioning vertically, but you could certainly modify it to change that pattern (e.g., partition horizontally twice in a row; or equivalently, partition horizontally into three or four regions rather than just into two regions). | {
"domain": "cs.stackexchange",
"id": 8649,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "data-structures, search-trees, space-partitioning",
"url": null
} |
homework-and-exercises, newtonian-mechanics, harmonic-oscillator, hamiltonian-formalism, phase-space
Title: Simple (classical, non-damped) 1D harmonic oscillator - how to represent phase space elliptical trajectory in polar form for an ellipse? Considering a classical, non-damped 1D harmonic oscillator (e.g. mass $m$ oscillating along $x$-axis attached to spring with constant $k$) -- described by Hamiltonian (for constant energy $E$) $$E=p^2/2m + kx^2/2,$$ which system follows an elliptical trajectory in corresponding phase space $(p, x)$:
I want to formulate an equation for this phase space trajectory in polar form for an ellipse (origin at ellipse center), having semi-major/minor axes $a/b$, using the standard polar form:
$$r(θ)=\frac{ab}{\sqrt{(b\cos(θ))^2 + (a\sin(θ))^2}}$$
I am stumped as to what "a" and "b" would be in terms of "m", "k" and "E". Can you suggest what they might be? | {
"domain": "physics.stackexchange",
"id": 80999,
"lm_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, harmonic-oscillator, hamiltonian-formalism, phase-space",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.