text stringlengths 1 1.11k | source dict |
|---|---|
• "Show that given any two such quadrilaterals A, B, there is a unique symmetry which carries A to B." Note that by symmetry they mean a symmetry of the tiling as a whole. "if A and B are connected to the same vertex [...] you only need to perform a suitable rotation.". A rotation by 45 degrees will bring one quadrilateral to an adjacent one, but that rotation is not a symmetry of the whole tiling. Instead you will have to use a reflection symmetry. Aug 16, 2021 at 14:28
• @JaapScherphuis Oh yes! So we need a combination of rotation and reflection in general, right? Aug 16, 2021 at 14:46
• Translation, reflection, rotation may all be used, but you won't need more than one of each. In fact, you can always do it using just two - some cases using a translation and a rotation, and other cases with a translation and a reflection. The easiest way is to put the origin of your coordinate system at B, and begin by translating A to the origin so it shares a vertex with B. Aug 16, 2021 at 15:05 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9793540704659681,
"lm_q1q2_score": 0.8074401414290696,
"lm_q2_score": 0.8244619242200082,
"openwebmath_perplexity": 167.47064425084668,
"openwebmath_score": 0.7879161238670349,
"tags": null,
"url": "https://math.stackexchange.com/questions/4225354/symmetries-of-persian-tiles"
} |
javascript, snake-game
return tail.reduce((accum, [row, col]) => accum || (row === head[0] && col === head[1]), false);
},
moveSnake: function() {
for (let i = 0; i < snakeCoordinates.length; i++) {
snakeCoordinates[i][0] += moveDirections[i][0];
snakeCoordinates[i][1] += moveDirections[i][1];
snakeCoordinates[i] = wrapAround(snakeCoordinates[i]);
}
shiftDirections();
}
};
}();
const goal = function() {
var goal = [HEIGHT - 1, WIDTH - 1];
return {
newGoal: function() {
goal = [rng(0, HEIGHT), rng(0, WIDTH)];
},
isGoal: function(row, col) {
return goal[0] === row && goal[1] === col;
}
};
}();
initialiseGame();
function initialiseGame() {
initialiseGridInDOM();
addEventListeners();
runGame();
} | {
"domain": "codereview.stackexchange",
"id": 38814,
"lm_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, snake-game",
"url": null
} |
c++, optimization, beginner
if (choice == 1) {
const std::string alpha = "abcdefghijklmnopqrstuvwxyz";
for (char& c: user_password) {
c = alpha[dis(gen)];
}
std::cout << user_password;
}
}
Voilà! Your program has been converted to somewhat clean modern C++. Now, all you have to do is to provide more scrambling algorithms and to provide a mechanism to tell the user that they have chosen an invalid option and that they should chose again. | {
"domain": "codereview.stackexchange",
"id": 10831,
"lm_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++, optimization, beginner",
"url": null
} |
structures, waterproofing
I guess the the tiling below windows has holes which leak out a substantial amount of indoor air. In the summertime the walls get wet also because the wall near the holes are cooled by the indoor air. In a cold weather the walls get wet because there comes out warm indoor air which carries out water. See this Google Maps image: | {
"domain": "engineering.stackexchange",
"id": 4794,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "structures, waterproofing",
"url": null
} |
c++, object-oriented, database
Matchers.h
#ifndef MATCHERS_H_
#define MATCHERS_H_
#include <string>
#include "Position.h"
#include "Room.h"
using namespace std;
class Matchers {
public:
struct MatchName {
MatchName(const string& s);
bool operator()(const Room* r) const;
private:
const string& name;
};
struct MatchPosition {
MatchPosition(const int pX, const int pY);
bool operator()(const Room* r) const;
private:
const int x;
const int y;
};
};
#endif /* MATCHERS_H_ */
Matchers.cpp
#include "Matchers.h" | {
"domain": "codereview.stackexchange",
"id": 22098,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, object-oriented, database",
"url": null
} |
electromagnetism, magnetic-fields
Title: Saturation of an iron core? Lets assume we have a 1 kg iron core, and a 100 kg iron core.
Now saturation is defined as how much that core can absorb the magnetic field, since they are different sizes, don't they saturate at different fields?
Lets assume the 1kg core saturates at 1 Tesla, shouldn't the larger core saturate at a higher magnetic field?
Now saturation is defined as how much that core can absorb the magnetic field | {
"domain": "physics.stackexchange",
"id": 58185,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, magnetic-fields",
"url": null
} |
python, python-3.x, tic-tac-toe, ascii-art
if gameWon:
print(f"Congratualtions player {player}, you won!")
sys.exit()
def printGameBoard():
"""For debugging, prints gameboard"""
for row in gameBoard:
print(row)
def printInitScreen():
"""Prints the initial welcome screen"""
header = """
888 d8b 888 888
888 Y8P 888 888
888 888 888
888888888 .d8888b888888 8888b. .d8888b888888 .d88b. .d88b.
888 888d88P" 888 "88bd88P" 888 d88""88bd8P Y8b
888 888888 888 .d888888888 888 888 88888888888
Y88b. 888Y88b. Y88b. 888 888Y88b. Y88b. Y88..88PY8b.
"Y888888 "Y8888P "Y888"Y888888 "Y8888P "Y888 "Y88P" "Y8888
"""
os.system('cls' if os.name == 'nt' else 'clear') # Clear screen
print(header)
input("Press enter to start!")
printDisplayBoard() | {
"domain": "codereview.stackexchange",
"id": 38065,
"lm_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, tic-tac-toe, ascii-art",
"url": null
} |
quantum-mechanics, condensed-matter, topological-insulators, chern-simons-theory, berry-pancharatnam-phase
However, the second Chern class is indirectly connected to the classification of vector bundles over $2$ dimensional systems as follows:
Just to remind, vector bundles over two dimensional manifolds are classified by means of the first Chern Class. But when the bundle is time reversal invariant (in this case the first Chern class vanishes) there exists a binary invariant: the Fu–Kane–Mele $Z_2$ invariant which discriminates between cases where the Berry phase is always $2\pi$ (the trivial case), or it can assume the value of $\pi$ (the nontrivial case).
One way to understand the $Z_2$ invariant is to look at higher dimensional systems from which our two-dimensional system can be obtained by dimensional reduction. The dimensional reduction is to be understood according to the Kaluza-Klein paradigm in which the extra dimensions are compactified and in the infrared only the low energy modes which are constants along these directions reside. | {
"domain": "physics.stackexchange",
"id": 52063,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, condensed-matter, topological-insulators, chern-simons-theory, berry-pancharatnam-phase",
"url": null
} |
llm, prompt-engineering
I don't understand why this should work at all. Let's simplify the matter: assume an LLM is trained only on stackoverflow questions and answers. Since no question on SO starts with such a sentence, the pre-prompt actually makes the prompt more different from training data that it was before.
More generally, why would writing prompts like asking questions to a being, and moreover telling this being what it is give us better output? Moreover, is this even measurably true? | {
"domain": "datascience.stackexchange",
"id": 12196,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "llm, prompt-engineering",
"url": null
} |
1. ## Lawn Mower Cord Problem (Radians and Angular Velocity)
Hi, this is my first time on this website and I hope to help other people while getting help myself. First off, I was absent the day this homework was assigned; therefore I have no idea how to do it. Anyway, here is the problem, THANKS.
Yank Hardy pulls the cord on his power mower. in order for the engine to start, the pulley must turn at 180 revolutions per minute. The pulley has a radius of 0.2 ft.
1. How many radians per second must the pulley turn?
2. How fast must Yank pull the cord to start the mower?
3. When Yank pulls this hard, what is the angular velocity of the center of the pulley?
Thanks for looking I appreciate all help!!!!!!!!
2. Perhaps this is enough to get you started:
There are pi radians in 180 degrees.
1 revolution = 360 degrees.
The linear speed at the edge of a pulley is
As long as the pulley is rigid the angular speed from the center is the same throughout the pulley. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9911526433490359,
"lm_q1q2_score": 0.8384580828594603,
"lm_q2_score": 0.8459424373085146,
"openwebmath_perplexity": 1009.8061953588137,
"openwebmath_score": 0.8313735127449036,
"tags": null,
"url": "http://mathhelpforum.com/pre-calculus/166031-lawn-mower-cord-problem-radians-angular-velocity.html"
} |
human-biology, biochemistry, molecular-biology, cell-membrane, pulmonology
Edit: So, I was on some conspiracy shtuff when I wrote this post because I was worried about impurities in my vapes killing me. I don't want to take this down because I want my cognitive distortion to remain visible as a reminder of how we can succumb to biased reasoning. Also, the answer I marked correct contextualized the fragmented information of which I was aware and attempted to give me an improved framework for understanding the terms I was using incorrectly as a layman. There are several ways to get ARDS (sepsis, pneumonia, trauma, pancreatitis, etc). Pathophysiologically, they all converge at alveolar insult. So however it happens, there's alveolar insult, cytokine release that recruits neutrophils, and the activated neutrophils release toxic mediators that destroy the alveolar membranes. So for your question specifically, the mineral oil in the vape cartridges (theoretically) is instigating an inflammatory reaction that destroys alveolar membranes. | {
"domain": "biology.stackexchange",
"id": 10476,
"lm_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, biochemistry, molecular-biology, cell-membrane, pulmonology",
"url": null
} |
c#
...and make sure the tokens array provided has as many arguments / fail fast:
protected override void ParseTokens(string[] tokens)
{
if (tokens.Length != Enum.GetNames(typeof(Dop)).Length)
{
throw new ArgumentException("Invalid number of tokens.");
}
//
}
Another thing that strikes me as not needed and potentially bug-prone, is exposing the setters for these hard-earned float values.
Also, the order of the accessors is unusual:
public float Pdop { set; get; }
I'm used to see the getter first.
public float Pdop { get; private set; }
With a private setter, the only way to set that value is to parse a new array of strings.
At this point I'd question the mutability of the type. How about simply this?
public class GSA : NMEAMsg
{
private readonly IDictionary<Dop,float?> _tokens; | {
"domain": "codereview.stackexchange",
"id": 15570,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#",
"url": null
} |
javascript, node.js, sql-server, mongodb, express.js
var getOneByUserName = function (userName, callback) {
var query = {
userName: userName,
_k: null
};
validateItem(query, function (err) {
if (err) { return callback(err); }
mongoose.model('Member').findOne(query, function (err, item) {
if (err) { return callback(err); }
if (item) { return callback(null, toDto(item)); }
return callback();
});
});
};
memberSchema.methods.getOneByUserName = getOneByUserName; | {
"domain": "codereview.stackexchange",
"id": 12965,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, node.js, sql-server, mongodb, express.js",
"url": null
} |
analytical-chemistry, concentration, stoichiometry, notation, units
"Deprecated usage Adding extra labels to ppm and similar symbols,
such as ppmv (meaning ppm by volume) should be avoided. Qualifying
labels may be added to symbols for physical quantities, but never to
units. | {
"domain": "chemistry.stackexchange",
"id": 16571,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "analytical-chemistry, concentration, stoichiometry, notation, units",
"url": null
} |
general-relativity, special-relativity
Suppose we take two points in spacetime $A$ and $B$. For example in the twin paradox point $A$ could be when the twins part and point $B$ could be the point when the twins return. There are an infinite number of possible paths linking the two points. For example the twin who stays on Earth gets from $A$ to $B$ by staying still while the other twin gets from $A$ to $B$ by racing around in a rocket.
For every path there is an associated path length called the proper time, which is calculated using the metric. If you're interested in the details, I talk about how to calculate this path in What is time dilation really?. | {
"domain": "physics.stackexchange",
"id": 32216,
"lm_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, special-relativity",
"url": null
} |
javascript, library, genetic-algorithm
You need to move the source up to the current version of ECMAScript if you want people to evaluate it positively.
Code style points
There would be more but I am limiting this mostly to ES5 style points. | {
"domain": "codereview.stackexchange",
"id": 30658,
"lm_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, library, genetic-algorithm",
"url": null
} |
differential-geometry, tensor-calculus, vector-fields
Title: How to visualize the gradient as a one-form? I am reading Sean Carrol's book on General Relativity, and I just finished reading the proof that the gradient is a covariant vector or a one-form, but I am having a difficult time visualizing this. I usually visualize gradients as vector fields while I visualize one-forms with level sets. How to visualize the gradient as a one-form? If you're going to take that path, then maybe you should be thinking more of a level set density, i.e. how closely spaced the level sets in question are. Sean Carrol's book is not wonted to me: if you can get a copy of Misner Thorne and Wheeler, the first few pages do a good job of this idea with their quaint "bong" machine that sounds a "bong" bell each time a vector pierces a level set. If you can't get this readily, then the early part of Kip Thorne's lectures here is also good | {
"domain": "physics.stackexchange",
"id": 18988,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "differential-geometry, tensor-calculus, vector-fields",
"url": null
} |
vba, pdf, ms-word
'*******************************************************************************
'Replaces a text in Ms Word
'*******************************************************************************
Private Sub ReplaceTextInDoc(ByVal doc As Document _
, ByVal searchText As String _
, ByVal replacementText As String _
)
With doc.Content.Find
.Replacement.Font.Color = wdColorBlack
.Text = searchText
.Replacement.Text = replacementText
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With
End Sub | {
"domain": "codereview.stackexchange",
"id": 40695,
"lm_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, pdf, ms-word",
"url": null
} |
c, xml
Always indicate success in main with 0 rather than 1. We do this because we have to interact with the system outside where 0 is considered a success any any other value is considered an error code.
Also avoid extra ((())) in the function arguments. Especially, it is not required in return statements.
int main(int argc, char **argv) {
if (argc <= 1) {
printf("Usage: %s inputfile.xml\n", argv[0]);
return 1;
}
parseXml(argv[1]);
return 0;
}
void xprint(xmlNodePtr cur, const char* var, const char* msg) {
xmlChar *key = xmlGetProp(cur, (const xmlChar*) var);
fprintf(stderr, "%s: %s\n", msg, key);
xmlFree(key);
} | {
"domain": "codereview.stackexchange",
"id": 1978,
"lm_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, xml",
"url": null
} |
Find vector and parametric equation of plane in $\Bbb R^{3}$ that passes through origin and is orthogonal to vector v.
$v=(4,0,-5)$ and I am given the hint: Construct two nonparallel vectors orthogonal to $v$ in $\Bbb R^3$.
I've looked at this post Find the equation of the plane passing through a point and a vector orthogonal but I don't see how that relates to the hint.
I am able to solve the question if it is a line in $\Bbb R^2$ that passes through the origin and orthogonal to a vector $v$. An example: if $v=(-2,3)$ then a vector orthogonal to $v$ is $v_0=(-3,-2)$, the point at origin is $P_0=(0,0)$ so then $(x,y)=(0,0)+t(-3,-2)$ is the vector equation.
-
Can you find a vector orthogonal to $(4,0,-5)$? – rae306 Jun 29 '14 at 6:36
If
$v = (4, 0 , -5) \tag{1}$
then clearly
$w_1 = (0, 1, 0) \tag{2}$
is orthogonal to $v$; so is
$w_2 = (5, 0, 4), \tag{3}$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9808759615719876,
"lm_q1q2_score": 0.8152482301180025,
"lm_q2_score": 0.8311430415844384,
"openwebmath_perplexity": 143.8981530334174,
"openwebmath_score": 0.8805575966835022,
"tags": null,
"url": "http://math.stackexchange.com/questions/851019/find-vector-and-parametric-equation-of-plane-in-bbb-r3-that-passes-through"
} |
quantum-field-theory, conformal-field-theory
The new contour in $z'$ will surround $-1$ with an opposite orientation. This gives $\langle O_1(0) O_2'(-1) \rangle$, up to a possible sign (an additional sign may come from the factor I mentioned). This means the two correlators are at least related, if not equal.
If the argument is correct then I think the extension to any two operators is easy. | {
"domain": "physics.stackexchange",
"id": 4249,
"lm_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, conformal-field-theory",
"url": null
} |
c++, boost
Actually, just checked and phoenix::construct can do aggregates:
auto make_bin =
_val = boost::phoenix::construct<ast::binary_expr>(_1, _val, _2);
Also dropped the unused unary_* machinery, moved the IO manipulator into io namespace (instead of ast) and reintroduced eoi checking in the main driver...
Heck, with some c++17 you can combine the branches of each production:
auto op = [](auto... sym) { return qi::copy((qi::string(sym) | ...)); };
expression %= equality >> *(op("&&","||") > equality)[make_bin];
equality %= relational >> *(op("==","!=") > relational)[make_bin];
relational %= additive >> *(op("<","<=",">",">=") > relational)[make_bin];
additive %= multiplicative >> *(op("+","-") > multiplicative)[make_bin];
multiplicative %= factor >> *(op("*","/") > factor)[make_bin];
factor %= primary >> *(op("**") > primary)[make_bin]; | {
"domain": "codereview.stackexchange",
"id": 38663,
"lm_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++, boost",
"url": null
} |
physical-chemistry, quantum-chemistry, computational-chemistry, electronic-configuration, density-functional-theory
Furthermore, treating the total electron density of a molecule (ie the square of the multi-electron wave-function) as the sum of densities of multiple discrete orbitals is a standard pedagogical approach, and predicting the properties and reactions of molecules based on a subset of these discrete orbitals (valence or frontier orbitals usually) works quite well at a qualitative and semi-quantitative level. Whether this pedagaogical value counts as "physically valuable" depends on what you mean by that.
I'll conclude by invoking George Box's maxim that "All models are wrong. Some are useful." While your animations are not defensible on theoretical physics grounds, that does not mean that they are not reasonable and useful representations for pedagogical purposes. | {
"domain": "chemistry.stackexchange",
"id": 16127,
"lm_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, quantum-chemistry, computational-chemistry, electronic-configuration, density-functional-theory",
"url": null
} |
newtonian-gravity, computational-physics, software
Title: Gravitational field of thin 2D ring - numerical simulation I'm aware of Newton's Shell Theorem, which states that inside of a thin ring of uniform density, the gravitational force exerted on a point mass should be zero.
I wrote a quick field simulation to demonstrate this, but am getting a force inside the ring. The potential (-GM/r) is zero, but the force on a test mass (-GM/r^2) is non-zero.
I'll post the relevant segments of my code below and a few screenshots. Any ideas what's going on?
Each point in the field accumulates the felt gravitational force from all masses comprising the ring (which is a large set of very closely spaced point masses):
void accumulateForce(Mass m){
//Vector from test point towards individual ring mass
double dx = m.x-x;
double dy = m.y-y;
double lenSqd = dx*dx + dy*dy;
double len = Math.sqrt(lenSqd);
//Normalized direction of gravitational force
double nx = dx/len;
double ny = dy/len; | {
"domain": "physics.stackexchange",
"id": 26996,
"lm_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-gravity, computational-physics, software",
"url": null
} |
-
Great answer, thanks for your help. – Mario Oct 17 '12 at 20:15
@Mario: You’re welcome! – Brian M. Scott Oct 17 '12 at 20:16
It must be an interval, because any intersection of convex sets is convex. By taking finite intersections we can assume without loss of generality that the intersection is decreasing, that is, $I_{n+1} \subset I_n$ for each $n$. The intersection $I$ can be a closed interval as in your example, where $I = [0,1]$, or it can be a half-open interval $(a,b]$. It cannot have the form $[a,b)$ or $(a,b)$ because the limit of the right endpoints of the $I_n$'s will be the right endpoint of $I$ and will be in $I$ (unless $I$ is empty, which is also possible.)
In a general topological space, the notion of a semi-closed set is normally not defined and if it were, it probably wouldn't be very useful. The reason we have this notion for $\mathbb{R}$ is just the coincidental fact that the boundary of a connected set of $\mathbb{R}$ consists of at most 2 points. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9830850862376966,
"lm_q1q2_score": 0.8336244568716512,
"lm_q2_score": 0.8479677583778258,
"openwebmath_perplexity": 191.11748440209232,
"openwebmath_score": 0.9183849096298218,
"tags": null,
"url": "http://math.stackexchange.com/questions/215869/countable-intersection-of-semi-closed-intervals"
} |
reinforcement-learning
Title: Can I have actions that, if taken, cannot be taken again in the following N timesteps? I'm trying to train a load-balancing system with reinforcement-learning (RL) s.t. the incoming jobs are queued evenly at the available servers.
The system will not be able to directly dispatch the jobs, but it will only offer suggestions to use a set of servers over another.
The system will also be capable of reducing the speed at which new jobs arrive and at each time step, to reduce the queue lengths.
The agent must decide whether to change this speed or keep it constant.
Changing the speed at time T, however, disables any other changes until time T+N, with N constant (basically, we need to prevent speed changes at every time-step).
Are these actions an obstacle in training the system? | {
"domain": "cs.stackexchange",
"id": 8314,
"lm_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",
"url": null
} |
rospy
Title: rospy absolute duration bug
Hello,
I use ROS hydro and I think I found an error in the code of the rospy.Duration class
When I do :
print abs(rospy.Duration.from_sec(0.5))
it prints -500000000 instead of 500000000. That's because the code only takes into account the number of seconds.
cf : https://github.com/ros/genpy/blob/indigo-devel/src/genpy/rostime.py
def __abs__(self):
"""
Absolute value of this duration
:returns: positive :class:`Duration`
"""
if self.secs > 0:
return self
return self.__neg__()
It should be :
def __abs__(self):
"""
Absolute value of this duration
:returns: positive :class:`Duration`
"""
if self.secs < 0 or (self.secs == 0 and self.nsecs<0):
return self.__neg__()
return self
Originally posted by jbv on ROS Answers with karma: 11 on 2015-06-26
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 22017,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rospy",
"url": null
} |
localization, navigation, odometry, 3d-slam, stereo-camera
Originally posted by natejgardner on ROS Answers with karma: 36 on 2016-11-02
Post score: 0
Since you mentionned rtabmap, I'll describe what you can already do with it. rtabmap can do stereo localization in a map created previously by rtabmap (with any other sensors, stereo or rgb-d):
$ roslaunch rtabmap_ros stereo_mapping.launch database_path:="~/map_created_with_kinect.db" localization:=true
See stereo_mapping.launch for other remapping options (image topics or frame_id.). You can also see this tutorial on stereo mapping with rtabmap.
rtabmap will not do stereo/rgbd localization on an arbitrary raw point cloud, only with its database format.
cheers
Originally posted by matlabbe with karma: 6409 on 2016-11-02
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 26121,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "localization, navigation, odometry, 3d-slam, stereo-camera",
"url": null
} |
python, django
query_items = [q.strip() for q in query.split(',') if q.strip()]
items = InventoryItem.objects
if query_items:
for q in query_items:
tags = InventoryTag.objects
q = q.lstrip(':')
if ':' in q:
(k, v) = q.split(':', 1)
tags = tags.filter(Q(key = k) & Q(value__startswith = v))
else:
tags = tags.filter(value__startswith = q)
tags_pks = InventoryItemTag.objects.filter(Q(tag__in = tags.values_list('id')))
items = items.filter(pk__in=tags_pks.values_list('item_id'))
items = items.all()
How this is used:
InventoryItem -- For practical purpose this is an AWS instance with an instance_id
InventoryTag -- Other attributes of that instance (e.g. Name) or IP address. This is unique for any key/value pair of the tag. | {
"domain": "codereview.stackexchange",
"id": 23240,
"lm_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, django",
"url": null
} |
computational-models, history
Title: Are ladder operators ever extensively used in any model of quantum computation? Computer scientists and others who are interested in learning more about quantum computation might be exposed, or re-exposed, to various concepts and classes of matrices from linear algebra. For example because of familiarity with truth-tables, (classical) reversible operators are often introduced in conjunction with unitary matrices.
Within quantum mechanics, there are a number of classes of matrices that are commonly used: | {
"domain": "quantumcomputing.stackexchange",
"id": 3869,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computational-models, history",
"url": null
} |
java, object-oriented, design-patterns, game, chess
}
Knight.java
public class Knight extends Piece{
public Knight(boolean available, int x, int y) {
super(available, x, y);
}
@Override
public boolean isValid(Board board, int fromX, int fromY, int toX, int toY) {
if(super.isValid(board, fromX, fromY, toX, toY) == false)
return false;
if(toX != fromX - 1 && toX != fromX + 1 && toX != fromX + 2 && toX != fromX - 2)
return false;
if(toY != fromY - 2 && toY != fromY + 2 && toY != fromY - 1 && toY != fromY + 1)
return false;
return true;
}
}
Bishop.java
public class Bishop extends Piece{
public Bishop(boolean available, int x, int y) {
super(available, x, y);
// TODO Auto-generated constructor stub
}
@Override
public boolean isValid(Board board, int fromX, int fromY, int toX, int toY) {
if(super.isValid(board, fromX, fromY, toX, toY) == false)
return false; | {
"domain": "codereview.stackexchange",
"id": 29093,
"lm_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, object-oriented, design-patterns, game, chess",
"url": null
} |
performance, r
#Loop through each row of the data
for(i in 1:nrow(Y)){
y <- Y[i,1]
n <- Y[i,2]
c <- Y[i,3]
if (c==0){ #For uncensored, apply regular PDF
liks_a[i] <- log(p_function(y,n))
} #outputs a value of 0 in liks_a[i] if c=1, so doesnt affect sum(log(liks))
if(c==1){ #for censored, sum to do 1-(sum(Y-1))
liks_b[i] <- log(1-sum(p_function(1:(y-1),n)))
} #outputs a value of 0 if in liks_b[i] if c=0, so doesnt affect sum(log(liks))
}
sumliks <- sum(liks_a,liks_b)
return(sumliks)
}
# Example data
Y_censor0 <- cbind(c(3,2,2,10,1,1),c(1,1,1,1,1,1),c(0,0,0,0,0,0)) # 3-column data w/ no one censored
Y_censor1 <- cbind(c(3,2,2,10,1,1),c(1,1,1,1,1,1),c(0,0,1,1,0,0)) # 3-column data with some censored | {
"domain": "codereview.stackexchange",
"id": 40000,
"lm_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, r",
"url": null
} |
java, playing-cards
default: return null;
}
}
}
Rank getRank(){
return r;
}
Suit getSuit(){
return s;
}
Card(Rank r, Suit s){
this.r = r;
this.s = s;
}
}
class cardComparator implements java.util.Comparator<Card.Rank>{
@Override
public int compare(Card.Rank o1, Card.Rank o2) {
if(o1.getPriority() > o2.getPriority()){
return 1;
}else if(o1.getPriority() < o2.getPriority()){
return -1;
}else{
return 0;
}
}
@Override
public Comparator<Card.Rank> reversed() {
return null;
}
} Card class
Specify the access modifiers of the class and members properly.
Use proper names for members:
class Card{
Suit s;
Rank r;
for example:
public class Card{
private Suit suit;
private Rank rank; | {
"domain": "codereview.stackexchange",
"id": 19976,
"lm_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, playing-cards",
"url": null
} |
c++, sorting, mergesort
auto left = begin;
auto right = midIter;
D diff;
while(left != midIter && right != end)
{
buffer.push_back(std::move(diff(*left, *right) ? *left++: *right++));
}
std::move(left, midIter, std::back_inserter(buffer));
std::move(right, end, std::back_inserter(buffer));
std::move(std::begin(buffer), std::end(buffer), begin);
}
template<typename I, typename D = std::less<typename std::iterator_traits<I>::value_type>>
void mergeSort2(I begin, I end)
{
auto size = std::distance(begin, end);
if (size <= 1)
{
return;
}
auto mid = size/2;
auto midIter = begin;
std::advance(midIter, mid);
mergeSort2(begin, midIter);
mergeSort2(midIter, end);
merge<I, D>(begin, midIter, end);
} | {
"domain": "codereview.stackexchange",
"id": 21356,
"lm_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++, sorting, mergesort",
"url": null
} |
# block matrix multiplication
If $A,B$ are $2 \times 2$ matrices of real or complex numbers, then
$$AB = \left[ \begin{array}{cc} a_{11} & a_{12} \\ a_{21} & a_{22} \end{array} \right]\cdot \left[ \begin{array}{cc} b_{11} & b_{12} \\ b_{21} & b_{22} \end{array} \right] = \left[ \begin{array}{cc} a_{11}b_{11}+a_{12}b_{21} & a_{11}b_{12}+a_{12}b_{22} \\ a_{21}b_{11}+a_{22}b_{21} & a_{22}b_{12}+a_{22}b_{22} \end{array} \right]$$
What if the entries $a_{ij}, b_{ij}$ are themselves $2 \times 2$ matrices? Does matrix multiplication hold in some sort of "block" form ?
$$AB = \left[ \begin{array}{c|c} A_{11} & A_{12} \\\hline A_{21} & A_{22} \end{array} \right]\cdot \left[ \begin{array}{c|c} B_{11} & B_{12} \\\hline B_{21} & B_{22} \end{array} \right] = \left[ \begin{array}{c|c} A_{11}B_{11}+A_{12}B_{21} & A_{11}B_{12}+A_{12}B_{22} \\\hline A_{21}B_{11}+A_{22}B_{21} & A_{22}B_{12}+A_{22}B_{22} \end{array} \right]$$ This identity would be very useful in my research. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9820137910906878,
"lm_q1q2_score": 0.8786955875698715,
"lm_q2_score": 0.894789457685656,
"openwebmath_perplexity": 286.72184653134616,
"openwebmath_score": 0.8344562649726868,
"tags": null,
"url": "https://math.stackexchange.com/questions/787909/block-matrix-multiplication/4021707"
} |
radio, radio-frequency
Is there a formula that takes into account both the antenna gain of the receiver and transmitter and determines the maximum distance based on atmospheric pressure and such weather conditions? Actually it's relatively easy and within some statistical probabilities one can get rough answers. Look it up in any introductory book on communications systems engineering. Or maybe Wikipedia. Then think and ask here what you really want. Rough answer to can one receive a signal from a well transmitter:
Definitely, depends on the numbers but we receive radio signals from relatively weak transmitters on spacecraft probes that are further away that Saturn, and I believe Pluto. The main equation is
Pr = Pt X Gt x Gr/4x pi x $R^n$, where | {
"domain": "physics.stackexchange",
"id": 35883,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "radio, radio-frequency",
"url": null
} |
applications, swarm-intelligence, ant-colony-optimization
Title: What are the applications of ant colony optimization algorithms? I'm interested in ant colony optimization algorithms and bee algorithms,but I'm confused what are the applications of these algorithms
Can you suggest me some examples of applications can I work on? The first ant colony optimisation algorithm was introduced by Marco Dorigo in the report Positive Feedback as a Search Strategy (1991) and his PhD thesis Optimization, Learning and Natural Algorithms (1992). He's still one of the leading figures in the field of swarm intelligence (having also written or co-written several papers and books). Another important person that contributed to ACO algorithms is Luca Gambardella (co-director of IDSIA). | {
"domain": "ai.stackexchange",
"id": 1154,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "applications, swarm-intelligence, ant-colony-optimization",
"url": null
} |
observational-astronomy, gravitational-lensing
A sensitive enough instrument might also detect gravitational lensing around Jupiter (318 Earth masses and 2.528g on average). Therefore I guess any gas giant and brown, red, orange and yellow dwarf will provide for that effect. The lower limit may be one Jupiter mass and 2.5g. The body's density is more important for that effect. Jupiter's density is 1.326 g/cc (0.048 lb/in³).
I should add that black holes always produce visible gravitational lensing, as singularities, they have infinite density. If the hypothetical so-called primordial black holes at 5 Earth masses exist, the lens would be clear. | {
"domain": "astronomy.stackexchange",
"id": 5619,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "observational-astronomy, gravitational-lensing",
"url": null
} |
continuum-mechanics, stress-strain
Once you know that the stress is the right way to "microscopically" define force, elastic systems start to show off a similar problem: the simplest stretching of a beam consists in that beam not only lengthening but also narrowing. Microscopically, a little box inside the substance is not only feeling a force $+\sigma~dA$ on one side and a force $-\sigma~dA$ on the other side (so it is in force balance and provides tension), but it must also be feeling some forces on its other sides which "pinch" it smaller. So: the force is direction-dependent, and we therefore have not a stress vector (which we already didn't quite have -- the stress is in opposite directions on the top and bottom of the box), but a stress tensor: give me a direction and I'll give you the stress vector on a plane normal to that direction. (This also solves nicely the "stress on the top of the box is negative the stress on the bottom of the box" problem.) | {
"domain": "physics.stackexchange",
"id": 24586,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "continuum-mechanics, stress-strain",
"url": null
} |
python, python-3.x, game, combinatorics
# function to convert from a list of requirements back to the name of the action space
def convert_reqs_to_spaces(reqs):
converter = {tuple(sorted(["boatman", "craftsman"])): 'village',
tuple(sorted(["boatman", "farmer", "trader"])): 'castle',
tuple(sorted(["farmer", "trader", "knight"])): 'wagon',
tuple(sorted(["boatman", "farmer", "knight"])): 'ship',
tuple(sorted(["farmer", "craftsman", "knight"])): 'guildhall',
tuple(sorted(["knight", "scholar"])): 'scriptorium',
tuple(sorted(["scholar", "trader"])): 'monastery',
tuple(sorted(["farmer", "craftsman", "trader"])): 'university',
tuple(sorted(["boatman", "craftsman"])): 'farmhouse'}
spaces = []
for s in reqs:
spaces.append([converter[tuple(sorted(req))] for req in s])
return spaces | {
"domain": "codereview.stackexchange",
"id": 32600,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, game, combinatorics",
"url": null
} |
haskell, scheme, racket, interpreter
evaluate env (Multiply aExpr bExpr) =
let
aValue = evaluate env aExpr
bValue = evaluate env bExpr
in
case (aValue, bValue) of
(Constant aInt, Constant bInt) -> Constant (aInt * bInt)
_ -> error ("Multiply applied to non-integer")
evaluate env (Let bindings body) =
let
addBindingsToEnv acc [] = acc
addBindingsToEnv acc (x : xs) =
let acc' = Map.insert (fst x) (evaluate env (snd x)) acc
in addBindingsToEnv acc' xs
in evaluate (addBindingsToEnv env bindings) body
evaluate env (Lambda param body) = Closure env param body | {
"domain": "codereview.stackexchange",
"id": 10561,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "haskell, scheme, racket, interpreter",
"url": null
} |
python, beginner, object-oriented, pygame
# Executes a turn when the mouse is near a cat
def do_turn_near_cat(self, cat):
self.speed_end_of_turn = self.speed_panic # Set speed to panic mode
# Set direction away from cat (with some tolerance)
self.direction_end_of_turn = math.remainder(self.direction_to_point(cat.position_horizontal,
cat.position_vertical) + math.pi, 2 * math.pi) + random.uniform(
-self.turn_angle_tolerance_cat, self.turn_angle_tolerance_cat)
self.acceleration = self.acceleration_max # Set acceleration to maximum
self.turn_speed = self.turn_speed_panic # Set turn speed to panic mode
# Set turn time to panic mode (shorter, makes for nice zig-zag runs sometimes)
self.turn_time = self.turn_time_panic | {
"domain": "codereview.stackexchange",
"id": 35102,
"lm_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, object-oriented, pygame",
"url": null
} |
quantum-mechanics, nanoscience, quantum-transport
Introduction to Mesoscopic Physics by Joe Imry
Quantum Kinetics in Transport and Optics of Semiconductors by Jauho and Haug
Electronic Transport in Mesoscopic Systems by Supriyo Datta
The original articles by Landauer, Büttiker, Meir&Wingree, Jauho, Meir&WIngreen are also quite readable and highly recommended. | {
"domain": "physics.stackexchange",
"id": 94746,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, nanoscience, quantum-transport",
"url": null
} |
c++, performance, algorithm, chess
int a, b;
a = row;
b = col;
if (a != 0 && b != 0) {
for (;;) {
a -= 1;
b -= 1;
if (board[a][b] == 6 || board[a][b] == 2) return true;
if (board[a][b] != 0 || a == 0 || b == 0) break;
}
}
a = row;
b = col;
if (a != 0 && b != 7) {
for (;;) {
a -= 1;
b += 1;
if (board[a][b] == 6 || board[a][b] == 2) return true;
if (board[a][b] != 0 || a == 0 || b == 7) break;
}
}
a = row;
b = col;
if (a != 7 && b != 0) {
for (;;) {
a += 1;
b -= 1;
if (board[a][b] == 6 || board[a][b] == 2) return true;
if (board[a][b] != 0 || a == 7 || b == 0) break;
}
}
a = row;
b = col;
if (a != 7 && b != 7) {
for (;;) { | {
"domain": "codereview.stackexchange",
"id": 39278,
"lm_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, algorithm, chess",
"url": null
} |
ros
Original comments
Comment by zakizadeh on 2016-10-15:
thanks a lot . but when i run this command: roslaunch bullet_server bullet_server.launch
i have this error : ERROR: cannot launch node of type [bullet_server/bullet_server]: can't locate node [bullet_server] in package [bullet_server]
Comment by lucasw on 2016-10-16:
git clone https://github.com/lucasw/simple_sim_ros.git into your catkin_ws/src and build it first.
Comment by zakizadeh on 2016-10-16:
thanks a lot .
but when i run this command:
roslaunch bullet_server bullet_server.launch
i have empty space .
Comment by lucasw on 2016-10-17:
That's just the server, rosrun bullet_server stewart_platform.py in another terminal will create the stewart platform.
Comment by zakizadeh on 2016-10-17:
thanks a lot
Comment by zakizadeh on 2016-10-17:
how can i controlling this platform ?
Comment by lucasw on 2016-10-17: | {
"domain": "robotics.stackexchange",
"id": 25881,
"lm_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
} |
c#, timer, task-parallel-library
Title: Measure a given method's execution time - follow-up A long time ago, I've written a method that would allow me to measure the amount of time a method takes to run. I've decided to tweak this method and make use of TPL since measuring a method may take some time.
public static class ComparableUtils
{
public static T Min<T>(this T t1, T t2)where T:IComparable
{
if (t1.CompareTo(t2) <= 0)
{
return t1;
}
return t2;
}
public static T Max<T>(this T t1, T t2) where T : IComparable
{
if (t1.CompareTo(t2) >= 0)
{
return t1;
}
return t2;
}
}
public static class TestUtils
{
private static readonly Stopwatch Watch = new Stopwatch(); | {
"domain": "codereview.stackexchange",
"id": 13429,
"lm_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#, timer, task-parallel-library",
"url": null
} |
programming-languages, type-theory, polymorphisms
Objects are entirely opaque about their non-unique representation. Belonging in the object type means satisfying its interface, with no guarantees as to how this is achieved internally, and so binary methods may only assume that the two objects can respond to the same set of messages, but are quite possibly implemented entirely differently.
Even if the interface has a getter getFoo, that is no guarantee that the object has a foo field that you could poke at directly. Maybe some mock object is faking it with a method that returns a constant Foo. All you know as a client is that it supports a getFoo call. | {
"domain": "cs.stackexchange",
"id": 14591,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "programming-languages, type-theory, polymorphisms",
"url": null
} |
| Is it possible for planetary rings to be perpendicular (or near perpendicular) to the planet's orbit around the host star? One likes to do it oneself. xDiff=mean(A)-mean(B); This is calculated using both the raw data as well as the covariance matrix. Why is there no Vice Presidential line of succession? The weighted average takes this form, The pooled covariance is computed using weighted average (10/15)*Covariance group 1 + (5/15)*Covariance group 2 yields. [n2, k2]=size(B); [n,k]=size(X); % covariance. matrix Input are two matrices name matrix A and matrix B that represent features coordinates of two objects. For those interested in data science/statistics, check my post out on the Mahalanobis Distance. (Reverse travel-ban). The initial input values are the example. h ii = [((MD i) 2)/(N-1)] + [1/N]. It measures the separation of two groups of objects. Mahalanobis distance is a common metric used to identify multivariate outliers. peso mg.kg1 28 &n. R-bloggers ... We are going to | {
"domain": "dobrewiadomosci.eu",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105287006255,
"lm_q1q2_score": 0.8177771892521221,
"lm_q2_score": 0.8376199633332891,
"openwebmath_perplexity": 1350.5458421304695,
"openwebmath_score": 0.5691320896148682,
"tags": null,
"url": "https://dobrewiadomosci.eu/professional-ice-eggwr/ded191-mahalanobis-distance-excel"
} |
ros, bagfile
Title: Error with launch file and rosrun using a ROS package
Hey guys,
I am in the process of using a ROS package (https://github.com/beltransen/lidar_bev) that converts PointCloud data into Bird Eye View images. I have successfully installed the package with catkin. I use my own launch file (supplemented with that of the ROS package) to import bag files and get the desired images. The input message is sensor_msgs/PointCloud2, which is also included in my bag files.
My first question would be, can the bag files only contain this one message in order to run it compatible with the package?
Attached is my launch file:
<launch>
< !--1. start bag files playback-- >
< node pkg ="rosbag" type="play" name="bag_files_playback" output="screen" args="/home/pkatsoulakos/catkin_ws/src/launch/rosbags/Besprechungsraum/_2022-03-23-08-37-50_0.bag /home/pkatsoulakos/catkin_ws/src/launch/rosbags/Besprechungsraum/_2022-03-23-08-39-07_2.bag"/ >
< !-- 2. topics and frames -- > | {
"domain": "robotics.stackexchange",
"id": 37527,
"lm_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, bagfile",
"url": null
} |
special-relativity, metric-tensor, vectors
b) You have to be careful here, Minkowski space can be treated as $\Bbb R^4$ equipped with an inner product (making it a vector space), but if you want to talk about vectors at different points in Minkowski space you need to treat it as a manifold. On a manifold each point has a tangent space which has vector space structure which allows us to justifiably talk about vectors that aren't "at the origin" or "at the same point".
Even here we again have to be careful, because we are not necessarily allowed to compare vectors in different tangent spaces if we are working in, say, spherical coordinates (or if our spacetime has curvature).
c) The scalar product is invariant under coordinate transformations. | {
"domain": "physics.stackexchange",
"id": 73113,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, metric-tensor, vectors",
"url": null
} |
noethers-theorem, gauge-symmetry
$$\partial_\mu J^\mu = \partial_\mu (F^{\mu \nu} \partial_\nu \Lambda)=
(\partial_\mu F^{\mu \nu}) \partial_\nu \Lambda+ F^{\mu \nu} \partial_\mu\partial_\nu \Lambda = 0 + 0 =0\:.$$
Above, $\partial_\mu F^{\mu \nu}=0 $ due to field equations and $F^{\mu \nu} \partial_\mu\partial_\nu \Lambda=0$ because $F^{\mu \nu}=-F^{\nu \mu}$ whereas $\partial_\mu\partial_\nu \Lambda =\partial_\nu\partial_\mu \Lambda$.
ADDENDUM. I show here that $J^\mu$ arises from the standard Noether theorem. The relevant symmetry transformation, for every fixed $\Lambda$, is
$$A_\mu \to A'_\mu = A_\mu + \epsilon \partial_\mu \Lambda\:.$$ One immediately sees that
$$\int_\Omega {\cal L}(A', \partial A') d^4x = \int_\Omega {\cal L}(A, \partial A) d^4x\tag{0}$$
since even ${\cal L}$ is invariant. Hence,
$$\frac{d}{d\epsilon}|_{\epsilon=0} \int_\Omega {\cal L}(A, \partial A) d^4x=0\:.\tag{1}$$ | {
"domain": "physics.stackexchange",
"id": 97933,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "noethers-theorem, gauge-symmetry",
"url": null
} |
newtonian-mechanics, forces, free-body-diagram, buoyancy, weight
If they are not the same thing, then could you also please mention if there are separate formulas to find them.( It'd also be helpful if you described their relations with ' the weight we feel ' and ' the weight a weighing scale would read if you were to stand on it ') A normal force is simply a force that arises from contact between one object and another object or substance. There can be several normal forces acting on an object. For example, an object on a slope held in place by a wedge will have two normal forces acting on it - one from the slope, the other from the wedge. Neither one is equal to the weight of the object (or its apparent weight if the slope is in an accelerating lift). | {
"domain": "physics.stackexchange",
"id": 84925,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, forces, free-body-diagram, buoyancy, weight",
"url": null
} |
statistics, awk
Here is the code I use to get the output desired:
printf " Code 10 20 30 40 Total\n" > header
dd=`cat header | wc -L`
awk -F"," '
BEGIN {CNTLM = split ("20,30,40,60", LMT)
cmdsort = "sort -nr"
DASHES = sprintf ("%0*d", '$dd', _)
gsub (/0/, "-", DASHES)
}
{for (IX=1; IX<=CNTLM; IX++) if ($4 <= LMT[IX]) break
CNT[$2,IX]++
COLTOT[IX]++
LNC[$2]++
TOT++
}
END {
print DASHES
for (l in LNC)
{printf "%5d", l | cmdsort
for (IX=1; IX<=CNTLM; IX++) {printf "%9d", CNT[l,IX]+0 | cmdsort
}
printf " = %6d" RS, LNC[l] | cmdsort
}
close (cmdsort)
print DASHES
printf "Total"
for (IX=1; IX<=CNTLM; IX++) printf "%9d", COLTOT[IX]+0
printf " = %6d" RS, TOT
print DASHES | {
"domain": "codereview.stackexchange",
"id": 30468,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statistics, awk",
"url": null
} |
gravity, experimental-physics, experimental-technique, equivalence-principle, inertia
For a small angle of deflection, where we can take $\sin\theta \approx \theta$, this equation can be solved. It gives us for the period
$$T = 2\pi \sqrt\frac{m_i \ell}{m_g g}$$
Normally, we take it that $m_i = m_g$, in which case the expression reduces to the familiar one.
If there is non-equivalence, then you would expect this to show up when comparing different materials (say lead and silver) - if they have different ratios for $m_i/m_g$, then an otherwise identically constructed pendulum with either lead or silver as the bob would have a different period (controlling for things like drag - which has a very small effect for a heavy bob on a long string with a small deviation; to eliminate the effect of difference in drag, Newton put the different masses in identical wooden boxes so they had the exact same drag). | {
"domain": "physics.stackexchange",
"id": 41708,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gravity, experimental-physics, experimental-technique, equivalence-principle, inertia",
"url": null
} |
## Data
data1 = RandomVariate[NormalDistribution[2, 3], 10^3];
data2 = RandomVariate[LaplaceDistribution[1, 2], 10^3];
## Visual comparison
DistributionFitTest and KolmogorovSmirnovTest seem to work. But first check visually.
QuantilePlot[data1, data2]
Clearly not equally distributed.
For contrast
data3 = RandomVariate[LaplaceDistribution[1, 2], 10^4];
QuantilePlot[data3, data2]
Equally distributed
## Tests
KolmogorovSmirnovTest[data1, data2]
0
KolmogorovSmirnovTest[data3, data2]
0.17038
DistributionFitTest[data3, data2, "ShortTestConclusion"]
"Do not reject"
DistributionFitTest[data1, data2, "ShortTestConclusion"]
"Reject"
That been "Reject" the hypothesis that the two distributions are equal. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.957277806109987,
"lm_q1q2_score": 0.8078420561186892,
"lm_q2_score": 0.843895106480586,
"openwebmath_perplexity": 2050.842064220162,
"openwebmath_score": 0.29629281163215637,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/96913/is-there-any-function-that-compares-distributions-of-two-populations"
} |
ros, frame, world, beginner
Comment by TouchDeeper on 2019-09-26:
@DimitriProsser Is the world frame a pre-defined coordinate system by tf?
Comment by Tristan9497 on 2021-02-17:
No nothing is pre defined in tf. Look at REP105 the frame world is not even a proposal, it's name should be earth. In tf you can build it like you want name the frames like you want etc. but i would highly recommend to build your ros system after the proposals in the rep index. This will help you get answers here on ros.answers and if anyone should ever take a look at your robot they will understand the basic structure immediately. | {
"domain": "robotics.stackexchange",
"id": 8127,
"lm_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, frame, world, beginner",
"url": null
} |
cell-culture
Title: Testing CO₂ for cell culture I'm am refurbishing some old CO2 incubators. I would like to test the precision of the CO2 sensor. There is a sample port on this incubator.
What sorts of methods are commonly used to measure CO2 in these incubators?
Strangely, the manufacturer of the incubator makes no recommendations.
I need to be able to report the measurement as a percentage. Found this:
http://www.mybacharach.com/fyrite-gas-analyzers.htm
Probably what I need | {
"domain": "biology.stackexchange",
"id": 4370,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cell-culture",
"url": null
} |
electric-current, classical-electrodynamics, dirac-delta-distributions
Title: Deriving Current density of a Moving Point Charge Using the Continuity-Equation Problem:
We know, a point charge at position $\mathbf{r}_q$ has the charge density
$$\rho_q(\mathbf{r})=q\delta(\mathbf{r}-\mathbf{r}_q) \tag{2}$$
if it moves with the velocity $\mathbf{v}$, we get the current-density:
$$\mathbf{j}_q(\mathbf{r})=q\mathbf{v}\delta(\mathbf{r}-\mathbf{r}_q) \tag{3}$$
Apparently, we can derive (3) using the continuity equation
$$\dot{\rho}+\text{div} \ \mathbf{j} = 0 \tag{4}$$
and the fact that
$$\mathbf{v}=\dot{\mathbf{r}} \tag{5}$$
Question:
I really can't derive (3) using (4). At some point, I'd have to write down $\dot{\rho}$ no? But I have no idea how to evaluate that. Also I have no idea how to get rid of the "div". I just don't see how to even start here. If the charge is moving its position must change, so the actual time-explicit form of the charge density is:
$\rho\left(\mathbf{r},\,t\right)=q \delta^{(3)}\left(\mathbf{r}-\mathbf{r}_q\left(t\right)\right)$ | {
"domain": "physics.stackexchange",
"id": 60018,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electric-current, classical-electrodynamics, dirac-delta-distributions",
"url": null
} |
### MGF of Poisson Distribution
If $X \sim \mathcal{P}(\lambda)$, then by definition Probability Mass Function is
\begin{align} f_X(k)=\frac{\lambda^k}{k!}e^{-\lambda},\quad k \in 0,1,2.... \end{align} It's MGF is \begin{align} M_X(t)&=E[e^{tX}]\\&=\sum_{k=0}^{\infty}\frac{\lambda^k}{k!}e^{-\lambda}e^{tk}\\&=e^{-\lambda}\sum_{k=0}^{\infty}\frac{\lambda^ke^{tk}}{k!}\\&=e^{-\lambda}\sum_{k=0}^{\infty}\frac{(\lambda e^t)^k}{k!}\\&=e^{-\lambda}e^{\lambda e^t}\\&=e^{\lambda e^t-\lambda}\\&=e^{\lambda(e^t-1)} \end{align}
hint: $\sum_{k=0}^{n} P(X = k)P(Y = n-k)$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.985271386582759,
"lm_q1q2_score": 0.8078174352534166,
"lm_q2_score": 0.8198933271118222,
"openwebmath_perplexity": 763.2746494472284,
"openwebmath_score": 0.9961511492729187,
"tags": null,
"url": "https://math.stackexchange.com/questions/221078/poisson-distribution-of-sum-of-two-random-independent-variables-x-y"
} |
java, multithreading, singleton
private final int incrementAndWrap(int item) {
item++ ;
if (item == LIMIT) {
item = 0;
}
return item;
}
}
/**
* Allows resetting the TestingChatClient. All currently stored messages
* will be lost.
*/
public void reset() {
currentItem.lazySet(0);
lastQueryTime.lazySet(0);
// no need to reset messages ;)
}
private final void incrementAndWrap() {
currentItem.incrementAndGet();
currentItem.compareAndSet(LIMIT, 0);
}
public List<ChatMessage> getMessages() {
return Arrays.asList(messages);
}
public static MessageTracker getInstance() {
return INSTANCE;
}
} | {
"domain": "codereview.stackexchange",
"id": 11550,
"lm_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, singleton",
"url": null
} |
4. Jul 29, 2004
### Staff: Mentor
No one said it fell (vertically) twice the distance! It fell for twice the time. Now you have to know how distance fallen relates to time. The distance fallen is proportional to the square of the time: $d = 1/2gt^2$
So... if the time to fall is double, what can you say about the relative height of the buildings?
5. Jul 29, 2004
this question looks tricky but if you know how to tackle it its really quite easy. Doc Al said it right. If you do the calculation, you would get this:
Time of the taller building = 2 times the time of the smaller building, since horizontal distance is double
Horizontal Distance travelled by the projectile of the taller building = 2 times smaller
Now we can work with the verticla component and time in order to get the height:
Shorter Building: d = vot + 1/2at^2
d = 1/2at^2
t = sqrt(2d/a)
Taller Building: d = vot + 1/2at^2
d = 1/2a(2t)^2
t = sqrt(8d/a)
Therefore, the ratio of building heights is 4:1.
6. Jul 29, 2004 | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754447499796,
"lm_q1q2_score": 0.81174496359504,
"lm_q2_score": 0.8244619220634456,
"openwebmath_perplexity": 1410.6917022346424,
"openwebmath_score": 0.5393323302268982,
"tags": null,
"url": "https://www.physicsforums.com/threads/falling-objects-puzzle.37233/"
} |
python, python-3.x, file-system, numpy
def array2binary_list(bin):
""" Converts an numpy array into an list of bytes.
!!! Note returns generator !!! """
return map(bytes, zip(*[iter(bin.tobytes())] * bin.itemsize))
def write_binary_col(fid, bun, col):
""" Write down the data in the variable space format.
For int32 and double this means just the binary.
For str this means ascii representation preceded with the str length in
int32 """
raw = []
for key, val in col.items():
if (val['type'] == 'double') or (val['type'] == 'long'):
raw.append(array2binary_list(bun[key]))
elif val['type'] == 'string':
str_len = np.array([len(line) for line in bun[key]], dtype=np.int32)
raw.append(array2binary_list(str_len))
raw.append(line.encode('ascii') for line in bun[key])
else:
raise TypeError('Unknown Type {}'.format(val['type']))
# Transpose and serialize it first
fid.write(b''.join(map(join, zip(*raw)))) | {
"domain": "codereview.stackexchange",
"id": 18040,
"lm_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, file-system, numpy",
"url": null
} |
homework-and-exercises, kinematics, vectors, approximations
In very small rotations, we can approximate the distance moved in the rotation simply by the magnitude of the vector multiplied by the angle moved. Hence we get
$$\Delta v_\perp\approx v\Delta\theta$$
In other words, look at figure 11-8. Imagine that the vector $v_\perp$ is very small. Then you will notice that $v_1$ and $v_2$ will converge to the same length, we call this $v$. Then try to see if you can convince yourself that what I said before is true. | {
"domain": "physics.stackexchange",
"id": 23303,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, kinematics, vectors, approximations",
"url": null
} |
Links and banners on this page are affiliate links. You may want to simply skip to the examples. So it might look something like this. Check This Out A Taylor polynomial takes more into consideration.
Professor Leonard 99,296 views 3:01:45 Taylor Polynomials - Duration: 18:06. Krista King 59,295 views 8:23 Lec 38 | MIT 18.01 Single Variable Calculus, Fall 2007 - Duration: 47:31. Now, if we're looking for the worst possible value that this error can be on the given interval (this is usually what we're interested in finding) then we find the maximum So what I wanna do is define a remainder function. | {
"domain": "accessdtv.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9372107984180243,
"lm_q1q2_score": 0.8585878277570174,
"lm_q2_score": 0.9161096193153989,
"openwebmath_perplexity": 515.4209480898912,
"openwebmath_score": 0.7899336814880371,
"tags": null,
"url": "http://accessdtv.com/error-bound/taylor-series-maximum-error.html"
} |
homework-and-exercises, newtonian-mechanics, harmonic-oscillator, spring, calculus
I hope now you have a deeper understanding of this model, and I hope you are relieved to see that our forefathers haven't simply plucked these expressions out of thin air.
If it is an anharmonic, driven, or damped solution you're after, you might consider learning a bit of differential equations course material. Although I suppose if you give enough details, perhaps someone here would be willing to derive the solution for you. | {
"domain": "physics.stackexchange",
"id": 36048,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, harmonic-oscillator, spring, calculus",
"url": null
} |
Oh lol What if we want it to be Hausdorff Sorgenfrey plane Oh neat Is there a name for a separable space all of whose subspaces are separable? "Completely separable" or something like that? hereditarily separable In set theoretic topology there was (there is?) a lot of interest in S-spaces, which are regular and hereditarily separable but not Lindelöf spaces and L-spaces, which are regular and hereditarily Lindelöf but not separable spaces What is the weakest P such that P+separable\implieshereditarily separable? P=metric space works but I wonder if it can be weakened 3:13 PM What's Lindelöf again? Every (open) cover has countable subcover. Every open cover has a countable subcover, it's a weaker version of compactness Oh interesting that's way too many adjectives Is \Bbb R^n Lindelöf? I'm guessing yes but I don't see why 3:14 PM yes because it's second countable @LeakyNun "Oh interesting" is one adjective Isn't there also a concept of \aleph_n-Lindelöf too? Oh right yeah there's | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9833429599907709,
"lm_q1q2_score": 0.839689086749822,
"lm_q2_score": 0.8539127455162773,
"openwebmath_perplexity": 383.8928336469595,
"openwebmath_score": 0.8634619116783142,
"tags": null,
"url": "https://chat.stackexchange.com/transcript/36/2019/3/27"
} |
symmetry, topological-order, ising-model, spin-models, emergent-properties
Title: A simple model that exhibits emergent symmetry? In a previous question Emergent symmetries I asked, Prof.Luboš Motl said that emergent symmetries are never exact. But I wonder whether the following example is an counterexample that has exact emergent spin rotational symmetry.
Just consider the simplest Ising model for two spin-1/2 system $H=\sigma_1^z\sigma_2^z$, it has two ground states, one of them is spin-singlet $|\uparrow\downarrow> -|\downarrow\uparrow> $ which possesses spin rotational symmetry, while the original Hamiltonian explicitly breaks it.
And I want to know if anyone knows some simple examples that all of the ground states have the emergent symmetry while the Hamiltonian doesn't have? | {
"domain": "physics.stackexchange",
"id": 63999,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "symmetry, topological-order, ising-model, spin-models, emergent-properties",
"url": null
} |
protein-interaction, biological-networks
I don't know that there are any companies that do this commercially, but the Max Delbruck Center will talk to you about screening something custom. I don't know how long it would take but 2000 proteins would not take a long time, relatively speaking. The human genome has tens of thousands of proteins, so 2000 proteins would only be a few percentage points of the effort. However if they're totally novel there's probably library setup times and overhead, but I don't even have a good guess how long this would take. Depends on who you talk to, I expect. | {
"domain": "biology.stackexchange",
"id": 5249,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "protein-interaction, biological-networks",
"url": null
} |
classical-mechanics, rotational-kinematics
Title: A rigid body rotation with 3 joints I was playing around a physics simulation and I saw this.
(One of my first questions , forgive if this question is too simple or has grammatical errors)
Here it is in action.
I wanted to figure out its time period as it is periodic motion, i also figured that they are performing rotation along the joints and I can use transition from 1 rotation frame from other, Also something more important is this image.So the rod 1 performs motion in a circle where as rod 2 performs motion in an ellipse and rod 3 performs some other periodic motion which i do not know.
I need help in understanding this motion and figuring out its time period.
Thanks for the help in advance.
(You can use Physion where User named Dimitri made this) True double or triple pendulum would give chaotical motion (non-periodic), because if for example we take double pendulum : | {
"domain": "physics.stackexchange",
"id": 94876,
"lm_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, rotational-kinematics",
"url": null
} |
nuclear-engineering
What am I missing? The size of the core plays a large role in the feasibility of controlling a reactor through reflection. In small cores, the surface area is large relative to the volume, which, in the absence of a reflector, leads to high neutron leakage out of the core. As core size increases, the ratio of surface area to volume decreases, which, in an unreflected system, decreases the fraction of neutrons that stream out of the core. This means that adding a reflector to a small core will significantly increase reactivity, while adding a reflector to a large core will result in only a minor increase in reactivity. It follows that changes in reflection causes larger corresponding reactivity changes in small, leaky cores than it does in large, low-leakage cores. This explains why reflector control systems have typically been used in small (usually experimental) reactors and control rod-type systems have been used in larger, commercial-scale reactors. | {
"domain": "physics.stackexchange",
"id": 72815,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nuclear-engineering",
"url": null
} |
classical-mechanics, differential-geometry, classical-field-theory, diffeomorphism-invariance
\begin{align}
&\int_{\alpha}^{\beta}d\tau\left\{L(q(\tau),\dot{q}(\tau),\tau)+\epsilon\frac{d}{d\tau}\left[L(q(\tau),\dot{q}(\tau),\tau)\xi(\tau)\right]+\mathcal{o}(\epsilon)\right\} \\
&=\int_{\alpha}^{\beta}d\tau\left\{L(q(\tau),\dot{q}(\tau),\tau)+\epsilon\left[\frac{\partial L}{\partial q}\xi\dot{q}+\frac{\partial L}{\partial\dot{q}}\frac{d}{d\tau}(\xi\dot{q})+\frac{\partial L}{\partial\tau}\xi\right]+\mathcal{\epsilon}(\epsilon)\right\},
\end{align}
where in the last line, I expanded the Lagrangian $L(k_{\epsilon}(\tau),\dot{k}_{\epsilon}(\tau),\phi_{\epsilon}(\tau))$. This implies
$$L(q,\dot{q},\tau)\dot{\xi}=\frac{\partial L}{\partial\dot{q}}\dot{\xi}\dot{q}.$$
This above equation must hold for any $\dot{\xi}(\tau)$, therefore one has
$$H_{c}=\frac{\partial L}{\partial\dot{q}}\dot{q}-L=0,$$
where $H_{c}$ is the canonical Hamiltonian. This is a direct result of Euler's theorem.
It is strange that Edmund Bertschinger seems derived the correct result from incorrect ways. | {
"domain": "physics.stackexchange",
"id": 85778,
"lm_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, differential-geometry, classical-field-theory, diffeomorphism-invariance",
"url": null
} |
astrophysics, stars, stellar-physics
Perhaps it's only a matter for the cloud to have a minimal mass that allows the nuclear reaction? If so, how can I predict this minimal mass? The answer is that if you ignore degeneracy pressure, then indeed a collapsing cloud of helium must eventually reach a temperature that is sufficient to initiate the triple alpha $(3\alpha)$ process. However, electron degeneracy pressure means that below a threshold mass, the centre will not become hot enough to ignite He before the star is supported against further collapse.
The virial theorem tells us that (roughly)
$$ \Omega = - 3 \int P\ dV\ ,$$
where $\Omega$ is the gravitational potential energy, $P$ is the pressure and the integral is over the volume of the star.
In general this can be tricky to evaluate, but if we (for a back of the envelope calculation) assume a uniform density (and pressure), then this transforms to
$$ -\frac{3GM^2}{5R} = -3 \frac{k_B T}{\mu m_u} \int \rho\ dV = -3 \frac{k_B T M}{\mu m_u}\ , \tag*{(1)}$$ | {
"domain": "physics.stackexchange",
"id": 58874,
"lm_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, stars, stellar-physics",
"url": null
} |
(3) infinite times
As explained for the previous case,
The bird reaches the second car in $\dfrac{12}{180}=\dfrac{1}{15}$ hour for the first time.
In this time, the cars together covers a distance of $\dfrac{1}{15}×120=8$ km and therefore the distance between the cars becomes 12-8=4 km.
The bird reaches back the first car in $\dfrac{4}{180}=\dfrac{1}{45}$ hour.
In this time, the cars together covers a distance of $\dfrac{1}{45}×120=\dfrac{8}{3}$ km and therefore the distance between the cars becomes $4-\dfrac{8}{3}=\dfrac{4}{3}$ km.
Now the bird flies to the second car for the second time. It takes $\dfrac{\left(\dfrac{4}{3}\right)}{180}=\dfrac{1}{135}$ hour for this.
In this time, the cars together covers a distance of $\dfrac{1}{135}×120=\dfrac{8}{ 9}$ km and therefore the distance between the cars becomes $\dfrac{4}{3}-\dfrac{8}{9}=\dfrac{4}{9}$ km.
The bird reaches back the first car in $\dfrac{\left(\dfrac{4}{9}\right)}{180}=\dfrac{1}{405}$ hour. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9736446517423792,
"lm_q1q2_score": 0.8726303547192482,
"lm_q2_score": 0.896251371748038,
"openwebmath_perplexity": 376.63806774058094,
"openwebmath_score": 0.45112529397010803,
"tags": null,
"url": "https://math.stackexchange.com/questions/1661818/a-bird-flies-between-two-cars-infinite-times"
} |
general-relativity, black-holes, event-horizon, topology, accretion-disk
Title: Why don’t black rings exist in 3+1 dimensions? In higher dimensions black holes can take different forms. Besides spheroids, there are also “black rings” which have a toroidal event horizon. However, in our 3+1 dimension no black ring solution has been found. The only valid solution of a black hole with an angular momentum is the Kerr metric. The no hair theorem dictates that black holes are only described by their masses, spins and charges (which is assumed to be neutral for simplicity). However, no hair theorem is not actually proved mathematically despite its name. | {
"domain": "physics.stackexchange",
"id": 95020,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, black-holes, event-horizon, topology, accretion-disk",
"url": null
} |
fft, noise
To answer questions 2), 3) (I dont really understand your question 2)):
If your sampling frequency is 56Hz, your FFT output will range from 0 to 56Hz, where the distance between the bins is 56Hz/FFT-length. Furthermore, as your input signal is real, the frequencies above 56/2Hz will be a mirror of the first half of the frequency domain output, they do not contain additional information. As a general rule for Fourier Analysis: The frequency resolution $\Delta_f$ after FFT is only determined by the time duration $T$ of the original signal, given by $\Delta_f=1/T$. You can have a look at this article I wrote on my website about the FFT and frequency domain resolution as an introduction to the topic. | {
"domain": "dsp.stackexchange",
"id": 4922,
"lm_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, noise",
"url": null
} |
electric-circuits, electric-current, electrical-resistance, voltage, batteries
Title: Why is the emf of the battery which is being charged included for the current flow? When a battery is being charged, let's say it has an emf $\mathcal{E}$ and internal resistance $r$. At first it's completely drained, and we use a battery to charge it back, and lets say the emf of battery we use for the charging is $\mathcal{E}'$; it has negligible internal resistance with an external resistance $R$ in series.
When asked to find the current in the circuit, the formula for this calculation is
$$I=\frac{\mathcal{E'-E}}{R+r}.$$ | {
"domain": "physics.stackexchange",
"id": 96514,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electric-circuits, electric-current, electrical-resistance, voltage, batteries",
"url": null
} |
quantum-mechanics, quantum-field-theory, quantum-interpretations
Then he (the author is male) goes on to point out something that I can't independently confirm but seems reasonable: one cannot make a perfect preparation of the original two-particle entangled state in QED. There will always be some admixture of other states. So you will never truly predict the outcome of this (or any other!) experiment with unity, and therefore the prerequisite for EPR as stated above is never satisfied. Of course, our uncertainty may get arbitrarily low, but perhaps any uncertainty in principle is enough to ruin this "element of physical reality."
Okay, but how important is this? From my perspective, the answer is "not very," for the following reason: | {
"domain": "physics.stackexchange",
"id": 23469,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, quantum-field-theory, quantum-interpretations",
"url": null
} |
Let $V$ denote your vector space, $M:V\to V$ a positive-definite matrix not proportional to the identity, and $\langle u|v\rangle$ an inner product of $V$. Then $\langle u|Mv\rangle$ is another one.
You mean: Define a new / second inner product such that two vectors orthogonal with respect to the first / old inner product are not orthogonal with respect to the new / second one?
Yes! That would be possible..
If you do not need any practical motivation take the vector space $\mathbb{C}^n$ and any positive definite hermitian matrix $A$. Then $x^{*}Ax$ is a scalar product, where $x^{*}$ means conjugate transpose. Now consider first $A$ as the identity matrix and then $\tilde{A}$ as identical to $A$ except for the upper left coefficient changed to 2... | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9820137863531804,
"lm_q1q2_score": 0.8028694026276746,
"lm_q2_score": 0.817574471748733,
"openwebmath_perplexity": 138.0711884299562,
"openwebmath_score": 0.9573176503181458,
"tags": null,
"url": "https://math.stackexchange.com/questions/2771039/can-a-vector-space-have-more-than-one-definition-of-an-inner-product"
} |
quantum-mechanics, thermodynamics, atomic-physics, atoms
Ubiquitousness and stability of atoms relies on their binding energy, which means that an atom has a lower energy than an unbound system of the nucleus and electrons.
Atoms make up everything you see around you.
Atoms themselves are made of two types of charge: positive and negative.
It so happens that opposite charges attract.
This is why atoms tend to stay together.
Now, since they attract, it takes some effort/energy to separate the constituents.
The amount of energy needed to separate them is called the "binding energy."
Where the temperature is much higher than ionization potential, the matter exists in the form of plasma – a gas of positively-charged ions and electrons. | {
"domain": "physics.stackexchange",
"id": 16167,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, thermodynamics, atomic-physics, atoms",
"url": null
} |
# What are the limitations of linear regression + feature / label transformation?
## Regression
Suppose I have data points in a matrix $X \in \mathbb{R}^{n \times m}$ as well as labels $\mathbb{R}^n$, where $n$ is the number of my data points and $m$ is the number of features per data point. For a new data point $x \in \mathbb{R}^m$ I want to predict a value $\hat{y} \in \mathbb{R}$.
## Linear Regression
A simple way to do so is to assume that the data is created by a linear function:
$$y = x^T \cdot w$$
where $w \in \mathbb{R}^m$ are parameters which have to be learned from the data we've collected so far.
A simple way to learn the parameters $w$ is
$$w = (X^T X)^{-1} X^T y$$
Now it is possible to add some features to the data points. For example, say we have $x \in \mathbb{R}$ and we transform the feature by $$\Phi(x) = (x, x^2)$$
Let
$$X = \begin{pmatrix}-1 \\ 0\\ 1\end{pmatrix}\;\;\; y = \begin{pmatrix}1\\0\\1\end{pmatrix}$$
and thus | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9905874104123902,
"lm_q1q2_score": 0.8189302931312114,
"lm_q2_score": 0.8267117919359419,
"openwebmath_perplexity": 181.3391327922984,
"openwebmath_score": 0.9862670302391052,
"tags": null,
"url": "https://math.stackexchange.com/questions/1626052/what-are-the-limitations-of-linear-regression-feature-label-transformation"
} |
You've shown that $sech(x)$ is monotone decreasing on [0,∞) by applying the first derivative test.
This tells you that $sech(x)$ is indeed one to one.
6. May 20, 2013
### I like Serena
Actually, it has to be strictly decreasing with the possible exception of a countable number of points, which it is.
That is, it is not allowed to be constant in some interval.
7. May 21, 2013
### Jimbo57
Thanks a lot for the input but I seem to be getting two very different and very confident answers guys. Unless I'm misunderstanding something, I still feel like I'm on the fence. So, since the maxima is at the end of the interval, is it still invertible, or does that make it not invertible?
8. May 21, 2013
### Dick
If a function is strictly decreasing over an interval, then it's invertible. Having a derivative being zero at a single point doesn't make it not strictly decreasing.
Last edited: May 21, 2013
9. May 21, 2013
### Jimbo57 | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9805806552225683,
"lm_q1q2_score": 0.8315007801177409,
"lm_q2_score": 0.8479677583778258,
"openwebmath_perplexity": 445.789352200905,
"openwebmath_score": 0.6429953575134277,
"tags": null,
"url": "https://www.physicsforums.com/threads/is-it-invertible.692768/"
} |
python, beginner, calculator, finance
print(f"Lucro parcelado 5x: R${profit_5}")
print(f"Lucro parcelado 6x: R${profit_6}")
print(f"Lucro parcelado 7x: R${profit_7}")
print(f"Lucro parcelado 8x: R${profit_8}")
print(f"Lucro parcelado 9x: R${profit_9}")
print(f"Lucro parcelado 10x: R${profit_10}")
print(f"Lucro parcelado 11x: R${profit_11}")
print(f"Lucro parcelado 12x: R${profit_12}")
print(f"Lucro parcelado 15x: R${profit_15}")
print(f"Lucro parcelado 18x: R${profit_18}")
else:
print(f"Lucro à vista: R${base_profit}")
print(f"Lucro parcelado 2x: R${profit_2}")
print(f"Lucro parcelado 3x: R${profit_3}")
print(f"Lucro parcelado 4x: R${profit_4}")
print(f"Lucro parcelado 5x: R${profit_5}")
print(f"Lucro parcelado 6x: R${profit_6}")
print(f"Lucro parcelado 7x: R${profit_7}")
print(f"Lucro parcelado 8x: R${profit_8}")
print(f"Lucro parcelado 9x: R${profit_9}")
print(f"Lucro parcelado 10x: R${profit_10}") | {
"domain": "codereview.stackexchange",
"id": 31394,
"lm_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, calculator, finance",
"url": null
} |
php, html, php5, pagination
Note that I also moved the closing ?> to its own line. This makes it much easier to tell when you switch from code to HTML.
I also switched from the non-standard : notation. Very little PHP code is written that way. The only time that I've actually seen it is in WordPress templates.
And I switched from >= 2 to > 1 because 2 is not a significant number here. What you are saying is that you don't want allow the back link on the first page, only on pages after the first. This translates to > 1 more directly.
Separating PHP and HTML
I'd tend to write this as
<?php
$currentPage = isset($_GET['page_num']) ? $_GET['page_num'] : 1;
?>
<div class="row">
<div class="twelve columns tac">
<?php
echo getPaginationLinks($currentPage, $totalPages);
?>
</div>
</div> | {
"domain": "codereview.stackexchange",
"id": 16415,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, html, php5, pagination",
"url": null
} |
c++, c++11, error-handling
This would allow code like this.
if (const auto cv = prn(5, 2))
std::cout << cv.get() << '\n';
else
std::cerr << "error: " << to_string(cv.status()) << '\n';
Instead of a single Good value, you could have a more general predicate but this would deprive you of the ability to default it in the lucky case and smells like over-engineering to me.
Think whether you want a “no value” state
If your computation fails, you currently have to pass a dummy value to the constructor because it always initializes the t member. If an object of type T is expensive to construct, this would be wasteful. It also feels bad having to specify a value when you actually have none. Of course, you also don't want to default-construct the t member in this case as this might be equally costly or not even possible.
The usual way to handle this is to use a properly aligned buffer instead of a typed variable T.
char buffer[sizeof(ValueT)] alignas(ValueT); | {
"domain": "codereview.stackexchange",
"id": 19183,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, c++11, error-handling",
"url": null
} |
quantum-field-theory, scattering, correlation-functions, s-matrix-theory
Title: What is the sense of introducing generating functional to the summands of expansion of S-matrix? Let's have generating functional $Z(J)$:
$$
Z(J) = \langle 0|\hat {T}e^{i \int d^{4}x (L_{Int}(\varphi (x)) + J(x) \varphi (x))}|0 \rangle , \qquad (1)
$$
where $J(x)$ is the functional argument (source), $\hat {T}$ is the chronological operator, $\varphi (x)$ - some field.
I want to understand the reasons for its introduction for the summands of expansion of S-matrix. As I read in the books, it helps to consider only the vacuum expectation values, forgetting about in- and out-states. But in $(1)$ appear summands like $\int \frac{J(p)dp}{p^2 - m^2 + i0}$ instead of the contributions from external lines. It may refer to the internal lines. So what to do with them and are there some other reasons to introducing $(1)$ except written by me? The primary utility in introducing the generating functional is in using it to compute correlation functions of the given quantum field theory. | {
"domain": "physics.stackexchange",
"id": 10547,
"lm_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, scattering, correlation-functions, s-matrix-theory",
"url": null
} |
object-oriented, typescript
public not(): PredicateBuilder<T> {
return new PredicateBuilder((x: T) => !this.condition(x));
}
public apply(x: T): boolean {
return this.condition(x);
}
private extractCondition(input: PredicateBuilder<T> | Predicate<T>): Predicate<T> {
let condition: Predicate<T>;
if ("condition" in input) {
condition = input.condition;
} else {
condition = input;
}
return condition;
}
} | {
"domain": "codereview.stackexchange",
"id": 38249,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "object-oriented, typescript",
"url": null
} |
electromagnetism
In short, Ampère's Law is always valid (in magnetostatics), but it is not always useful when it comes to computing the magnetic field. It will only be helpful in situations with a lot of symmetry, which this problem lacks. Griffiths' Introduction to Electrodynamics, Sec. 5.3., lists the possible symmetries in which one can employ this trick as being | {
"domain": "physics.stackexchange",
"id": 88723,
"lm_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",
"url": null
} |
planet, space-time, life
Title: Is there anything special about our position in the galaxy thats necessary for life? It's a fact that our planet's location from our parent star (among other factors) is of crucial importance to the existence of life. But can our position in the galaxy be considered a factor when considering potential planets to carry life?
In any given position in the galaxy for instance there are distinct radiation levels, distinct gravitational effects, space-time, etc. These factors could contribute to the existence of life on earth or even its continuity, wouldn't they? Certain regions of the galaxy are more favourable for life, others less. Life takes some time to develop, and it needs chemical elements heavier than helium, e.g. carbon or silicon. | {
"domain": "astronomy.stackexchange",
"id": 244,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "planet, space-time, life",
"url": null
} |
performance, c
while (mdx > buckets - 1 - oob)
{
mdx = mdx - 1;
}
oob++;
}
nodeGen[mdx].index = mdx;
if (printFlag)
{
printf("index = %d mdx = %d word = %s cnt = %d \n", nodeGen[mdx].index, mdx, nodeGen[mdx].word, cnt) ;
}
cnt ++; | {
"domain": "codereview.stackexchange",
"id": 39496,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, c",
"url": null
} |
random-forest, weka
I am using Weka 3.8.3 - not sure if this matters.
Thanks for all hints :) Your linked paper appears to be wrong about feature subsetting. I couldn't find it in the documentation for randomForest, but the source for randomForest uses randomTree for the base models, and in that documentation it says
a tree that considers K randomly chosen attributes at each node.
So the selection seems to happen at each split.
(Note that xgboost has feature subsetting at each of the tree, the level (depth), and the node. I don't see any obvious reason that one or more of these options should always be preferable...)
For default number of features, sqrt(m) is the most common, but it looks like Weka uses lg(m). See option -K at
https://weka.sourceforge.io/doc.dev/weka/classifiers/trees/RandomForest.html
Yes, Weka uses the Quinlan family of decision trees, which split using information gain (as opposed to CART, which uses gini). | {
"domain": "datascience.stackexchange",
"id": 6970,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "random-forest, weka",
"url": null
} |
ros
Originally posted by mechatron on ROS Answers with karma: 56 on 2015-12-21
Post score: 0
Original comments
Comment by Humpelstilzchen on 2015-12-22:
Gazebo 5 never hit Jessie: https://packages.qa.debian.org/g/gazebo.html
Comment by mechatron on 2015-12-22:
Can you please explain what that means ? I was of the impression that I am using libgazebo package built for ubuntu vivid.
"There is an effort for migrating ROS packages to Debian which probably can help you to bring gazebo binaries to jessie. https://wiki.debian.org/DebianScience/Robotics/ROS
Check for the http://sir.upc.edu/debian-robotics jessie-robotics mainwhich is managed by Leo Palomo-Avellanade who works in debian-science and uses ROS."
I found answer in another thread in github. I hope this helps others having similar issue.
Originally posted by mechatron with karma: 56 on 2016-04-06
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 23269,
"lm_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
} |
objects. common examples: velocity, force Engineering Mathematics -I Semester – 1 By Dr N V Nagendram UNIT – V Vector Differential Calculus Gradient, Divergence and Curl Chapter (PDF Available) · December 2014 with 5,190 Reads scalar and vector fields in physics I the gradient of a scalar field ii the divergence of a vector field and iii the curl. For each question in the following quiz, choose whether the given quantity is a vector or a scalar. 60. Distance is a scalar ("3 km"); Displacement is a vector ("3 km 8 Mar 2016 A vector is a quantity with both a size and a direction, whereas a scalar is a For example, 5 m would be a scalar quantity because it has a size Vectors: Vectors are mathematical entities which have both a magnitude and a Scalar functions: The scalar function (aka a scalar field) is a function which Abstract: These notes sum up “all you need to know” about the mathematics of Vectors. . Add (or subtract) the scalar value to the vector directly. Search this site. | {
"domain": "cleanupthepackers.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9852713874477228,
"lm_q1q2_score": 0.8008949145233167,
"lm_q2_score": 0.8128673223709251,
"openwebmath_perplexity": 542.805935340855,
"openwebmath_score": 0.7808359265327454,
"tags": null,
"url": "http://cleanupthepackers.com/uaq0/vector-and-scalar-mathematics-pdf.html"
} |
ros, markers, ar-track-alvar
Originally posted by bwillaert on ROS Answers with karma: 11 on 2014-03-06
Post score: 1
Original comments
Comment by bwillaert on 2014-03-11:
In the meantime, I did a calibration of the rgd camera (using http://wiki.ros.org/camera_calibration) and that improved the 2d based tracking accuracy. The errors are now < 2 cm in the direction from the camera to the marker location. Depending on the camera quality and the calibration quality, I assume now that's the best possible...
This seems odd. If the position of the tag is being estimated as "behind" where the tag really is, it usually means that the measurement of the size of tag is incorrect, leading it to think it is a different distance away. The measurement should be done from side to side (not corner to corner) of the black edges of the tag.
Originally posted by sniekum with karma: 101 on 2014-04-30
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 17194,
"lm_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, markers, ar-track-alvar",
"url": null
} |
Polynomials Taylor Polynomials When Functions Are Equal to Their Taylor Series When a Function Does Not Equal Its Taylor Series The following diagrams show the Taylor Series and some examples of the MacLaurin Series. (c) the 3rd-degree Taylor polynomial for f(x) at 0. Extended Kalman Filters Are useful when there is an Non Linearity in the su=ystem and the estimation/prediction and measurement step requires a Jacobian matrix( first Derivative in the Taylor Series) is required to transform and work optimally. Example 7.7. which is all the terms up to, but not including, order eight in the Taylor series for f(x): ∑ n = 0 ∞ ( x − a ) n f ( n ) ( a ) n ! . Taylor's Theorem Let f be a function with all derivatives in (a-r,a+r). 24 + (x 1)4 4! 1) $$f(x)=1+x+x^2$$ at $$a=1$$ Example $$\PageIndex{2}$$: The Ratio Test Graphical evidence suggests that the Taylor series centered at … Taylor Polynomials. Taylor’s theorem is used for approximation of k-time differentiable function. f00(a)(x a)2 + 1 | {
"domain": "honda-event.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9912886137407895,
"lm_q1q2_score": 0.8010278325140145,
"lm_q2_score": 0.8080672181749422,
"openwebmath_perplexity": 451.9839795971824,
"openwebmath_score": 0.9216812252998352,
"tags": null,
"url": "https://honda-event.com/backgrounds-e-evubw/ccd970-taylor-series-examples"
} |
php, html, security, e-commerce
String Building:
Here's the most helpful part.
During the course of execution, you echo out quite a few hidden inputs.
Replacing that with a function would greatly be of assistance.
function build_hidden_inputs($type, $value){
return "<input name=\"$type\" type=\"hidden\" value=\"$value\">";
}
Then, build arrays with the content as keys and values, like so:
$first_content = array(
"MERCHANT_ID" => $merchant_id,
"ORDER_NUMBER" => $order_number,
// So on
);
Then, foreach them into the function.
foreach ($first_content as $key => $value){
echo build_hidden_inputs($key, $value);
}
To answer your questions:
Is it somehow unsecure, that my output data will be visible in pure html? including md5 hash, which is calculated based on shopping cart items/user input data. (output.html) | {
"domain": "codereview.stackexchange",
"id": 13763,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "php, html, security, e-commerce",
"url": null
} |
lab-techniques, literature, drosophila, fitness
Title: Measuring fitness / lifetime reproductive success (LRS) in Drosophila I am planning a fitness assay of Drosophila melanogaster. I'd like to get a good measure of lifetime reproductive success (lrs) but I don't want to count all the offspring produced over a lifetime by 100's of focal flies. The solution I am toying with is to count offspring production over the first few days or weeks. But before I commit to this I need to know if there is existing research material on the following:
Does early reproductive output correlate well with lrs? (this could be a low correlation if a fly trades early-life offspring production for late-life offspring production) | {
"domain": "biology.stackexchange",
"id": 2429,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "lab-techniques, literature, drosophila, fitness",
"url": null
} |
c++, multithreading, thread-safety, c++14
// Starts multiple transactions simultaneously in a
// dead-lock free manner.
template<typename... Args>
auto transaction(Args&&... args) {
std::lock(args...);
return std::make_tuple(args.adopt_transaction()...);
}
First of all, I don't think this is a good use of variadic templates. IIUC, you're trying to make a function that accepts any number of TransactionEnforcer<T> objects and returns a std::tuple<Transaction<T>...>? I would express that at least as
template<typename... T>
auto transaction(TransactionEnforcer<T>&&... args) {
std::lock(args...);
return std::make_tuple(args.adopt_transaction()...);
} | {
"domain": "codereview.stackexchange",
"id": 15126,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, multithreading, thread-safety, c++14",
"url": null
} |
Well what if we do not allow the use of double negation elimination? If you have only the other usual rules (the first-order logic rules here but excluding ¬¬elim and including ex falso), then the resulting logic is intuitionistic logic, which is strictly weaker than classical logic, and cannot even prove the law of excluded middle, namely "$$A \lor \neg A$$" for any statement $$A$$. So if you instead ask the more interesting question of whether every true theorem can be proven in intuitionistic logic, then the answer is no.
Note that intuitionistic logic plus the rule "$$\neg A \to \bot \vdash A$$" gives back classical logic, and one could say that this rule embodies the 'true principle' of proof by contradiction, in which case one can say that some true theorems require the use of a proof by contradiction somewhere.
If you can prove a statement $A$ directly, you can prove it by contradiction. Just assume $\lnot A$, perform your proof of $A$, note the contradiction, and derive $A$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765552017674,
"lm_q1q2_score": 0.8461035408992584,
"lm_q2_score": 0.8633916152464016,
"openwebmath_perplexity": 251.62871913055332,
"openwebmath_score": 0.8424243927001953,
"tags": null,
"url": "https://math.stackexchange.com/questions/2081396/can-every-true-theorem-that-has-a-proof-be-proven-by-contradiction/2081513"
} |
ros, pluginlib, rqt, rqt-bag
Keep using two separate plugins, one in C++, one in Python and let them interact through ROS communication patterns with each other (messages, services). The "only" downside is that the user has to open two plugins. (It would be possible though to add API to rqt to enable plugins to start other plugins somehow automatically.)
Reimplement the rqt_bag user interface in C++ using the C++ API of rosbag. The significant downside of this is the effort since rqt_bag does quite a lot of stuff already.
Since option 2 is quite some effort I would suggest option 1.
Originally posted by Dirk Thomas with karma: 16276 on 2016-03-30
This answer was ACCEPTED on the original site
Post score: 3 | {
"domain": "robotics.stackexchange",
"id": 24275,
"lm_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, pluginlib, rqt, rqt-bag",
"url": null
} |
special-relativity, electric-circuits, electric-current, speed-of-light
Of course, this number isn't really physically meaningful for a number of reasons. This classical picture is a toy model, and electrons in solids are a highly quantum mechanical system. Even disregarding quantum mechanics, no conductor could come anywhere near this current density without being vaporized by Ohmic heating. Even considering a classical model of a superconductor as a conductor with zero resistivity, this current density would be far above the superconductor/normal conductor switching threshold. | {
"domain": "physics.stackexchange",
"id": 94019,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, electric-circuits, electric-current, speed-of-light",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.