text stringlengths 1 1.11k | source dict |
|---|---|
resource-recommendations, conformal-field-theory, greens-functions, special-functions
Title: References regarding Green's function on a square domain in 2D Premise: I know this question would be better suited to MathSE, but since I endeavour to solve a free CQFT on a bounded domain, I'm confident I'll find a more exhaustive answer here.
I'm trying to obtain the Green's function on a planar square domain, i.e, I'm trying to solve the following BVP:
\begin{cases}
\Delta G(\bar x,\bar y) = \delta^2(\bar x - \bar y),& \bar x, \bar y\in D\\
G(\bar x,\bar y) = 0,& \bar x\in \partial D
\end{cases}
with $D = \{\bar x = (x_1,x_2)\in \mathbb{R}^2 / -L<x_1 < L, -L<x_1 < L\}$.
I've already solved the same problem on a disk with both the methods of images and conformal mapping as shown here; moreover, I know from this paper, page 5, what is to be the form of my solution and that it will involve Weierstrass sigma functions. | {
"domain": "physics.stackexchange",
"id": 58449,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "resource-recommendations, conformal-field-theory, greens-functions, special-functions",
"url": null
} |
bioinformatics, genomics, gene-expression, gene-annotation, drosophila
Title: Combining gene expression data from two species I currently have two sets of gene expression data. The first is a dataframe of genes identified by Annotation id CG numbers (for example "CG10005") in one column and a numerical variable of interest associated with each of those genes in the other (the important part is that the genes are identified by the CG number). The second dataset is this study from multiple species where genes are identified by "GLEANR" ID's like this one: "dsim_GLEANR_10060".
I would like to extract all of the values from this study for the D.melanogaster and D.simulans data, then link that to the Annotation ID's in the first dataset (to connect my variable of interest to the sex bias in expression for each species). The trouble I am having is connecting the orthologous genes within the second study to each other, and then connecting them to the CG identifiers in the first study. | {
"domain": "biology.stackexchange",
"id": 879,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bioinformatics, genomics, gene-expression, gene-annotation, drosophila",
"url": null
} |
python, beginner, python-3.x, tic-tac-toe
def _reset(self):
self.player = EMPTY
pass
class Line:
""" One instance for each row, column and diagonal
ATTRIBUTES
- cells[] - list of Cells in this line
- value - (read-only) SUM of player values in cells in this line
(used for testing line contents)
"""
def __init__(self, *args):
self.cells = [cells[i] for i in args]
for cell in self.cells:
cell.lines.append(self)
@property
def _value(self):
""" Return total value of cells in this line. """
return sum([cell.player._value for cell in self.cells]) | {
"domain": "codereview.stackexchange",
"id": 28924,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, python-3.x, tic-tac-toe",
"url": null
} |
natural-language-processing
Title: Are sentence-transformers the best available pretrained models for computing embeddings for a sentence? I am playing around with the sentence transformers pretrained models to compute embeddings for a sentence and then compare it using the cosine similarity on the two vectors. I was using the sentence-transformers/all-MiniLM-L6-v2 model and used the inference API on the model page.
For the two sentences:
delivery fee not showing
delivery fee showing twice | {
"domain": "ai.stackexchange",
"id": 4062,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "natural-language-processing",
"url": null
} |
terminology, synthetic-biology
Potential building blocks might be mammalian and microbial cells and their products, such as slime, fibers, small molecules and proteins. The cells might be engineered to hold new electrical, mechanical, and chemical powers.
[...]
Cells would be programmed to degrade their organs and DNA if they began to invade other organisms or the environment. A genetic "kill switch" aims to stop contamination or infection.
Summarising this, I wouldn't call it a "popular term". | {
"domain": "biology.stackexchange",
"id": 8912,
"lm_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, synthetic-biology",
"url": null
} |
neural-networks, machine-learning, deep-learning, research, programming-languages
Then, Common Lisp (and other dialects of Lisp) is great for symbolic AI. However, many recent machine learning libraries are coded in more mainstream languages, for example TensorFlow is coded in C++ & Python. Deep learning libraries are mostly coded in C++ or Python or C (and sometimes using OpenCL or Cuda for GPU computing parts).
Common Lisp is great for symbolic artificial intelligence because: | {
"domain": "ai.stackexchange",
"id": 222,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-networks, machine-learning, deep-learning, research, programming-languages",
"url": null
} |
And with $m=2$ this leads to solutions (Robert had first one) of:
$$\matrix{b = 40 & x = 20 & y = 48 & z = 52 & x' = 300 & y' = 11248 & z' = 11252\cr b = 48 & x = 24 & y = 70 & z = 74 & x' = 360 & y' = 16198 & z' = 16202\cr b = 56 & x = 28 & y = 96 & z = 100 & x' = 420 & y' = 22048 & z' = 22052\cr b = 64 & x = 32 & y = 126 & z = 130 & x' = 480 & y' = 28798 & z' = 28802\cr b = 72 & x = 36 & y = 160 & z = 164 & x' = 540 & y' = 36448 & z' = 36452\cr b = 80 & x = 40 & y = 198 & z = 202 & x' = 600 & y' = 44998 & z' = 45002\cr}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9852713831229043,
"lm_q1q2_score": 0.8231780242143388,
"lm_q2_score": 0.8354835411997897,
"openwebmath_perplexity": 254.25088007765842,
"openwebmath_score": 0.8509650826454163,
"tags": null,
"url": "https://math.stackexchange.com/questions/1934917/is-there-a-way-to-find-a-pythagorean-triple-so-that-when-you-place-a-given-digit"
} |
string-theory, conformal-field-theory
Title: Large central charge limit for Virasoro blocks On page 3 of this paper (https://hal.science/hal-00627906v3/document), the authors say that in the $c\to\infty$ limit only the global generators will survive when computing the conformal block. In particular, they say that because the norm is
$$||L_{-n}|\Delta_s \rangle||^2=2n\Delta_s+\frac{c}{12}n(n-1)(n+1),$$
which then goes to infinity for $c\to\infty$ and $\,n\geq 2$, this means that the $L_{-n}$, generators will not survive and hence not contribute to the conformal block.
Why does the norm being infinite mean that these generators/descendents don't survive/contribute to the conformal block? Roughly speaking, the contribution of the state $L_{-n}|\Delta_s\rangle$ to a conformal block
is
$$
\mathcal{F}_{\Delta_s}^{(s)} = \cdots + \frac{\langle V_1V_2 L_{-n}|\Delta_s\rangle \langle V_3V_4L_{-n}|\Delta_s\rangle}{||L_{-n}|\Delta_s\rangle ||^2} + \cdots
$$ | {
"domain": "physics.stackexchange",
"id": 100042,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "string-theory, conformal-field-theory",
"url": null
} |
aspects. A Vector is something that has two and only two defining characteristics. For example, if a vector-valued function represents the velocity of an object at time t , then its antiderivative represents position. Vector Point Function: Let be a Domain of a function, then if for each variable Unique association of a Vector , then is called as a Vector. Vector calculus identities: In this chapter, As an example of using the above notation, consider the problem of expanding the triple cross product The following identity is a very important property regarding vector fields which are the curl of another vector field. Here are a set of practice problems for the Calculus III notes. | {
"domain": "cralstradadeiparchi.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808753491773,
"lm_q1q2_score": 0.8059762805706365,
"lm_q2_score": 0.8221891305219504,
"openwebmath_perplexity": 797.4507241697992,
"openwebmath_score": 0.6484940052032471,
"tags": null,
"url": "http://irdu.cralstradadeiparchi.it/vector-calculus-problems.html"
} |
c#, entity-framework, asp.net-mvc, authorization, asp.net-identity
IPrincipal user = httpContext.User;
if (!user.Identity.IsAuthenticated)
{
return false;
}
//var rolesProvider = new RoleProvider();
var routeData = httpContext.Request.RequestContext.RouteData;
var controller = routeData.GetRequiredString("controller");
var action = routeData.GetRequiredString("action");
string area = null;
var userId = httpContext.User.Identity.GetUserId();
var _user = _userManager.FindById(userId);
if (routeData.DataTokens["area"] != null)
{
area = routeData.GetRequiredString("area");
result = _user.AccessPermissions.Where(x => x.Controller.Equals(controller) && x.ActionMethod.Equals(action) && x.Area.Equals(area)).Select(x => x.HasAccess).FirstOrDefault(); | {
"domain": "codereview.stackexchange",
"id": 33788,
"lm_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#, entity-framework, asp.net-mvc, authorization, asp.net-identity",
"url": null
} |
c#, http, server, client
}
public interface IIncomingMessage
{
bool IsExpectedMessage(IIncomingMessage compareTo);
}
Some utilities:
public static class ObjectUtilities
{
private static bool HasValue(object value)
{
if (value != null)
{
if (value is bool)
{
return (bool)value;
}
return true;
}
return false;
} | {
"domain": "codereview.stackexchange",
"id": 22042,
"lm_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#, http, server, client",
"url": null
} |
java, beginner, mvc, javafx, crud
/** Create and add animal to AnimalList.allAnimals then serialize. */
public class AddAnimalController implements Initializable {
@FXML private GridPane grid;
@FXML Button saveButton;
@FXML TextField animalName;
@FXML TextField animalType;
@FXML ChoiceBox<String> gender;
@FXML Spinner<Integer> age;
@FXML Spinner<Integer> weight;
@FXML DatePicker acquisitionDate;
@FXML TextField animalLocation;
@FXML Spinner<Integer> trainingStatus;
@FXML CheckBox reserved;
private RescueAnimal selectedAnimal;
private final ArrayList<InputValidationController<Node>> nodes = new ArrayList<>();
/** Allows MainViewController to set the instance that's being edited. */
public void setSelectedAnimal(RescueAnimal selectedAnimal) {
this.selectedAnimal = selectedAnimal;
} | {
"domain": "codereview.stackexchange",
"id": 43752,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, beginner, mvc, javafx, crud",
"url": null
} |
waves
Title: Phase difference clarification In the following diagram what is the phase difference between left and right waves. I mean if the waves were travelling in the same direction it would have been pi. But what in this case? The phase difference is defined at a particular moment in time, so at the moment in time that you have drawn, the phase difference is $\pi$. You can capture the fact that the waves are moving in opposite directions by saying that the frequencies are equal but opposite in sign. | {
"domain": "physics.stackexchange",
"id": 46891,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "waves",
"url": null
} |
particle-physics, statistical-mechanics, nuclear-physics, collision, ionization-energy
Why must the kinetic energy not exceed the ionization energy?
This seems incorrect. It would be helpful to have a reference for these claims, but the maximum kinetic energy of the electron liberated by ionization can, for high collision energies, far exceed the ionization energy of the atom. | {
"domain": "physics.stackexchange",
"id": 67717,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "particle-physics, statistical-mechanics, nuclear-physics, collision, ionization-energy",
"url": null
} |
classical-mechanics, lagrangian-formalism, field-theory, variational-principle, action
Title: Higher than Lagrangian/action? When you begin learning physics, you start with equations of motion applied to various physics systems. In classical mechanics course you learn, that exists Lagrangian/action of a system, which gives you, after applying Euler-Lagrange equations, the solution for equations of motion - we can say that Lagrangian is something higher than EoM, because it consists all physics of a system inside, and even gives us information about conserved values, during to symmetries. Lagrangian formalism is so elegant and simple, that we try to apply it almost everywhere, mainly in field theory and quantum mechanics.
My question is - is there a mathematical object which is more fundamental to Lagrangian in a same way like Lagrangian is more fundamental to equations of motion? Going from action to EOMs is simple: it is just (functional) differentiation. Going the other way from EOMs to the action is hard: It is (functional) integration, and sometimes impossible! | {
"domain": "physics.stackexchange",
"id": 30084,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, lagrangian-formalism, field-theory, variational-principle, action",
"url": null
} |
algorithms, computational-geometry
It looks like is enough for sweep line algorithm. If there is something wrong, or may be there is something what should be done different, feel free to share your thoughts with us.
Addendum:
I insert a circle when vertical sweep line touches the circle for the first time, and remove a circle from the status when sweep line touches it for the last time. The check for intersection should be done for the nearest previous circle. If we added a circle to status and there was already another circle which we added before and it was still there, therefore the pervious circle was not "closed", so there might be an intersection. You're definitely on the right track. The big question is: when you insert a circle, which other circles do you check for intersection? How do you perform this check? | {
"domain": "cs.stackexchange",
"id": 1101,
"lm_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, computational-geometry",
"url": null
} |
octomap, ros-diamondback
make[3]: Leaving directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
[ 0%] Built target rospack_genmsg_libexe
make[3]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
make[3]: Leaving directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
[ 0%] Built target rosbuild_precompile
make[3]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
make[3]: Leaving directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
make[3]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
[ 14%] Building CXX object CMakeFiles/octree_pcl.dir/src/pcl_to_octree/octree/OcTreePCL.o | {
"domain": "robotics.stackexchange",
"id": 5487,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "octomap, ros-diamondback",
"url": null
} |
ros, messages, rxplot, time
Originally posted by Gideon with karma: 239 on 2011-09-01
This answer was ACCEPTED on the original site
Post score: 4
Original comments
Comment by Gideon on 2011-09-01:
Sweet, thanks
Comment by Thomas D on 2011-09-01:
Do you even need to prepend the message with a frame_id? I think if you add a 'Header header' as the first field in your custom message then you can fill in the timestamp using the call you found of 'msg.header.stamp = ros::Time::now()'. | {
"domain": "robotics.stackexchange",
"id": 6581,
"lm_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, messages, rxplot, time",
"url": null
} |
(It should look like this, but try it yourself before you peek!)
-
Is it not just $0$ and $\pi$? – Mike Gates Sep 13 '11 at 20:26
@Mike: Yes, it is not just $0$ and $\pi$; there are other solutions. – Arturo Magidin Sep 13 '11 at 20:29
@Mike: It's a bit tricky to see in the first Wolfram plot, since it doesn't go all the way to $2\pi$, but there are some solutions in the interval $[-\pi,0]$ that will have counterparts one period later, in the interval $[\pi,2\pi]$. Look at height $y=0.5$, and you will hopefully find them! – Hans Lundmark Sep 13 '11 at 20:31
@Hans Lundmark: I strongly agree with pointing beyond the formal manipulational aspect of the problem. – André Nicolas Sep 13 '11 at 21:06 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357216481429,
"lm_q1q2_score": 0.8071724372455514,
"lm_q2_score": 0.8221891283434877,
"openwebmath_perplexity": 293.5252329849132,
"openwebmath_score": 0.9177247285842896,
"tags": null,
"url": "http://math.stackexchange.com/questions/64259/finding-all-trigonometric-solutions-of-an-equation-within-a-given-interval/64260"
} |
z-transform, stationary
Here, $y(t)$ is causal.
To me it seems the case is exactly the opposite, the roots should be inside the unit circle for causal process to be stable.
Example, consider the difference equation:
$$y_t-5y_{t-1}+6y_{t-2}=0$$
The characteristic equation is then: $$r^2-5r+6=0$$
Solution for characteristic roots: $$r=2, r=3$$
Solution for the difference equation (assuming 1 as initial conditions): $$y(t)=2^t+3^t$$
Clearly the roots are outside the unit circle (as 1<2,3), and the process unstationary (as it grows with t). To me it seems that the 3rd equation in the paper should have negative exponent for zs (in which case the solution would be the same as mine, even if arrived through the z transform). | {
"domain": "dsp.stackexchange",
"id": 3734,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "z-transform, stationary",
"url": null
} |
vba, excel
Title: Eliminating empty spreadsheet cells from a range I am copying data, that is one long list, into an excel sheet and I want to use a macro to organize it visually. The problem is that the data I am copying has empty cells that are unnecessary and will inhibit my code later in the macro and I want to get rid of them. This is what I came up with, but I am hoping there is a more efficient way to do it. The main problem I ran into in trying other methods is I couldn't set a value to a variable to end the second "For" statement before it tried to select a cell that doesn't exist. After it got to the first row it would keep running and would return an error on "ActiveCell.Offset(-1, 0).Range("A1").Select" because there was no cell to select.
Data example:
1, ,2, ,1, ,3, ,1, ,2, ,1, ,4, ,1, ,2, ,1, ,3, ,1, ,2, ,1,...
1, , ,1, , ,2, , ,1, , ,1, , ,2, , ,1, , ,1, , ,3, , ,1, ,...
Each comma represents a new cell, with the numbers and spaces (empty cells) in the same column.
My code: | {
"domain": "codereview.stackexchange",
"id": 21656,
"lm_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
} |
electromagnetism, electricity, magnetic-fields, induction
For the electromotive force we are interested in the flux derivative with time
$$\mathcal E = -\frac {\text d\Phi_B}{\text d t} = v B D. \tag{ii}$$
because $\text dL/dt = -v$.
Now, I believe that my formula $\text {(ii)}$ and your $(2)$ begin to resemble one another. What misses in my $\text {(ii)}$ is the charges $q$, and what has to appear in your $(2)$ is the rod length $D$, which probably is connected with the element of distance $\text d \vec {\ell}$. Also, since in our case the force $\vec F$ in your $(1)$ is along the rod, and the rod velocity $\vec v$ is perpendicular to $B$, the three vectors $\vec F$, $\vec v$ and $\text d \vec {\ell}$ are mutual perpendicular, s.t. the fact that in my $\text {(ii)}$, the vector product does not appear, is not a concern. | {
"domain": "physics.stackexchange",
"id": 20017,
"lm_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, electricity, magnetic-fields, induction",
"url": null
} |
mri
Title: Effective field in MRI when solving for Bloch equations I have a confusion regarding MRI signal formation. So, as I understand it, we need to solve the Bloch equations for the excitation and the relaxation stages:
So, in the excitation stage, let us assume that we have an RF field excitation which is applied along with the slice selection gradient. The bloch equations are given by:
$$
\frac{dM}{dt} = \gamma M \times B - R
$$
where $R$ is the vector accounting for the relaxation effects. Now, during excitation, the B1 field is on and as I understand it, the B vector is given as:
\begin{align}
B_x &= B_1 \cos(\omega t)\\
B_y &= B_1 \sin(\omega t)\\
B_z &= z G_z
\end{align}
The $B_z$ field is basically the gradient times the position offset from the origin and the $B_x$ and $B_y$ fields are the real and imaginary parts of the B1 waveform. | {
"domain": "dsp.stackexchange",
"id": 4014,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mri",
"url": null
} |
$$f(t) = e^{2 t} \left [ \left (1-i \frac52 \right ) (\cos{t}+i \sin{t}) + \left(1+i \frac52 \right ) (\cos{t}-i \sin{t}) \right ]$$
Simplifying, I get
$$f(t) = e^{2 t} (2 \cos{t} + 5 \sin{t})$$
-
I think if you do the fraction as follows:
$$\frac{2s+1}{(s-2)^2 + 1}= \frac{2(s-2)+5}{(s-2)^2 + 1}=\frac{2(s-2)}{(s-2)^2 + 1}+\frac{5}{(s-2)^2 + 1}$$ and considering very useful fact:
$\mathcal{L}^{-1}(F(s-a))=e^{at}f(t)$
then we get:
$$\mathcal{L}^{-1}\left(\frac{2s+1}{(s-2)^2 + 1}\right)=2\mathcal{L}^{-1}\left(\frac{(s-2)}{(s-2)^2 + 1}\right)+5\mathcal{L}^{-1}\left(\frac{1}{(s-2)^2 + 1}\right)=2e^{2t}\cos t+5e^{2t}\sin t$$
-
You're on a roll today! +1 – amWhy Aug 23 '13 at 11:15 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9688561676667173,
"lm_q1q2_score": 0.8009648143634457,
"lm_q2_score": 0.8267117876664789,
"openwebmath_perplexity": 331.92765153504035,
"openwebmath_score": 0.9351568818092346,
"tags": null,
"url": "http://math.stackexchange.com/questions/378561/inverse-laplace-transform-of-2s1-s2-4s-5"
} |
python, performance, reinventing-the-wheel, quick-sort
def QuickSort(array, right, left):
...
# Yes: less chance for confusion.
def quicksort(array, left, right):
...
Don't make the caller know your implementation details. Forcing the caller
to pass values for left and right is not convenient for your users; it is
somewhat error prone (for example, in some cases you can pass the wrong
indexes, the function will complete without error, but the list won't be
sorted); and it's not needed because Python makes it easy to define a function
with optional arguments:
def quicksort(xs, left = 0, right = None):
if right is None:
right = len(xs) - 1
...
Ranges have a step value. If you are using range(), you don't need
reversed(). Use a negative step:
for right in range(right, pivot_pos - 1, -1):
... | {
"domain": "codereview.stackexchange",
"id": 42665,
"lm_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, reinventing-the-wheel, quick-sort",
"url": null
} |
area of regular and irregular polygon. Using the fact that , one of the most famous limits in calculus, it is easy to show that . For example, here’s how you’d find the area of EIGHTPLU in the figure below given that it’s a regular octagon with sides of length 6. Edit. A polygon is any 2-dimensional shape formed with straight lines. The idea here is to divide the entire polygon into triangles. Collectively recall the various expressions discovered from the previous lessons. First, find the perimeter of the hexagon. Exterior angle of a regular polygon having n sides = $$\dfrac{360^\circ}{n}$$ Interior angle of a regular polygon having n sides = $$180^\circ$$ - Exterior angle; Apothem falls on the midpoint of a side dividing it into two equal parts. A = (n × s × a) 2 Let's dive into the details: Apothem is a segment that joins the polygon’s center to the midpoint of any side and it is perpendicular to that side. The area of the polygon is Area = a x p / 2, or 8.66 multiplied by 60 | {
"domain": "org.br",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9808759677214398,
"lm_q1q2_score": 0.8064655675979744,
"lm_q2_score": 0.8221891392358015,
"openwebmath_perplexity": 436.1171104462351,
"openwebmath_score": 0.62630295753479,
"tags": null,
"url": "http://www.iprede.org.br/53wje0dw/area-of-a-polygon-with-n-sides-00df44"
} |
swift, ios, swift3
Title: Simple War game in Swift I'm new to swift and I want to know if I'm doing something wrong or a harder way. I made a simple war game app. Tames of variables aren't correct, I know, but I was doing it quickly and I didn't worry about names of variables in that small project so I named them in English with Polish grammar.
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var LeftCardOutlet: UIImageView!
@IBOutlet weak var RightcardOutlet: UIImageView!
@IBOutlet weak var LeftScoreOutlet: UILabel!
@IBOutlet weak var RightscoreOutlet: UILabel!
var karty = ["card2","card3","card4","card5","card6","card7","card8","card9","card10","jack","queen","king"]
var scoreplayer:Int=0
var CPUscore:Int=0
override func viewDidLoad() {
super.viewDidLoad()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning() | {
"domain": "codereview.stackexchange",
"id": 23610,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "swift, ios, swift3",
"url": null
} |
thermodynamics, temperature, geophysics
My doubts refer to a calculation often reproduced in textbooks. One compares the temperature, which the earth would have without greenhouse gases (on the basis of a calculation with the law of Stefan-Boltzmann) with the "measured" global average temperature of the earth. One obtains a value around -20°C without greenhouse gases and attributes the difference to the "measured" approximate global temperature of +15°C to the greenhouse effect and from this also obtains an estimate of the climate sensitivity of climate gases.
However, this simple calculation alone seems physically disputable in several respects. | {
"domain": "earthscience.stackexchange",
"id": 2718,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics, temperature, geophysics",
"url": null
} |
electromagnetism, visible-light, waves, electromagnetic-radiation
Title: How is the combination of electric & magnetic waves (electromagnetic wave) illustrated as a single wave? This is the common presentation of an electromagnetic wave:
But it can also be shown as a single wave with a single defined wavelength & amplitude : | {
"domain": "physics.stackexchange",
"id": 35121,
"lm_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, visible-light, waves, electromagnetic-radiation",
"url": null
} |
javascript, ecmascript-6
export default proxy; You are correct that there is no need to wrap this with a promise. As it is, there are a few problems with the GetOrSetLocal function.
The function will always try to fetch the values from the server, even if it is cached locally.
The function's name is misleading, when first reading the code I assumed the function could be used to set a value in storage - not just retrieve values. I'm not really sure what to suggest for a name...
I would recommend using something other than callback for the Axios instance as it is decidedly not a callback. It might be best to just call it axios.
burst would be better named ignoreCache to more clearly indicate it's purpose. | {
"domain": "codereview.stackexchange",
"id": 28754,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, ecmascript-6",
"url": null
} |
ros, gmapping-demo
Once I did this and launched rviz again with above commands, the interactive marker was in rviz and when I clicked on the interactive button, I could navigate using interactive markers while mapping was taking place. Of course you still have to run
roslaunch turtlebot_interactive_markers interactive_markers.launch --screen
I do not really understand the syntax in the *.rviz files. I could attach my modified navigation.rviz so others can do a diff and see where I changed it, but I don't have enough points. Maybe someone can tell me if what I did is the correct way to fix this issue or not.
Originally posted by mrobot with karma: 16 on 2017-05-02
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 27781,
"lm_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, gmapping-demo",
"url": null
} |
genetics, bioinformatics, gene-regulation, computational-model
The "comprehensive" model in Lobo has 14 species, so there are at least
$3\cdot14^2 + 4\cdot14 = 644$
644 free parameters to fit during the modelspace search. Against those 644 parameters they have exactly 16 independent experimental observations. | {
"domain": "biology.stackexchange",
"id": 4069,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "genetics, bioinformatics, gene-regulation, computational-model",
"url": null
} |
newtonian-mechanics, pressure, acceleration, fluid-statics
Title: Will this move due to pressure difference? A U-tube is placed on a frictionless horizontal plane with a cork fixed tightly at the middle of the horizontal arm. It is filled with water and mercury on either side, as shown in the picture.
Let's consider points A and B (marked as red dots). Since A is facing mercury which has a higher density, there pressure is higher than that of B. So there is a net force acting on the cork from A to B. As the cork is connected with the U tube tightly, will the U tube accelerate towards the right? Remember that Pascal's law tells us that a fluid exerts its pressure equally in all directions, so if we draw all the forces that the mercury exerts on the container is in they will look something like this: | {
"domain": "physics.stackexchange",
"id": 80973,
"lm_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, pressure, acceleration, fluid-statics",
"url": null
} |
algorithm-analysis, runtime-analysis, loops
print count Now, you need to make index reach n, rather than go just up to it,
so instead of range(1,n), it should be range(1,m) for some m such that n < m .
To avoid n+1, one also needs m ≤ n+1 . Combining those gives n < m ≤ n+1 .
The simplest such m is obviously m = n+1 , so your initial range should be range(1,n+1). | {
"domain": "cs.stackexchange",
"id": 12924,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithm-analysis, runtime-analysis, loops",
"url": null
} |
### Show Tags
10 Mar 2017, 22:59
2
KUDOS
HKD1710 wrote:
A family of 4 is at a restaurant with 6 choices on the menu. If nobody orders the same meal, how many possible combinations of meals could they order?
A) 15
B) 30
C) 60
D) 180
E) 360
Person 1 can order from 6 different choices
Person 2 can order from 5 different choices
Person 3 can order from 4 different choices
Person 4 can order from 3 different choices
total choices = 6*5*4*3 =360
Hence option E is correct
Hit Kudos if you liked it
Intern
Joined: 22 Dec 2013
Posts: 9
Location: United States
Schools: Wharton '20
Re: A family of 4 is at a restaurant with 6 choices on the menu [#permalink]
### Show Tags
10 Mar 2017, 23:09
HKD1710 wrote:
A family of 4 is at a restaurant with 6 choices on the menu. If nobody orders the same meal, how many possible combinations of meals could they order?
A) 15
B) 30
C) 60
D) 180
E) 360 | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9536217992774898,
"lm_q1q2_score": 0.8161583124377173,
"lm_q2_score": 0.8558511488056151,
"openwebmath_perplexity": 3422.498852214532,
"openwebmath_score": 0.5389502644538879,
"tags": null,
"url": "https://gmatclub.com/forum/a-family-of-4-is-at-a-restaurant-with-6-choices-on-the-menu-235774.html"
} |
Another way: We show that in general $f(n+1)=2f(n)$. Consider all patterns of steps that add up to $n+1$. They are of two types (i) Patterns that have last step $1$ and (ii) Patterns that have last step $>1$.
It is obvious that there are $f(n)$ patterns of type (i). We now count the type (ii) patterns. Take a pattern of type (ii), and shorten its last step by $1$. The total is now $n$. Moreover, we get all patterns for $n$ in this manner, in one and only one way. Thus there are $f(n)$ type (ii) patterns. It follows that $f(n+1)=f(n)+f(n)=2f(n)$.
-
A composition of an integer $n$ into $k$ parts is the number of sums $a_1 + \dots + a_k$ of positive integers that equal $n$. For example, there are 3 compositions of $4$ into $2$ parts: 2+2, 3+1, and 1+3. You should try to prove that the number of compositions of $n$ into $k$ parts is equal to $\binom{n-1}{k-1}$. (Or, look it up in any good combinatorics book.) | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.98593637543616,
"lm_q1q2_score": 0.861784536238564,
"lm_q2_score": 0.8740772302445241,
"openwebmath_perplexity": 154.85605334381498,
"openwebmath_score": 0.9091524481773376,
"tags": null,
"url": "http://math.stackexchange.com/questions/89470/in-how-many-ways-can-i-climb-down-ten-stairs-taking-as-many-steps-at-a-time-as"
} |
Refractive Index of Water/Glass Combination
1. Jan 14, 2010
labview1958
If a beam of light enters water from air at 30 degrees from the normal. It then enters a glass block and exit into air. At what angle does it exit from glass to air ? My friend says it exist again at 30 degrees to normal. The refractive index of water is 1.3 and glass is 1.5.
2. Jan 14, 2010
RoyalCat
Your friend's forgotten Snell's Law: $$n_1 \sin{\theta _1}=n_2 \sin{\theta _2}$$
Where the index 1 refers to the material the light's coming from, and the index 2 refers to the material the light's entering.
3. Jan 14, 2010
MATLABdude | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9777138131620183,
"lm_q1q2_score": 0.8579211695846708,
"lm_q2_score": 0.8774767810736693,
"openwebmath_perplexity": 1017.4631242954754,
"openwebmath_score": 0.6225447654724121,
"tags": null,
"url": "https://www.physicsforums.com/threads/refractive-index-of-water-glass-combination.369449/"
} |
c++, linked-list
This looks broken
while(node!=NULL){
if(temp->next==node)
temp->next=node->next;
temp=temp->next;
return; // Seems to return after the first iteration.
}
Rule of 3/5 Violation
You need to look up the rule of 5/3. Currently your list will not do what you expect when you copy it.
But it will not crash at the moment because you leak all the nodes on destruction. But when you fix the leak the copying will become a problem.
Improved Version
#include <iostream>
class DoubleList
{
struct Node
{
Node* next;
Node* prev;
};
struct DataNode: public Node
{
int data;
DataNode(int val, Node* next, Node* prev)
: Node{next, prev}
, data(val)
{}
};
Node sent; | {
"domain": "codereview.stackexchange",
"id": 26640,
"lm_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++, linked-list",
"url": null
} |
general-relativity, fluid-dynamics, stress-energy-momentum-tensor
Title: Derivation of the energy-momentum tensor for an imperfect fluid In chapter 7 of the "Physical Foundations of Cosmology" Mukhanov uses this energy-momentum tensor for an imperfect fluid:
$$T^\mu_\nu = (\rho + p)u^\mu u_\nu - p\delta^\mu_\nu - \eta(P^\mu_\gamma u^{;\gamma}_\nu+P^\gamma_\nu u^\mu_{;\gamma}-\frac{2}{3}P^\mu_\nu u^{\gamma}_{;\gamma}) $$
where $\eta$ is the shear viscosity coefficient and $P \equiv \delta^\mu_\nu - u^\mu u_\nu$ is the projection operator.
Where does this relation come from? can you introduce some references for derivation of this energy-momentum tensor? Here is a sketch of where it comes from. First just consider the perfect fluid terms and note the thermodynamic relation
$$
\rho + p = \mu n + T s,
$$
where $T$ and $s$ are temperature and entropy, $\mu$ and $n$ are a chemical potential and number density.
We also have a relation for derivatives of $p$
$$
dp = n d\mu + s dT.
$$
Now if you take the divergence and dot with $u$ | {
"domain": "physics.stackexchange",
"id": 21686,
"lm_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, fluid-dynamics, stress-energy-momentum-tensor",
"url": null
} |
c#, performance, xna
This works fine. I get 60FPS and it's totally smooth & everything runs perfectly. However, if I do this:
foreach (Human human in this.humans)
{
Vector2 position = new Vector2(random.Next(8000), random.Next(4800));
human.Spawn(position);
} | {
"domain": "codereview.stackexchange",
"id": 4475,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, performance, xna",
"url": null
} |
comparison, statistical-ai, symbolic-ai
Title: What are the differences in scope between statistical AI and classical AI? What are the differences in scope between statistical AI and classical AI?
Real-world examples would be appreciated. Statistical AI, arising from machine learning, tends to be more concerned with inductive thought: given a set of patterns, induce the trend.
Classical AI is the branch of artificial intelligence research that concerns itself with attempting to explicitly represent human knowledge in a declarative form, i.e given a set of constraints, deduce a conclusion.
Another difference is that C++, Python, and R tend to be a favorite language for statistical AI, while LISP and PROLOG dominate in classical AI.
A system can't be more intelligent without displaying properties of both inductive and deductive thought. This leads many to believe that, in the end, there will be some kind of synthesis of statistical and classical AI. | {
"domain": "ai.stackexchange",
"id": 2613,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "comparison, statistical-ai, symbolic-ai",
"url": null
} |
c#, linq
client.DefaultRequestHeaders.TryAddWithoutValidation(
"Authorization", "key=" + api);
var r = client.PostAsync(url,
new StringContent(jGcmData.ToString(), Encoding.Default, "application/json")).Result;
}
}
catch (Exception ex)
{
Toast.MakeText(Application.Context, "Something went wrong", ToastLength.Short).Show();
var objLog = new LogService();
objLog.MobileLog(ex, SISConst.UserName);
}
}
}
});
pushTask.Start();
} | {
"domain": "codereview.stackexchange",
"id": 33267,
"lm_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#, linq",
"url": null
} |
astrophysics, galaxies
There isn't a clear or a known answer why they form , there are several studies and researches concerning this question. The study of galaxy formation and evolution is concerned with the processes that formed a heterogeneous universe from a homogeneous beginning, the formation of the first galaxies, the way galaxies change over time, and the processes that have generated the variety of structures observed in nearby galaxies. It is one of the most active research areas in astrophysics. | {
"domain": "physics.stackexchange",
"id": 23856,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "astrophysics, galaxies",
"url": null
} |
visible-light, reflection, refraction
Is A=B? The "reflected ray" will follow both the law of reflection and the law of refraction (i.e., Snell's law). It may be simpler to analyze the situation if you consider the incident ray actually hitting a point on the mirror slightly above the A-B interface. In this case, the incident ray reflects off the mirror with the same angle A, and then hits the A-B interface and then its angle is bent from an angle A to an angle B by Snell's law. You could also consider the case when the light beam is adjusted to hit a point below the A-B interface. In that case, the beam of light is first refracted from an angle A to a new angle B, and then bounces off the mirror with the same angle B. The bottom line is that you get the same answer regardless of whether the incident beam hits the A-B interface exactly at the point where it meets the mirror, or a little bit above or below that point. | {
"domain": "physics.stackexchange",
"id": 26795,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "visible-light, reflection, refraction",
"url": null
} |
general-relativity, symmetry
Also, iirc, $u^\mu D_\mu \equiv \frac{d}{d\tau}$, if $\tau$ is affine.
Finally, you could just write the geodesic equation out in components (at least, the interesting ones that don't vanish, e.g., $\ddot{x}$ and $\ddot{t}$) and then write $\dot{E}$ in terms of $\dot{r}$ and $\dot{t}$. This is probably the "low level" way of doing the problem, although it might be quicker. | {
"domain": "physics.stackexchange",
"id": 10580,
"lm_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, symmetry",
"url": null
} |
machine-learning, binary-classification, vc-theory
I'm already struggling with the first part. Let $C\subseteq\mathcal{X}$ be a set of size $k+1$. Then, $C$ is not shattered by $\mathcal{H}$ as there is no $h\in\mathcal{H}$ satisfying $h(\mathbf{x})=1$ for all $\mathbf{x}\in C$ $\Rightarrow\;\mathrm{VCdim}(\mathcal{H})\leq k$. On the other hand, if $C\subseteq\mathcal{X}$ is of size $|\mathcal{X}|-k+1$, then $C$ is not shattered by $\mathcal{H}$ as there is no $h\in\mathcal{H}$ satisfying $h(\mathbf{x})=0$ for all $\mathbf{x}\in C$. Hence, $\mathrm{VCdim}(\mathcal{H})\leq\min\{k,|\mathcal{X}|-k\}$.
I don't see why the second step in this line of reasoning is true. For example, consider some domain of cardinality $|\mathcal{X}|=4$ and let $k=3$. Then, $|\mathcal{X}|-k+1=2$. So when I pick any $2$ instances from $\mathcal{X}$ so that $C=\{\mathbf{x}_1,\mathbf{x}_2\}$, why is there no $h\in\mathcal{H}$ satisfying $h(\mathbf{x}_1)=h(\mathbf{x}_2)=0$? In my opinion, as $2<k=3$, this is actually the only possible labeling. | {
"domain": "datascience.stackexchange",
"id": 11433,
"lm_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, binary-classification, vc-theory",
"url": null
} |
java, multithreading, socket, server, client
String str = in.readLine();
while (!str.equals("END"))
{
switch (str.split(" ", 10)[0])
{
case "HELP":
help();
break;
case "NEWGAME":
newgame();
break;
case "RESUME":
resume(str);
break;
default:
out.println("Sorry, that's not a valid option; please try again!");
break;
} | {
"domain": "codereview.stackexchange",
"id": 35574,
"lm_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, multithreading, socket, server, client",
"url": null
} |
radioactivity, neutrons, cosmic-rays
What is the dominating process and why? Yes, they're thermalized and captured. Remember that the free neutron lifetime is roughly fifteen minutes, and that thermal neutrons are moving a couple kilometers per second. The chance of going fifteen minutes without a capture interaction is tiny. (Even in so-called "neutron bottle traps," it's hard to get the mean time before neutron disappearance to approach the beta-decay lifetime.) There'll be some free decay, but not much. | {
"domain": "physics.stackexchange",
"id": 15577,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "radioactivity, neutrons, cosmic-rays",
"url": null
} |
fluid-dynamics
$$
For your situation we have
$$
\omega_2=0\to z_s(r)=\frac{r_1^4 \left(r_2^2-r^2\right){}^2 \omega _1^2}{2 g r^2 \left(r_1^2-r_2^2\right){}^2}
$$
And we see that $\omega_1$ and $g$ don't affect the shape. Taking $r_2/r_1=10$ the situation looks something like | {
"domain": "physics.stackexchange",
"id": 68013,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics",
"url": null
} |
fft, filters, filter-design, convolution
Title: Applying a Filter Kernel Defined by a Continuous Equation in the Frequency Domain I have a filter kernel $K(\omega)$ completely defined in the frequency domain as a continuous function of angular frequency $\omega$. I know $K(\omega)$ defined as a continuous mathematical equation.
Using the discrete FFT and IFFT, I would like to apply this kernel to a discrete time-domain signal using convolution via multiplication in the frequency domain.
What is a good way to deal with this convolution? Should I generate the $U(\omega)$ as a continuous function in the frequency domain, take the IFFT, and then truncate, shift and window the signal as mentioned in the book Steven W. Smith - The Scientist and Engineer's Guide to Digital Signal Processing? | {
"domain": "dsp.stackexchange",
"id": 7783,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fft, filters, filter-design, convolution",
"url": null
} |
python, python-3.x, reinventing-the-wheel, comparative-review
>>> a = (1, 2, 3, 4)
>>> func = lambda x: x * x
>>> map_tuple(func, a)
(1, 4, 9, 16)
"""
length = len(tup)
count = 0
new_tuple = ()
while count < length:
new_tuple = new_tuple + (func(tup[count]),)
count = count + 1
return new_tuple
My solution 2:
def map_tuple_recursive(func, tup):
"""Applies func to each element of tup and returns a new tuple.
>>> a = (1, 2, 3, 4)
>>> func = lambda x: x * x
>>> map_tuple(func, a)
(1, 4, 9, 16)
"""
length = len(tup)
def new_tuple(count):
if count == length:
return ()
else:
return (func(tup[count]), ) + new_tuple(count + 1)
return new_tuple(0) | {
"domain": "codereview.stackexchange",
"id": 13021,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, reinventing-the-wheel, comparative-review",
"url": null
} |
python
def parse_delta(d: str):
'''
returns a timedelta object that is parsed from the default
string format outputed by the datetime.datetime.now() function
'''
time = []
if 'day' in d:
for char in d:
if char.isnumeric():
time.append(char)
elif char == 'd':
time.append('')
days = ''
time_copy = time.copy()
for i in range(len(time)):
if time_copy[i] == '':
break
days += time_copy[i]
time.remove(time_copy[i])
days = int(days)
if len(time) == 12: #if hours value is two digits instead of 1
index = 1
else:
index = 2
hours = int(''.join(time[1: 1 + index]))
minutes = int(''.join(time[1 + index: 3 + index]))
seconds = int(''.join(time[3 + index: 5 + index])) | {
"domain": "codereview.stackexchange",
"id": 38021,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python",
"url": null
} |
homework-and-exercises, electric-circuits, electric-current, electrical-resistance, capacitance
This question is from kvpy exam that was held on 5th November, the official answer key says its (c) but thats tentative. Could someone please explain this?
I know this kinda questions dont go too well on stackexchange but this question has us intrigued as everyone expected the answer would be (a) or (d) Badly stated question.
If the capacitance is high and the frequency high, assuming one is talking of an AC high tension,the alternating fields will cook the bird, ( like a microwave oven) .
BUT powerlines are not made with such conditions because a lot of energy would be lost in ionizing the air. For existing power lines the answer is A, the circuit is not complete. | {
"domain": "physics.stackexchange",
"id": 44758,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electric-circuits, electric-current, electrical-resistance, capacitance",
"url": null
} |
quantum-field-theory, gauge-theory, path-integral, propagator, chern-simons-theory
The parameters $\beta$ and $\gamma$ must be calculated fro the condition:
$ G^{-1}_{\mu\nu}(k) \delta^{\nu\sigma} G_{\sigma\tau}(k)= \delta_{\mu\tau} $
Please observe that the propagator cannot contain a term proportional to $\delta_{\nu\sigma}$, because this term would result a term proportional to $\epsilon_{\mu\sigma\tau}q^{\tau}$ after contraction with the inverse propagator which cannot be canceled with any other term.
We obtain:
$(\alpha \beta q^2 -\frac{\theta}{4} \gamma) q_{\mu} q_{\tau} + \frac{\theta}{4} \gamma q^2 \delta^{\mu\tau} = \delta^{\mu\tau}$
(Where, The following identity was used: $\delta^{\nu \sigma}\epsilon_{\mu\nu\rho} \epsilon_{\sigma\tau\eta} = \delta_{\mu \eta}\delta_{\rho \tau}- \delta_{\mu \tau}\delta_{\rho \eta}$)
Thus:
$ \gamma = \frac{4}{\theta q^2}$
$ \beta = \frac{\theta \gamma }{4 \alpha q^2} = \frac{1}{\alpha q^4}$
Thus $ \beta $ vanishes in the limit $ \alpha \to \infty$ and we are left with the effective action: | {
"domain": "physics.stackexchange",
"id": 3459,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-field-theory, gauge-theory, path-integral, propagator, chern-simons-theory",
"url": null
} |
java, stream
Now we can deal with the stuff that we need to set up:
public BinaryOperator<StringBuffer> combiner() {
// explicitly doesn't do anything, supplier always returns the same object
return (a, b) -> a;
}
public Supplier<StringBuffer> supplier() {
return () -> {
return out;
};
} | {
"domain": "codereview.stackexchange",
"id": 31291,
"lm_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, stream",
"url": null
} |
python, interview-questions
for user in self.users:
if user.name = user_name:
user_id = user.user_id
self.users.append(task(user_id, task_name))
def get_user_tasks(self, user_name):
'''
Get task(s) that belongs to the specified user name
@ user_name: string
'''
user_tasks = []
for user in self.users:
if user.name == user_name:
for task in self.tasks:
if task.user_id == user.user_id:
user_tasks.append(task)
return user_tasks
if __name__ == "__main__":
tms = TaskManagementSystem()
tms.add_user('Bob')
tms.add_task('Bob', 'laundry')
tms.add_task('Bob', 'grocery')
tms.add_task('Bob', 'daycare')
print tms.get_user_tasks('Bob')
# should print: ['laundry', 'grocery', 'daycare']
Here is the code I handed in as my answer:
#!/usr/bin/env python2.7
# encoding: utf-8
from random import choice
class user(object): | {
"domain": "codereview.stackexchange",
"id": 18976,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, interview-questions",
"url": null
} |
• Since $y=N-2x$, the number of integer solutions is actually $\left\lfloor\frac{N}{2}\right\rfloor+1$. If you draw the function $y=N-2x$ in the first quadrant and work on the boundary conditions, you will easily get the answer. Also, I don't think that this is a combinatorics question... – Yourong Zang Nov 14 '19 at 0:28
• This is the number of partitions of $N$ into at most $2$ parts or where no part exceeds $2$. The pattern continues: for example the number of solutions to $6u+5v+4w+3x+2y+z=1$ is the number of partitions of $N$ into at most $6$ parts or where no part exceeds $6$, though the formula gets more complicated – Henry Nov 14 '19 at 0:56
Case 1: $$N$$ is odd. We have $$N=1: \quad 1 \mbox{ solution } \ (x,y)=(0,1)$$ $$N=3: \quad 2 \mbox{ solutions } \ (0,3), \ (1,1)$$ $$N=5: \quad 3 \mbox{ solutions } \ (0,5), \ (1,3), \ (2,1)$$ The pattern suggests that we have $$\lceil N/2 \rceil$$ solutions for odd $$N$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676496254957,
"lm_q1q2_score": 0.8458368275275809,
"lm_q2_score": 0.8633916082162403,
"openwebmath_perplexity": 60.93457876031679,
"openwebmath_score": 0.8350617289543152,
"tags": null,
"url": "https://math.stackexchange.com/questions/3434719/number-of-non-negative-integer-solutions-to-2x-y-n"
} |
Proof of Lemma 1
Suppose the space $Y$ satisfies condition 1. Let $H$ and $K$ be disjoint closed subsets of the space $Y$. Consider $H \subset U=Y \backslash K$. Using condition 1, there exists a sequence $U_1,U_2,U_3,\cdots$ of open subsets of the space $Y$ such that $H \subset \bigcup_{i=1}^\infty U_i$ and $\overline{U_i} \cap K=\varnothing$ for each $i$. Consider $K \subset V=Y \backslash H$. Similarly, there exists a sequence $V_1,V_2,V_3,\cdots$ of open subsets of the space $Y$ such that $K \subset \bigcup_{i=1}^\infty V_i$ and $\overline{V_i} \cap H=\varnothing$ for each $i$.
For each positive integer $n$, define the open sets $U_n^*$ and $V_n^*$ as follows:
$U_n^*=U_n \backslash \bigcup_{k=1}^n \overline{V_k}$
$V_n^*=V_n \backslash \bigcup_{k=1}^n \overline{U_k}$ | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9911526443943918,
"lm_q1q2_score": 0.8033083158230812,
"lm_q2_score": 0.8104789109591831,
"openwebmath_perplexity": 104.48403738152078,
"openwebmath_score": 0.9783799052238464,
"tags": null,
"url": "https://dantopology.wordpress.com/tag/perfectly-normal-space/"
} |
geophysics, seismology, waves
Reconciling P- and S-wave reflections is one of the great problems in reflection seismology today. Everything is made more complicated by the fact that these waves can convert from one to the other. For example, when P-waves reflect from an elastic interface, like rock broundaries, some energy is converted into S-waves. Furthermore, some recording equipment is more sensitive to vertical ground motion than to horizontal (e.g. single component geophones), so our records are often strongly filtered. The result is that unpeeling multiple wave types is not easy. | {
"domain": "earthscience.stackexchange",
"id": 68,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "geophysics, seismology, waves",
"url": null
} |
Keep plugging the result back in. After 100 iterations you have:
$$\begin{bmatrix} 7.9991\\ 5.9993\end{bmatrix}$$
Here is a graph of the progression of the iteration:
• So we just have $f\begin{bmatrix} 0 \\ 0\end{bmatrix}$ and then $f\bigg(f\begin{bmatrix} 0 \\ 0\end{bmatrix}\bigg)$ and by letting $f^k(\cdot ) = f(f(\ldots f(f(\cdot))\ldots )$ $k$ times, this overall goes to $$f^{100}\begin{bmatrix} 0 \\ 0\end{bmatrix}$$ and etc... hmm... it actually seems quite appealing to me, regardless of its low efficiency, as you say :P Apr 10, 2019 at 0:46
• Note that this doesn't always work, $f$ needs to be a contraction. Apr 11, 2019 at 12:10
• It's worth noting this is often used as a final step to improve the accuracy of the solution. Aug 28, 2020 at 17:29 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765628041175,
"lm_q1q2_score": 0.8057260845083343,
"lm_q2_score": 0.8221891370573388,
"openwebmath_perplexity": 393.1936734546725,
"openwebmath_score": 0.9875684976577759,
"tags": null,
"url": "https://math.stackexchange.com/questions/3180580/are-there-any-other-methods-to-apply-to-solving-simultaneous-equations"
} |
if len_a mod len_b = 0 then
q := q + len_b;
fi;
od;
p := p*q;
od;
res := res + p*flat_a[1]*flat_b[1];
od;
od;
res;
end;
This is some sample output from the program.
> seq(strs(k, 4), k=1..18);
1, 2, 3, 5, 6, 9, 11, 15, 18, 23, 27, 34, 39, 47, 54, 64, 72, 84
> seq(strs(k, 5), k=1..18);
1, 2, 3, 5, 7, 10, 13, 18, 23, 30, 37, 47, 57, 70, 84, 101, 119, 141
> seq(strs(k, 6), k=1..18);
1, 2, 3, 5, 7, 11, 14, 20, 26, 35, 44, 58, 71, 90, 110, 136, 163, 199
Looking these up in the OEIS we can confirm that we indeed have the number $p_n(k)$ of partitions into at most $n$ parts. These are the sequences OEIS A001400, OEIS A001401 and OEIS A001402.
This MSE link points to some sophisticated power group enumeration examples. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808707404788,
"lm_q1q2_score": 0.8104097531577503,
"lm_q2_score": 0.8267117898012105,
"openwebmath_perplexity": 708.39796820915,
"openwebmath_score": 0.5928859114646912,
"tags": null,
"url": "https://math.stackexchange.com/questions/7235/number-of-classes-of-k-digit-strings-when-digit-order-and-identity-doesnt-matte?noredirect=1"
} |
performance, vba, excel
Title: Recoloring cells to create a heat map dynamic legend Goal: Get the code to execute quicker
Quick Overview of the codes objective:
Takes the colors of a heatmap created in excel and changes them whenever a target cell is changed on the input worksheet(something that would change the heatmap). The heat map is created to show which of many pensions plans will be the highest value at any given time, and utilizes excels condition formats to decide which color to output. The code then formats the output year cell in black bold to make it easier to see and creates a dynamic legend to make the viewer undertand which colors link to which pension plan.
The code below has 2 major parts which I will outline. Please see the numbered parts 1, 2 for more info on each portion. | {
"domain": "codereview.stackexchange",
"id": 30071,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, vba, excel",
"url": null
} |
homework-and-exercises, optics, refraction, geometric-optics
Title: Does this picture look wrong to anyone else? There is a typo. One which obfuscates the main point and makes it difficult for anyone unfamiliar with the problem to deduce the answer. The angles XCF and N'CB are marked as being the same angle, but that is clearly nonsense since that would makes line CB parallel to line FB. | {
"domain": "physics.stackexchange",
"id": 29917,
"lm_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, optics, refraction, geometric-optics",
"url": null
} |
math-expression-eval, powershell
About correctness: the $_.Value -is [int32] condition seems to be too strong. For instance, 1/2*3*4 gives 6, however (1/2*3*4).GetTypeCode() gives Double; hence, (1/2*3*4) -is [int32] condition (incorrectly) rejects the value from result.
For the sake of comparison, I added appropriate Write-Verbose cmdlet (immediately before the main loop) and used $maxRange = 7; $lowCountThreshold = 1 in the original script. The comparison of the latter with the adapted one I performed using the following wrapper:
param (
[parameter()]
[ValidateRange(8,13)]
[int]$maxLoop = 12
)
$y = (Measure-Command {$x = D:\PShell\CR\122635.ps1}).TotalSeconds
$z = ($x | Measure-Object -Property Count -Sum).Sum
'orig. {0,4} {1,9} {2,9} {3,16}' -f 7, $x.count, $z, $y | {
"domain": "codereview.stackexchange",
"id": 34648,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "math-expression-eval, powershell",
"url": null
} |
ros, diagnostics
Title: Root cause analysis library for ROS?
Hi,
A lot of times when we develop ROS systems with multiple different nodes communicating w each other, it goes without saying that there are going to be a few bugs introduced. And it gets hard to track the root cause for that bug.
It may appear that the bug is in node A but suppose node A depends on something in node B and that in turn on node C, the root cause of the problem could be in node C. Are there any ROS libraries that look at root cause analysis in complex ROS systems? Or any libraries or general sources of information I could check out for this kind of thing.
I am not sure what this would be classified as so I couldn't get the right Google keywords to make a good search.
If not, I would be interested in writing something like that. Is there a forum to discuss such kind of stuff and see if there would be someone else also interested in the same?
Thank you. | {
"domain": "robotics.stackexchange",
"id": 28319,
"lm_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, diagnostics",
"url": null
} |
Does the sign of the weight have anything to do with class?
Not really, the sign of the weights has to do with the equation of the boundary plane.
Source
https://ai6034.mit.edu/wiki/images/SVM_and_Boosting.pdf
• this is a very well written summary. i've used svm for nearly 20 years off and and find it useful as quick reference. Sep 11 '20 at 1:58
• Thank you, I don't understand how and why this is not part of the scikit learn documentation. Oct 2 '20 at 17:48
• @Xavier In a linear SVM classification, having a weight of 0.90 for the gender variable where (gender = 0 if female and gender=1 if male), does it tells us something additional? Apart from the fact that gender is important since the weight magnitude is high.. Apr 6 at 13:25
• Personally I have never seen anyone inferring anything about SVM weights other than relative importance - but if you find something please feel free to post it here ! Apr 7 at 9:55 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.972830769252026,
"lm_q1q2_score": 0.8085615224685839,
"lm_q2_score": 0.8311430394931456,
"openwebmath_perplexity": 651.244260679008,
"openwebmath_score": 0.7507437467575073,
"tags": null,
"url": "https://stats.stackexchange.com/questions/39243/how-does-one-interpret-svm-feature-weights/355043"
} |
rosbag
After I change the the "Hellow" in the bag file to "ILoveYou", and replay it :
My subscriber still get the Hello World ........not the ILoveYou World????
This is my first time to use ROS, I have read all overview and done all tutorial in the wiki...
Could anyone give me some suggestion????
Originally posted by eddyxd on ROS Answers with karma: 13 on 2011-12-19
Post score: 0
Your best bet is to use the rosbag API to try to solve your problem. It gives you access to the bag data so that you can modify it.
Originally posted by DimitriProsser with karma: 11163 on 2011-12-19
This answer was ACCEPTED on the original site
Post score: 3 | {
"domain": "robotics.stackexchange",
"id": 7684,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rosbag",
"url": null
} |
organic-chemistry, reaction-mechanism
group (make our leaving group less stable), then ejecting it becomes a higher energy process and the E1 reaction becomes less competitive with the other reaction pathways. Saying this last sentence differently, when we use a poor leaving group we raise the activation energy for the E1 mechanism. Since the rate of the E1cb process is not affected by the leaving group, its rate remains unchanged. Consequently, a poor leaving group will disfavor the E1 process making the E1cb process more competitive. If the leaving group is bad enough, we can disfavor the E1 process so much that we wind up pushing our reaction all the way over to the E1cb side. | {
"domain": "chemistry.stackexchange",
"id": 2647,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, reaction-mechanism",
"url": null
} |
physical-chemistry, group-theory, group-representations, quarks
If Dmitri Mendeleev had had access to and a full understanding of modern group theory, could have plausibly structured the periodic table of chemistry in terms of group theory, as opposed to the simpler data-driven tabular format that he actually used?
If Mendeleev really had created a group-theory-based Periodic Table, would it have provided any specific insights, e.g. perhaps early insights into quantum theory?
The inverse question: If Murray Gell-Mann and others had not used group theory concepts such as $SU(3)$ to organize particles into families, and had instead relied on simple grouping and graphical organization methods more akin to those of Mendeleev, is there any significant chance they could have succeeded? Or less speculatively, is it possible to create useful, concise, and accurate organizational structures (presumably quark based) that fully explain the particle data of the 1970s without making any reference to algebraic structures? | {
"domain": "physics.stackexchange",
"id": 4399,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physical-chemistry, group-theory, group-representations, quarks",
"url": null
} |
python, mysql
Should I be quoting or escaping some strings/fields? The data is made safe by parameterized queries, but the table and field names could still cause trouble. I'm less concerned about security than failed queries due to odd characters.
Is there already a library out there for this? The existing solutions for upsert and batch-insert seem more generalized, and therefore slower, than implementing a MySQL-specific solution.
Also, I'm clearly in love with str.format()—is this the best way of handling string composition?
Here's some code to run the function, assuming a database named demo exists and mysql is listening on the localhost socket.
import MySQLdb
db = MySQLdb.connect(host="localhost", user="root", passwd="", db="demo", charset="utf8")
c = db.cursor()
c.execute("""DROP TABLE IF EXISTS upsert_demo""")
c.execute("""CREATE TABLE upsert_demo (
`id` int(11) unsigned NOT NULL,
`foo` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8""") | {
"domain": "codereview.stackexchange",
"id": 38448,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, mysql",
"url": null
} |
general-relativity, gravity, loop-quantum-gravity
Title: Confused about equations for the Big Bang in general relativity ad loop quantum gravity? I am trying to get a vague understanding of the mathematical equations for the Big Bang in GR and LQG. My understanding so far is that when the universe is assumed to be homogeneous and isotropic, which it practically is, then the Einstein Field Equations may be solved and you get the FLRW metric. I think the Friedman equations are based on the FLRW metric and they can be used to show that GR cannot deal with the big bang. I have the following questions about this: | {
"domain": "physics.stackexchange",
"id": 17794,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, gravity, loop-quantum-gravity",
"url": null
} |
beginner, sql-server, windows, batch
:: ------------------------------------------------------------------------------------------------
:: UPDATE AND PATCH EACH DB IN THE SERVER
call :echo_header "Starting DB update process"
for /d %%a in (%sqlDBs%) do (
if not [!prePatchScripts!]==[] call :run_script Pre-patching %%a !prePatchScripts!
if not errorlevel 1 call :run_script Updating %%a !updateScript!
if not errorlevel 1 if not [!postPatchScripts!]==[] call :run_script Post-patching %%a !postPatchScripts!
if errorlevel 1 goto :eof
echo.
)
:: ------------------------------------------------------------------------------------------------
:: END THE PROCESS SUCCESSFULLY
call :echo_header "SUCCESS: Update to %targetVersion% was successful!"
goto :eof | {
"domain": "codereview.stackexchange",
"id": 21688,
"lm_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, sql-server, windows, batch",
"url": null
} |
c#, .net, playing-cards, .net-5
With a Fluent design, I can do that in one line with:
deck.Shuffle().WriteLines();
Rank Structure
public enum RankName : byte
{
Ace = 1,
Two,
Three,
Four,
Five,
Six,
Seven,
Eight,
Nine,
Ten,
Jack,
Queen,
King,
Joker = byte.MaxValue
}
public struct Rank : IEquatable<Rank>
{
private Rank(RankName name, string symbol)
{
this.Name = name;
this.Symbol = symbol;
}
public RankName Name { get; }
public string Symbol { get; } | {
"domain": "codereview.stackexchange",
"id": 41507,
"lm_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#, .net, playing-cards, .net-5",
"url": null
} |
c#, winforms, mvp, pdf
case ScriptEvent.DidSave:
actionType = PdfWriter.DID_SAVE;
break;
case ScriptEvent.WillPrint:
actionType = PdfWriter.WILL_PRINT;
break;
case ScriptEvent.WillSave:
actionType = PdfWriter.WILL_SAVE;
break;
}
pdfStamper.Writer.SetAdditionalAction(
actionType, pdfAction);
} | {
"domain": "codereview.stackexchange",
"id": 20357,
"lm_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#, winforms, mvp, pdf",
"url": null
} |
scala
/** Returns a subtable made from the columns of the given indexes.
*
* Identical to [[rowsAt]] but uses the columns of the given indexes not
* the rows. It should not transform the columns into rows.
*
* @param cols Indexes of the desired columns.
* @return A table made from the selected columns.
*/
def colsAt(colIndexes: Iterable[Index]): DataSheet = {
val colVec = colIndexes.toVector
val cols = rows map { row =>
colVec map { colIndex =>
cellAt(colIndex)(row)
}
}
Sheet(cols)
}
private def cellAt(colIndex: Index)(row: Row): Cell = {
if (row.isDefinedAt(colIndex)) row(colIndex)
else ""
}
/**********\
IndexedSeq
\**********/
/** Returns the row at the given index
*
* @param rowIndex Index of the desired row.
* @return The row at rowIndex.
*/
def apply(rowIndex: Index): Row = {
rowAt(rowIndex)
}
// for IndexedSeq
def length = {
rows.length
}
} | {
"domain": "codereview.stackexchange",
"id": 21106,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "scala",
"url": null
} |
c, console, winapi
I am particularly interested in having feedback focused on the following:
Pipe creation and usage
CreateProcess usage
Method used for dynamically growing response buffer
Usage example:
#include "cmd_rsp.h"
int main(void)
{
char *buf = {0};
buf = calloc(100, 1);
if(!buf)return 0;
cmd_rsp("dir /s", &buf, 100);//where "dir /s" could be any command line
//input that results in a stdout response
printf("%s", buf);
free(buf);
return 0;
}
cmd_rsp.h
#ifndef _CMD_RSP_H_
#define _CMD_RSP_H_
//Exported Functions | {
"domain": "codereview.stackexchange",
"id": 25572,
"lm_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, console, winapi",
"url": null
} |
bond, molecular-orbital-theory, polarity
Note that this can't be generalised to more complex molecules and MO diagrams. It only truly works in the specific case where two AOs make up two MOs. Even, for example, carbon monoxide is problematic: it is only formed from two atoms, but its MOs generally have contributions from more than two different orbitals (carbon 2s and 2p, and oxygen 2s and 2p). So this simplification falls apart. | {
"domain": "chemistry.stackexchange",
"id": 16289,
"lm_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, molecular-orbital-theory, polarity",
"url": null
} |
# Dice Probability: Rolling 5's
I have two quick questions about probabilities and dice.
• What is the probability that that you can roll AT LEAST two fives in four rolls.
• What is the probability that you roll no more than one five in four rolls.
I'm pretty sure I have been over thinking this, but I just want to check to make sure.
For the first problem the sample set should be ${6^4}$. Then the probability of rolling one 5 should be $\frac{1}{6}$. There are 6 ways to roll two fives. Should the answer to this problem then be $\frac{6}{6^4}$?
The second problem... so the probability of rolling a five is $\frac{1}{6}$ then the probability of not rolling a five would be $\frac{5}{6}$. Therefore, the answer should be $\frac{5^4+4}{6^4}$?
Any help would be much appreciated. Thanks! | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.975201841245846,
"lm_q1q2_score": 0.8168485285304131,
"lm_q2_score": 0.837619961306541,
"openwebmath_perplexity": 129.19129247056222,
"openwebmath_score": 0.8135214447975159,
"tags": null,
"url": "https://math.stackexchange.com/questions/2900422/dice-probability-rolling-5s"
} |
• The green arc in the image should be reduced, because it does not represent the limitation on $\theta$ shown in the answer. – enzotib Aug 13 '20 at 16:16
• @enzotib, when $P$ will be topmost point, $\theta$ will be less than the maximum. Everything seems perfect to me. BTW, what do you suggest, what it should be? – SarGe Aug 13 '20 at 16:23
• – enzotib Aug 13 '20 at 16:30
• @enzotib, according to my best, my diagram seems to be correct. At topmost point $\theta$ will be less than the maximum. Consider a line coinciding with $y$-axis and now start rotating it w.r.t. origin in clockwise direction. It will first touch the circle at point with $\theta_{max}$ and then it will pass through the topmost point where $\theta<\theta_{max}$. – SarGe Aug 13 '20 at 16:35
• See my answer, please. In particular, you plus sign in front of the square root is wrong. – enzotib Aug 13 '20 at 16:52 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.974042639034657,
"lm_q1q2_score": 0.8179366899585113,
"lm_q2_score": 0.8397339676722393,
"openwebmath_perplexity": 197.77134488561938,
"openwebmath_score": 0.7718169689178467,
"tags": null,
"url": "https://math.stackexchange.com/questions/3789580/calculate-the-distance-of-any-point-on-the-arc-from-the-center-of-circle"
} |
general-relativity, resource-recommendations, ligo, gravitational-wave-detectors
Title: What is a complete book for Gravitational Wave Detectors I would like to find textbook/lecture notes which include the following:
explain how gravitational waves are produced
the physical principles underlying detectors of gravitational waves (particulary detectors using laser interferometry
astrophysical sources for the production of significant levels of gravitational radiation (a compact binary system)
outline the main noise sources which limit the performance of interferometric gravitational wave detectors
describe the plans for building more sensitive detectors on the ground and in space (describe how the signals from various astrophysical sources may be extracted from the data collected by these detectors.) All these subjects are covered in Michele Maggiore's two textbooks:
Gravitational Waves: Volume 1: Theory and Experiments
Gravitational Waves: Volume 2: Astrophysics and Cosmology | {
"domain": "physics.stackexchange",
"id": 89410,
"lm_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, resource-recommendations, ligo, gravitational-wave-detectors",
"url": null
} |
general-relativity, differential-geometry, geodesics, constrained-dynamics
Example: Consider $\mathbb R^2$, equipped with the Euclidean metric. In Cartesian coordinates $\{x,y\}$, the coordinate-induced basis vectors are $\left\{\frac{\partial}{\partial x}, \frac{\partial}{\partial y}\right\}$. The metric components in this basis are simply $g_{\mu\nu}=\pmatrix{1 & 0 \\ 0 & 1}$, and the connection coefficients $\Gamma^\mu_{\ \ \nu\sigma}$ all vanish.
If we remove the origin from consideration, we can switch to polar coordinates $\{r,\theta\}$ and the corresponding induced basis $\left\{\frac{\partial}{\partial r},\frac{\partial}{\partial \theta}\right\}$. Since $x=r\cos(\theta)$ and $y=r\sin(\theta)$, we can write | {
"domain": "physics.stackexchange",
"id": 67504,
"lm_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, differential-geometry, geodesics, constrained-dynamics",
"url": null
} |
general-relativity, tensor-calculus, notation
Title: Contorsion tensor and notation I was reading an article about Einstein-Cartan universes and the beginning he defines the contortion tensor as $$ K^a\vphantom{K}_{bc}=S^a\vphantom{S}_{bc}+S_{bc}\vphantom{S}^a+S_{cb}\vphantom{S}^a $$ with $$S^a\vphantom{S}_{bc}=\Gamma^a\vphantom{S}_{[bc]}.$$
Then he writes two equalities that I cannot understand:
$$K_{(a|b|c)}=-2S_{(ac)b}$$ and $${ }K_{[a|b|c]}=-S_{bac}. $$ | {
"domain": "physics.stackexchange",
"id": 38674,
"lm_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, tensor-calculus, notation",
"url": null
} |
homework-and-exercises, classical-mechanics, rotational-dynamics, moment-of-inertia
$$ I_{yz} = \int_{}^{}f(yz)\,dm = (0.300 * 0) * 4 kg = 0.00 kg.m^2 $$
$$ I_{zz} = \int_{}^{}f(x^2 + y^2)\,dm = (0.150^2 + 0.300^2) * 4 kg = 0.45 kg.m^2 $$
$$ I_{xx} = \int_{}^{}f(y^2 + z^2)\,dm = (0.300^2 + 0^2) * 4 kg = 0.36 kg.m^2 $$
$$ I_{yy} = \int_{}^{}f(x^2 + z^2)\,dm = (0.150^2 + 0^2) * 4 kg = 0.09 kg.m^2 $$
Thus my inertia tensor is different from the book's:
$$
\begin{bmatrix}
0.36 & -0.18 & 0 \\
-0.18 & 0.09 & 0 \\
0 & 0 & 0.45 \\
\end{bmatrix} \ne
\begin{bmatrix}
0.48 & -0.18 & 0 \\
-0.18 & 0.12 & 0 \\
0 & 0 & 0.6 \\
\end{bmatrix}
$$
Could someone explain to me what conceptual mistake I have made? | {
"domain": "physics.stackexchange",
"id": 26022,
"lm_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, classical-mechanics, rotational-dynamics, moment-of-inertia",
"url": null
} |
Name the property under multiplication used in given
-13/17 xx (-2)/7 = (-2)/7 xx (-13)/17
Ex. 1.1 | Q 5.3 | Page 14
Name the property under multiplication used in given
-19/29 xx 29/(-19) = 1
Ex. 1.1 | Q 6 | Page 14
Multiply 6/13 by the reciprocal of -7/16
Ex. 1.1 | Q 7 | Page 14
Tell what property allows you to compute 1/3 xx(6xx4/3) as (1/3 xx 6) xx 4/3
Ex. 1.1 | Q 8 | Page 14
Is 8/9 the multiplicative inverse of -1 1/8? Why or why not?
Ex. 1.1 | Q 9 | Page 14
Is 0.3 the multiplicative inverse of 3 1/3 ? Why or why not?
Ex. 1.1 | Q 10.1 | Page 15
Write: The rational number that does not have a reciprocal
Ex. 1.1 | Q 10.2 | Page 15
Write : The rational numbers that are equal to their reciprocals.
Ex. 1.1 | Q 10.3 | Page 15
Write : The rational number that is equal to its negative.
Ex. 1.1 | Q 11.1 | Page 15
Fill in the blanks
Zero has __________ reciprocal.
Ex. 1.1 | Q 11.2 | Page 15
Fill in the blanks | {
"domain": "shaalaa.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307668889047,
"lm_q1q2_score": 0.8417166044033053,
"lm_q2_score": 0.8652240791017536,
"openwebmath_perplexity": 4733.57406750295,
"openwebmath_score": 0.3934588134288788,
"tags": null,
"url": "https://www.shaalaa.com/textbook-solutions/c/ncert-solutions-class-8-mathematics-textbook-chapter-1-rational-numbers_252"
} |
java, performance, algorithm, combinatorics, minesweeper
I think you should tease out the running tally aspect of what's going on here. At a minimum....
void informAboutSolution(int rValue, Solution<T> solution, double total) {
// codestyle: always use braces
if (rValue == 0) {
return;
}
double probabilityChange = solution.nCr() / total * rValue / fields.size(); | {
"domain": "codereview.stackexchange",
"id": 8183,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, performance, algorithm, combinatorics, minesweeper",
"url": null
} |
space, ice
Title: Thoughts on the ice cube from orbit problem Let's say we have a really exquisite cocktail party somewhere in New Mexico, and we just ran out of ice cubes. To the rescue comes this new service provided by Orbital Glacier Inc.
They provide ice cubes around the world within only 5 minutes (!). How do they do it?
How big must an ice cube be when you drop it from the orbit, so that it will have the size of a typical ice cube when it hits your glass of scotch that you're holding in your hand.
Assuming the ice cube in the orbit needs to be of an enourmous size, would Orbit Glacier Inc. inevitably impact the climate conditions on planet earth when celebrating several such cocktail parties?
Disclaimer: We are in no way related to our competitor Moon Ice Now, Inc. I don't think the question can be answered because you don't say how the orbital energy is to be dissipated. However it's quite interesting to compare the orbital energy with the energy required to boil the ice. | {
"domain": "physics.stackexchange",
"id": 15094,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "space, ice",
"url": null
} |
reference-request, programming-languages, type-theory
This is entirely contrary to my personal perception, which was more along the lines of:
Weak typing: Objects have types, but are implicitly converted to other types when the context demands it. For example, Perl, PHP and JavaScript are all languages in which "1" can be used in more or less any context that 1 can.
Strong typing: Objects have types, and there are no implicit conversions (although overloading may be used to simulate them), so using an object in the wrong context is an error. In Python, indexing an array with a string or float throws a TypeError exception; in Haskell it will fail at compile time.
I asked for opinions on this from other people more experienced in the field than I am, and one gave this characterisation:
Weak typing: Performing invalid operations on data is not controlled or rejected, but merely produces invalid/arbitrary results.
Strong typing: Operations on data are only permitted if the data is compatible with the operation. | {
"domain": "cs.stackexchange",
"id": 293,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reference-request, programming-languages, type-theory",
"url": null
} |
evolution, molecular-genetics, population-dynamics, molecular-evolution, population-genetics
Title: Coefficient of relationship and path of coefficient A path of coefficient of relationship is defined as
$$\rho_{AO} = \left( \frac{1}{2}\right)^n \sqrt { \frac{1+f_A}{1+f_O}}$$
This SE post discusses this definition
From this, the coefficient of relatedness between two individuals $B$ and $C$ is defined as
$$R_{BC} = \sum \rho_{AB} \rho_{AC}$$
, where $A$ is (I think) the last common ancestor of $B$ and $C$. The sum is over all possible path coefficients.
Source: Wikipedia | {
"domain": "biology.stackexchange",
"id": 2196,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "evolution, molecular-genetics, population-dynamics, molecular-evolution, population-genetics",
"url": null
} |
python, exception-handling, python-3.x, converting, validation
# make sure guse is a number, and if not print error and restart
try:
gcon = float(gcon)
except ValueError:
print('Gas consumed must be a number. You did not use "' + \
gcon + '"" gallons of gas!')
main()
else:
# set mpg to dist divided by guse
# if guse is 0.0, print error and restart
try:
mpg = dist / gcon
except ZeroDivisionError:
print('Gas consumed can not be 0!')
main()
else:
# return(print) mpg
print('Average miles per gallon(mpg):', format(mpg, '5.2f'))
# print request for enter keypress to end
input('press enter to continue') | {
"domain": "codereview.stackexchange",
"id": 5910,
"lm_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, exception-handling, python-3.x, converting, validation",
"url": null
} |
ros
Original comments
Comment by rnunziata on 2013-12-18:
So you saying, that I can not use gmapping to provide the map service and amcl for the localization? In what sense does amcl use the map topic ...what was its intent? When would it use this feature?
Comment by dornhege on 2013-12-18:
If you already have a map from the environment and only want to localize on that.
Comment by Tim Sweet on 2013-12-18:
You might consider using map_server instead of gmapping. Typically you use gmapping to build a map of the environment, save the map (by running: rosrun map_server map_saver) and then broadcast it at run time using map_server.
Comment by rnunziata on 2013-12-18:
Ok...I wanted to be able to send updated maps as I go along...but I guess I can not do that. I will close this question.
Comment by Tim Sweet on 2014-01-06: | {
"domain": "robotics.stackexchange",
"id": 16485,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
of a 16 QAM. Take an fft of the whole signal and multiply each component (as a complex number) by the complex number cos(p) + i * sin(p) where p is the phase-shift given in radians Afterwards take the inverse transform and you are done. The theoretical content, which is the basis for understanding the control applications, consists of identifying nonlinear phenomena, the process. All MATLAB variables are multidimensional arrays , no matter what type of data. to find the value of the complex number. Plotting a given data set or the results ofcomputation is possible with very fewcommands The MATLAB command toplot a graph is plot(x,y), e. Consequently, a complex value can be assigned simply as in >> x = 2+i*4 x = 2. Vector Interpretation of Complex Numbers; Signal Metrics. Let's say I have a voltage with a magnitude of 1 p. 2 SINGLE- AND THREE-PHASE AC CIRCUITS. Matlab says nothing because you ended the line with a semicolon. Thus, your Matlab code is correct for a rv $\sim CN(0,1)$. When | {
"domain": "iwen.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9664104962847373,
"lm_q1q2_score": 0.8010951692235778,
"lm_q2_score": 0.8289388125473629,
"openwebmath_perplexity": 737.8790262700554,
"openwebmath_score": 0.6594741940498352,
"tags": null,
"url": "http://yzkr.iwen.pw/phase-of-complex-number-matlab.html"
} |
P.S.: You may also find my answer here to be helpful, dealing as it does with the more general case.
I would assume that you typed in the expression for the limit correctly.
For the problem you provided, there is a short way to determine the limit. Given that the limit is:
$$\lim_{x\to 0} \frac{\sqrt{16 + 4x} - \sqrt{16 + 4x}}{x}$$
The numerator expression becomes $0$. Then, we have:
$$\lim_{x\to 0} \frac{0}{x} = \lim_{x \to 0} 0 = 0$$
~~
For the second problem, we can rewrite the expression as:
$$\lim_{x \to 0} \dfrac{\frac{1}{(x + 6)^2} - \frac{1}{36}}{x} \cdot \dfrac{36(x + 6)^2}{36(x + 6)^2}$$ $$= \lim_{x \to 0} \dfrac{36 - (x + 6)^2}{36x(x + 6)^2}$$ $$= \lim_{x \to 0} \dfrac{36 - x^2 - 12x - 36}{36x(x + 6)^2}$$ $$= \lim_{x \to 0} \dfrac{-x(x + 12)}{36x(x + 6)^2}$$ $$= \lim_{x \to 0} \dfrac{-(x + 12)}{36(x + 6)^2}$$
Thus,
$$\lim_{x \to 0} \dfrac{-(x + 12)}{36(x + 6)^2} = \dfrac{-12}{36(6)^2} = -\dfrac{1}{108}$$
Verified by Wolfram for:
First problem
Second problem | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9585377320263431,
"lm_q1q2_score": 0.8185075989080505,
"lm_q2_score": 0.8539127585282744,
"openwebmath_perplexity": 124.46404325966414,
"openwebmath_score": 0.9493280649185181,
"tags": null,
"url": "https://math.stackexchange.com/questions/408852/indeterminate-limits/409186"
} |
electrons, solid-state-physics
Title: Why is there no conservation principle for n and p (electrons/cm^3 and electron hole density)? I'm taking analog circuits next quarter and I'm watching Ali Hajimiri's course at Cal Tech to prepare while doing problems from my own textbook (we cover the same material roughly). He poses this question and sort of gives an answer to it but I'm unsatisfied. I've opened up my copy of Griffith's electrodynamics and have not found anything either.
To properly state his question: "why is it that the product of n & p are constant but not the sum?"
I actually thought about the question before he posed it. We have many conservation laws in physics. Conservation of mass, conservation of charge, KVL, KCL, etc.
It's really non-trivial to me why in a qualitative way it is the product not the sum that is constant.
I worked through the
$$n + p= n_ie^{\frac{E_f - E_i}{kT}}+n_ie^{\frac{E_i-E_f}{kT}}$$
which works out to
$$ n + p = 2n_i\cosh (\frac{E_f - E_i}{kT})$$ | {
"domain": "physics.stackexchange",
"id": 45252,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrons, solid-state-physics",
"url": null
} |
java, unit-testing, junit
@Test
public void testPermalinkServiceB_getAllPermalinks_getAllPermalinks() throws Exception {
Assert.notNull(permalinkService.getPermalinks(VALIDATION.getId()));
}
@Test
public void testPermalinkServiceC_getPermalink_getPermalink() throws Exception {
Assert.notNull(permalinkService.getPermalinks(VALIDATION.getId(), PERMALINK.getId()));
}
@Test
public void testPermalinkServiceD_setStatus_setNokStatus() throws Exception {
String status = "nok";
String email = "daniela.morais@sofist.com.br";
permalinkService.setStatus(VALIDATION.getId(), PERMALINK.getId(),
String.valueOf(PECA.get("id")), status, email);
} | {
"domain": "codereview.stackexchange",
"id": 13569,
"lm_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, unit-testing, junit",
"url": null
} |
neural-networks, ai-basics, activation-functions, hidden-layers, weights
Finally, yes all independent variables must be normalized before training a neural network. This is to equalize the scale of different variables. More info here. | {
"domain": "ai.stackexchange",
"id": 1912,
"lm_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, ai-basics, activation-functions, hidden-layers, weights",
"url": null
} |
reinforcement-learning, q-learning, dqn, implementation, reward-functions
Is there any way to set the initial Q-values for the actions? I could set -infinity for the invalid actions. | {
"domain": "ai.stackexchange",
"id": 258,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reinforcement-learning, q-learning, dqn, implementation, reward-functions",
"url": null
} |
astrophysics
We really don't know how to detect life on an exoplanet, but it seems possible that the presence of reactive components like oxygen in the atmosphere would be an indication that photosynthesis is going on. Probably the presence of organic compounds associated with wildfires would be a strong indication that life is present. | {
"domain": "physics.stackexchange",
"id": 51218,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "astrophysics",
"url": null
} |
human-biology
Some substances that are produced by the body are also present in various body building supplements.
What I wanted to ask is, is there evidence that ingesting these types of substances for prolonged period leads to (permanent?) withering of the organs that produce the substance? Yes it is possible but in most cases it will not occur as the body simply halts production. The most infamous manifestation of this is in adrenal insufficiency. That's where when we take glucocorticoids (e.g. prednisolone used in management of lots of inflammatory diseases like asthma and autoimmune diseases) for a prolonged period at high dose. This causes the adrenal glands to atrophy (physically shrink) and following this sudden withdrawal can be dangerous for a patient. That's why we always slowly withdraw steroids when a patient has been on them for a long period of time. | {
"domain": "biology.stackexchange",
"id": 3507,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "human-biology",
"url": null
} |
matlab, turtlebot, ubuntu, velocity, kobuki
sudo sh -c 'ROS_HOSTNAME=192.168.3.139 >> /opt/ros/indigo/setup.bash' | {
"domain": "robotics.stackexchange",
"id": 29048,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "matlab, turtlebot, ubuntu, velocity, kobuki",
"url": null
} |
Say there is a set $B$ such that $|B| \le \aleph_0 = |\mathbb{N}|$. Start with listing the elements of $B$ as $b_1, b_2, b_3, \dots$. The list runs ad infinitum (if it stops somewhere, $B$ would be finite) and we've a way to injectively map all of $\mathbb{N}$ into $B$ by associating each $n \in \mathbb{N}$ with some $b_n \in B$ which gives us $|\mathbb{N}| \le |B|$. There's also an injection the other way around ($|B| \le |\mathbb{N}|$) and by CBS we have $|\mathbb{N}| = \aleph_0 = |B|$.
-
"If it were infinite, this would mean its cardinality is at least $\aleph_0$". This is precisely my question. – user17762 Dec 4 '12 at 23:34
@Marvis I was under the impression that part of the question was already resolved. If it isn't still, I've edited my post explaining how I think $\aleph_0$ is the least of infinite cardinals. – Mark Dec 5 '12 at 11:02
protected by Asaf KaragilaJan 29 at 16:26 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9886682478041813,
"lm_q1q2_score": 0.8059944723624732,
"lm_q2_score": 0.8152324848629214,
"openwebmath_perplexity": 158.68302572927166,
"openwebmath_score": 0.9553179740905762,
"tags": null,
"url": "http://math.stackexchange.com/questions/10085/why-is-omega-the-smallest-infty?answertab=oldest"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.