text stringlengths 1 1.11k | source dict |
|---|---|
thermodynamics, reversibility
Or is it in fact the case that irreversible processes simply cannot be represented by $p-V$ diagrams, for instance? A gas which is expanded quickly enough as to generate pressure waves would not have a well-defined pressure, and so we would not be able to represent it by a point in state-space, perhaps?
Thank you. Many processes cannot be drawn on a p-V diagram because the pressure is not always defined.
Those processes that can be drawn are called "quasi-static". However, you cannot look at a certain path and say whether it represents a reversible or irreversible process for sure. | {
"domain": "physics.stackexchange",
"id": 11621,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics, reversibility",
"url": null
} |
python, beginner, python-2.x, playing-cards
I want help to make it better. Any code optimization with explanation is welcome. If you know any major rules that this code does not follow or some bugs in code, please mention.
P.S. I have tried using Object Oriented Programming. Due to gettting frustrated at the end due to errors. At the end the name of variables might be confusing. After a quick glance I see there are a few blocks that are repeated. They can be put into functions instead to reduce repetition and make it more readable. The sections are:
1)
if(ip[0] == 0):
if( self.player_card[0] == 'A of spades' or self.player_card[0] == 'A of hearts' or
self.player_card[0] == 'A of diamonds' or self.player_card[0] == 'A of clubs' or
self.player_card[1] == 'A of spades' or self.player_card[1] == 'A of hearts' or
self.player_card[1] == 'A of diamonds' or self.player_card[1] == 'A of clubs'):
values['A']=1
ip[0] = 1 | {
"domain": "codereview.stackexchange",
"id": 26207,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, python-2.x, playing-cards",
"url": null
} |
homework-and-exercises, electric-circuits, electrical-resistance, voltage, capacitance
The answer is given as $V'=V_0+V_m\cos(\omega t-\alpha)$ where $V_m=\frac{V_0}{\sqrt{1+(\omega RC)^2}}$, $\alpha=arctan(\omega RC)$.
Here I also did not understand how the d.c. component(Voltage $V_0$) fed across the circuit would be equal to the voltage across the capacitor. Because the system is linear the response to the two driving voltages [$V_0$ and $V_0cos(\omega t)]$ will equal the sum of each acting alone (superposition).
Yes, each component behaves independently and the output will be their sum. | {
"domain": "physics.stackexchange",
"id": 80608,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electric-circuits, electrical-resistance, voltage, capacitance",
"url": null
} |
sum of all terms like', sigma notation is a convenient way to show where a series begins and ends. Not every sequence has this behavior: those that do are called convergent, while those that don't are called divergent. 5 Absolute Ratio Test Let be a series of nonzero terms and suppose. Convergence of sequences One concept that is typically hard to grasp is the convergence of a sequence. –Fixed point iteration , p= 1, linear convergence •The rate value of rate of convergence is just a theoretical index of convergence in general. Limit calculator wolfram alpha wolfram alpha result for infinite series summation posts tagged with advanced math wolfram alpha blog posts tagged with advanced math wolfram alpha blog. Before discussing convergence for a sequence of random variables, let us remember what convergence means for a sequence of real numbers. Each term (except the first term) is found by multiplying the previous term by 2. When a sequence has a limit that exists, we say that the | {
"domain": "casandrea.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9896718453483273,
"lm_q1q2_score": 0.8351792253683175,
"lm_q2_score": 0.8438951045175643,
"openwebmath_perplexity": 379.3981477732795,
"openwebmath_score": 0.89300936460495,
"tags": null,
"url": "http://volv.casandrea.it/sequence-calculator-convergence.html"
} |
ros, ros-melodic, installation
If so, do you know about how long we should wait for syncing?
I would not know.
Also, what is the best way to let admins know the problem when I find it?
Posting either here or on ROS Discourse, maybe in the Packaging and Release Management category. Or perhaps the Buildfarm category.
Comment by gvdhoorn on 2020-05-18:
Seems it's being worked on: Incident Report for ROS: packages.ros.org mirrors out of sync.
Comment by Kenji Miyake on 2020-05-18:
I understand, thank you! I'll wait for a while and check again after it's fixed.
Comment by Kenji Miyake on 2020-05-18:
Oh, now 64.50.236.52 seems to be synced. Will check other packages as well for just in case.
Comment by Kenji Miyake on 2020-05-18:
I've tried the installation of ROS melodic + colcon several times using docker, and it seems working correctly.
According to Incident Report for ROS: packages.ros.org mirrors out of sync, this should now be fixed:
Resolved
The mirrors are re-synchronized.
Original incident report: | {
"domain": "robotics.stackexchange",
"id": 34973,
"lm_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, ros-melodic, installation",
"url": null
} |
This question is sparked from a response I got on StackOverflow (SO) and from what I read on this forum. For example, on my SO post, user @AGN Gazer says the following:
"A solution with a minimal norm does not mean a solution that minimizes residuals. [...] Having a solution with a minimal norm means nothing to me[.] [...] I want the "best" solution - the one that minimizes the residuals but I cannot get it with an underdetermined system."
However, on the accepted answer on this Math Exchange post, it appears that @Brian Borchers says otherwise:
"[We're] often interested in the minimum norm least squares solution. That is, among the infinitely many least squares solutions, pick out the least squares solution with the smallest $∥x∥_{2}$ [(i.e. euclidean norm: $\| x \|_{2} =\sqrt{\sum_{i=1}^{n}x_{i}^{2}}$)]. The minimum norm least squares solution is always unique." | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9814534392852384,
"lm_q1q2_score": 0.8380756027608324,
"lm_q2_score": 0.8539127473751341,
"openwebmath_perplexity": 301.6215915895497,
"openwebmath_score": 0.9046627879142761,
"tags": null,
"url": "https://math.stackexchange.com/questions/2828800/does-a-solution-with-a-minimal-norm-mean-it-is-a-solution-that-minimizes-the-res?noredirect=1"
} |
exoplanet, rotation, earth-like-planet, weather
If you mean a true Earth-like analogue (in the sense of being exactly-like-Earth-in-every-way-except-the-axial-tilt), then no--it would not have noticeable seasons, since none of the above factors really apply. | {
"domain": "astronomy.stackexchange",
"id": 548,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "exoplanet, rotation, earth-like-planet, weather",
"url": null
} |
nextflow
I could try delaying submissions, but I suspect that will still result in collisions.
Here's the SLURM script that I'm using:
TOTAL_THREADS=$1
MEM_PER_THREAD=$2
nextflow run 02-SAMTOOLS_SORT.nf \
-with-report "reports/report.${TOTAL_THREADS}_threads.${MEM_PER_THREAD}_GB_per_thread.html" \
-with-trace "traces/trace.${TOTAL_THREADS}_threads.${MEM_PER_THREAD}_GB_per_thread.txt" \
--samtools_total_threads $TOTAL_THREADS \
--samtools_mem_per_thread $MEM_PER_THREAD
My workflow had the following global parameters:
/*
* Make this pipeline a nextflow 2 implementation
*/
nextflow.enable.dsl=2
...
params.samtools_total_threads = '4'
params.samtools_mem_per_thread = '8'
... | {
"domain": "bioinformatics.stackexchange",
"id": 2088,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nextflow",
"url": null
} |
[Next: IncompleteGammaQuotient] [Previous: Digamma] [Top]
## IncompleteGammaQuotient
The symbol IncompleteGammaQuotient represents the Incomplete Gamma Quotient function, it is denoted by $P(a,x)$ and is defined by, the integral $P(a,x)=\frac{1}{\Gama (a)}\int_{0}^{x} e^{-t}t^{a-1}dt$. It has a branch cut along the negative real axis in the complex $a$ plane. It is defined as in M. Abramowitz and I. Stegun, Handbook of Mathematical Functions, [6.5.1]
Commented Mathematical property (CMP):
P : (real, real) $\rightarrow$ real
Commented Mathematical property (CMP):
P : (complex, real) $\rightarrow$ complex
Commented Mathematical property (CMP):
P : (symbolic, symbolic) $\rightarrow$ symbolic
Commented Mathematical property (CMP):
$P(n,x)=1-e^{-x} \sum_{j=0}^{n-1} \frac{x^j}{j!}$ Special values
Commented Mathematical property (CMP):
$P(a+1,x)=P(a,x)-\frac{x^ae^{-x}}{\Gamma(a+1)}$ Recurrence Formulas
Signatures:
sts
[Next: IncompleteGamma] [Previous: PolyGamma] [Top] | {
"domain": "uwo.ca",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9850429147241161,
"lm_q1q2_score": 0.8007091875811518,
"lm_q2_score": 0.8128673133042217,
"openwebmath_perplexity": 8260.870328403802,
"openwebmath_score": 0.8763903379440308,
"tags": null,
"url": "http://www.scl.csd.uwo.ca/~bill/OpenMath/SpecialFns/html/cd/gammaFnsPlus.html"
} |
electrostatics, solid-state-physics
Why, then, should a mean field approximation of the electron-electron interaction be tolerable? Why would there not be a huge Coulomb contribution to the energy when the electrons get close to each other? Well, the Coulomb potential itself comes to the rescue. Precisely because it is so large and repulsive, each electron actually has a configuration hole around it that no other electron will come too near towards. That is, if you find an electron precisely localised at some point, you will not find another electron too close to there. This shows up as a correlation in the position of electrons, in a way that no "independent particle" approximation can properly capture. I mean this on top of the exchange symmetry/interaction. In more detail, a single Slater determinant may capture the exchange interaction of electrons in an atom, but it will not ever be able to capture correlation, by definition. This is because Slater determinants start by assuming that each electron is independently | {
"domain": "physics.stackexchange",
"id": 95167,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrostatics, solid-state-physics",
"url": null
} |
asymptotics, runtime-analysis, recurrence-relation
First off, we see that split will be equal to one third the length of the input list, rounded down (we assume // means integer division). We then have three recursive function invocations. To get the input size for these recursive calls, we have to see how big the lists we're passing are. All three are slices of the original input list; we can determine the size of the lists being passed to recursive calls by computing the indices used to determine slices. Observations:
The first and third slices use the same indices.
0 .. len(lst) - 1 is the entire list, size n.
split is one third the list size, equal to n/3.
The second slice uses split .. len(lst) - 1; to get the size of this slice, we can use simple subtraction of the size of the smaller interval (0..split) from the bigger interval (0..len(lst) - 1): n - n/3 = 2/3 n.
The first and third slices work similarly: if we take a slice of size n and stop it n/3 indices earlier, we get n - n/3 = 2/3 n. | {
"domain": "cs.stackexchange",
"id": 3419,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "asymptotics, runtime-analysis, recurrence-relation",
"url": null
} |
quantum-mechanics, quantum-spin, quantum-interpretations
In the hidden variable interpretation the particle should carry a very large number (potentially infinite) of labels, yielding the results of each following measure.
I found it completely innatural to assign to one particle an infinite string of possible future measurement results: It seems to me enough to rule out the hidden variable explanation. Am I wrong? You assume the spin projections have to be among those hidden variables. Bohmian mechanics is an explicit example showing that this is not necessary: with just the position of the particle as hidden variable, and then incorporating the coupling of the spin with the magnetic field in Schrödinger equation as usual, Bohmian mechanics perfectly predict successive Stern-Gerlach measurements, as explained in details in [1]. | {
"domain": "physics.stackexchange",
"id": 43883,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, quantum-spin, quantum-interpretations",
"url": null
} |
special-relativity, spacetime, conventions, dirac-matrices, wick-rotation
$$
S_E=\mathrm{i}\int\mathrm{d}^d x e\bar\psi \gamma^m e_m{}^\mu \partial_\mu \psi,
$$
with the vielbein $e_\mu{}^m=\delta_\mu{}^m$, inverse vielbein $e_m{}^\mu$ defined by
$e_m{}^\mu e_\mu{}^n=\delta_m{}^n$ and $e=\det(e_\mu{}^m)$. One can use the vielbein as a free variable to change to a different metric/signature. This approach based on a general change of a vielbein is more flexible than the usual notion of analytic continuation of a time component. We define
$$
\begin{align}
\gamma^\mu&= \gamma^m e_m{}^\mu \tag{2}\\[.75em]
\Rightarrow \{\gamma^\mu,\gamma^\nu\}&= e_m{}^\mu e_n{}^\nu \delta^{\mu\nu}=g^{\mu\nu}\tag{3}
\end{align}
$$
Using $ e_m{}^\mu e_n{}^\nu \delta^{\mu\nu}=g^{\mu\nu}$ one can specify a set of $\{ e_m{}^\mu \}$ to realize a metric with arbitrary signature. To convert from euclidean ($s=0$) to mostly plus ($s=1$) Minkowski signature we can use
$$
e_{m}{}^0=-\mathrm{i}\,\delta_m{}^0, \quad e_{m}{}^k=\delta_{m}^k \quad\text{and}\quad e=\mathrm{i},\tag{4.1}
$$ | {
"domain": "physics.stackexchange",
"id": 87736,
"lm_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, spacetime, conventions, dirac-matrices, wick-rotation",
"url": null
} |
java, beginner, random, serialization
Title: Simple ID Generator Task
Write a program that can generate and manage collections of IDs. The user should determine how long the IDs have to be and what symbols they are composed of.
Design choices made by me
The program functionalities are used via command line arguments
A configuration file determines which scheme the IDs correspond to and where they are to be stored.
It should be possible to manage several ID collections if the user wants it.
Misuse should be intercepted, but the program does not have to be foolproof. | {
"domain": "codereview.stackexchange",
"id": 43671,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, beginner, random, serialization",
"url": null
} |
c++, performance, object-oriented, graph, hash-map
Now you can set them and walk them back if you found the right one
size_t findShortestLink(const std::string& name1, const std::string& name2) {
actor* firstActor = (*std::find(actors.begin(), actors.get(), [&name1](auto&& act) { return act.get()->name == name1;}).get();
std::queue<actor*> queue;
queue.push(firstActor);
std::unordered_set<actor*> visited;
visited.insert(firstActor);
while(!queue.empty()) {
actor* current = queue.front();
queue.pop();
for (auto&& partner : partners) {
if (visited.count(partner) == 0) {
partner->predecessor = current;
if (partner->name == name2) {
std::queue<actor*> emptyQueue;
std::swap(queue, emptyQueue);
size_t result = 0;
while (partner->predecessor != firstActor) {
result++;
partner = partner->predecessor;
} | {
"domain": "codereview.stackexchange",
"id": 25715,
"lm_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, object-oriented, graph, hash-map",
"url": null
} |
skid-steer, gazebo-model, gazebo-plugin, sdformat
Originally posted by ZdenekM with karma: 62 on 2013-11-05
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by Martí Morta - IRI on 2013-11-05:
Thanks I didn't find this, I am going to try it asap :) | {
"domain": "robotics.stackexchange",
"id": 3501,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "skid-steer, gazebo-model, gazebo-plugin, sdformat",
"url": null
} |
electromagnetism, electric-circuits, electric-current, electrical-resistance, voltage
Title: Why is current in a circuit constant if there is a constant electric field? I'm a beginner in E&M, and have just started to learn about current and Ohm's law.
According to this page there is a constant electric field everywhere in a DC circuit pointing against the direction that electrons flow. This is consistent with my textbook and general intuition thus far - a potential difference created by a battery causes charge carriers to flow because of an electric force, which can be represented by having an electric field everywhere in the circuit. | {
"domain": "physics.stackexchange",
"id": 76076,
"lm_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, electric-circuits, electric-current, electrical-resistance, voltage",
"url": null
} |
catkin-make
Originally posted by tomcattiger on ROS Answers with karma: 1 on 2017-03-23
Post score: 0
Original comments
Comment by fettespferd on 2019-01-21:
Hattest du eine Lösung für dein Problem gefunden?
Ich stehe momentan vor dem exakt gleichen Problem und komme nicht weiter :(
Yes, other users have seen this before.
A quick search on this site for the title of your question turns us: http://answers.ros.org/question/257331/python-module-empy-missing-tutorials/ , http://answers.ros.org/question/239285/invoking-make-j4-l4-failed-importerror-no-module-named-em/ and http://answers.ros.org/question/228285/invoking-make-j4-l4-failed-linux-mint/ , all of which describe different causes for this error and possible solutions.
Originally posted by ahendrix with karma: 47576 on 2017-03-24
This answer was ACCEPTED on the original site
Post score: 4 | {
"domain": "robotics.stackexchange",
"id": 27405,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "catkin-make",
"url": null
} |
vbscript
':::::::::::::::::::::::::::::::::::::::::
function lineToWrite()
dim curUser
curUser = createObject("WScript.Network").userName
lineToWrite = curUser & ": " & Now() '& vbCrLf
end function
I like this function and the abstraction it provides, but you are calling it over and over and over to get the same string. Declare a variable and call this function once. Also, as an option, It would be completely acceptable to remove the curUser variable and one line this function.
Function LineToWrite()
LineToWrite = CreateObject("WScript.Network").userName & ": " & Now()
End Function
Also, you should remove dead, commented out code. It serves no purpose but to clutter things.
One last thing. Your error messages kind of suck. It's one thing to abbreviate variable names, but it's an entire other matter to abbreviate error/log messages. | {
"domain": "codereview.stackexchange",
"id": 11592,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vbscript",
"url": null
} |
c++, c++11, linked-list, pointers
The problem is that we create two nodes but only use one unless the list is empty. I'd fix that like this:
void append(int new_data) { // O(1)
auto n{new Node(new_data)};
if(_head == nullptr) {
_head = _tail = n;
} else {
_tail->next = n;
_tail = _tail->next;
}
} | {
"domain": "codereview.stackexchange",
"id": 33793,
"lm_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, linked-list, pointers",
"url": null
} |
condensed-matter, superconductivity, topology, fermi-liquids
Title: Volovik's argument and superconductivity In Volovik's book he describes the Fermi surface as a vortex in energy+momentum space. Due to a winding number the Fermi surface is topologically protected.
I don't understand how the above topological protection is compatible with superconductivity, which destroys the Fermi surface even for small attractive interactions. If it is a topological phase transition, there should be some type of gap closing, e.g. Fermi surface shrinking to points, which is seemingly not the case. Or is it that the pole in the Green's function still exists in a superconductor, although then I am wondering what Volovik's argument really says about the Fermi surface. | {
"domain": "physics.stackexchange",
"id": 43296,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "condensed-matter, superconductivity, topology, fermi-liquids",
"url": null
} |
quantum-mechanics, spectroscopy
Title: Non Adiabatic Coupling Term in Born Oppenheimer Approximation I am attaching a section from a text book (Conical Intersections Electronic Structure, dynamics and spectroscopy: David R Yarkony & Horst Koppel). | {
"domain": "physics.stackexchange",
"id": 13556,
"lm_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, spectroscopy",
"url": null
} |
graphs, computability, satisfiability, 2-sat
My first intuition was a proof by contradiction however I failed to construct a general enough assumption. I then tried to show that if the truth assignment means that l1 and l2 are true, then by building a cycle connecting all variables, the assignment is only valid when those edges exist. However this doesn't seem rigorous enough since I'm not properly understanding why the cycle requires the complement of x to exist.
Currently I build G by adding a vertex for every variable x and it's complement as well. Then for each clause (a v b) I add an edge between not a and b and not b and a.
However I fail to see how this would specifically form a cycle.
Working of the sipser textbook. Here is a proof sketch. We will show that the given formula is unsatisfiable iff there exists a cycle containing both $x$ and $\lnot x$, for some variable $x$. | {
"domain": "cs.stackexchange",
"id": 15681,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "graphs, computability, satisfiability, 2-sat",
"url": null
} |
java, tic-tac-toe
Before I ask for a code review: I had to open a new repository on github, because I wanted to continue working on Eclipse but I couldn't manage to import the old repository.
I currently have 19 classes, so I imagine that this post is going to be rather long. If you want to view the classes on github, here is the link: https://github.com/kebiro/TicTacToe/tree/GameMenu/TicTacToe/src/game
Overall, I believe that I managed to solve some parts of my design in a good way, others in a not-so-good way. I'm especially unsure whether my Input/Output classes and my GameMenu are properly designed. Board still needs some proper refactoring as well.
I've tried to keep future ideas in mind whereever I could, but I'm not sure if I've succeeded in keeping my design properly extendable.
Anyway, here is the code (some classes are excluded, like Main.java):
Board, Move, Position
package game; | {
"domain": "codereview.stackexchange",
"id": 20996,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, tic-tac-toe",
"url": null
} |
rospy, transform
Originally posted by bennypi on ROS Answers with karma: 48 on 2017-08-08
Post score: 0
Original comments
Comment by gvdhoorn on 2017-08-08:
I can't be sure, but this sounds like something that could happen with a mixed TF1 / TF2 setup (static transforms, etc). perhaps @tfoote can help here?
Comment by bennypi on 2017-08-08:
You could be right because tf2 can do the transformation. I've added this to the question.
Comment by gvdhoorn on 2017-08-08:
I don't want to suggest using some workaround when it's not necessary, but can you see whether setting use_tf_static (private param of robot_state_publisher) to False makes things work again? see wiki/robot_state_publisher.
The python implementation of tf was unable to receive static transforms. This has been resolved in 1.11.9 which is in testing and will become available in the next sync.
Changelog Specifically #149 #134 | {
"domain": "robotics.stackexchange",
"id": 28551,
"lm_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, transform",
"url": null
} |
c#, multithreading, simulation
//Run the customers
customers.ForEach( x => Task.Run( () => x.MakePayments() ) );
// Prevents program from closing so that user may read output.
while ( Teller.Instance.IsWorking )
Thread.Sleep( 100 );
Console.WriteLine( "The Bank is now closed. Press any key to exit." );
Console.ReadKey();
}
}
public static class RandomHelper
{
private static readonly Random _random = new Random();
public static Int32 Next( Int32 start, Int32 end )
{
return _random.Next( start, end );
}
}
/// <summary>
/// Class representing a teller.
/// </summary>
public sealed class Teller
{
#region Fields
/// <summary>
/// Lazy used to create a teller.
/// </summary>
private static readonly Lazy<Teller> Lazy = new Lazy<Teller>( () => new Teller() ); | {
"domain": "codereview.stackexchange",
"id": 12849,
"lm_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, simulation",
"url": null
} |
quantum-field-theory, standard-model, bosons, gauge
You should actually look at the way they transform under $CP$ (I am neglecting the small CP-violating contributions form the CKM matrix). The $Z$ and the photon transform in the same way under $CP$ (think about the fact that they result from a mixing that doesn't break CP since the Higgs boson is CP neutral), that is they are neutral ``polar'' vectors, meaning that under CP: $A_\mu(t,x)\rightarrow -\eta_{\mu\mu}A_\mu(t,-x)$ (indexes not summed) with $\eta_{\mu\mu}=\mathrm{diag}(1,-1,-1,-1)$. With this transformation the SM lagrangian is CP invariant (again, neglecting the small sources of CP violations).
If you want to discuss the case where CP is violated, you need to consider CPT as the discrete symmetry. CPT is certainly conserved under the usual conditions (i.e. Lorentz invariance, microcausality, locality, ...). Under CPT they transform as $i\partial_\mu$ (remember that T is anti-unitary) and therefore $CPT: A_\mu(t,x)\rightarrow \eta_{\mu\mu}A_\mu(-t,x)$. | {
"domain": "physics.stackexchange",
"id": 16812,
"lm_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, standard-model, bosons, gauge",
"url": null
} |
electromagnetism, acoustics, doppler-effect
I perfectly understand why the frequency is different in both cases (1.5 and 2 times): if you draw lines representing the crest of the cos wave emitted at a given frequency, you will see that the lines comes closer following the number I gave previously in the two cases.
What I don't understand is the Doppler effect for electromagnetic waves (like the light). Apparently the Doppler effect is there independent of who is moving and the only thing that matter is the relative velocity between the source and the receiver. I here only speak of non-relativistic Doppler effect so the relative speed is small with respect to the speed of light.
It can explain the red-shift of the star light due to the expansion of the universe.
Why is it only the relative speed that matter here? I read that it was because in the sound cases, the sound propagate in a medium (air) and that the light propagate in nothing ... but I do not see how it explains it ?
Thank you for any help ! | {
"domain": "physics.stackexchange",
"id": 9616,
"lm_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, acoustics, doppler-effect",
"url": null
} |
c#, beginner, calculator
The final code looks like this
Program.cs
using System;
namespace CalculatorTest
{
class Program
{
private static void Main()
{
while (true)
{
Console.WriteLine("Enter a mathematical expression, please");
string userInput = Console.ReadLine();
Calculator.ErrorCode stdout = Calculator.ParseTwoNumberOperation(userInput, out double result);
if (stdout == Calculator.ErrorCode.Success)
{
Console.WriteLine(result);
}
else
{
Console.Error.WriteLine("Error: " + stdout + "\t" + userInput);
}
}
}
}
}
Calculator.cs
using System;
using System.Text.RegularExpressions; | {
"domain": "codereview.stackexchange",
"id": 30662,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, beginner, calculator",
"url": null
} |
gas-laws, units
(0.45\mathrm{m} + x) ) $$ eliminating $A^2$ and simplifying $$ \Delta P ( (0.45\mathrm{m})^2 - x^2) = -2P_0 x(0.45\mathrm{m}) $$ or in quadratic form $$ x^2 - 2\frac{P_0}{\Delta P}(0.45\mathrm{m})x - (0.45\mathrm{m})^2 = 0 $$ which would be $$ x^2 - (6.84\mathrm{m})x - 0.2025\mathrm{m}^2 = 0 $$ You can take it from there. | {
"domain": "chemistry.stackexchange",
"id": 4286,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "gas-laws, units",
"url": null
} |
of code create arrays of the independent (X) and dependent (y) variables, respectively. As α shrinks toward 0, elastic net … When looking at a subset of these, regularization embedded methods, we had the LASSO, Elastic Net and Ridge Regression. Say hello to Elastic Net Regularization (Zou & Hastie, 2005). Why is ElasticNet result actually worse than the other two? Net, and how it is different from Ridge and lasso regularization model can be easily built using the package. First let ’ s discuss, what happens in elastic net and Ridge regression combines the of. Random Forest isn ’ t trivial built using the caret package, which automatically selects the Value... Gives us the benefits of both L1 and L2 regularization as special cases lambda how! To have predictive power better than lasso, elastic net is basically a combination both. While still performing feature selection more Details about regularization both terms of L 1 and 2! And elastic net is a method that includes both lasso and | {
"domain": "ranchimunicipal.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9838471647042429,
"lm_q1q2_score": 0.8599584095494789,
"lm_q2_score": 0.8740772351648677,
"openwebmath_perplexity": 1591.3799950309767,
"openwebmath_score": 0.7856265306472778,
"tags": null,
"url": "http://pmay.ranchimunicipal.com/apk/waskesiu-weather-kmcyu/article.php?page=elastic-net-vs-lasso-d8d828"
} |
# Formula and proof for the sum of floor and ceiling numbers
For any real number $a$ and a positive integer $n$, there is a concise formula to calculate
$$a + 2a + 3a + \cdots + na = \frac{n(n+1)}{2} a.$$
The proof for the same is given in Mathematical literature.
Is there any such formula to calculate:
$$\lfloor a\rfloor + \lfloor 2a\rfloor + \lfloor 3a\rfloor + \cdots + \lfloor na\rfloor$$
and
$$\lceil a\rceil + \lceil 2a\rceil + \lceil 3a\rceil + \cdots + \lceil na\rceil$$
for any whole number $n$ and $0 < a < 1$ ? Also, provide the proof for the same. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357567351324,
"lm_q1q2_score": 0.8115607293547226,
"lm_q2_score": 0.8289388040954684,
"openwebmath_perplexity": 304.9833365284996,
"openwebmath_score": 0.9605711102485657,
"tags": null,
"url": "http://math.stackexchange.com/questions/207604/formula-and-proof-for-the-sum-of-floor-and-ceiling-numbers?answertab=active"
} |
inorganic-chemistry, reaction-mechanism, redox
Oxygen, where's that from?
I did the classic match experiment; it did indeed burn more vigorously near the reaction mixture.
$$\ce{HMnO4_{(aq)} -> MnO2_{(s)} + 3 O2_{(g)} + 2 H2O_{(l,g)}}$$
$$\ce{2 MnO4^2- -> MnO4^3- + MnO2_{(s)} + O2_{(g)}}$$
$$\ce{2 Mn2O7_{(l)} -> 4 MnO2_{(s)} + 3 O2_{(g)}}$$
I think you get the idea
Sorry I could not be of more assistance. The mixture is indeed complex with multiple processes happening in parallel. (This is actually the case with every reaction.) It should at least point you in some direction.
Extra
I was a bit loosey–goosey with the ionic equations; you should not do that ;). In my opinion, it made the process more clear.
One might also wish to consider $\ce{Mn2MnO4}$ or $\ce{Mn3O4}$ which, I believe, are also brown. | {
"domain": "chemistry.stackexchange",
"id": 5735,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "inorganic-chemistry, reaction-mechanism, redox",
"url": null
} |
motor, control, can
Title: What's the difference between CAN's Motor Max Velocity vs. Profile Max Velocity? CAN301/402 provides Max Motor Speed (0x6080,0x00) and Max Profile Velocity (0x607F,0x00). In profiled motions, the maximum speed is limited to the lower of these two values. In non-profiled motions, the maximum speed is limited to Max Motor Speed.
What is the intended purpose of Max Profile Velocity, rather than only providing Max Motor Speed and using that everywhere instead? Max Motor Speed is used to protect the motor against being driven over it's maximum speed. The units for this are RPM.
Max Profile Velocity is given in same units as the profile velocity and applies only to profile position mode.
(Source CiA DSP 402 V2.0)
While the standard doesn't expand on these, the way I see it is that the first number is something you set up based on the motor's data sheet to prevent damaging the motor. The units are set up that way. | {
"domain": "robotics.stackexchange",
"id": 353,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "motor, control, can",
"url": null
} |
c#, object-oriented
There is a "conceptual meltdown" in having CalcSupervisorPremium(...) as a member of the BaseSalaryCalculator
because it is a specialization of the common salary calculation - related only to certain employee types.
I would create an abstract class SupervisorSalaryCalculator : BaseSalaryCalculator as base class for ManagerSalaryCalculator and SalesmanSalaryCalculator
and because the two sub classes are almost identical except for the values of their members you can let the new base class do the calculations:
public abstract class SupervisorSalaryCalculator : BaseSalaryCalculator
{
public override string EmployeeGroup { get; }
private int PremiumPercentForEachYearExp { get; }
private int MaxExperiencePremiumPercent { get; }
private float SupervisorPremiumPercent { get; } | {
"domain": "codereview.stackexchange",
"id": 32745,
"lm_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",
"url": null
} |
object-oriented, unit-testing, vba, library
DebugTestOutput class module
Option Explicit
Private Const InconclusiveResult As String = "INCONCLUSIVE"
Private Const SuccessResult As String = "PASS"
Private Const FailureResult As String = "FAIL"
Private outcomeStrings As Dictionary
Implements ITestOutput
Private Sub Class_Initialize()
Set outcomeStrings = New Dictionary
outcomeStrings.Add Inconclusive, InconclusiveResult
outcomeStrings.Add Failed, FailureResult
outcomeStrings.Add Succeeded, SuccessResult
End Sub
Private Sub ITestOutput_WriteResult(ByVal name As String, ByVal result As TestResult)
If result.testOutput = vbNullString Then
Debug.Print Framework.Strings.Format("{0:s} {1}: [{2}]", Now, name, outcomeStrings(result.TestOutcome))
Else
Debug.Print Framework.Strings.Format("{0:s} {1}: [{2}] - {3}", Now, name, outcomeStrings(result.TestOutcome), result.testOutput)
End If
End Sub | {
"domain": "codereview.stackexchange",
"id": 9570,
"lm_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, unit-testing, vba, library",
"url": null
} |
c++
class float4 {
public:
float a,b,c,d;
float norm() const{
return sqrt(a*a+b*b+c*c);
}
};
typedef float4 plane;
class sphere {
public:
float3 position;
float radius;
};
float project( const float3 & spherePos, const plane & p){
return std::abs( spherePos.x*p.a + spherePos.y*p.b + spherePos.z*p.c + p.d );
}
bool const collision( const sphere & s, const plane & p){
return project(s.position,p)/p.norm() < s.radius;
}
int main( int argc, char * argv[]){
plane p = {0.0,-1.0,0.0, 2.0 };
sphere s = { {0.0,1.5,0.0}, 1.0 };
if ( collision(s,p) )
std::cout << "Collision detected" << std::endl;
}
The advantage here is that you don't need a normalized plane. The line that bothers me is this:
return abs<float>(dot(p.normal, s_origin) - p_distance) < s.radius; | {
"domain": "codereview.stackexchange",
"id": 1425,
"lm_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
} |
shors-algorithm
Doesn't this imply the existence of the multiverse? How/where could the number be factorized otherwise?
This thread does not answer this question, as 1. the fact that there are still some unknowns doesn't necessarily mean the multiverse theory is wrong, and 2. it doesn't explain how/where the number could be factorized otherwise if not in the so-called "parallel universes". MWI doesn't merely imply Shor's algorithm, it explains it. I don't agree with the assertion that the other interpretations of quantum mechanics simply must have their own interpretation of where the computational resources required for Shor's algorithm are sourced. Because the truth is that MWI interpretation is the only one that seriously provides explanation, and the challenge remains unanswered. | {
"domain": "quantumcomputing.stackexchange",
"id": 5108,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "shors-algorithm",
"url": null
} |
electrostatics, electric-current, charge
Title: The net value of electric current If i have electron moved to the left And another electron moved to the right, will the net current be zero?
Because i read that in some cases such as those involving gases And electrolytes, the current is the result of Flow of both positive And negative charges. Yes, in the situation of electrons moving left and right, the current would be zero. However, typically, we generate current by applying an electric field (through a potential difference), so it would be difficult to get your electrons to move in opposite directions in response to the electric field.
However, you could take a negative and positive charge, and they would move in opposite directions in response to the electric field. | {
"domain": "physics.stackexchange",
"id": 51767,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrostatics, electric-current, charge",
"url": null
} |
javascript, jquery, ajax, form
//Make AJAX request, using the selected value as the GET
$.ajax({url: '../ajax/tenancy_defaults.php?property_id='+selectvalue+'&request=tenancy_tenant_find_fee_type',
success: function(output) {
$('#tenancy_tenant_find_fee_type').html(output);
},
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status + " "+ thrownError);
}});
//Make AJAX request, using the selected value as the GET
$.ajax({url: '../ajax/tenancy_defaults.php?property_id='+selectvalue+'&request=tenancy_management_fee_type',
success: function(output) {
$('#tenancy_management_fee_type').html(output);
},
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status + " "+ thrownError);
}});
//Make AJAX request, using the selected value as the GET
$.ajax({url: '../ajax/tenancy_defaults.php?property_id='+selectvalue+'&request=tenancy_gas',
success: function(output) {
$('#tenancy_gas').html(output);
},
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status + " "+ thrownError);
}}); | {
"domain": "codereview.stackexchange",
"id": 17520,
"lm_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, jquery, ajax, form",
"url": null
} |
java, object-oriented, calculator, swing
a = Double.valueOf(tf.getText());
operator = 3;
tf.setText("×");
} else if (e.getSource().equals(div)) {
a = Double.valueOf(tf.getText());
operator = 4;
tf.setText("÷");
} else if (e.getSource().equals(equal)) {
point = 1;
tf.setText(calcInput(operator, a));
} else {
getInput(e);
}
}
private String calcInput(int operator, double a) {
b = Double.valueOf(tf.getText());
String Result;
switch (operator) {
case 1:
result = a + b;
break;
case 2:
result = a - b;
break;
case 3:
result = a * b;
break;
case 4:
if (b != 0)
result = a / b;
else {
result = 0;
tf.setText("∞");
}
} | {
"domain": "codereview.stackexchange",
"id": 33597,
"lm_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, calculator, swing",
"url": null
} |
statistical-mechanics, computational-physics, simulations
People at school told me that since it is stochastic, I will not be able to tell convergence by looking at how the energy changes over cycle. I should be looking at acceptance rate - I could not tell anything from this either.
I adjusted my displacement step for a system at $300K$ to get an acceptance rate of around $50\%$. But I am still getting fluctuation that does not look minimal to me whatsoever. I ran my simulation for $5000$ and $10000$ cycles but both look just the same.
Can someone enlighten me please? I would start from the very beginning. What the Monte Carlo (MC) algorithm is supposed to do, and what do we mean by the convergence of a simulation. | {
"domain": "physics.stackexchange",
"id": 77137,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statistical-mechanics, computational-physics, simulations",
"url": null
} |
c#, .net
if (headers == null) { return; }
var headerKeys = new[]{
"PROC_HEADER",
"DB_HEADER",
"TEXT_HEADER",
"ALPHA_HEADER",
"TIMEOUT_HEADER",
"FILTER_HEADER",
"PREVIEW_HEADER",
"ANT_HEADER",
"APP_HEADER",
"PAGE_HEADER",
"LOCAL_HEADER",
"CONTEXT_HEADER",
"CHANNEL_HEADER"
};
foreach(var key in headerKeys)
{
headers.TryGetValue(key, out var headerValue); | {
"domain": "codereview.stackexchange",
"id": 38062,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, .net",
"url": null
} |
• (+1) That is how I just did this. Then I looked on MSE to see if it's already been discusses and found this page. Well done my friend! – Mark Viola Apr 23 at 3:36 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9653811571768048,
"lm_q1q2_score": 0.8518792288730577,
"lm_q2_score": 0.8824278602705731,
"openwebmath_perplexity": 1416.1116553532966,
"openwebmath_score": 1.000008463859558,
"tags": null,
"url": "https://math.stackexchange.com/questions/1941888/calculate-int-0-infty-frac-sinx-logxx-mathrm-dx"
} |
rosdep, ros-electric
The install appears to work, then fails at the end:
$ rosdep install art_teleop
Executing script below with cwd=/tmp
{{{
#!/bin/bash
#Packages ['python-pyside.qtcore python-pyside.qtgui libpyside-dev libshiboken-dev shiboken libgenrunner-dev python-qt4 python-qt4-dev python-sip-dev python-qt4-gl']
sudo apt-get install python-pyside.qtcore python-pyside.qtgui libpyside-dev libshiboken-dev shiboken libgenrunner-dev python-qt4 python-qt4-dev python-sip-dev python-qt4-gl
}}} | {
"domain": "robotics.stackexchange",
"id": 8852,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rosdep, ros-electric",
"url": null
} |
ros2
Originally posted by thebyohazard with karma: 3562 on 2020-04-10
This answer was ACCEPTED on the original site
Post score: 2 | {
"domain": "robotics.stackexchange",
"id": 34703,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros2",
"url": null
} |
general-relativity, special-relativity, reference-frames, time, observers
Title: How does the derivative of time with respect to proper time equals gamma? So, I want to really get a deep understanding of everything that goes beneath special relativity. Since I teach myself with books, I have no teacher to ask to which makes things a bit harder most of the times.
Proper time is great, I finally get how it is indeed a clock moving through a given worldline.
I have two questions (which are related to using the proper time to get the 4-Velocity and further 4-vectors...)
If we use (-,+,+,+) metric, how can we avoid the imaginary numbers when:
$$
d\tau=\sqrt{-ds^2}=idt; \text{When the particle is at rest}
$$
And, how is this result obtained:
$$
\frac{dt}{d\tau}=\gamma
$$
Thanks! The two questions are related.
First, proper time is defined as the spacetime interval between timelike separated events.
$$d\tau = \sqrt{-ds^2}$$
If the interval is timelike, then $ds^2<0$. This means $-ds^2$ is positive and the proper time is a real number.
The spacetime interval is | {
"domain": "physics.stackexchange",
"id": 75867,
"lm_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, reference-frames, time, observers",
"url": null
} |
population-genetics
Immigrants yield to higher effective population size and therefore higher genetic diversity. They will also affect the site frequency spectrum and I would expect that if the migrants are numerous enough, they would yield to positive Tajima's D.
Therefore, unidirectional migration will definitely yield to differences in patterns of genetic variance among populations (that can be measured by any summary statistic of the site frequency spectrum).
Existing methods for detecting directional selection
I have never had to do such inference so I am not able to do a good review of the existing technics. | {
"domain": "biology.stackexchange",
"id": 5959,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "population-genetics",
"url": null
} |
# Are finite dimensional normed linear spaces locally compact?
Let $(X,\| \cdot \|)$ be a finite dimensional normed linear space. Can we say that $(X,\| \cdot \|)$ is a locally compact normed linear space?
Thank you very much.
• In what? I know that it is true for locally compact normed linear spaces. – Dbchatto67 Aug 19 '18 at 7:31
• These are just the $\Bbb R^n$ with the usual topology. – Lord Shark the Unknown Aug 19 '18 at 7:38 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9881308782546027,
"lm_q1q2_score": 0.8078705786115415,
"lm_q2_score": 0.8175744695262775,
"openwebmath_perplexity": 97.314536700437,
"openwebmath_score": 0.9146032333374023,
"tags": null,
"url": "https://math.stackexchange.com/questions/2887454/are-finite-dimensional-normed-linear-spaces-locally-compact"
} |
php
Would have to agree with Corbin about this looking more like a dispatcher/router. These are okay, just letting you know that what you have isn't a controller.
Would suggest moving the send() method out of the switch. It doesn't really appear to change much and is just causing you to rewrite code. Assign whatever paramters you need to in the switch and just call the method outside of it. To prevent the default case from doing this, since you mentioned wanting to use try/catch, I would throw an error there instead of using echo. | {
"domain": "codereview.stackexchange",
"id": 1928,
"lm_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",
"url": null
} |
homework-and-exercises, electromagnetism, magnetic-fields
I assumed that when a compass is near a an electromagnetic field the compass will always be attracted to the field. So the compass would turn 90 degrees? I also know that it can be solved vectorially but I'm not sure how I would get to this. I have calculated the B-Field of the wire as $B=2\mu_02/2\pi(0.05)=2.55\ 10^{-6}\ \mathrm T$. And I sketched the diagram of the wire using the right hand rule with the wire coming up out of the page. I also thought about using trig for the B-fields $\cos^{-1}$(B-field of earth/B-field of wire) but that wouldn't work. By the way, I cant stress this enough this is not homework we don't have homework in my course we only have exams! So,
We have freedom to set up the problem. So I said the magnetic field on the x axis is the earths magnetic field. | {
"domain": "physics.stackexchange",
"id": 29861,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electromagnetism, magnetic-fields",
"url": null
} |
organic-chemistry, reaction-mechanism, amines, salt
An aromatic amine can attack the electrophilic nitrosonium ion to form a nitrosoamine $(\ce{Ar-NH-N=O})$.
The nitrosoamine can undergo a proton transfer (tautomerism) to give corresponding imminol $(\ce{Ar-N=N-OH})$.
Under acidic conditions, this $\ce{N=N-OH}$ group can be protonated and left as a water molecule to give the diazonium salt, which is resonance stabilized $(\ce{(Ar-N#N)+Cl-})$. | {
"domain": "chemistry.stackexchange",
"id": 14388,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, reaction-mechanism, amines, salt",
"url": null
} |
reference-request, human-computing, agent-based-computing
My question is, all of these systems clearly reflect years of cumulative efforts, and rather than jumping in to the deep end, I'd like to ease into this world of research a bit more slowly. Is there a canonical reference in this area that might be able to provide a more general overview of all of these levels of organization, and where the abstractions stop and the implementations begin?
Fox J., Glasspool, D., Modgil, S. A Canonical Agent Model for Healthcare Applications. IEEE Intelligent Systems, 21(6), 21-28, 2006. If you want to approach this field from a computer science perspective then the standard reference I would recommend is:
Yoav Shoham and Kevin Leyton-Brown [2009], "Multiagent systems: algorithmic, game-theoretic, and logical foundations", Cambridge University press. | {
"domain": "cs.stackexchange",
"id": 355,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "reference-request, human-computing, agent-based-computing",
"url": null
} |
ros, kinect, turtlebot, network
Originally posted by axel0143 on ROS Answers with karma: 1 on 2016-12-05
Post score: 0
Sorry I meant to say ROS_IP not ROS_HOSTNAME -
Set ROS_IP=192.168.1.150 on the Desktop PC and on Laptop
Mark
Originally posted by MarkyMark2012 with karma: 1834 on 2016-12-06
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by axel0143 on 2016-12-06:
With:
Desktop PC:
export ROS_MASTER_URI=http://192.168.1.150:11311
export ROS_HOSTNAME=192.168.1.150
Laptop PC:
export ROS_MASTER_URI=http://localhost:11311
export ROS_HOSTNAME=192.168.1.150
Rostopic list from the laptop gives "unable to communicate with master" and desktop gives no response.
Comment by axel0143 on 2016-12-06:
Desktop gives no response with those .bashrc settings no matter whether i run rostopic list or roscore. And thank you for responding! | {
"domain": "robotics.stackexchange",
"id": 26401,
"lm_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, kinect, turtlebot, network",
"url": null
} |
special-relativity, spacetime, coordinate-systems, inertial-frames
UPDATE:
Concerning the passive transformation...
the events are left unchanged in spacetime.
But now the passive Lorentz boost provides the coordinates
of an event in another inertial frame.
In this case, your event B is the event simultaneous with P, according to the moving inertial observer.
The diagram below is for $v=(3/5)c$.
So, the transformation would assign the event $P$ with red-coordinates $(t=1,x=0)$
with blue coordinates $(t=1.25, x=-0.75)$.
The passive transformation identifies event B as the event the moving inertial observer says is simultaneous with P
and calculates the blue time-coordinate of P to be equal to the blue time-coordinate of B as $t=1.25$.
(The transformation will also identify an event (not shown in the image) on the moving x-axis (at blue time t=0) that is "at the same place as P" according to blue. The spatial-coordinate of that event is $x=-0.75$.) | {
"domain": "physics.stackexchange",
"id": 93486,
"lm_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, spacetime, coordinate-systems, inertial-frames",
"url": null
} |
java, design-patterns, iterator
}
Questions:
Why should I not use Object instead of E/template everywhere ?
How do I make an iterator for a binary tree.
I assume apart from the above, I would have to implement a traversal algorithm and try to find if the next "traversal" successor exist? I would write an iterator for arrays that way:
import java.util.Iterator;
import java.util.NoSuchElementException;
public class ArrayIterator<E> implements Iterator<E> {
private final E[] arr;
private int currentIndex = 0;
public ArrayIterator(E... arr) {
if(arr == null) {
throw new IllegalArgumentException("Array is null");
}
this.arr = arr;
}
public boolean hasNext() {
return currentIndex < arr.length;
}
public E next() {
if (! hasNext()) {
throw new NoSuchElementException();
}
return arr[currentIndex++];
}
public void remove() {
throw new UnsupportedOperationException("Not supported.");
} | {
"domain": "codereview.stackexchange",
"id": 402,
"lm_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, design-patterns, iterator",
"url": null
} |
-
It seems this operator works on binomial convolution like a derivative on a product. – Anixx Oct 2 '13 at 8:07
Exactly @Anixx, the above would be the analogous to Leibnitz derivation rule for the shift $S$ under this convolution product, this surprised me! One can use this to solve linear recurrences very much like linear ODEs: by characteristic roots or by the annihilator method, which was what I was I looking for when I found this. – Lucas Seco Oct 2 '13 at 14:45
I wrote a paper a few years ago that uses finite differences to evaluate binomial sums. Since the finite difference is $S(a_n) - a_n$, some of the ideas in there are related to your observation here. In case you're interested, the paper is here. – Mike Spivey Oct 2 '13 at 17:32 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.975576912786245,
"lm_q1q2_score": 0.8086935655722838,
"lm_q2_score": 0.8289388104343892,
"openwebmath_perplexity": 452.79469181142014,
"openwebmath_score": 0.9081944227218628,
"tags": null,
"url": "http://math.stackexchange.com/questions/8713/how-this-operation-is-called/8716"
} |
periodic-table, elements
Link to a wide version of Periodic table of Elements so you can see what I am talking about.
http://en.wikipedia.org/wiki/Template:Periodic_table_%28wide_large%29 I suppose IUPAC hasn't bothered with group numbers for the lanthanides/actinides quite yet because there would only be two elements for each group, and because there are few vertical similarities among the f-block elements. The entire row of lanthanides behaves very similarly due to the 4f orbitals being anomalously compact and not being available for bonding or ionization. The first half of the actinides is quite different to the lanthanides, as the 5f orbitals there can actually participate in chemical interactions, though the second half becomes more similar as the 5f orbitals are once again strongly trapped to the atom, this time by the very high effective nuclear charge. | {
"domain": "chemistry.stackexchange",
"id": 732,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "periodic-table, elements",
"url": null
} |
arrangements the elements can take (where N is the number of elements in the range). Enter the pool of numbers you would like to pick the numbers from. A permutation, also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S itself. You have fewer combinations than permutations. Another way of looking at this question is by drawing 3 boxes. A permutation is an ordered arrangement. Here you will get program for permutation of string in C and C++. With the software you can have up to 26 letters of any number of ways up to 26 for the combinations. (b) If clock-wise and anti-clock-wise orders are taken as not different, then total number of circular-permutations is given by (n-1)!/2! Proof (a): (a) Let’s consider that 4 persons A,B,C, and D are sitting around a round table. We can either use reasoning to solve these types of permutation problems or we can use the permutation formula. The number of | {
"domain": "madzuli.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9719924826392581,
"lm_q1q2_score": 0.8078647945161651,
"lm_q2_score": 0.8311430478583168,
"openwebmath_perplexity": 563.5830429954628,
"openwebmath_score": 0.568350076675415,
"tags": null,
"url": "http://cxmi.madzuli.it/c-program-for-permutation-of-numbers.html"
} |
You can set things up so that you integrate with respect to $x$ or you can set things up so that you integrate with respect to $y$. It's your pick! For each solution, you should draw the picture that goes with that solution.
With respect to $x$: Look at the line that passes through the origin and the point $(5,10)$. Rotate the region below this line, above the $x$-axis, from $x=0$ to $x=5$, about the $x$-axis. This will generate a cone with base radius $10$ and height $5$. The main axis of this cone is along the $x$-axis. Kind of a sleeping cone.
Take a slice of width "$dx$" at $x$, perpendicular to the $x$-axis. The ordinary name for this would be a vertical slice. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.992767234698562,
"lm_q1q2_score": 0.8336603729502325,
"lm_q2_score": 0.8397339716830605,
"openwebmath_perplexity": 171.9066989613472,
"openwebmath_score": 0.939029335975647,
"tags": null,
"url": "http://math.stackexchange.com/questions/82259/finding-volume-of-a-cone-through-integration"
} |
# Weird probability question - Grapes & olives
Does anyone know how to solve this?
"A basket has 3 grapes and 2 olives. If two were taken out and random, what is the probability of picking both olives?"
-My first thought is that the total number of possible outcomes would be 3 grapes(G) + 2 olives(O) = 5, but once I start writing out the possible outcomes in a chart, it gets way more complicated.
Eg. -Grape 1: (G1,G2) (G1,G3) (G1,O1) (G1,O2) -Grape 2: (G2,G1) (G2,G3) (G2,O1) (G2,O2) ...etc. All the way through grape 3, olive 1 & olive 2.
The part that keeps confusing me, is where I get reoccurring picks, (G1,G2) or (G2,G1). Should I even be labelling each individual grape? Or just count them as 3 grapes in general? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109485172559,
"lm_q1q2_score": 0.8227933285941876,
"lm_q2_score": 0.8354835309589073,
"openwebmath_perplexity": 345.36031662728385,
"openwebmath_score": 0.7364692687988281,
"tags": null,
"url": "https://math.stackexchange.com/questions/1489934/weird-probability-question-grapes-olives?noredirect=1"
} |
# Ridge Regression Example | {
"domain": "xnwe.pw",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9814534333179649,
"lm_q1q2_score": 0.8113791328453958,
"lm_q2_score": 0.8267117983401363,
"openwebmath_perplexity": 775.6429824887281,
"openwebmath_score": 0.490317165851593,
"tags": null,
"url": "http://onte.xnwe.pw/ridge-regression-example.html"
} |
• We need to know something about how $\gamma_n$ goes to 0. Is it a sequence of constants? I think that you first have to show $\bar{x}_n^T \gamma_n I \bar{x}_n \rightarrow_p 0$ which I think is a result of Slutsky's. Then I would write $\hat{C}$ as $C + \text{bias}(\hat{C})$. $\bar{x}_n^T C \bar{x}_n$ has a limiting distribution that can be found with $\delta$ method. Lastly you can try to show that $\bar{x}_n^T \text{bias}(\hat{C}) \bar{x}_n$ goes to 0 in probability. Although I'm not sure if that holds... Apr 10 '18 at 13:51
• $\gamma_n$ is a sequence of constants (not random). The sequence can be set to anything that makes the convergence work (if such a sequence exists). I think $\bar{x}_n^\top I \bar{x}_n \stackrel{p}{\to} 0$ is true. I did not follow why we first need this. But let me think about it and the rest more. :)
– wij
Apr 10 '18 at 14:02 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9732407152622596,
"lm_q1q2_score": 0.8001879417103758,
"lm_q2_score": 0.822189134878876,
"openwebmath_perplexity": 320.7320648771792,
"openwebmath_score": 0.965050995349884,
"tags": null,
"url": "https://stats.stackexchange.com/questions/339660/asymptotic-normality-of-a-quadratic-form"
} |
quantum-field-theory, quantum-gravity, hamiltonian-formalism, quantization
I have asked a lot of long questions, so please answer as many as you can and link relevant articles. The overall idea is the following. As the symplectic manifold is affine (in the sense of affine spaces not in the sense of the existence of an affine connection), when you fix a point $O$, the manifold becomes a real vector space equipped with a non-degenerate symplectic form. A quantization procedure is nothing but the assignment of a (Hilbert-) Kahler structure completing the symplectic structure. In this way the real vector space becomes a complex vector space equipped with a Hermitian scalar product and its completion is a Hilbert space where one defines the quantum theory. As I shall prove shortly in the subsequent example, symplectic symmetries becomes unitary symmetries provided the Hilbert-Kahler structure is invariant under the symmetry. In this way time evolution in Hamiltonian description gives rise to a unitary time evolution. | {
"domain": "physics.stackexchange",
"id": 98318,
"lm_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, quantum-gravity, hamiltonian-formalism, quantization",
"url": null
} |
$=EX^2-2(EX)^2+(EX)^2=EX^2-(EX)^2$.
All of the above properties apply to any random variables. The next one is an exception in the sense that it applies only to uncorrelated variables.
Property 9. If variables are uncorrelated, that is $Cov(X,Y)=0$, then from (1) we have $Var(aX + bY)=a^2Var(X)+b^2Var(Y).$ In particular, letting $a=b=1$, we get additivity$Var(X+Y)=Var(X)+Var(Y).$ Recall that the expected value is always additive.
Generalizations$Var(\sum a_iX_i)=\sum a_i^2Var(X_i)$ and $Var(\sum X_i)=\sum Var(X_i)$ if all $X_i$ are uncorrelated.
Among my posts, where properties of variance are used, I counted 12 so far.
### 19 Responses for "Properties of variance"
1. […] sizes. The modern explanation is different: the t statistic arises from replacing the unknown population variance by its estimator, the sample variance, and it works regardless of the sample size. If we take a […] | {
"domain": "raisingthebar.nl",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9943580906640098,
"lm_q1q2_score": 0.8152675698591155,
"lm_q2_score": 0.8198933337131076,
"openwebmath_perplexity": 923.7454368832418,
"openwebmath_score": 0.9458794593811035,
"tags": null,
"url": "http://raisingthebar.nl/2016/10/25/properties-of-variance/"
} |
physical-chemistry, kinetics
Title: Using the quasi-steady assumption for reaction-diffusion equations I have a question regarding an equation for changes in chemical concentration. The chemical concentration we are looking at changes due to diffusion, decay and production of the chemical. Since the diffusion happens so much faster than the other two, it is given that we can you a so-called quasi-steady assumption. This then gives the equation:
$$D \nabla^2c-a \cdot c+b\cdot c=0$$
where $a$ and $b$ are rates of decay and production, respectively. $c$ is the chemical concentration and D is the diffusion coefficient. | {
"domain": "chemistry.stackexchange",
"id": 7297,
"lm_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, kinetics",
"url": null
} |
python, performance, beginner, hash-map, pyqt
import time
import types
import json
import sys
reload(sys)
sys.setdefaultencoding('utf8')
from datetime import datetime
import collections
import operator
import sip
sip.setapi('QVariant', 2)
goods_data = {"2015" :
{
"09" : {
"01" : {
"1" : {
"name" : "Red apples", "price" : "10.01", "category" : "Food and Grocery | Fruit and Vegetables | Fruit | Apples"
},
"2" : {
"name" : "Green apples", "price" : "10.99", "category" : "Food and Grocery | Fruit and Vegetables | Fruit | Apples"
}
},
"15" : {
"1" :
{
"name" : "Blue apples", "price" : "10.01", "category" : "Food and Grocery | Fruit and Vegetables | Fruit | Apples"
},
"2" : {
"name" : "Black apples", "price" : "10.99", "category" : "Food and Grocery | Fruit and Vegetables | Fruit | Apples"
}}
}, | {
"domain": "codereview.stackexchange",
"id": 16887,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, beginner, hash-map, pyqt",
"url": null
} |
haskell, recursion, random
There are many algorithms to generate random unique values.... The unique part complicates things a bit, and depending on your circumstances, different algorithms work better. I will discuss those cases later in this answer, but for now I chose the same algorithm that you used in your answer.
Because Haskell is lazy, adding another function filter in a bunch of composed functions barely takes a speed, memory or latancy performance hit. Data will flow through the functions from right to left as it is generated, you will start to see results even before all the data has started to flow into the pipeline. In this way, Haskell function composition is more like Unix pipe chaining than anything else.
In fact breaking things apart like this is my preferred way to do things. By now I might have more code than if I wrote it all in one function, but each of these are simple, easy to debug tools that you could imagine reusing. | {
"domain": "codereview.stackexchange",
"id": 5232,
"lm_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, recursion, random",
"url": null
} |
c++, simulation
component =
subcircuit->m_component_map[component_name_components[1]];
} else {
component = m_component_map[component_name];
}
if (component == nullptr) {
throw std::invalid_argument{
"The target component is not present in the circuit."
};
}
return component;
}
bool isDoubleInputPinComponent(AbstractCircuitComponent* component) {
return dynamic_cast<AbstractDoubleInputPinCircuitComponent*>
(component) != nullptr;
}
bool isSingleInputPinComponent(AbstractCircuitComponent* component) {
return dynamic_cast<AbstractSingleInputPinCircuitComponent*>
(component) != nullptr;
} | {
"domain": "codereview.stackexchange",
"id": 27816,
"lm_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++, simulation",
"url": null
} |
quantum-mechanics, hilbert-space, operators, heisenberg-uncertainty-principle, observables
$\langle M \rangle = \langle v|M|v\rangle$ which is an inner product and thus a value and not a matrix. How can you subtract a value from an operator/matrix?
Edit: I now see that $\langle C \rangle$ is $\langle C \rangle 1$, but am still confused about how this substitution gets us from the first inequality to the 2nd inequality. I'll write down the whole calculation for completion. Firstly we define
$$A = C-\langle C\rangle \qquad B = D-\langle D \rangle$$
We firstly evaluate the following
$$\frac{\langle v|A^2|v\rangle}{\langle v | v \rangle} = \frac{\langle v|C^2-2C\langle C\rangle+\langle C\rangle^2|v\rangle}{\langle v | v \rangle} = \frac{\langle v|C^2|v\rangle}{\langle v | v \rangle}-2\langle C\rangle\frac{\langle v|C|v\rangle}{\langle v | v \rangle}+\left(\frac{\langle v|C|v\rangle}{\langle v | v \rangle} \right)^2\\ | {
"domain": "physics.stackexchange",
"id": 65662,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, hilbert-space, operators, heisenberg-uncertainty-principle, observables",
"url": null
} |
• Case 2: $$a\geqslant 1\geqslant b\geqslant c\geqslant d\geqslant 0$$. If $$ab\geqslant 1$$, we might proceed as in the next case. So we will work with $$ab<1$$. Thus \begin{align*}3+abcd-(a+b+c+d)&=(1-a)(1-b)+(1-c)(1-d)+(1-ab)(1-cd)\\&\geqslant \underbrace{(1-a)}_{<0}(1-b)+(1-c)(1-d)\\&\geqslant (1-a)(1-c)+(1-c)(1-d)\\&=(1-c)(2-(a+d))\geqslant 0 \end{align*} Where the last inequality follows from the lemma.
• Case 3: $$a\geqslant b\geqslant 1\geqslant c\geqslant d\geqslant 0$$. This implies that \begin{align*}6+2abcd-2(a+b+c+d)&=a^2+b^2+c^2+d^2+3+2abcd-2(a+b+c+d)\\ &=(a-1)^2+(b-1)^2+(c+d-1)^2+2cd(ab-1)\geqslant 0\end{align*} Or, equivalently $$3+abcd\geqslant a+b+c+d$$.
• Case 4: $$a\geqslant b\geqslant c\geqslant 1\geqslant d\geqslant 0$$. As @dezdichado noticed, this case is straightforward, since it forces directly $$a=b=c=1, d=0$$ due to the constraint $$a^2+b^2+c^2+d^2=3$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822877023336244,
"lm_q1q2_score": 0.8076262719040871,
"lm_q2_score": 0.8221891305219504,
"openwebmath_perplexity": 431.1612110000666,
"openwebmath_score": 0.9018518328666687,
"tags": null,
"url": "https://math.stackexchange.com/questions/3990116/proving-abcd3-geq-abcd/3990267"
} |
machine-learning, python, neural-network, deep-learning, cnn
Sorry if the question is naive, I am new to image processing.
Maintaining aspect ratio is important or not.
Yes, it's really important in most cases. As you can read from here, Why does aspect ratio matter? It’s all to do with the relationship of the main subject to the sides of the frame, and the amount of empty space you end up with around the subject. An awareness of the characteristics of the aspect ratio of your particular camera can help you compose better images. It also helps you recognise when cropping to a different aspect ratio will improve the composition of your image.
In deep learning tasks, it depends how you want to feed data to your network. It's better to train your network with real data. Consequently if you are going to face data with standard aspect ratio, you have too keep it during training.
If yes (224,224) is a good choice or should I set it to higher resolution. | {
"domain": "datascience.stackexchange",
"id": 3160,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, python, neural-network, deep-learning, cnn",
"url": null
} |
python, beginner, python-3.x, tic-tac-toe
elif coords[2][0] == "[X]" and coords [2][1] == "[X]" and coords[2][2] == "[X]":
iswon = 'yes'
whowon = 'player'
elif coords[0][0] == "[X]" and coords [1][0] == "[X]" and coords[2][0] == "[X]":
iswon = 'yes'
whowon = 'player'
elif coords[0][1] == "[X]" and coords [1][1] == "[X]" and coords[2][1] == "[X]":
iswon = 'yes'
whowon = 'player'
elif coords[0][2] == "[X]" and coords [1][2] == "[X]" and coords[2][2] == "[X]":
iswon = 'yes'
whowon = 'player'
elif coords[0][0] == "[X]" and coords [1][1] == "[X]" and coords[2][2] == "[X]":
iswon = 'yes'
whowon = 'player'
elif coords[0][2] == "[X]" and coords [1][1] == "[X]" and coords[2][0] == "[X]":
iswon = 'yes'
whowon = 'player'
elif coords[0][0] == "[O]" and coords [0][1] == "[O]" and coords[0][2] == "[O]":
iswon = 'yes'
whowon = 'computer' | {
"domain": "codereview.stackexchange",
"id": 14483,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, python-3.x, tic-tac-toe",
"url": null
} |
file-formats, gff3, gtf, bioawk
I see that there are 10 fields defined for gff parsing.
However, when I look at the pages for gtf and gff in the ensembl website (gff/gtf and gff3), all have 9 fields.
I'm curious about these "filter" and "group" fields. What are they meant for? Are they extracted from some of the columns mentioned in the above pages? I would consider the description there a bug. The filter is actually the strand, strand is the frame, group is the attribute, and attribute does nothing. These are really meant to be the 9 columns.
Edit: There's a bug report related to this.
Edit 2: I've made a pull request to clarify this and fix the aforementioned bug report.
Edit 3: I realized that I never directly answered the title of your question (mea culpa). bioawk itself will work with gff, gff3, or gtf files. It really is just treating them as tab-separated files with named columns (this is surprisingly convenient, since it's a PITA to remember what column does what). | {
"domain": "bioinformatics.stackexchange",
"id": 84,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "file-formats, gff3, gtf, bioawk",
"url": null
} |
raspberry-pi, wheeled-robot
Driving the robot to the source is equivalent to shifting the origin of the state and driving the state of the robot to 0. For unicycle robots, a easy method of control is achieved by controlling a point, which is holonomic, some small distance $l$ away from the center of the the two wheels rather than controlling the unicycle robot directly. To do this, we can derive the following rotation matrix to transform the control law of the robot to the control law of the point: $$\dot{p}=\left[\begin{matrix}\dot{p_x}\\\dot{p_y}\end{matrix}\right]=\left[\begin{matrix}\text{cos}(\theta)&-l\text{sin}(\theta)\\\text{sin}(\theta)&l \text{cos}(\theta)\end{matrix}\right]\left[\begin{matrix}v\\\omega\end{matrix}\right]$$
$\dot{p}$ is the velocity of the point being controlled, and it is decomposed into its $x$ and $y$ components. | {
"domain": "robotics.stackexchange",
"id": 1121,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "raspberry-pi, wheeled-robot",
"url": null
} |
navigation, sensor-fusion, odometry, ros-kinetic, encoders
initial_estimate_covariance: [1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, | {
"domain": "robotics.stackexchange",
"id": 31527,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, sensor-fusion, odometry, ros-kinetic, encoders",
"url": null
} |
-
Wow. I really didn't expect such an in depth explanation but I understand it now, thank you so much for your help! – Traxter Nov 2 '12 at 7:16
You seem to be trying some groups semi-direct stuff. Now, in order to get a non-trivial homomorphism as you want you must map the generator of $\,C_2\,$ to an element of the same order in $\,\operatorname{Aut}(C_{17})\cong C_{16}\,$ .
If $\,C_{17}=\langle\,b\,\rangle\,\,,\,\,C_2=\langle\,a\,\rangle\,$ ,then you can always try the nicest, cutest automorphism of an abelian group: the involution $\,x\to x^{-1}\,$ , thus:
$$f:C_2\to\operatorname{Aut}(C_{17})\,\,,\,f(a)(b):=b^{-1}$$
If you're really going on semidirect products, you can write this as $\,b^a:=b^{-1}\,$
@Traxter: You could also take $$f:C_2\to\text{Aut}(C_{17})\\ x\longmapsto f_x\in \text{Aut}(C_{17})$$ with $f_x(y)=y^x=y^l$ and $(l,17)=1$ and $l^2\equiv 1\; \; \text{mode 2}$. +1 for really the cutest map. – B. S. Nov 2 '12 at 2:20 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9863631675246404,
"lm_q1q2_score": 0.8176347024075341,
"lm_q2_score": 0.8289388019824947,
"openwebmath_perplexity": 86.51636374286957,
"openwebmath_score": 0.9722975492477417,
"tags": null,
"url": "http://math.stackexchange.com/questions/227123/finding-generators-of-an-automorphism-group"
} |
frequency, measurements, error-analysis
What is the correct procedure to find the mean frequency and its standard deviation?
PS: I have empirically noted that point 2 leads to a higher uncertainty. Firstly let's suppose that $\bar{S} \neq 0$ because, in this way, we can define the frequency.
Point 2 is wrong since the standard deviation of the mean related to a set $M$ is calculated via the following expression $\sigma(\bar{M})= \dfrac{\sigma(M)}{\bar{M}} $. Simply you can't propagate the error of the mean since it is not a measurement but a statistics.
In your problem the uncertainty of each measurement is given by the standard deviation related to your set. In point 1, going from periods $S$ to frequencies $S'$, you have redefined the set of measurements and their distribution. In this way the uncertainty is related to the new standard deviation. Essentially point 1 is correct. | {
"domain": "physics.stackexchange",
"id": 90334,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "frequency, measurements, error-analysis",
"url": null
} |
homework-and-exercises, fluid-dynamics, astrophysics, atmospheric-science, stability
Title: Criteria for Kelvin-Helmholtz Instability I am presently engaged on a project to model elements of the behavior of Jupiter's atmosphere. I have been given by my authority some readings on fluid dynamics to raise awareness for the code. However, I do not entirely perceive why Kelvin-Helmholtz instability is an instability in the least bit. This is a quote from one of my assigned readings on the topic.
I don't see how there is an imaginary growing component for each $|U_1-U_2| > 0$ since there are two possible solutions for $\omega_{1/2}$, one of which appears to yield the growing pertubation, the opposite sign doesn't. Any clarification of why $|U_1-U_2| > 0$ has a an imaginary growing component for the two solutions of $\omega_{1/2}$?
I don't see how there is an imaginary growing component for each $\lvert U_{1} - U_{2} \rvert > 0$ since there are two possible solutions for $\omega_{1/2}$, one of which appears to yield the growing pertubation, the opposite sign doesn't... | {
"domain": "physics.stackexchange",
"id": 84375,
"lm_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, fluid-dynamics, astrophysics, atmospheric-science, stability",
"url": null
} |
python, python-3.x, selenium
while True:
try:
Firefox.switch_to.alert
break
except NoAlertPresentException:
while True:
try:
reboot.click()
break
except ElementClickInterceptedException:
time.sleep(1)
time.sleep(1)
while True:
try:
Firefox.switch_to.alert.accept()
break
except UnexpectedAlertPresentException:
time.sleep(1)
time.sleep(n) | {
"domain": "codereview.stackexchange",
"id": 44577,
"lm_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, selenium",
"url": null
} |
angular-momentum, reference-frames, rigid-body-dynamics, moment-of-inertia, angular-velocity
Title: How do the inertia tensor varies when a rigid body rotates in space? The inertia tensor is clearly constant the in a frame moving with the rigid body. But what is the simplest way to see why its columns can be considered rotating vectors in space with the angular velocity of the rotating rigid body? This has been answered below, but consider the rotation matrix $\mathrm{R}$ whose columns represent the local $\hat{x}$, $\hat{y}$ and $\hat{z}$ axis in the world coordinates.
$$ \mathrm{R} = \begin{vmatrix} \hat{x} & \hat{y} & \hat{z} \end{vmatrix}\tag{1}$$
This defines the changing inertia tensor from the local inertia tensor $\mathcal{I}_{\rm body}$
$$ \mathcal{I} = \mathrm{R}\, \mathcal{I}_{\rm body} \mathrm{R}^\top \tag{2}$$
Now that rate of change of the rotation matrix is by definition described by the derivative on a rotating frame
$$ \begin{aligned}
\frac{\rm d}{{\rm d}t} \boldsymbol{\hat{x}} & = \boldsymbol{\omega} \times \boldsymbol{\hat{x}} \\ | {
"domain": "physics.stackexchange",
"id": 87727,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "angular-momentum, reference-frames, rigid-body-dynamics, moment-of-inertia, angular-velocity",
"url": null
} |
general-relativity, speed-of-light, causality
Only one thing is for sure: as long as the coordinate system is not singular at the horizon, and you are consistent with your time orientation, future light cones exactly at the event horizon must point solely into the black hole. As you noted, Schwarzschild coordinates don't obey this, but that's just because they're singular at the event horizon. In Schwarzschild coordinates it takes an infinite amount of coordinate time to enter the black hole, which is why the light cones close up. | {
"domain": "physics.stackexchange",
"id": 53802,
"lm_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, speed-of-light, causality",
"url": null
} |
statistical-mechanics, entropy, information, landauers-principle
If the information stored on a Rubik's cube is equivalent to any other type of physically-stored information, then by Landauer's principle we might expect the machine to have to give off a heat of $T \mathrm{d}S \sim 65 T k_B \ln(2)$, but is it valid to apply Landauer's principle to the information stored in such a manner? What sort of argument does it take to say that a certain type of information is physically meaningful, such that destroying it necessitates paying an entropy cost somewhere else? Let's suppose you have a Rubik's cube that's made of a small number of atoms at a low temperature, so that you can make moves without any frictional dissipation at all, and let's suppose that the cube is initialised to a random one of its $\sim 2^{65}$ possible states. Now if you want to solve this cube you will have to measure its state. In principle you can do this without dissipating any energy. Once you know the moves you need to make to solve the cube, these can also be made without | {
"domain": "physics.stackexchange",
"id": 19176,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statistical-mechanics, entropy, information, landauers-principle",
"url": null
} |
optics, hologram
Holograms are basically complex diffraction gratings, designed to form an image. Often, even non-imaging diffractive components are called holograms (for example, the colorful sheets that reduced the need for backlighting behind LCDs in the 1990's). So a better word for this device might be "diffractive optics", but "holographic" has better name recognition, so that's what you're going to see in marketing materials.
What I'm curious about is how they make these holographic gratings that couple the image in and out of the waveguide. I don't even know what they are. Are they grinding tiny little aberrations into a sheet of glass, or is it an etching process, or laser? I guess if it was plastic it could be molded like a CD is? | {
"domain": "physics.stackexchange",
"id": 36349,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optics, hologram",
"url": null
} |
quantum-mechanics, angular-momentum, quantum-spin, representation-theory, lie-algebra
Thus, the Poincare transformations must act on $\mathcal{H}$ by virtue of a representation $U : P(1,3)\to GL(\mathcal{H})$. Unitarity then means that given $(a,\Lambda) \in P(1,3)$ we have
$$(U(a,\Lambda)\psi,U(a,\Lambda)\varphi)=(\psi,\varphi),\quad \forall \psi,\varphi\in \mathcal{H}$$
Thus the possible one-particle state spaces can be found as the possible representations of the Poincare group. Furthermore, we want the elementary particles to be in correspondence to the irreducible representations, those that can't be broken down into simpler pieces.
There's a theorem then, known as Wigner's classification, which tells what are all the possible unitary irreducible representations of $P(1,3)$. | {
"domain": "physics.stackexchange",
"id": 41213,
"lm_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, angular-momentum, quantum-spin, representation-theory, lie-algebra",
"url": null
} |
• I would consider anything above $1/\sqrt{\epsilon_{\text{mach}}}$ problematic, so it would be floating point system dependent. But it also depends on the size of the linear system. You can create small linear systems (3x3) with a condition number at O(1000) and the solution a computer finds could be out of acceptable tolerance. In general, I tell my students if they are using double precision the danger zone starts at 1000, and they need to be particularly careful if it is above $1/\sqrt{\epsilon_{\text{mach}}}$ – Abdullah Ali Sivas May 7 at 13:30
• @AbdullahAliSivas Is it also dependent on what method you're using to solve the linear system? If it's a direct method, I imagine a large condition number is (relatively) less problematic than an iterative method? Also, what is the logic behind $\frac{1}{\sqrt{\epsilon_{mach}}}$. I know what machine epsilon is, but I think I'm having trouble seeing the direct connection. – David May 7 at 13:35 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692325496974,
"lm_q1q2_score": 0.8822196672558871,
"lm_q2_score": 0.903294214513915,
"openwebmath_perplexity": 277.9344189141476,
"openwebmath_score": 0.793489396572113,
"tags": null,
"url": "https://scicomp.stackexchange.com/questions/37372/is-there-a-general-threshhold-for-which-a-large-condition-number-becomes-proble/37379"
} |
java, object-oriented, design-patterns, collections
What you want is easy to maintain code that you can extend without worrying too much about someone else using it in an unintended way. To achieve this, immutability, required fields in constructor, explicit error handling and other best java practices are your friend.
As a final remark I'd like to point out 2 principles | {
"domain": "codereview.stackexchange",
"id": 36620,
"lm_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, collections",
"url": null
} |
distributed-systems, security, consensus, fault-tolerance, byzantine
Title: Why is a threshold determined for Byzantine Fault Tolerance of an "Asynchronous" network? (where it cannot tolerate even one faulty node) In following answer (LINK: https://bitcoin.stackexchange.com/a/58908/41513), it has been shown that for Asynchronous Byzantine Agreement:
"we cannot tolerate 1/3 or more of the nodes being dishonest or we lose
either safety or liveness."
For this proof, the following conditions/requirements has been considered:
Our system is asynchronous.
Some participants may be malicious.
We want safety.
We want liveness. | {
"domain": "cs.stackexchange",
"id": 15554,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "distributed-systems, security, consensus, fault-tolerance, byzantine",
"url": null
} |
Let $$u_{A_1}$$ and $$u_{A_2}$$ be two linearly independents normalized eigenvectors of $$A$$ and let $$u_{B_1}$$ and $$u_{B_2}$$ be two eigenvectors of $$B^T$$ (they could be the same), then suppose that $$u_{A_1} u_{B_1}^T=u_{A_2} u_{B_2}^T$$, so we have \begin{align*} u_{A_1} = (u_{A_1} u_{B_1}^T) u_{B_1} = (u_{A_2} u_{B_2}^T) u_{B_1}=(u_{B_2}^T u_{B_1}) u_{A_2} \end{align*} and so $$u_{A_1}$$ and $$u_{A_2}$$ are collinear, since they are normalized they are equal which proves that $$u_{A_1} u_{B_1}^T\neq u_{A_2} u_{B_2}^T$$.
The same argument can be given for $$u_{B_1}\neq u_{B_2}$$ and $$u_{A_1}$$ and $$u_{A_2}$$ arbitrary.
This means that all the eigenvectors of this form are distinct. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9814534392852384,
"lm_q1q2_score": 0.8302531088159005,
"lm_q2_score": 0.8459424314825853,
"openwebmath_perplexity": 150.94238883641026,
"openwebmath_score": 0.9716206192970276,
"tags": null,
"url": "https://math.stackexchange.com/questions/2941605/finding-the-eigenvalues-of-a-linear-transformation-which-takes-inputs-from-the-s/2942119"
} |
\displaystyle \begin{aligned} \mathcal{L}_{(X_1,\dots,X_n) }(\theta_1,\dots,\theta_n) &=\prod_{i=1}^n\frac{1}{\det(\Sigma_i)} f(\Sigma_i^{-1}(X_i-\mu_i))\\ &=\prod_{i=1}^n\frac{1}{\det(\Sigma_i)} f(\Sigma_i^{-1}(X_i-\mu_i))\\ & = \prod_{i=1}^n\frac{1}{\det(\Sigma_i)} f(\Sigma_i^{-1}(\Sigma^*Z_i+\mu^*-\mu_i))\\ &= \prod_{i=1}^n\frac{1}{\det(\Sigma_i)} f(\Sigma_i^{-1}\Sigma^*(Z_i-(\Sigma^*)^{-1}(\mu_i -\mu^*)))\\ & = \bigr(\det((\Sigma^*)^{-1})\bigr)^n\prod_{i=1}^n\frac{1}{\det(\Sigma_i(\Sigma^*)^{-1})} f(\Sigma_i^{-1}\Sigma^*(Z_i-(\Sigma^*)^{-1}(\mu_i -\mu^*))).\\ \end{aligned} \ \ \ \ \ (8)
Thus the likelihood ratio ${R}$ reduces to | {
"domain": "threesquirrelsdotblog.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.992422758508031,
"lm_q1q2_score": 0.8204475928070726,
"lm_q2_score": 0.8267117876664789,
"openwebmath_perplexity": 11766.24440627605,
"openwebmath_score": 1.0000014305114746,
"tags": null,
"url": "https://threesquirrelsdotblog.com/"
} |
waves, fourier-transform, frequency, interactions, non-linear-systems
$$
(\sin (\omega_0\cdot t) + \sin(\omega_1\cdot t))^2
= \sin(\omega_0\cdot t)^2
+ 2\cdot \sin (\omega_0\cdot t) \cdot\sin(\omega_1\cdot t)
+ \sin(\omega_1\cdot t)^2
$$
The $\sin(\omega_i\cdot t)^2$ terms† are often ignored. The reason is that these can be written in terms of $\sin(2\cdot\omega_i\cdot t)$, and double-frequency is often already present in the signal anyway (real-world signals can very well be periodic at frequency $\tfrac{\omega_i}{2\pi}$, but they won't be exact sinusoidals, meaning they can be interpreted as a Fourier series of integer-multiple frequencies). But
$$
2\cdot \sin (\omega_0\cdot t) \cdot\sin(\omega_1\cdot t)
= \cos ((\omega_0-\omega_1)\cdot t) - \cos ((\omega_0+\omega_1)\cdot t)
$$
...and those sum-and difference frequencies were quite definitely not at all in either of the individual signals. | {
"domain": "physics.stackexchange",
"id": 59042,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "waves, fourier-transform, frequency, interactions, non-linear-systems",
"url": null
} |
quantum-field-theory, wick-rotation, dimensional-regularization
See, for example, section 3 of Lorentzian methods in conformal field theory
Slava Rychkov. Nowadays, these ideas extensively studied in CFT, see also this. Main idea is very illustrative:
Unitary Lorentzian CFTs are related to reflection-positive Euclidean
CFTs by Wick rotation. This is the Osterwalder-Schrader reconstruction
theorem. Thus, in
principle, everything about a Lorentzian CFT is encoded in the usual CFT
data (operator dimensions and OPE coefficients) that can be studied in
Euclidean signature. However, many observables, and many constraints
on CFT data are deeply hidden in the Euclidean correlators.
Also, it's very important to realise, that Euclidean QFT are used in condensed matter physics. For example, it is useful tool for describing of critical phenomena.For introduction, one can consult
David Tong: Lectures on Statistical Field Theory. | {
"domain": "physics.stackexchange",
"id": 69853,
"lm_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, wick-rotation, dimensional-regularization",
"url": null
} |
quantum-mechanics
By your logic, this equation remains true under any phase redefinition of $|x \rangle$ and $|y \rangle$, so we have
$$|z \rangle = e^{i\theta_1} |x \rangle + e^{i\theta_2} |y \rangle$$
This is only true if the two $|z \rangle$'s are the same, i.e. if $\theta_1 = \theta_2$, in which case $|z \rangle$ itself just picks up an overall phase. If this isn't true, then you've mistakenly thrown away a relative phase between the $|x \rangle$ and $|y \rangle$ components, which has physical consequences.
Another way of saying this is that 'global phase' is only a single degree of freedom. You can rotate away any one phase in a problem, but you can't do that to all of them. | {
"domain": "physics.stackexchange",
"id": 33095,
"lm_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",
"url": null
} |
complexity-theory, polynomial-time
In your approach, assuming $b$ to be numerically smaller than $n$ would lead to correct analysis. But what the statement means is that $b$ is asymptotically smaller than $n$. Like, $b=log(n) \space or \space b=\sqrt{n} \space or \space b=log(log(n))$ | {
"domain": "cs.stackexchange",
"id": 12117,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "complexity-theory, polynomial-time",
"url": null
} |
ros, urg-node, hokuyo
Title: Using the Hokuyo UST-05LN laser rangefinder with urg_node
I'm trying to get the Hokuyo UST-05LN laser rangefinder working with ROS Indigo.
I have successfully connected a UST-05LA model (which I believe is nearly identical to the LN) to the urg_node and taken laser scans with data coming from the USB. However when I connect the LN the device is recognised as a USB device in linux but the node cannot connect to it. The error message in the master log is:
ERROR [/tmp/binarydeb/ros-indigo-urg-node-0.1.10/src/urg_node.cpp:245(main) [to pics:/rosout] Error connecting to Hokuyo: Could not initialize Hokuyo:
Any suggestions?
Originally posted by ChrisU on ROS Answers with karma: 1 on 2017-11-03
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 29271,
"lm_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, urg-node, hokuyo",
"url": null
} |
convolutional-neural-networks, image-recognition, tensorflow, python
Aside the dataset (potential) issue, the graph is fine. However, it may be worth trying different settings. It really depends on how you have ended up with the current graph. Removing pooling layers helps keeping more information, as well as a larger input image. 120x60 looks pretty small, and the comparison to fast-RCNN's RoI pooling layer looks odd, given that RoI comes after the feature maps. So a larger input image could give better results. | {
"domain": "ai.stackexchange",
"id": 541,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "convolutional-neural-networks, image-recognition, tensorflow, python",
"url": null
} |
algorithms, control-systems, camera
Title: AutoExposure with nonlinear camera: Non linear proportional PID? Now I', wondering how to best implement a control algorithm for it. I tried using a PID controler but started with a simple P-control first. The problem is, that when using the equation delta_exposure = k*e whereas e = mean_grey_is - mean_grey_want = mean_grey_is - 127 and with k as a fixed value it is hard to define a good value for k because it depends on how big e is and on how big the actual mean_grey_is is. Assuming mean_grey_is is something like 150 (e=23) I'd only need a certain small change of my current ExposureTime. But when mean_grey_is something like 173 (e is twice as big) and I'm using the same k-value, the change of the ExposureTime obviously would also be twice as big, but to get a fast and quick controlling response, the change of ExposureTime would need to be a lot larger as you could see in the matlab figure above :(
How to do this?
Thanks a lot in advance!
EDIT2 | {
"domain": "dsp.stackexchange",
"id": 1317,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, control-systems, camera",
"url": null
} |
classical-mechanics
All these symmetries are the same for every isolated mechanical system.
Considering specific systems you can have further symmetries and associated conserved quantities. However, in general, these Lagrangian symmetries are not associated with symmetries of the classical spacetime, but are proper of the mechanical system.
When you have a Larangian symmetry it is possible to prove that it transforms solutions of Eulero-Lagrange equations into solutions of Eulero-Lagrange equations. That is another notion of symmetry a dynamical symmetry.
Lagrangian symmetries are dynamical symmetries but the converse is generally false.
Moreover:
Lagrangian symmetries imply the existence of conserved quantities but the converse generally is false.
The correspondence instead is one-to-one if describing all this picture in Hamiltonian formulation and where the Hamiltonian symmetries are assumed to be canonical transformations: | {
"domain": "physics.stackexchange",
"id": 11321,
"lm_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",
"url": null
} |
quantum-field-theory, quantization
Inserting the graviton has terrible consequences. The graviton is a spin 2 particle, and the renormalization process does not work for those particles. If you define gravity perturbatively (by starting from the Einstein-Hilbert action and linearizing gravity), the renormalization process does not go smoothly and you find out that you need to add infinite terms in the Lagrangian. I don't know if there is an energy scale under which this theory has only a finite number of important interaction terms, but it surely cannot be used as fundamental theory (that must be valid and predictive at all energies). So we say that quantum gravity is not renormalizable. | {
"domain": "physics.stackexchange",
"id": 40432,
"lm_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, quantization",
"url": null
} |
astronomy, telescopes
The discrepancy is actually such that many space probes aren't worth funding because one should just build a bigger, more powerful ground telescope.
Given the above one could flip the question around and ask, why bother with space-based telescopes then? There are reasons, some of the most important being:
The atmosphere obscures some wavelengths of light. If you want to observe in those wavelengths you must go to space.
Ground telescopes are susceptible to local weather conditions. If it's raining or cloudy, you can't observe.
Space telescopes can observe in all directions all the time. On the ground, you can only observe at night, and even then you can only observe half the celestial sphere at best (because the Earth is in the way of the other half).
See e.g. this source for more details. | {
"domain": "physics.stackexchange",
"id": 84686,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "astronomy, telescopes",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.