text stringlengths 1 1.11k | source dict |
|---|---|
c#
Title: One time property reading I have following code that is used of one time skipping some functionality(actually do something only one time until SkipSomeStuff is true):
private bool _skipSomeStuff;
public bool SkipSomeStuff
{
set
{
_skipSomeStuff = value;
}
get
{
if (_skipSomeStuff)
{
_skipSomeStuff = false;
return true;
}
return false;
}
} | {
"domain": "codereview.stackexchange",
"id": 1194,
"lm_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
} |
quantum-mechanics, hilbert-space, definition, superposition, quantum-states
$$
\int_{-\infty}^\infty|\psi(x)|^2\text dx<\infty
\quad\text{and}\quad
\hat H \psi=E\psi.
$$
This is typically used in comparison to continuum states, which will (formally) obey the eigenvalue equation $\hat H\psi=E\psi$, but whose norm is infinite. Because their norm is infinite, these states do not lie inside the usual Hilbert space $\mathcal H$, typically taken to be $L_2(\mathbb R^3)$, which is why the eigenvalue equation is only formally true if taken naively - the states lie outside the domain of the operator. (Of course, it is possible to deal rigorously with continuum states, via a construct known as rigged Hilbert spaces, for which a good reference is this one.) | {
"domain": "physics.stackexchange",
"id": 84440,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, hilbert-space, definition, superposition, quantum-states",
"url": null
} |
javascript, html, ecmascript-6, event-handling, user-interface
if(dir == 1) {
A good habit and recommendation of many style guides is to use strict equality operators (i.e. ===, !==). The problem with loose comparisons is that it has so many weird rules one would need to memorize in order to be confident in its proper usage.
Minimize DOM access
In the slideshow constructor there are two lookups for elements with class name 'slide' within three lines:
this.slides = this.sliderItems.getElementsByClassName('slide');
this.slidesLength = this.slides.length;
this.slideSize = this.sliderItems.getElementsByClassName('slide')[0].offsetWidth;
DOM access is expensive. The line to set the sliderSize can simply reference this.slides[0] instead of re-querying the DOM.
Default parameters
ES6 functions can have default parameters.
The dragAction method can be simplified from:
Slideshow.prototype.dragAction = function(event) {
event = event || window.event;
To:
Slideshow.prototype.dragAction = function(event = window.event) { | {
"domain": "codereview.stackexchange",
"id": 39492,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, html, ecmascript-6, event-handling, user-interface",
"url": null
} |
quantum-field-theory, special-relativity, lagrangian-formalism, klein-gordon-equation
Title: Why is ${\partial^i}{\partial_i\phi}$ = ${\partial^i {\phi}}{\partial_i{\phi}}$? This notation can be found on page 254 of Victor Stenger's Comprehensible Cosmos and in David Tong's Lectures on QFT (Equation 2.4 http://www.damtp.cam.ac.uk/user/tong/qft/two.pdf), and in
EDIT: on page 254 of Stenger's Comprehensible Cosmos, the Lagrangian is written with a ${\partial^i}{\partial_i\phi}$ instead of the usual ${\partial^i {\phi}}{\partial_i{\phi}}$ (that David Tong uses).
Why is ${\partial^i}{\partial_i\phi}$ = ${\partial^i {\phi}}{\partial_i{\phi}}$ in QFT ? This fact is used to calculate the Lagrange Equations of Motion (The Klein Gordon Equation) from the Lagrange Density for a Scalar Field.
This clearly isn't true for elementary functions like $y^2$ because ${\partial_y}{\partial_y\ ({y^2})}$ =/= $ {\partial_y {y^2}}{\partial_y{y^2}}$ You have overlooked a letter. The kinetic term for the Klein-Gordon field is usually written as | {
"domain": "physics.stackexchange",
"id": 3949,
"lm_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, lagrangian-formalism, klein-gordon-equation",
"url": null
} |
java
I'd like to move this out into a method or two, but I need to only do this count one time. This limitation is clouding my vision, as I can't think of any function which follows the Single Responsibility Principle. Anything I can do to achieve my goal? You could make count a field, then have a function to determineFirstResult(). Then the setPageNumber block can be separated out.
if (pageData.isLastPage()) {
count = getCountFromDb();
if (count > 0) {
boolean isFinalPageFull = (count % maxResults) == 0;
int pageNum = count / maxResults;
pageData.setPageNumber((isFinalPage) ? pageNum - 1 : pageNum;
}
}
firstResult = determineFirstResult();
...
int determineFirstResult(int maxResults) {
if (pageData.isLastPage()) return getFirstResult(count, maxResults);
return maxResults * pageNumber;
} | {
"domain": "codereview.stackexchange",
"id": 435,
"lm_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
} |
differential-drive, ros2, webots, urdf, physics-engine
<!-- RIGHT WHEEL LINK -->
<joint name="right_wheel_joint" type="continuous">
<parent link="base_link"/>
<child link="right_wheel"/>
<origin rpy="1.5707963267948966 0 0" xyz="0 -0.1485 0"/>
<axis xyz="0 0 -1"/>
</joint>
<link name="right_wheel">
<visual>
<geometry>
<cylinder length="0.026" radius="0.033"/>
</geometry>
<material name="blue"/>
</visual>
<collision>
<geometry>
<sphere radius="0.033"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 0 0" xyz="0 0 0"/>
<mass value="0.05"/>
<inertia ixx="1.642916666666667e-05" ixy="0.0" ixz="0.0" iyy="1.642916666666667e-05" iyz="0.0" izz="2.7225000000000004e-05"/>
</inertial>
</link>
<!-- CASTER WHEEL LINK -->
<joint name="caster_wheel_joint" type="fixed">
<parent link="chassis"/>
<child link="caster_wheel"/>
<origin xyz="0.075 0 -0.013"/>
</joint>
<link name="caster_wheel">
<visual>
<geometry> | {
"domain": "robotics.stackexchange",
"id": 2667,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "differential-drive, ros2, webots, urdf, physics-engine",
"url": null
} |
python, configuration, yaml
unhelpful docstring
"""
CodifyConfig
"""
Please delete.
Or write an English sentence describing the responsibility of this class.
That will be an aid to future maintainers, who will pass up the
temptation to add kitchen_sink to the class, based on your
advice about what does and does not belong here.
In contrast, you've written a bunch of nice method and module
docstrings, thank you.
If a linter "made" you insert a docstring, then consider using
a linter
that is less picky by default,
or change your current linter's config.
local variable vs object attribute
self.path_config = path_config
Consider deleting that,
preferring a call to self.load_config(path_config).
Consider renaming the parameter to config_path. | {
"domain": "codereview.stackexchange",
"id": 45190,
"lm_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, configuration, yaml",
"url": null
} |
quantum-mechanics, particle-physics, string-theory, wave-particle-duality
Title: Understanding quantum mechanics Forgive me for this dumb question but what are matter waves of particles?
are they particles being spread out in a space like waves or the particles are still "particles" but matter waves are probability waves?
and if the particle is actually spread out in space like a wave then why does this page from wikipedia about string theory says that strings replace "point-like particles"?
https://en.wikipedia.org/wiki/String_theory Quantum mechanics is applicable in the regime of extremely small (when length scale ~ $h/p$). So lets talk about small particles. For such particles, something strange happens: | {
"domain": "physics.stackexchange",
"id": 61798,
"lm_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, particle-physics, string-theory, wave-particle-duality",
"url": null
} |
# Print out the shapes
A.shape, B.shape, v.shape
((2, 2), (2, 2, 3), (2,))
Einstein summation has been implemented directly via np.einsum. The indices that occurs in the Einstein summation can be passed as a string, followed by the tensors that are being acted upon. For instance, to implement matrix multiplication, we can consider the Einstein summation seen above ($$\mathbf{A}\mathbf{v} = a_{ij}v_j$$) and strip out the indices themselves to get the implementation:
# Reimplement matrix multiplication
np.einsum("ij, j -> i", A, v), A.dot(v)
(array([ 5, 11]), array([ 5, 11]))
This is a highly flexible notation. For instance if we want to compute what would be traditionally written as
(17.1.34)$c_{kl} = \sum_{ij} \mathbf{B}_{ijk}\mathbf{A}_{il}v_j.$
it can be implemented via Einstein summation as:
np.einsum("ijk, il, j -> kl", B, A, v)
array([[ 90, 126],
[102, 144],
[114, 162]]) | {
"domain": "d2l.ai",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9867771778588348,
"lm_q1q2_score": 0.802118926816257,
"lm_q2_score": 0.8128673269042767,
"openwebmath_perplexity": 275.3627365559314,
"openwebmath_score": 0.884429395198822,
"tags": null,
"url": "http://d2l.ai/chapter_appendix-mathematics-for-deep-learning/geometry-linear-algebric-ops.html"
} |
cc.complexity-theory, graph-theory
then no $k$-clique includes $x$. Thus, we can remove such a vertex.
Repeat this until every vertex has a neighbor in each color class (except for the class it belongs to).
If some class becomes empty, then the graph does not have a $k$-clique.
Otherwise, since the property ``every pair of color classes induces a biclique + isolated vertices''
is closed under taking induced subgraphs,
the remaining graph is a complete $k$-partite graph, which contains a $k$-clique. | {
"domain": "cstheory.stackexchange",
"id": 5034,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, graph-theory",
"url": null
} |
c++, algorithm, strings, complexity
Am I correct that this is a linear operation? Are there any other ideas that could speed this up? ( Though, I'm not too worried about it, it currently takes twice as long to even make the random string ). You have tagged this question with algorithm, and I like algorithm problems. In the spirit of the original question, the solution should not be using any additional space, which means your char vector suggestion at the end is not really relevant. I would agree with your analysis, that the problem is reduced to \$O(n)\$ by storing the vowels and consonants in different vectors, and then merging them again... but that relies on an \$O(n)\$ space complexity too.
I think the solution that the original problem (with no additional storage) is looking for, is a three-pointer option.... a 3-point turn, to make a bad pun. | {
"domain": "codereview.stackexchange",
"id": 9778,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, algorithm, strings, complexity",
"url": null
} |
has the largest vega, and this sets a maximum limit on the vega of other options. Let's consider the graph of vega against the underlying: Which of the following options (on the same expiry) has the largest vega when the stock is trading at 100? The Greek values most commonly referred to are Delta, Gamma, Vega and Theta. As volatility increases slightly but not sufficiently enough to affect the payoff which is far away, there would be little change in the extrinsic value, hence a low vega. Collectively, the Greeks are used by options traders to have a clearer idea of how various factors impact on the price of options. The put-call parity states that C−P=S−Ke−rt C - P = S - K e^{-rt} C−P=S−Ke−rt. Thus, we obtain. Definition of Vegas in the Definitions.net dictionary. Ultima is the rate at which the vomma of an option will react to volatility in the underlying market. Vega. Investopedia uses cookies to provide you with a great user experience. For example, volatility at 14% would | {
"domain": "arizonachess.org",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018390836985,
"lm_q1q2_score": 0.8018003585329558,
"lm_q2_score": 0.8221891370573388,
"openwebmath_perplexity": 3350.1565688183273,
"openwebmath_score": 0.6837106347084045,
"tags": null,
"url": "http://ftp.arizonachess.org/txmpv/dcec9d-vega-meaning-greek"
} |
electromagnetism, special-relativity
For a better derivation, I've found this (non-peer-reviewed) paper that uses the relativity of simultaneity to derive the magnetic force and the lack of force on a non-moving test charge. In this paper, the test charge is not restricted to moving at the same velocity as the current in the wire. The math is more difficult and even makes reference to a textbook simply referred to as Jackson--a tome much feared amongst physics grad students (me included). However, the first two sections should be manageable for most people familiar with special relativity.
In conclusion, the length-contraction argument serves a purpose: to relate electric and magnetic fields in different reference frames to students who are first encountering these ideas. It is not rigorous or general, but it is useful. | {
"domain": "physics.stackexchange",
"id": 51304,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, special-relativity",
"url": null
} |
machine-learning, neural-network, deep-learning, cnn, computer-vision
Title: The goal of fine tuning I would like to ask what is the goal of fine-tuning a VGGNet on my dataset.
What does fine-tuning mean? Does it mean to change the weights or keep the weight values? Fine tuning means changing the weights such that the VGGNet can perform the task you want in your dataset. The reason why fine-tuning is not called training (which is what you are doing) is because it implies that you already use a network that has been trained on a dataset. However, the concept is the same as training, but you just happen to it do with a convenient set of initial weights. | {
"domain": "datascience.stackexchange",
"id": 3020,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, neural-network, deep-learning, cnn, computer-vision",
"url": null
} |
machine-learning, neural-network, svm, computer-vision, object-recognition
Yes your approach is right
Of A, B and C the right answer is B.
The explanation is the following: In order to calculate Mean Average Precision (mAP) in the context of Object Detection you must compute the Average Precision (AP) for each class, and then compute the mean across all classes. The key here is to compute the AP for each class, in general for computing Precision (P) and Recall (R) you must define what are: True Positives (TP), False Positives (FP), True Negative (TN) and False Negative (FN). In the setting of Object Detection of the Pascal VOC Challenge are the following: | {
"domain": "datascience.stackexchange",
"id": 3314,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, neural-network, svm, computer-vision, object-recognition",
"url": null
} |
molecular-structure, halides, noble-gases
Based on all the experimental data, Pitzer and Bernstein concluded that $\ce{XeF6}$ could be described by a pseudorotational model with the potential minimum most likely being a $C_\mathrm{3v}$ structure.9 Following in the footsteps of Bartell and Gavin,2 they attributed this deformation to a second-order Jahn–Teller effect, which we will now turn to. | {
"domain": "chemistry.stackexchange",
"id": 8814,
"lm_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-structure, halides, noble-gases",
"url": null
} |
image-processing, matlab, inverse-problem, svd
Title: Regularization for Inverse Problems using the Singular Value Decomposition (SVD) I am reading these lecture notes on Optimisation and Inverse Problems in Imaging, and I have difficulties understanding how figures on page 20 (Figure 3.2) or page 21 (Figure 3.3).
Precisely, I don't understand what numbers on horizontal and vertical axes mean. I would appreciate if you could explain me this. Here is the code for Figure (3.3). Similar to The Concepts Behind SVD Based Image Processing the horizontal axis are the samples index of the SVD basis.
The idea in the chapter you linked is generalizing the Wiener Filter.
While the Wiener Filter uses the Fourier Transform as a basis the SVD uses the data adaptive basis. | {
"domain": "dsp.stackexchange",
"id": 9313,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "image-processing, matlab, inverse-problem, svd",
"url": null
} |
backpropagation, pytorch, regression, softmax
def forward(self, x):
smax = self.softmax(x*100)
end_index = self.base_index + x.size()[1] * self.step_size
indices = torch.arange(start=self.base_index,
end=end_index,
step=self.step_size)
return torch.matmul(smax, indices.float())
Following is the final architecture:
class CombinedNetwork(nn.Module):
def __init__(self, input_size, hidden_size, num_classes):
super(CombinedNetwork, self).__init__()
self.classifier_fc1 = nn.Linear(input_size, hidden_size)
self.classifier_fc2 = nn.Linear(hidden_size, num_classes)
self.regression_fc = nn.Linear(input_size, num_classes)
self.smax = SoftArgmax1D() | {
"domain": "ai.stackexchange",
"id": 3877,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "backpropagation, pytorch, regression, softmax",
"url": null
} |
homework-and-exercises, centripetal-force
Title: Centripetal acceleration and gravitational acceleration on a thread This is a question from my physics textbook.
"A $200$ gram weight is suspended in a $2.5m$ long thread in the roof. The weight is pulled out sideways, creating the angle $\alpha$ and is then released. The weight then swings back and forth. What is the maximum angle $\alpha$before the thread snaps? The thread snaps at above $2.6N$"
This is the diagram I drew: | {
"domain": "physics.stackexchange",
"id": 10148,
"lm_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, centripetal-force",
"url": null
} |
c++, game, c++17, qt
[[nodiscard]] bool maxArrowRangeReached() const;
bool isMarked(Room *room) const;
bool isNeigbourOfLastMarkedRoom(Room *room) const;
bool leftRoom(Room *current, Room* last);
bool enteredRoom(Room *current, Room* last);
static constexpr auto mArrowRoomRange{ 3 };
bool mShootArrowSelectOn{ false };
Room *mlastRoom{ nullptr };
QVector<Room *> mMarkedRooms;
};
#endif // DUNGEONVIEW_H
dungeonview.cpp
#include "dungeonview.h"
#include "room.h"
#include <QDebug>
#include <QMouseEvent>
#include <algorithm>
DungeonView::DungeonView(QWidget *parent)
:QGraphicsView{ parent }
{
setMouseTracking(true);
}
void DungeonView::mousePressEvent(QMouseEvent *event)
{
if (auto room = qgraphicsitem_cast<Room *>(itemAt(event->pos()));
room && room->hasPlayer()) { | {
"domain": "codereview.stackexchange",
"id": 36733,
"lm_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++, game, c++17, qt",
"url": null
} |
c++, algorithm, programming-challenge, strings
Title: Determining whether a string is transformable into another by repetitively increasing its prefixes alphabetically Here's Alice and Strings, a programming challenge on hackerearth:
Two strings \$A\$ and \$B\$ comprising of lower case English letters
are compatible if they are equal or can be made equal by following
this step any number of times:
Select a prefix from the string \$A\$ (possibly empty), and increase the alphabetical value of all the characters in the prefix by the same
valid amount. For example if the string is xyz and we select the
prefix xy then we can convert it to yz by increasing the
alphabetical value by 1. But if we select the prefix xyz then we
cannot increase the alphabetical value. | {
"domain": "codereview.stackexchange",
"id": 37436,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, algorithm, programming-challenge, strings",
"url": null
} |
javascript, fizzbuzz, dogescript
Create result variable
Append "Fizz" and "Buzz" based on rules
Print result variable if it has content, otherwise the iterator value.
such fizzbuzz much max
much very i is 0 next i smaller max next i more 1
very result
rly i % 3 is 0
result += "Fizz"
wow
rly i % 5 is 0
result += "Buzz";
wow
console.loge(result || i);
wow
wow
You can run this with:
plz fizzbuzz with 30 First, use the doge version for everything possible:
such fizzbuzz much max
much very i is 0 next i smaller max next i more 1
very result
rly i % 3 is 0
result more "Fizz" next
wow
rly i % 5 is 0
result more "Buzz" next
wow
console dose with result or i next
wow
wow | {
"domain": "codereview.stackexchange",
"id": 17433,
"lm_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, fizzbuzz, dogescript",
"url": null
} |
As @drhab has uttered doubts I shall proceed with the details: Let $f:\>X_1\to X_2$ be such that $$(b\cos t,\>b\sin t)\mapsto\bigl(\sqrt{b^2+1}\cos t,\>b\sin t\bigr)\ .$$ Given $(x,y)=(b\cos t,\>b\sin t)$ we have $$\cos t={x\over b},\quad \sin t={y\over b},\quad b=\sqrt{x^2+y^2}\ .$$ It follows that $$\sqrt{b^2+1}\cos t={x\sqrt{x^2+y^2+1}\over \sqrt{x^2+y^2}},\quad b\sin t= y\ .$$ This means that our homeomorphism appears in cartesian coordinates as $$f:\quad (x,y)\mapsto\left(x\sqrt{1+{1\over x^2+y^2}}, \ y\right)\ .$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9861513905984457,
"lm_q1q2_score": 0.8477585994668098,
"lm_q2_score": 0.8596637469145054,
"openwebmath_perplexity": 167.45165244136115,
"openwebmath_score": 0.9680501818656921,
"tags": null,
"url": "https://math.stackexchange.com/questions/1142135/are-x-y-in-mathbbr2-x-y-neq0-0-and-x-y-in-mathbbr2"
} |
optics, visible-light
Title: Diffraction Gratings Composed of Spherical Particles (such as those in opals) I was curious about simulating opals, and after some research, found that their amazing colors come from diffraction gratings.
Although, it seems to be different from the gratings caused by what is usually depicted as a sawtooth-shaped surface. Along with the geometry being composed differently, it appears that sub-wavelength spheres can cause interference effects, whereas normal grating distances appear to be necessarily greater than a specific wavelength to cause an effect. | {
"domain": "physics.stackexchange",
"id": 57510,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optics, visible-light",
"url": null
} |
navigation, costmap
And this is how it looks in Rviz, when I visualize the local costmap. Clearly, something is wrong:
In the costmap_local config file, I have set the parameters exactly like they where before things went wrong, which is like it is in the tutorial as well. I tried changing to global_frame: map and static_map: true but that didn't work.
I tried installing the 1.11.5 release of the navigation stack (instead of the current hydro version), but that didn't work either.
Any help is appreciated!
Originally posted by mrath on ROS Answers with karma: 100 on 2014-08-01
Post score: 0
Original comments
Comment by David Lu on 2014-08-01:
If you visualize the TF tree, is everything where you expect it to be?
Well.. This is awkward. Apparently the robot needed a good rest over the weekend, and the navigation is now working. I suspect I might have forgot to restart the computer at some point, even though I don't like to admit it. Marking as solved for now. | {
"domain": "robotics.stackexchange",
"id": 18856,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, costmap",
"url": null
} |
cc.complexity-theory, co.combinatorics, counting-complexity, permanent
Title: Complexity of counting the number of Good-perfect matching in the bipartite graph Let's $G=(U, V, E)$ be a balanced bipartite graph which $|U|=|V|=n$ and $|E|=n*(n-1)$; All nodes in $U$ are connected to all nodes in $V$ except $u_i$ to $v_i$ for $1\leq i \leq n$.
Definition1: Cross edges are two edges in $E$, one with two end points $u_i$, $v_j$ and the other with $u_j$, $v_i$.
Definition2: Good-perfect matching is a perfect matching with no cross edges.
What is the complexity of counting the number of Good-perfect matching in $G$? There is only one instance for each size n. Thus, the problem is clearly in P/poly, and cannot possibly be #P-complete unless the polynomial hierarchy collapses. | {
"domain": "cstheory.stackexchange",
"id": 544,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, co.combinatorics, counting-complexity, permanent",
"url": null
} |
optics, diffraction, lenses
Title: Maximum numerical aperture and diffraction limit of a lens In this thesis, you can read page 62/63 the following:
"The lens is designed for λ = 780 nm and works diffraction limited up to NA= 0.55. However the diffraction-limited numerical aperture for λ = 1064 nm is significantly reduced to NA= 0.35"
I am confused with regards to the relation between the numerical aperture (which as I understand here would be fixed by the size of a collimated beam incident on the lens ?) and the diffraction limit.
Isn't the diffraction limit fixed by the aperture of the lens and the working wavelength? How can you work diffraction limited up to a certain numerical aperture ? Can anyone explain the sentence ? It's about aberration. Generally, aberration increases with increasing numerical aperture, while diffraction decreases. Thus, there is a numerical aperture value below which diffraction limits the optical resolution. Above that value, aberration limits the resolution. | {
"domain": "physics.stackexchange",
"id": 97311,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optics, diffraction, lenses",
"url": null
} |
neural-networks, deep-learning, classification, objective-functions, activation-functions
2) Use K softmax output units, integer labels instead of one-hot encoded and the sparse categorical crossentropy loss function. In this case I am not sure how exactly sparse categorical crossentropy works and if it really takes into account the hierarchy. In my opinion, the problem you pose is best described as an ordinal classification problem, rather than a hierarchical classification problem. There are a number of approaches (besides ordinal loss functions) to address this problem discussed in the linked review article.
What loss functions should you use?
There are a number of order-aware loss functions that have been described, such as mean absolute deviation (MAD), mean squared error (MSE), and ordinal crossentropy loss. Which one works best for your dataset must be empirically determined. | {
"domain": "ai.stackexchange",
"id": 3543,
"lm_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, deep-learning, classification, objective-functions, activation-functions",
"url": null
} |
c++, c++20, lock-free
// Reader interface
// Reader gets ownership of the buffer, until the next call of
// get_read_buffer().
T *get_read_buffer(std::chrono::milliseconds timeout = std::chrono::milliseconds::max())
{
auto const timeout_time = std::chrono::steady_clock::now() + timeout;
// get the written buffer, waiting if necessary
auto *b = next_read_buf.exchange(nullptr);
while (b != readbuffer) {
// it could be the available buffer
readbuffer = available.exchange(readbuffer);
if (b == readbuffer) {
// yes, that's it
return readbuffer;
}
// else we need to wait for writer
b = nullptr;
std::unique_lock lock{read_queue_mutex};
auto test = [this,&b]{ b = next_read_buf.exchange(nullptr); return b; };
if (!read_queue.wait_until(lock, timeout_time, test)) {
return nullptr;
}
} | {
"domain": "codereview.stackexchange",
"id": 41143,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, c++20, lock-free",
"url": null
} |
to break it plays! 'Random ' the LCG is parameterized by three integers, and are a ( mmoda ) <.. Role in many applications ranging from cryptography to Monte Carlo methods Techniques ] Reason: Longer period is... See [ 3 ], or other Wolfram Language products and best–known pseudorandom number as a decompositionm=aq+r where r=mmoda.! That k in equation ( 3.1 ) is φ ( m ) linear congruentialgenerator with the of. Obtained when X0 = a s n + b mod m 's method restates the modulus as. = a s n + b mod m, where m is to. To generate random numbers plays a large role in many applications ranging from to..., where m is chosen to be very big, e.g the of. Is parameterized by three integers, and role in many applications ranging from cryptography to linear congruential generator! Mentioned c ≠ 0 as a means for creating our uniform random draws available a. Demonstration for which you Give feedback 2.1: Try the generator used some! Which has been used since the number generation process is a | {
"domain": "aayhcs.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.979976554032175,
"lm_q1q2_score": 0.8387140613725503,
"lm_q2_score": 0.8558511506439708,
"openwebmath_perplexity": 1086.942660211881,
"openwebmath_score": 0.7285389304161072,
"tags": null,
"url": "https://aayhcs.com/rachel-kelly-plogpi/93b5fb-linear-congruential-generator"
} |
vba, excel
Dim newDict As Dictionary
Set newDict = New Dictionary
Dim i As Long
Dim j As Long
For i = 1 To numRows
Dim newKey As String
newKey = ""
For j = 1 To numCols - 1
newKey = newKey & dataArray(i, j)
Next j
'--- each key must be unique, for duplicate keys
' only the first key,value is added
If Not newDict.Exists(newKey) Then
newDict.Add newKey, dataArray(i, numCols)
End If
Next i
Set LookupDictionary = newDict
End Function | {
"domain": "codereview.stackexchange",
"id": 24864,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vba, excel",
"url": null
} |
general-relativity, black-holes, spacetime, event-horizon, singularities
If your lines, triangles, etc. don't work the same way as they do in euclidean geometry, then you are dealing with intrinsic curvature.
An example of intrinsic curvature: Take a spherical object, and grab a pen. Designate a pole on the sphere, and the associated equator. Take an arbitrary point on the equator, and draw a line along the great circle connecting that point with the pole, then turn 90°, and continue the line you just drawn along the great circle designated by your new direction, until you hit the equator again. Now connect the two points on the equator by a line along the equator!
What you got is a "triangle" on the sphere, whose sides are great circles of the sphere, and the total sum of the internal angles are 270°. This is decidedly not euclidean, and this means the sphere has intrinsic curvature. | {
"domain": "physics.stackexchange",
"id": 21351,
"lm_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, black-holes, spacetime, event-horizon, singularities",
"url": null
} |
star, the-sun, white-dwarf
M_{\odot}$. i.e. The Sun should lose approximately 50% of its initial mass in stellar winds and (possibly) planetary nebula ejection. | {
"domain": "astronomy.stackexchange",
"id": 908,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "star, the-sun, white-dwarf",
"url": null
} |
• You mean, display each point that went into drawing a particular stream line? – J. M.'s torpor Oct 8 '16 at 4:47
• I understand you mean something analoguous to: right click on the graph and select "get coordinates". – Dr. Wolfgang Hintze Oct 8 '16 at 12:51
• Thanks for your comment @Dr.WolfgangHintze. What I meant is what bbgodfrey actually showed. To display the corresponding value of the functions at a given coordinate. – D. Andrew Oct 8 '16 at 14:44
• In V12.2, due to a change in StreamPlot, one has to add the option StreamColorFunction -> None to reproduce the figure in the question. – Michael E2 Jan 11 at 2:36
Since ToolTip does not appear to work here, try
Dynamic[{loc = MousePosition["Graphics", {0, 0}],
{-1 - x^2 + y, 1 + x - y^2} /. {x -> First@loc, y -> Last@loc}}]
which gives a result that looks like
{{x, y}, {xstream, ystream}} | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.971563967366828,
"lm_q1q2_score": 0.8475412698157195,
"lm_q2_score": 0.872347368040789,
"openwebmath_perplexity": 1430.8630016387176,
"openwebmath_score": 0.33564215898513794,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/128184/how-to-determine-specific-values-of-a-function-on-each-streamline/128198"
} |
urdf, xacro
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://CamPanTilt/meshes/TiltServoArm.STL" />
</geometry>
<material
name="">
<color
rgba="1 1 1 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://CamPanTilt/meshes/TiltServoArm.STL" />
</geometry>
</collision>
</link>
<joint
name="TiltServoJoint"
type="revolute">
<origin
xyz="0 0 0"
rpy="6.383E-32 0 0" />
<parent
link="TiltServo" />
<child
link="TiltServoArm" />
<axis
xyz="-0.72217 0.69172 0" />
<limit
lower="0"
upper="31415"
effort="0"
velocity="0" />
</joint>
<link
name="CamSupport">
<inertial>
<origin
xyz="-0.00450560234040073 0.0107871985689981 0.0566128074113866"
rpy="0 0 0" /> | {
"domain": "robotics.stackexchange",
"id": 22539,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "urdf, xacro",
"url": null
} |
javascript, node.js, async-await, promise
Don't create intermediate functions when not required. eg .then(function(data) {resolve(data)}) can be .then(resolve)
Exceptions float to the top. You are returning a promise when you call test, It looks like you intend the calling function to include a .catch callback. That means you do not have to handle the catches inside the function test. just let the exceptions fall though to the calling function.
Console logging is for debugging only and has no place in release code. You are using console.log to follow flow. Avoid console logging and use dev tools debugger to follow flow.
One issues with using console is that it forces you to write the code in such a way as to allow for the console expression to exist, often to the detriment of optimal execution and readability. | {
"domain": "codereview.stackexchange",
"id": 33887,
"lm_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, node.js, async-await, promise",
"url": null
} |
ecology, biodiversity, species-distribution
Gaston. 2000. Global patterns in biodiversity (essential reading!)
Chave. 2013. The problem of pattern and scale in ecology: what have we
learned in 20 years?
Venevsky & Veneskaia. 2003. Large-scale energetic and landscape factors of vegetation diversity
Mittelbach et al. 2007. Evolution and the latitudinal diversity gradient: speciation, extinction and biogeography
Marquet et al. 2005. Scaling and power-laws in ecological systems | {
"domain": "biology.stackexchange",
"id": 1706,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ecology, biodiversity, species-distribution",
"url": null
} |
molecular-genetics, gene-expression, cell-culture
Wild-type cells would normally be included to show what 'normal' response is. | {
"domain": "biology.stackexchange",
"id": 6170,
"lm_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-genetics, gene-expression, cell-culture",
"url": null
} |
## Exercises
### Exercise $$\PageIndex{1}$$
One of the first conditional probability paradoxes was provided by Bertrand.23 It is called the Bot Paradox. A cabinet has three drawers. In the first drawer there are two gold balls, in the second drawer there are two silver balls, and in the third drawer there is one silver and one gold ball. A drawer is picked at random and a ball chosen at random from the two balls in the drawer. Given that a gold ball was drawn, what is the probability that the drawer with the two gold balls was chosen?
### Exercise $$\PageIndex{2}$$
The following problem is called the two aces problem. This problem, dating back to 1936, has been attributed to the English mathematician J. H. C. Whitehead (see Gridgeman24). This problem was also submitted to Marilyn vos Savant by the master of mathematical puzzles Martin Gardner, who remarks that it is one of his favorites. | {
"domain": "libretexts.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9811668684574637,
"lm_q1q2_score": 0.8089347243493602,
"lm_q2_score": 0.8244619242200082,
"openwebmath_perplexity": 233.36543261063332,
"openwebmath_score": 0.858582079410553,
"tags": null,
"url": "https://stats.libretexts.org/Bookshelves/Probability_Theory/Book%3A_Introductory_Probability_(Grinstead_and_Snell)/04%3A_Conditional_Probability/4.03%3A_Paradoxes"
} |
• The "next page" begins with a new section. By any chance are you bringing in that section with\include? (That always forces a new page.) – barbara beeton May 28 at 22:05 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211597623861,
"lm_q1q2_score": 0.8037029396593904,
"lm_q2_score": 0.8244619350028204,
"openwebmath_perplexity": 3753.756857697134,
"openwebmath_score": 0.9915350079536438,
"tags": null,
"url": "https://tex.stackexchange.com/questions/546706/combination-of-subequations-and-align-environments-leaves-a-lot-of-white-space"
} |
- Solve quadratic equations using factoring, complete the square and the quadratic formula step-by-step. Domain of a Quadratic Function. How to Find the Y-Intercept of a Parabola. - 12980261 brian has $45.25 saved and earns$7.25/week. Which four functions are even? The range is restricted to those points greater than or equal to the y -coordinate of the vertex (or less than or equal to, depending on whether the parabola opens up or down). Rational Parent Function. Quadratic function. …A parent function is the simplest function that still satisfies the definition of a certain type of function.For example, when we think of the linear functions which make up a family of functions, the parent function would be y = x. This website uses cookies to ensure you get the best experience. Quadratic functions generally have the whole real line as their domain: any x is a legitimate input. This same quadratic function, as seen in Example 1, has a restriction on its domain which is x \ge 0.After | {
"domain": "abrioasesores.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9711290913825542,
"lm_q1q2_score": 0.8154900908711467,
"lm_q2_score": 0.8397339736884711,
"openwebmath_perplexity": 702.6906658304392,
"openwebmath_score": 0.3587808310985565,
"tags": null,
"url": "https://abrioasesores.com/2h6mlk/de26f3-parent-functions-quadratic"
} |
image-processing, image-analysis
This really confuses me, because I think the image is just blurred by Gaussian with different $\sigma$, each blurred version still has the same image size, so I don't think they're scaled, unless each blurred is downsampled to a smaller image size, which means I think different size representation is truely the The larger the σ of the blur kernel, beyond an amount intrinsic to the image, the more the image is low-pass filtered and thus suitable for downsampling with little additional loss of information due to aliasing. This use of the term "scale" seems to relate to the remaining information content or to the size to which an image is suitable for downsampling without significant additional filtering. Here, scale is not just the current number of pixels, which may be larger (but carry little additional information). | {
"domain": "dsp.stackexchange",
"id": 6345,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "image-processing, image-analysis",
"url": null
} |
catkin
Title: Linking namespace to executable
Hello,
i have two executable i build them with:
add_executable(MapProcessing src/MapProcessing.cpp BasicCalculation.cpp)
added minimal example
function header MapProcessing.h
#ifndef MAPPROCESSING_H_
#define MAPPROCESSING_H_
#include <BasicCalculation.h>
class MapProcessing
{
public:
MapProcessing();
private:
void DoSomething();
};
#endif /* MAPPROCESSING_H_ */
function cpp
#include "map_processing.h"
void MapProcessing::DoSomething(){
Eigen::Vector2d vector(1,0);
double test=BasicCalculation::test;
int p=BasicCalculation::a();
double test=BasicCalculation::AngleBetweenXaxisAndVector(vector);
}
}
header namespace:
#ifndef BASICCALCULATION_H_
#define BASICCALCULATION_H_
#include <Eigen/Core>
#include <Eigen/Eigenvalues>
#include <Eigen/Geometry>
namespace BasicCalculation{
double AngleBetweenXaxisAndVector(const Eigen::Vector2d& vector);
static double test=2;
static int a(){return 1;}
}; | {
"domain": "robotics.stackexchange",
"id": 15252,
"lm_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",
"url": null
} |
photography, positional-astronomy, earths-orbit, analemma, axial-tilt
And also the light (as light tends to travel in straight lines, otherwise the shape of analemma could have easily been different). Then again all the physical properties of the universe and limits of human perception would have to be listed (please disregard strikethrough sentences as they are over the line of the limited context of this post and the answer. They were included to give an appraisal for the casual reader about the contextual limit this explanation addresses.)
Furthermore, | {
"domain": "astronomy.stackexchange",
"id": 7230,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "photography, positional-astronomy, earths-orbit, analemma, axial-tilt",
"url": null
} |
java, tic-tac-toe
If the name of a method implies something like getN() one expect to get exactly that what is implied by the name. You are returning size which is n * n. You should store the n which is passed inside the constructor and return it in this method.
Storing n will help you a lot more than only for this method. Every time you are using Math.sqrt(size) you could just use n instead.
Using braces {} for single if statement or single line loop statements will make your code less error prone.
You don't use the isValidMove() method. In addition one wouldn't expect for a invalid move that the next player would become "".
You need to implement this method and it should be called first at the move() method and if it returns false you should throw an IllegalArgumentException.
The getCurrentPlayer() method doesn't need a while loop. A simple if statement would be enough. | {
"domain": "codereview.stackexchange",
"id": 11991,
"lm_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, tic-tac-toe",
"url": null
} |
lagrangian-formalism, conservation-laws, neutrinos, noethers-theorem, spinors
$$
\mathcal{L} = i\psi^{\dagger}_L\overline\sigma^\mu\partial_\mu\psi_L
$$
that clearly has a $U(1)$ symmetry for field transformations such $\psi_L \to e^{i\theta}\psi_L $, with $\theta$ constant.
In the case of Dirac fields, this symmetry is linked to the electric charge of the field quanta, but neutrinos have no charge. Then my question is the following: what is the physical explanation of the Noether charge associated to this symmetry? The charge associated to the $U(1)$ symmetry you mention is called weak hypercharge. The relation with the electric charge is the following $Q= T_3+Y/2$ where $T_3$ is the third generator of the $U(2)$ symmetry representing the weak isospin and $Q$ the electric charge. This relation holds for all leptons. Neutrinos have weak isospin $+1/2$ and weak hypercarge $-1$ so that $Q=0$ | {
"domain": "physics.stackexchange",
"id": 25204,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "lagrangian-formalism, conservation-laws, neutrinos, noethers-theorem, spinors",
"url": null
} |
python, algorithm, parsing
Regarding how to use logging, the very basic to start with would be as follows:
import logging
...
def write_entry_file(dirname, filename, content, debug=False):
...
logging.debug('writing to file %s', path)
...
def main():
...
logging.basicConfig(
format='%(levelname)s: %(message)s',
level=logging.DEBUG)
...
Once you have more logs you can play a little bit setting different levels to each message and adding a command line option to set the desired level and get the desired level of verbosity. | {
"domain": "codereview.stackexchange",
"id": 8990,
"lm_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, algorithm, parsing",
"url": null
} |
Consider the equation $$x^2=2$$ which has a solution in the first field. Suppose $$f \colon \mathbb{Q}[\sqrt{2}] \to \mathbb{Q}[\sqrt{3}]$$ is an isomorphism, so $$f(x)^2 = f(x^2) = f(2)$$. But note that $$f(2)=2$$, as an isomorphism must fix the multiplicative identity. Hence, we have $$y^2=2$$ where $$y = f(x) \in \mathbb{Q}[\sqrt{3}]$$. Then $$y^2 = (a+b\sqrt{3})^2 = 2$$ and so $$a^2+2ab\sqrt{3} +3b^2=2$$. By a rationality argument then $$a^2+3b^2 =2$$ and so $$a$$ or $$b$$ is zero. If $$b$$ is zero then we conclude that $$2$$ has a rational square root. If $$a$$ is zero then we conclude that $$2/3$$ has a rational square root. Both lead to contradictions. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9881308796527184,
"lm_q1q2_score": 0.8055564012606642,
"lm_q2_score": 0.8152324938410784,
"openwebmath_perplexity": 225.26519946088408,
"openwebmath_score": 0.9815568923950195,
"tags": null,
"url": "https://math.stackexchange.com/questions/1856231/does-there-exist-any-isomorphism-between-mathbb-q-sqrt-2-and-mathbb-q-sq?noredirect=1"
} |
n 0 1 2 3 4 5 6 7 8 9 10 11 12
n^2 0 1 4 9 3 12 10 10 12 3 9 4 1
$$m^4+8 \equiv n^3 \mod 13\\ (m^4+8)^4 \equiv n^{12} \mod 13$$ From Fermat's little theorem we know that $n^{12}\equiv0,1 \mod 13$, so we then get: $$(m^4+8)^4 \equiv 0,1 \mod 13\\ (m^4+8)^2 \equiv 0,1,12 \mod 13\\ m^4+8 \equiv 0,1,5,8,12 \mod 13\\ m^4 \equiv 0,4,5,6,10 \mod 13$$ Note that $5$ and $6$ are not squares, so they are certainly not fourth powers. $$m^4 \equiv 0,4,10 \mod 13\\ m^2 \equiv 0,2,6,7,11 \mod 13$$ Note that the only one of these that is a square is $0$ so we are just left with $$m^2 \equiv 0 \mod 13\\ m \equiv 0 \mod 13$$
Consider the equation $n^3=m^2+8$. These types of equations are called Mordell equations.
Claim: The only integer solution to $n^3=m^2+8$ is given by $m=0, n=2$.
Suppose we have an integer solution to $n^3=m^2+8$. (All variables that are introduced will have integer values.) | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.978712650690179,
"lm_q1q2_score": 0.8155853215375167,
"lm_q2_score": 0.8333245932423308,
"openwebmath_perplexity": 62.177986697790594,
"openwebmath_score": 0.9928603172302246,
"tags": null,
"url": "https://math.stackexchange.com/questions/2642805/mathematical-proof-that-m48-is-not-a-cube-of-an-integer-if-13-does-not-div"
} |
quantum-mechanics, wavefunction, hilbert-space
$$\Psi_A = \psi_B \otimes \psi_C$$ at the level of normalizable (pure) quantum states and
$$H_A = H_B \otimes \hat{1}_C + \hat{1}_B \otimes H_C $$
at the level of Hamiltonians.
This description is consistent and leads to experimentally verifiable predictions for any multiparticle system (the simplest would be a Hydrogen atom). This axiom is amended for subsystems made of identical elements (for example the two electrons in the three-particle Helium atom) case in which the states and operators are multiplied or acted on by symmetrization or antisymmetrization operators.
The answer by Emilio Pisanty should be read after mine. | {
"domain": "physics.stackexchange",
"id": 45151,
"lm_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, hilbert-space",
"url": null
} |
inorganic-chemistry, acid-base, nomenclature, pnictogen
Title: Why does phosphinic acid not form pyroacids? Why does $\ce{H3PO2}$ not form pyroacids? All I know is pyroacids are derived oxyacids obtained by removing one $\ce{H2O}$ molecule from two molecules of oxyacids. Correct me if this is wrong. It’s essentially both reasons mentioned in the comments.
“Pyro-” means “fire” or, more generally, “heat” (“pyrotechnics” = “fireworks”). Hypophosphorous acid, or more accurately phosphinic acid, is thermally not very stable decomposing at 110 °C. Thus there is no chance for condensation with water loss. See Wikipedia — Hypophosphorous acid.
Each monomer has one protic hydrogen. Condensing two of them with loss of water would mean both of the protic hydrogens area in the water instead of the dimer. So if a dimer were to form, it would not be a (Brønsted–Lowry) acid. | {
"domain": "chemistry.stackexchange",
"id": 17417,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "inorganic-chemistry, acid-base, nomenclature, pnictogen",
"url": null
} |
java, tree
while ( input.hasNextLine () ) {
String line = input.nextLine().trim();
Scanner getStat = new Scanner(line).useDelimiter("\\s*:\\s*");
if ( line.length()== 0 || line.charAt(0) == '/' ) continue; | {
"domain": "codereview.stackexchange",
"id": 4163,
"lm_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, tree",
"url": null
} |
c, multithreading, thread-safety
where buf and n are passed as parameters to the function. buf should be long enough to hold any value for n, 9 + 4 + 1 + 11 = 25 characters, assuming n is no larger than 32 bits. (That's 9 bytes for the base filename, 4 for the extension, 1 for the terminating nul, and 11 for a signed 32 bit integer printed as a decimal.)
You don't verify that fw and fr (and some of your other file handles) have successfully been opened before making use of them.
Most of your strdup calls will leak, and are not necessary.
At one point in main you call atoi(&line_copy[0]) twice - one inside an if, and once in the following statement. This should be called once, stored in a local variable:
int nr = atoi(line_copy);
if (nr > NUMBER_OF_ROWS)
NUMBER_OF_ROWS = nr;
reducerThread will be an infinite loop if SYNCHRONIZED is 0. | {
"domain": "codereview.stackexchange",
"id": 38158,
"lm_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, multithreading, thread-safety",
"url": null
} |
newtonian-mechanics, rotational-dynamics, reference-frames, moon, coriolis-effect
Title: Would Foucault's pendulum work on the moon? I am taking a course in introductory general relativity and came up on this question, which a google search didn't answer.
The rotation of the Earth can be measured using a Foucault pendulum.
The moon also rotates to always keep the same side facing the Earth, and it seems therefore that we should be able to measure this rotation using a pendulum on the moon. However, I have just learnt that a particle falling freely in a gravitational field is really following a geodesic curve through space-time. This got me wondering whether the apparent rotation of the moon is an artifact of the curvature of space-time, or if it is a real physical effect. I think my question can be phrased as in the title - would a Foucault pendulum rotate on the moon? | {
"domain": "physics.stackexchange",
"id": 76233,
"lm_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, rotational-dynamics, reference-frames, moon, coriolis-effect",
"url": null
} |
equilibrium, surface-chemistry, adsorption
$$\left\{
\begin{align}
[A]+[AB]+[AC] & = A_0\\
[B]+[AB] & = B_0\\
[C]+[AC] & = C_0\\
{[AB]\over[A][B]}& =K_1 \\
{[AC]\over[A][C]}& =K_2
\end{align}
\right.$$
With 5 unknowns and 5 equations, this should be solvable (because the nature manages to solve it somehow, if not for other reason). There is no guarantee, however, that the solution will be nice. Indeed, if we deal with the system exactly as it stands now, it is equivalent to a certain 4th degree algebraic equation which is better solved numerically.
Things get somewhat more manageable if we may disregard something. For example, if A is a relatively minor component, so that $[A]<<[B]$, then we may assume $[B]\approx B_0$ (and the same for C). All of a sudden, the problem becomes linear:
$$[AB]=K_1[A]B_0 \\
[AC]=K_2[A]C_0 \\
[A]+K_1[A]B_0+K_2[A]C_0=A_0
$$
which yields
$$
[AB]={K_1B_0\over1+K_1B_0+K_2C_0} \\
[AC]={K_2C_0\over1+K_1B_0+K_2C_0}
$$
Whether or not this approximation is realistic in your particular case is up to you. | {
"domain": "chemistry.stackexchange",
"id": 6620,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "equilibrium, surface-chemistry, adsorption",
"url": null
} |
beginner, c, state-machine
/**
* Self Test or Self Diagnosis Check to test if all the
* components are working well
* <br>
* Returns <sbSelfTestOK> on success,
* <sbErr> on failure
* @returns sbTransition - Transition code
*/
sbTransition sbSelfTestState(void) {
int err = 0;
while (1) {
printf("Self Test\n");
if (err == 0) {
return sbStartupTrans;
} else if (err == 1) {
return sbErr;
}
}
}
sbTransition sbStartupState(void) {
int err = 0;
while (1) {
printf("Startup State\n");
if (err == 0) {
return sbStartupOK;
} else {
return sbErr;
}
}
}
sbTransition sbFlightStartState(void) {
int err = 0;
while (1) {
printf("Flight Start\n");
if (err == 0) {
return sbFlightStartOK;
} else {
return sbErr;
}
}
} | {
"domain": "codereview.stackexchange",
"id": 40069,
"lm_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, state-machine",
"url": null
} |
operators, renormalization, conformal-field-theory, singularities
It's related to the motivation by the contour integrals simply because by a "contour", we mean a closed curve parameterized by an angle $\phi$ which belongs to a compact circle. The compactness in both justifications is the "virtue" of the radial quantization. This compactness has many basic consequences: the absence of the arbitrarily soft modes, something that removes the IR divergences on the world sheet, as well as the possibility to get a well-defined contour integral (equivalent to the residue inside the contour) which is what allows us to to link OPEs to group action, relate operators with states, and so on. | {
"domain": "physics.stackexchange",
"id": 6982,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "operators, renormalization, conformal-field-theory, singularities",
"url": null
} |
ros, navfn, global-planner
Original comments
Comment by RB on 2015-01-26:
Thank you @David
Comment by David Lu on 2015-01-26:
If this is satisfactory, please click the check mark to mark the question as answered.
Comment by RB on 2015-01-27:
I have a doubt related to your last answer. In tutorial, only global_planner.cpp is used specific to plugin. global_planner.cpp is similar to navfn_ros.cpp. calcNavFnDijkstra(true) is used inside makePlan() method and computePotential() uses calcNavFnDijkstra(). calcNavFnDijkstra(true) is 2b changed
Comment by David Lu on 2015-01-27:
I'm really not sure what you're asking. If you're writing a new planner, you should make a new package. If you're modifying files from navfn, you should copy them over. If you're not modifying files from navfn, you should dynamically link to them.
Comment by RB on 2015-01-27:
Sorry for not explaining my doubt @David. I have updated the question to incorporate the doubt. | {
"domain": "robotics.stackexchange",
"id": 20684,
"lm_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, navfn, global-planner",
"url": null
} |
homework-and-exercises, kinematics, aircraft
Title: Relative motion of airplane in the wind I have a relative motion problem in which I cannot get my answer to match the book answer.
The question is:
An airplane has to travel $189\, \mathrm{km}$ due east to point $B$ from point $A$. It can fly at $100\, \mathrm{kph}$ in still air. There is a wind at $60\, \mathrm{kph}$ blowing from the south. Find the time taken for the trip. | {
"domain": "physics.stackexchange",
"id": 10451,
"lm_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, kinematics, aircraft",
"url": null
} |
Because they are disjoint, we can be certain that any intersecting set will contain at least one number from each of these four sets. Note that this immediately implies that $N$ can contain no more that 11 numbers. What if we try to construct $N$ by removing 1 from the first set, 3 from the second, 5 from the third, and 7 from the fourth? Then the square triplet $\{2, 4, 8\}$ would remain as a subset of $N$, so the resulting 11-element candidate would not have the property we seek. There are, of course, $3^4 = 81$ ways to remove a single number from each of the four triplets; unless we can think of a short cut, we must find for all 81 possibilities a square triplet that remains in $N$ after those four numbers are removed, thereby forcing $N$ to exclude at least one more item. So pour yourself a drink, turn on the TV, sit back and make a list of the 81 ways to select the four items, and then in each case find a square triplet that has not been intersected. Happily, Lim has done the job | {
"domain": "uregina.ca",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9867771763033943,
"lm_q1q2_score": 0.8286303095078712,
"lm_q2_score": 0.839733963661418,
"openwebmath_perplexity": 389.1328148057956,
"openwebmath_score": 0.7485301494598389,
"tags": null,
"url": "http://mathcentral.uregina.ca/mp/previous2012/sep12sol.php"
} |
terminology, genomes, copy-number-variation
Title: gene dosage vs copy number In the online articles I'm reading, I see the authors mention gene dosage and copy number. My confusion is regarding if the two terms mean exactly the same thing - number of copies a gene occur in the genome? They don't always mean the same thing, as gene dosage may be measured by RNA-Seq, whereas copy number by DNA sequencing / other means. But people do use it as rough substitutes. Often people do try to infer copy number from RNA-Seq, as samples tend to fall in "digital" intervals of expression, and use CNV to estimate gene dosage. | {
"domain": "biology.stackexchange",
"id": 12097,
"lm_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, genomes, copy-number-variation",
"url": null
} |
c++, beginner, reinventing-the-wheel, c++17
std::iota(K_.begin(), K_.end(), 0);
p_.reserve(weights.size());
std::transform(
weights.begin(), weights.end(),
std::back_inserter(p_),
[result = std::reduce(weights.begin(), weights.end())]
(real w) -> real
{
return w / result;
}
);
U_.reserve(weights.size());
std::transform(
p_.begin(), p_.end(),
std::back_inserter(U_),
[&, this]
(real x) -> real
{
return p_.size() * x;
}
); | {
"domain": "codereview.stackexchange",
"id": 44002,
"lm_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, reinventing-the-wheel, c++17",
"url": null
} |
electrostatics, electric-fields, charge, gauss-law, dielectric
If someone could explain why, in the second equation, the free charge is not divided by a form of permittivity, I believe this would clarify a lot. I would also request a method of answering my original question! D field is defined as the E field multiplied by the permittivity + P field (keep reading, this will be explained). The D field is simply the amount of electric field that is felt/measured.
Its separation/distinction to the E-field, is for two reasons.
Firstly, some media 'allow' or 'permit' the electric field better than others. The permittivity of a medium is the constant that describes how much is 'let through' said medium. | {
"domain": "physics.stackexchange",
"id": 87106,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrostatics, electric-fields, charge, gauss-law, dielectric",
"url": null
} |
• Because you wrote, "Your answer of 18 is incorrect" and the book's author wrote the answer, the author's answer is incorrect. Thank you for this level of detail! – mellow-yellow Mar 24 '17 at 19:23
Hint -
One easy method to do these type of problems is = Total ways - Number of ways Soma and Eric sit together.
I will try to put a generalization formula here. Please correct me if I am wrong:
Lets say we have $n$ people in a line, where $m$ certain people are not next to each other. (Assume $n \gt m$)
This can be solved using the complement.
$n! - m!(n-m+1)!$
• Something seems off with my answer now that I'm looking at it. I just don't know what – WaveX Mar 24 '17 at 16:55
• Nevermind my answer follow the one supplied by N. F. Taussig – WaveX Mar 24 '17 at 17:54 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9884918502576514,
"lm_q1q2_score": 0.8460018801764001,
"lm_q2_score": 0.855851143290548,
"openwebmath_perplexity": 199.94383996606769,
"openwebmath_score": 0.7558878660202026,
"tags": null,
"url": "https://math.stackexchange.com/questions/2201462/how-many-ways-can-you-rearrange-the-individuals-in-a-row-so-that-soma-and-eric-d/2201474"
} |
bond, hybridization, covalent-compounds, oxidation-state, lewis-structure
Regarding sulfur trioxide, this article may be of interest. | {
"domain": "chemistry.stackexchange",
"id": 1439,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bond, hybridization, covalent-compounds, oxidation-state, lewis-structure",
"url": null
} |
python, performance, python-3.x, numpy, simulation
139 0.001 0.000 0.043 0.000 <frozen importlib._bootstrap_external>:793(get_code)
804 0.001 0.000 0.119 0.000 function_base.py:3828(_quantile_unchecked)
182/2 0.001 0.000 0.165 0.083 <frozen importlib._bootstrap>:978(_find_and_load)
4221 0.001 0.000 0.001 0.000 numeric.py:1399(<listcomp>)
4226 0.001 0.000 0.001 0.000 {method 'insert' of 'list' objects}
287 0.001 0.000 0.004 0.000 overrides.py:72(verify_matching_signatures)
317 0.001 0.000 0.029 0.000 overrides.py:154(decorator)
1555 0.001 0.000 0.003 0.000 <frozen importlib._bootstrap_external>:56(_path_join)
179 0.001 0.000 0.034 0.000 <frozen importlib._bootstrap>:882(_find_spec)
339 0.001 0.000 0.002 0.000 functools.py:37(update_wrapper)
190/31 0.001 0.000 0.003 0.000 sre_compile.py:71(_compile) | {
"domain": "codereview.stackexchange",
"id": 37631,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, python-3.x, numpy, simulation",
"url": null
} |
python, ros2, packaging
UPDATE-1: Just FYI, though this should be irrelevant from the "src/flat layout" decision, I found the current implementation of ament(/colcon) doesn't support "src layout" usecase well -- Using ament_python_install_package(%PACKAGE_TOPDIR%), if I do ament_python_install_package(src) in order to let ament know where my Python modules/executables are in, then I get src installed, which is not a Python package I am making. The same cmake macro doesn't seem to support slash in the argument so passing src/mypackage errors. I expect that the rationale behind that exact change is likely lost to time. However, my intuition says this is likely a change related to one or more of: | {
"domain": "robotics.stackexchange",
"id": 2698,
"lm_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, ros2, packaging",
"url": null
} |
opencv, stere-image-proc
Title: What is subpixel matching precision for stereo?
Hello,
I'm trying to figure out what the subpixel stereo matching precision is in stereo_image_proc (that is, how many pixels/subpixels of disparity can the stereo matching algorithm resolve). I looked at the code a bit, and I think it's 1/4-pixel, but I've also heard it's 1/8-pixel. Do you which it is (or maybe a different value altogether)? Thanks!
Originally posted by rdbrewer on ROS Answers with karma: 66 on 2013-05-26
Post score: 0
I am pretty sure it's 1/16th pixel. In disparity.cpp of stereo_image_proc it says so explicitly:
// OpenCV uses 16 disparities per pixel
Best
Tim
Originally posted by timster with karma: 396 on 2013-08-14
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 14301,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "opencv, stere-image-proc",
"url": null
} |
mechanical-engineering, control-engineering, control-theory, transfer-function
$\ y = G(s)u $ is in terms of a differential equation:
$\ \dddot{y} + a_2\ddot{y}+a_1\dot{y}+a_0y = b_2\ddot{u}+b_1\dot{u}+b_0u $
Due to the fact that we only have measurements of the input $\ u $ and output $\ y $ of the system, we can't use their derivatives. As a result, we filter each term with a third order stable filter (poles of filter need to be negative) $\ Λ(s) = s^3 + λ_1s^2 + λ_2s + λ_3 $ where the coefficients $\ λ_1,λ_2,λ_3 $ are chosen though the poles of the filter. Filtering the above differential equation results in no use of differentiators and produces the following equation:
$\ \frac{s^3}{Λ(s)}y \ + a_2\frac{s^2}{Λ(s)}y \ + a_1\frac{s}{Λ(s)}y + a_0\frac{1}{Λ(s)}y \ = b_2\frac{s^2}{Λ(s)}u \ +b_1\frac{s}{Λ(s)}u \ + b_0\frac{1}{Λ(s)}u $
Let's define $\ z = \frac{s^3}{Λ(s)}y \ + a_2\frac{s^2}{Λ(s)}y \ + a_1\frac{s}{Λ(s)}y + a_0\frac{1}{Λ(s)}y \ \ $ since $\ Λ(s),a_2,a_1,a_0,y $ are known. Our equation now becomes: | {
"domain": "engineering.stackexchange",
"id": 3134,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mechanical-engineering, control-engineering, control-theory, transfer-function",
"url": null
} |
R ( Courses! Statistics easy by explaining topics in simple and straightforward ways, web Development & many more us. The symbol for the valuation of stock by assessing the fundamental of a company an observation from the mean the... And for population data at BYJU 'S it tells you how much your data set stock and... Many practical applications, the mean, or average, how far each value lies from the absolute. Exactly balance the negative and so their sum would be zero ) one! Learning algorithm uses these concepts in… the standard deviation is defined mathematically as the symbol for the valuation stock... Know the better and larger price range tool for measurement for mean deviation and standard deviation average. The numbers in your dataset standard deviation is one of the variance a! | {
"domain": "bifi.es",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.95598134762883,
"lm_q1q2_score": 0.802770013899282,
"lm_q2_score": 0.8397339716830605,
"openwebmath_perplexity": 480.8660382443618,
"openwebmath_score": 0.7592572569847107,
"tags": null,
"url": "http://contagion14.bifi.es/p91re/viewtopic.php?page=fc42fb-mean-deviation-and-standard-deviation"
} |
ros2, spin, nav2
Here Spin Node is getting initialized with 0 as spin_dist at once, not taking input from blackboard variable while ticking the Node at Run Time. The Answer is, Spin is getting input from blackboard at the time of initialization only, to make Spin to get input on Running we need to update the on_tick function of Spin Action.
void SpinAction::on_tick()
{
double dist;
getInput("spin_dist", dist);
RCLCPP_WARN(node_->get_logger(), "Angle from spin action %.2f", dist);
double time_allowance;
getInput("time_allowance", time_allowance);
goal_.target_yaw = dist;
goal_.time_allowance = rclcpp::Duration::from_seconds(time_allowance);
getInput("is_recovery", is_recovery_);
if (is_recovery_)
{
increment_recovery_count();
}
} | {
"domain": "robotics.stackexchange",
"id": 38547,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros2, spin, nav2",
"url": null
} |
// AbsoluteTiming But it still takes about more than twice the time of Diagonal[].What other ways to find the diagonal of a matrix that are faster than these attempts above without using the Diagonal command? I would love to learn other ways, I could only think of those two ways. Could it also be that, even using Part, there is a faster and simpler way that I haven't thought of? Can anyone teach me others ways (even if they are slower than Diagonal[])? I will be very grateful if anyone can help! Thanks. | {
"domain": "wolfram.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9441768541530198,
"lm_q1q2_score": 0.8134444396698852,
"lm_q2_score": 0.8615382129861583,
"openwebmath_perplexity": 1310.9410900830037,
"openwebmath_score": 0.4725727140903473,
"tags": null,
"url": "https://community.wolfram.com/groups/-/m/t/1815025"
} |
standard form and setting it equal to the graph of y = x 2 /latex ] the... Been superimposed over the quadratic equation called vertex form, that represents image... /Latex ] must be equal, there is a transformations of quadratic functions in vertex form that can be written in the form Now check to. Two pieces of information look similar to the standard form fits some.. Indicates the stretch of the given functions: graph the following mapping rules, the! The properties of their graphs such as vertex and show the new tables of values positive x-axis. Parabola looks like without any transformations being applied to a base or “ mother ” parabola h.. The y-axis provided to write the vertex, the corresponding coefficients must be equal this means: the... Investigating quadratic functions in vertex form Focus on transformations of quadratic functions in vertex form the equation y = x to... And table of values this means: if the graph of this basic function x + 4 ) +. The new tables of values | {
"domain": "mediakommunikation.se",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211582993982,
"lm_q1q2_score": 0.8343018100026284,
"lm_q2_score": 0.8558511506439708,
"openwebmath_perplexity": 731.1402702819819,
"openwebmath_score": 0.5322927832603455,
"tags": null,
"url": "https://mediakommunikation.se/equidae-family-epchc/01359c-transformations-of-quadratic-functions-in-vertex-form"
} |
c++, opencv, ubuntu, ros-fuerte, ubuntu-precise
Title: Undefined reference in cvBridge.h
I just updated to Fuerte and Ubuntu 12.04 and I'm trying to build my ROS pacakges on it.
I'm getting errors in my OpenCV code which may be because the OpenCV code I'm building is a little old.
Here's the full build log for the package that's giving me errors:
http://paste.ubuntu.com/991395/
And here's the code for ImageRecording.cpp (which seems to be the source of all these 'undefined reference' errors):
http://paste.ubuntu.com/991411/
What I'm confused about is that I'm not getting a compiler error, but a linker error. I would have understood getting a compiler error since the code is outdated and maybe the API we were using back then is not supported anymore, but a linker error indicates that the same API is still there but somehow the setup of the whole thing is broken in some way.
Any insight into this would be greatly appreciated.
Kind regards, Stefan Freyr. | {
"domain": "robotics.stackexchange",
"id": 9420,
"lm_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++, opencv, ubuntu, ros-fuerte, ubuntu-precise",
"url": null
} |
c#, beginner, sqlite
Title: Working with sqlite and moving functions to class I want to move this to a class that will open an sqlite connection that can be re-used, rather than disposing of it every time I write to the database. Furthermore I am more than happy for any best practices from sqlite users! I am aware of a similar thread and am trying to absorb it:
SQLite helper class
void createDB()
{
// Dont forget to del if refreshing
if (!File.Exists(connstring))
{
SQLiteConnection.CreateFile(connstring);
SQLiteConnection sqliteCon = new SQLiteConnection(@"Data Source=" + connstring);
sqliteCon.Open();
// Define db structure
string createfilesTableSQL = "CREATE TABLE files ( id INTEGER PRIMARY KEY, filename TEXT, creationtime TEXT, lastwrite TEXT, lastaccess TEXT, checksum TEXT);";
string createfoldersTableSQL = "CREATE TABLE folders ( id INTEGER PRIMARY KEY, dirname TEXT, creationtime TEXT, lastwrite TEXT, lastaccess TEXT, checksum TEXT);"; | {
"domain": "codereview.stackexchange",
"id": 3640,
"lm_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, sqlite",
"url": null
} |
Replacing DiracDelta by its approximation in the weak topology helps:
s = NDSolve[{f''[x] + x f'[x] == x^2 *0.01/Pi/((x - 1)^2 + 0.01^2),
f[0] == 0, f[10] == 1}, f[x], {x, 0, 10}]
Plot[f[x] /. s, {x, 0, 10}, PlotRange -> All]
• Rigorously saying, we replace the δ-distribution which is not associated with any usual function by the distribution associated with a usual function 0.01/Pi/((x - 1)^2 + 0.01^2). – user64494 Dec 9 '20 at 20:01
ClearAll[f, x];
psol = ParametricNDSolveValue[{f''[x] + x f'[x] ==
x^2 DiracDelta[x - 1], f[0] == 0, f'[0] == p},
f, {x, 0, 10}, {p}];
FindRoot[psol[p][10] == 1, {p, 0.2}]
bvpsol = psol[p] /. %;
(* {p -> 0.274728} *)
bvpsol[{0, 10}]
% - {0, 1}
(*
{0., 1.}
{0., -1.44329*10^-15}
*) | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.942506716354847,
"lm_q1q2_score": 0.820543761639563,
"lm_q2_score": 0.8705972566572504,
"openwebmath_perplexity": 3516.4071718296627,
"openwebmath_score": 0.18825481832027435,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/236213/boundary-value-problem-with-a-diracdelta"
} |
wheeled-robot, computer-vision
A paper "High Resolution Visual Terrain Classification for Outdoor Robots" by Yasir Niaz, Khan Philippe Komma and Andreas Zell, that discusses approach based on SURF features can be found here: http://www.cogsys.cs.uni-tuebingen.de/publikationen/2011/khan2011iccvworkshop.pdf
A list of some other papers on the subject: http://www2.ift.ulaval.ca/~pgiguere/terrainID.html (note that last modification is from 2014, so there may be some new research worth investigating). | {
"domain": "robotics.stackexchange",
"id": 1256,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "wheeled-robot, computer-vision",
"url": null
} |
electromagnetic-radiation, thermal-radiation, intensity
I think the answer stays same, but I am asking this just for conceptual clarity.
Now, I also have another doubt. Intensity is always measured perpendicular to the energy propagation direction, and diffused emitter (emitting diffusely) is an emitter whose intensity emitted is independent of the direction (please correct me if I am wrong).
So the question is as follows :
A small surface (area ${10}^{-3} m^2$) emits diffusively, and measurements indicate that the total intensity associated with emission in the normal direction I = 7000 $\frac{W}{{metre}^2 sr}$. The emitted radiation is intercepted by two surfaces, $a_1$ (perpendicular to energy direction), $a_2$ (vertical) where, area of each is ${10}^{-3} m^2$. What is the power intercepted by $a_1$ and $a_2$?(assume the direction of energy propagation is constant over the full area) | {
"domain": "physics.stackexchange",
"id": 95056,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetic-radiation, thermal-radiation, intensity",
"url": null
} |
algorithms, applied-theory
Finding secondary structures in RNA folding 1
Predicting DNA breakage during gene conversion 2
Finding/analyzing clustered regularly interspaced short palindromic repeats (CRISPRs) 3
These three motivations are presented in an article here and there are most likely many more. | {
"domain": "cs.stackexchange",
"id": 15593,
"lm_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, applied-theory",
"url": null
} |
java, recursion, pathfinding
you are keeping track of the path-count in the paths static variable. This is a pattern that, although works, is not very 'pretty', there's a better way... I'll explain.
you modify the source array. This can be OK, but, in general, when you want to modify the source data you should instead work off a copy of the data.
all your other variables (the maze itself and the size of the maze) are static.
With a slight shift in the way you think of your search method, instead of updating the number of paths, you should instead think 'how many paths from here?'
Also, lets fix the static variable issues too (we will need two methods for this):
public static final int search(int[][] data) {
int[] mymap = new int[data.length][];
for (int i = 0; i < data.length; i++) {
mymap[i] = Arrays.copyOf(data[i], data[i].length);
}
return search(mymap, 0, 0);
} | {
"domain": "codereview.stackexchange",
"id": 5225,
"lm_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, recursion, pathfinding",
"url": null
} |
Model the cross section of the bowl that includes the ball, as it is rolling down, as a circle of radius R. Let theta be the angle formed by the line from the ball to the center of the circle and then to the bottom of the circle. The gravitational force on the ball is -mg, straight down. The ball does not move straight down because the bowl is applying a force toward its center. The net force is tangent to the bowl. Dividing the gravitational force into components parallel and perpendicular to the tangent we see that the angle between perpendicular and vertical lines is also theta. The net force, tangent to the circle, is -mg sin(theta). | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9674102514755852,
"lm_q1q2_score": 0.8203327023754806,
"lm_q2_score": 0.8479677583778257,
"openwebmath_perplexity": 941.633678196842,
"openwebmath_score": 0.8181344866752625,
"tags": null,
"url": "https://www.physicsforums.com/threads/ball-and-bowl-and-newtons-second-law.6343/"
} |
javascript, css
setInterval(function() {
circle.style.transform = 'rotate(' + Math.floor((Math.random() * (180) + 1)) + 'deg)';
}, 120);
setInterval(function() {
peak_wave(Math.floor((Math.random() * (30) + 1)), Math.floor((Math.random() * (200) + 150)));
}, 1200);
setInterval(function() {
peak_wave(Math.floor((Math.random() * (30) + 1)), Math.floor((Math.random() * (200) + 150)))
}, 1300);
setInterval(function() {
peak_wave(Math.floor((Math.random() * (30) + 1)), Math.floor((Math.random() * (200) + 150)))
}, 1400);
setInterval(function() {
peak_wave(Math.floor((Math.random() * (30) + 1)), Math.floor((Math.random() * (200) + 150)))
}, 1500);
setInterval(function() {
peak_wave(Math.floor((Math.random() * (30) + 1)), Math.floor((Math.random() * (200) + 150)))
}, 100600);
setInterval(function() {
peak_wave(Math.floor((Math.random() * (30) + 1)), Math.floor((Math.random() * (200) + 150)))
}, 100700);
setInterval(function() { | {
"domain": "codereview.stackexchange",
"id": 41932,
"lm_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, css",
"url": null
} |
quantum-state, mathematics, bloch-sphere, linear-algebra, terminology-and-notation
P.S. I did find a related post here, but it doesn't seem to go into sufficient depth to answer my question. Moreover, the author seems to designate the difference $\theta_1 - \theta_0$ or $\theta_0 - \theta_1$ as a relative phase as opposed to the entire phase factor $e^{i(\theta_1-\theta_0)}$ or $e^{i(\theta_0-\theta_1)}$. TL;DR: It doesn't matter. Both $e^{i(\theta_0-\theta_1)}$ and $e^{i(\theta_1-\theta_0)}$ are valid. | {
"domain": "quantumcomputing.stackexchange",
"id": 4486,
"lm_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, mathematics, bloch-sphere, linear-algebra, terminology-and-notation",
"url": null
} |
linear-regression, gradient-descent
Title: Implementation of Stochastic Gradient Descent in Python I am attempting to implement a basic Stochastic Gradient Descent algorithm for a 2-d linear regression in Python. I was given some boilerplate code for vanilla GD, and I have attempted to convert it to work for SGD.
Specifically -- I am a little unsure as to if I correctly implemented the loss function and partial derivatives, since I am new to regressions in general.
I do see that the errors tend to "zig zag" as expected. Does the following look like a correct implementation or have I made any mistakes?
#sample data
data = [(1,1),(2,3),(4,3),(3,2),(5,5)]
def compute_error_for_line_given_points(b, m, points):
totalError = 0
x = points[0]
y = points[1]
return float(totalError + (y - (m * x + b)) ** 2)
def step_gradient(b_current, m_current, points, learningRate):
N = float(1)
for i in range(0, 1):
x = points[0] | {
"domain": "datascience.stackexchange",
"id": 2993,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "linear-regression, gradient-descent",
"url": null
} |
c++, opengl
Thanks in advance to all advice! I’ve seen it stated in conference presentations that constexpr should generally replace uses of static const. Even if you can’t do that because the initializer isn't constexpr, note that you no longer have to put the definitions into a CPP file separate from the class definition.
Is there a reason why drawLine and drawPoint are not inlined in the class definition? | {
"domain": "codereview.stackexchange",
"id": 30529,
"lm_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++, opengl",
"url": null
} |
java, game, tic-tac-toe, gui, javafx
This both allows multiple games (by accessing an instance of TicTacToe rather than the class) and it abstracts out the current player in a way that keeps it extensible. Note that game.endTurn() does two things that used to be done in this method. It will change the current player and trigger the board evaluation. It can also update the turn count, which you currently do as part of the board evaluation. That might be confusing if someone evaluated the board at a time other than the end of a turn.
Note that you could also get rid of the filled variable and instead check that player is not null to get the same information.
Expressive variable names
private static int boardTracker;
I already touched on this, but it's not obvious to me what this is. Looking at your code, perhaps
private int turnCount = 0; | {
"domain": "codereview.stackexchange",
"id": 14461,
"lm_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, tic-tac-toe, gui, javafx",
"url": null
} |
From a pedagogical point of view, the fact that you haven't been taught this result directly means that you've had some practice manipulating limits and have discovered it for yourself, which is far more valuable than being taught it by rote.
• What you've said makes a lot of sense - thank you! It never occurred to me how easily you can derive $\underset{x\to0}{lim}\frac{sin({K}_{1}x)}{{ K}_{2}x}=\frac{{K}_{1}}{{K}_{2}}$ given $\underset{x\to0}{lim}\frac{sin(x)}{x}=1$ with just a few simple concepts (which both you and Doug M explained). This does raise some other questions to me, but they're not strictly math related, and this is not the place for those questions. Thank you for your explanation and help! – CodeIt Oct 5 '16 at 4:55
• Of course the right-hand side of your first displayed equation should have $y \to 0$, not $x \to 0$. – LSpice Apr 4 '18 at 19:57
• @LSpice Thank you – John Gowers Apr 5 '18 at 8:58
This is an important property of limits: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9861513926334711,
"lm_q1q2_score": 0.8217842101826756,
"lm_q2_score": 0.8333245953120234,
"openwebmath_perplexity": 285.64568664988997,
"openwebmath_score": 0.8028600215911865,
"tags": null,
"url": "https://math.stackexchange.com/questions/1954080/why-not-teach-lim-limits-x-to-0-frac-sin-k-1-x-k-2-x"
} |
quantum-field-theory, particle-physics, renormalization, weak-interaction
which has dimension of inverse mass squared! (The numerical factors are not important for the argument and come out from doing the full calculation properly).
I am not sure if it was the use of the word operator in the quote that confused you. Remember that in QFT the fields are operators and so a term in the Lagrangian containing a bunch of fields is often referred to as an operator. If four fermion fields are involved (as above for the contact interaction) then it is called a four fermion operator. If the operator appears from integrating out some other fields (the $W$ in this case) then it is known as an effective operator meaning at low energies it effectively captures the correct physics. | {
"domain": "physics.stackexchange",
"id": 6489,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-field-theory, particle-physics, renormalization, weak-interaction",
"url": null
} |
quantum-mechanics, homework-and-exercises, symmetry, rotation
Title: Only get part of commutator form expanding to third order in generator expression (Shankar 12.2.4)
Let $U[R(\epsilon_z\hat k)] = I - {i\over\hbar}\epsilon_z L_z$ be the infinitesimal generator for rotation operators, and $T(\vec\epsilon) = I - {i\over\hbar}\vec\epsilon\cdot\vec P$ the generator for translations in the x-y plane, where $\vec\epsilon=(\epsilon_x,\epsilon_y)$ and $\vec P=(P_x,P_y)$. Then consider $\bar U = U[R(-\epsilon_z\hat k)]\:T(-\vec\epsilon)\:U[R(\epsilon_z\hat k)]\:T(\vec\epsilon)$ which infinitesimally translates a quantum state by $\vec\epsilon$, rotates it by $\epsilon_z$, translates it by $-\vec\epsilon$, and then rotates it by $-\epsilon_z$. Given a coordinate $(x,y)$, we can follow it through the transformations:
$$
\left(\begin{array}{c}
x \\
y
\end{array}\right)
\overset{T(\vec\epsilon)}{\longrightarrow}
\left(\begin{array}{c}
x + \epsilon_x \\
y + \epsilon_y
\end{array}\right) | {
"domain": "physics.stackexchange",
"id": 22897,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, homework-and-exercises, symmetry, rotation",
"url": null
} |
electric-current, acoustics, velocity, collision
Please help me with the above conceptual doubts. The free electrons in a metal do not have any "mean position". The positive ions form a lattice and indeed they vibrate around their equilibrium positions (motion which is part of the thermal energy of the crystal). The free electrons (or conduction electrons) move through the metal with velocities of the order $10^5$ m/s in the absence of any external field. This motion does not result in charge transport because the average momentum is zero (same as the average momentum of a gas is zero in the CoM frame). But this motion contributes to the thermal energy of the metal (even though is a relative small contribution). The interaction between the free electrons is negligible (or negected in most models). In the presence of an external electric field the already present thermal velocity of each electron gains a small component in the direction of the field. This does not average to zero as all electrons gain the velocity (drift velocity) in | {
"domain": "physics.stackexchange",
"id": 75806,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electric-current, acoustics, velocity, collision",
"url": null
} |
electrostatics, electricity, charge, biology
Title: Am I positively charged or negatively charged? We often hear that the human body has a weak electrical charge. Is it a positive charge or negative charge? Or maybe different parts of me have different electrical charges? Or maybe there's a complete electrical circuit inside of me?
Now suppose I scuff my feet on the carpet and touch metal objects to make sparks. Does any of that affect my electrical charge? Which direction do the sparks travel?
Or maybe a buildup of static electricity is a completely different phenomenon from inherent electrical charge. Even so, why doesn't the buildup of static electricity interfere with my internal electrical flow? It certainly does with old TVs and electronic equipment!
What if two people are scuffing their feet on the carpet and touching each other? You would think that both people, being electrically identical, would have the same charge. Why then would there be a spark at all? And which direction would the sparks travel? | {
"domain": "physics.stackexchange",
"id": 54916,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrostatics, electricity, charge, biology",
"url": null
} |
gene-expression, gene, gene-regulation
A gene is a sequence in the DNA (composed of 4 bases A,T,C and G) that can be transcribed by a protein, in your context we will say it always start with a start codon (a codon is a triplet of DNA bases) and stop with a stop codon. It is usually around a thousand bases long. The transcription will give you a RNA, and that RNA can be translated (note the difference with transcribed) into a whole new protein.
Now the gene Expression is a measure of the amount of RNA from the gene you are looking for. In a cell you can have around 10000-100000 copies of that RNA; the raw count is not really stable as you can have extract two cells or three and it will change your "expression". Most of the time we normalize the count by the count of a bunch of known genes called housekeeping genes. The particularity of these genes is that their expression is quite stable. | {
"domain": "biology.stackexchange",
"id": 8633,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gene-expression, gene, gene-regulation",
"url": null
} |
homework-and-exercises, atomic-physics, spectroscopy, orbitals, pauli-exclusion-principle
The actual proof is (I think) quite mathematical with Slater determinants, but the general rule of thumb is that:
For odd numbers for the total angular momentum $(L= 1,3,5, ...)$ the
spatial wavefunction is antisymmetric upon particle exchange.
You know that $S=0$ is always antisymmetric and $S=1$ always symmetric, so you could derive which $D, P, S$ also from that. | {
"domain": "physics.stackexchange",
"id": 68280,
"lm_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, atomic-physics, spectroscopy, orbitals, pauli-exclusion-principle",
"url": null
} |
newtonian-mechanics, reference-frames, energy-conservation
Where is all the extra kinetic energy coming from? Who is providing the potential energy since we are in deep space far from any gravity?
What if I put mass 2m or 3m instead of mass m at distance 2d (assuming the level is strong enough to handle the stress)? Will it also get launched at velocity 2v? | {
"domain": "physics.stackexchange",
"id": 92484,
"lm_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, reference-frames, energy-conservation",
"url": null
} |
quantum-mechanics, statistical-mechanics, fermions, pauli-exclusion-principle, identical-particles
I'm unable to understand why are we only allowed to fill up each energy sub-level with a single particle. According to what I know, the Pauli Exclusion principle states that no two fermions can occupy the same quantum state, not energy level. For example, two electrons in the ground state of helium have the same energy, but due to opposite spins, they are in a different quantum state. Why are we not considering the spin while dealing with Fermi-Dirac Statistics.
If we ignore spin, then we can only use Energy levels ($n$) and angular momentum ($l\space$ and $m_l$), to define a quantum state, and then the formula is true, that no two fermions can occupy the same energy level ( quantum state ). | {
"domain": "physics.stackexchange",
"id": 82643,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, statistical-mechanics, fermions, pauli-exclusion-principle, identical-particles",
"url": null
} |
php, mvc, codeigniter
Title: PHP Edit Volunteer Group Form I have a PHP CodeIgniter website that collects volunteer registrations. One thing I have noticed is that the controllers are getting really big. The controllers have many methods, and each method is fairly long. I believe this could be a code smell, and I would like some help and advice on how to refactor the code.
The website is in production and too big to post all the code. I will pick a sample page to post here so you can get an idea. I'm looking for broad feedback on how to improve the organization of the code. For example: | {
"domain": "codereview.stackexchange",
"id": 37807,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, mvc, codeigniter",
"url": null
} |
no rational number x with this property. Introduction Finding the root of nonlinear equations is one of important problem in science and engineering [5]. In mathematics, Newton method is an efficient iterative solution which progressively approaches better values. Newton's method for finding roots of functions. Newton method root finding: School project help. A method similar to this was designed in 1600 by Francois Vieta a full 43 years before Newton's birth. Start at x = 2+3i and use your polynew routine to find a root of the polynomial p(x) = x^2 - 6 * x + 10 Deflation. x i+1 x i x f(x) tangent. Quasi-Newton methods: approximating the Hessian on the fly ¶ BFGS : BFGS (Broyden-Fletcher-Goldfarb-Shanno algorithm) refines at each step an approximation of the Hessian. Bisection method is one of the many root finding methods. Newton's method, also known as Newton-Raphson, is an approach for finding the roots of nonlinear equations and is one of the most common root-finding algorithms due | {
"domain": "managerencoherence.fr",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682458008671,
"lm_q1q2_score": 0.8461528594088757,
"lm_q2_score": 0.8558511543206819,
"openwebmath_perplexity": 297.25593681290644,
"openwebmath_score": 0.8345716595649719,
"tags": null,
"url": "http://zvvs.managerencoherence.fr/newton-method-to-find-roots.html"
} |
# Related Rates
• Apr 10th 2009, 10:07 AM
Juggalomike
Related Rates
Ok i have 2 problems that i am stuck on. Please show me how to work this out as compared to simply posting the answer, thanks.
1. A light is affixed to the top of a 12 foot tall lamp-post. A 6 foot tall man walks away from the lamp post at a rate of 5 ft/sec. How fast i the length of his shadow increasing when he is 5 feet away?
Work so far: I set ds/dt as 5 ft/s because it is the rate of change. I am thinking that to solve this i should break it down into two triangles but i am lost as to how i can do that because i have no idea how to get the current distance of his shadow.
2. A water tank has the shape of an inverted right circular cone of altitude 12 feet and base radius 6 feet. If water is being pumped into the tank at a rate of 10 gal/min, at what rate is the water level rising when the water is 3 feet deep? | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9808759671623987,
"lm_q1q2_score": 0.8173880622965604,
"lm_q2_score": 0.8333245891029457,
"openwebmath_perplexity": 944.2061482955287,
"openwebmath_score": 0.881677508354187,
"tags": null,
"url": "http://mathhelpforum.com/calculus/83126-related-rates-print.html"
} |
dataset, class-imbalance, smote, imbalanced-data
By evaluating models on statistically sound values like log-loss (“crossentropy loss” or “negative log likelihood” in some circles) or Brier score, almost any apparent issue related to class imbalance turns out not to be a problem. Since class imbalance then is not a problem, there is no need to use methods like oversampling, undersampling, or synthesis of new points in order to solve a non-problem. In fact, since synthesis of new points need not produce reasonable new points, creating synthetic points might create problems just because the user tried to solve a non-problem.
We have an entire statistics meta post with oodles of good links related to class imbalance and why it is not the problem it appears to be. | {
"domain": "datascience.stackexchange",
"id": 11407,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dataset, class-imbalance, smote, imbalanced-data",
"url": null
} |
Consider the simpler example of a two-part experiment in which we first select one of two differently-biased coins (say $P(\mathrm{Heads}) = p_0$ for one coin and $P(\mathrm{Heads}) = p_1$ for the other, where $p_0\neq p_1$) and then toss the selected coin $n$ times. The choice of coin to be tossed is random: the two coins are picked with probabilities $\pi_0$ and $\pi_1 = 1-\pi_0$ respectively. We also assume that the tosses of the coin are independent sub-experiments of the main experiment, that is, the tosses are conditionally independent regardless of which coin has been selected for tossing. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357561234474,
"lm_q1q2_score": 0.8071776991510244,
"lm_q2_score": 0.8244619199068831,
"openwebmath_perplexity": 289.7262585969278,
"openwebmath_score": 0.8482266664505005,
"tags": null,
"url": "https://stats.stackexchange.com/questions/310942/basic-question-on-conditional-and-unconditional-independence/312503"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.