text stringlengths 1 1.11k | source dict |
|---|---|
#### lyd123
##### New member
I think I understand now.. so I should use (P⟹(Q ⟹ R ) ) ⟹ ((P⟹Q ) ⟹ R ) ),
which would give me the attached truth table.
So it is not a tautology. Is this correct?
#### Evgeny.Makarov
##### Well-known member
MHB Math Scholar
Yes, it is correct. The converse implication is a tautology. This follows from the fact that $P\to Q\to R$ is equivalent to $PQ\to R$ (I omitted conjunction) and $PQ$ implies $P\to Q$.
There is a typo in column R, second last row.
#### topsquark
##### Well-known member
MHB Math Helper
Just a quick question from a novice.
Do $$\displaystyle \implies$$ and $$\displaystyle \rightarrow$$ mean the same thing? I note that the OP and Evgeny.Makarov are using two different symbols.
-Dan
#### Evgeny.Makarov | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9489172615983309,
"lm_q1q2_score": 0.8175284818291448,
"lm_q2_score": 0.8615382129861583,
"openwebmath_perplexity": 1105.1651934581625,
"openwebmath_score": 0.8882349729537964,
"tags": null,
"url": "https://mathhelpboards.com/threads/truth-table-precedence.25506/"
} |
electricity, statistical-mechanics, electrons, electric-current, probability
A more classic example of this question is throwing a tennis ball against a brick wall: you can calculate how many times you'd have to throw it for all the atoms in the ball to tunnel through the potential of the wall, but you find that it's much more than the age of the universe. | {
"domain": "physics.stackexchange",
"id": 12791,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electricity, statistical-mechanics, electrons, electric-current, probability",
"url": null
} |
python, design-patterns, web-scraping, pandas, beautifulsoup
usage
>>> from wxlab.scrape import TSragr
>>> ragr = TSragr("https://nomads.ncep.noaa.gov/pub/data")
>>> ragr
https://nomads.ncep.noaa.gov/pub/data/
0 DSRC
1 nccf/
dtype: object
>>> ragr.navto("nccf")
https://nomads.ncep.noaa.gov/pub/data/nccf/
0 charts/
1 com/
2 dcom/
3 nonoperational/
4 pcom/
5 radar/
dtype: object
>>> ragr.navto("nccf","com")
https://nomads.ncep.noaa.gov/pub/data/nccf/com/
0 557ww/
1 amsu_estimation/
2 aqm/
3 arch/
4 blend/
...
61 uvi/
62 wave/
63 wave_nfcens/
64 wfs/
65 wsa_enlil/
Length: 66, dtype: object
>>> ragr.navto("nccf","com","blend")
https://nomads.ncep.noaa.gov/pub/data/nccf/com/blend/
0 prod/
1 v4.0/
dtype: object
>>> ragr.navto("nccf","com","blend","prod")
https://nomads.ncep.noaa.gov/pub/data/nccf/com/blend/prod/
0 blend.20220604/ | {
"domain": "codereview.stackexchange",
"id": 43379,
"lm_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, design-patterns, web-scraping, pandas, beautifulsoup",
"url": null
} |
python, regression, linear-regression
Title: Is there a library that would perform segmented linear regression in python? There is a package named segmented in R. Is there a similar package in python? No, currently there isn't a package in Python that does segmented linear regression as thoroughly as those in R (e.g. R packages listed in this blog post). Alternatively, you can use a Bayesian Markov Chain Monte Carlo algorithm in Python to create your segmented model.
Segmented linear regression, as implemented by all the R packages in the above link, doesn't permit extra parameter constraints (i.e. priors), and because these packages take a frequentist approach, the resulting model doesn't give you probability distributions for the model parameters (i.e. breakpoints, slopes, etc). Defining a segmented model in statsmodels, which is frequentist, is even more restrictive because the model requires a fixed x-coordinate breakpoint. | {
"domain": "datascience.stackexchange",
"id": 10321,
"lm_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, regression, linear-regression",
"url": null
} |
$$\left[(\sqrt{3})^2+(-1)^2\right]\cdot \left[\sin^2 x+\cos^2 x\right]\geq \left[\sqrt{3}\sin x-y\cos x\right]^2$$
So $$4\geq 4y^2\Rightarrow y^2\leq 1\Rightarrow y \in \left[-1,1\right]$$
Hint: You need to find the maximum and minimum values. To do this, find the $x$ values where the derivative of the function is zero, and then substitute these into the function itself. Note that, in general, you need to check the edges of the domain, and compare all turning points to find the absolute maxima and minima. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9752018376422666,
"lm_q1q2_score": 0.8229680567028415,
"lm_q2_score": 0.8438951045175643,
"openwebmath_perplexity": 238.65986379216832,
"openwebmath_score": 0.9704645276069641,
"tags": null,
"url": "https://math.stackexchange.com/questions/382136/a-problem-on-range-of-a-trigonometric-function-what-is-the-range-of-frac-sqr/382148"
} |
cc.complexity-theory, time-complexity, algebraic-complexity, gr.group-theory, determinant
As to the idea that symmetry always leads to complexity reduction (or not), in addition to things already in the comments, see this question and its answers.
An interesting point is that in Valiant's first papers on what is now known as Valiant's version of algebraic complexity theory, he was trying to make the point that one reason the determinant is important computationally is because roughly all the (then) known efficient algorithms could be reduced to linear algebra and thence to the computation of the determinant, e.g. the FKT algorithm for counting matchings in planar graphs. This is of course an exaggeration, but continues to be borne out by research into holographic algorithms, which often reduce to computing the Pfaffian (a close relative of the determinant). Surely Valiant knew this was an exaggeration, but here's the exact quote just to make sure I'm not misrepresenting (L. Valiant. Completeness classes in algebra. ACM STOC 1979): | {
"domain": "cstheory.stackexchange",
"id": 1654,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, time-complexity, algebraic-complexity, gr.group-theory, determinant",
"url": null
} |
arduino, rosserial, ros-hydro, ubuntu
Comment by gvdhoorn on 2015-03-27:
Well, what is the output of rospack find cmake_modules after sourcing /opt/ros/hydro/setup.bash?
Comment by khitrir on 2015-03-29:
That was what I did with "find" before - the result was [rospack] Error: stack/package cmake_modules not found
Comment by gvdhoorn on 2015-03-29:
Pay attention to the setup.bash file sourced. The first question asks to source your catkin_ws/install space, the second to source the ROS Hydro default setup.bash. The output is identical each time? In that case, make sure you have ros-hydro-cmake-modules installed.
Comment by khitrir on 2015-03-29:
Running apt-cache policy on cmake-modules and roslint both said they were installed. However, looking further it seems they weren't properly there (there was no files anywhere it pointed to. Using the re-install in apt-get, something I'd tried before, didn't work. to be Cont.
Comment by khitrir on 2015-03-29: | {
"domain": "robotics.stackexchange",
"id": 21200,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "arduino, rosserial, ros-hydro, ubuntu",
"url": null
} |
java, programming-challenge, mathematics
public class TriagularNumberWithManyDivisors {
Use long, descriptive names, Example is not acceptable by any standard.
static final int DIVISORS_WANTED = 500;
I may have fun running this code for any number of divisors and I really do not want to go haunting for a magic number to change inside the code.
public static int triangular(int n) {
return n * (n + 1) / 2;
}
This is a function, a part of your program that does only one thing, the function name also serves as documentation.
public static int divisors(int n) {
int counter = 0;
int limit = (int) Math.sqrt(n);
for (int i = 1; i <= limit; i++) {
if (n % i == 0) {
counter += (n % i == i ? 1 : 2);
}
}
return counter;
} | {
"domain": "codereview.stackexchange",
"id": 15724,
"lm_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, programming-challenge, mathematics",
"url": null
} |
ros-groovy, eclipse
[ 0%] Built target rosbuild_precompile
/usr/bin/make -f CMakeFiles/modem_test.dir/build.make CMakeFiles/modem_test.dir/depend
make[3]: Entering directory /home/amory/ros_workspace/modem_test/build' cd /home/amory/ros_workspace/modem_test/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/amory/ros_workspace/modem_test /home/amory/ros_workspace/modem_test /home/amory/ros_workspace/modem_test/build /home/amory/ros_workspace/modem_test/build /home/amory/ros_workspace/modem_test/build/CMakeFiles/modem_test.dir/DependInfo.cmake --color= Dependee "/home/amory/ros_workspace/modem_test/src/test.cpp" is newer than depender "CMakeFiles/modem_test.dir/src/test.cpp.o". Clearing dependencies in "/home/amory/ros_workspace/modem_test/build/CMakeFiles/modem_test.dir/depend.make". Scanning dependencies of target modem_test make[3]: Leaving directory /home/amory/ros_workspace/modem_test/build'
/usr/bin/make -f CMakeFiles/modem_test.dir/build.make CMakeFiles/modem_test.dir/build | {
"domain": "robotics.stackexchange",
"id": 13544,
"lm_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-groovy, eclipse",
"url": null
} |
Theorem 3.45: For $a_n \in \mathbb R^k$, if $\sum a_n$ converges absolutely, then $\sum a_n$ converges.
Proof: The proof is the same since the Cauchy criterion (Theorem 3.22) and the triangle inequality both hold in $\mathbb R^k$.
Theorem 3.47: For $a_n \in \mathbb R^k$ and $b_n \in \mathbb R^k$, if $\sum a_n = A$ and $\sum b_n = B$, then $\sum (a_n + b_n) = A + B$, and $\sum c a_n = cA$ for any fixed $c \in \mathbb R$.
Proof: The proofs are the same as those given in the text since the limit rules used (Theorem 3.3 parts a and b) are trivially shown to hold in $\mathbb R^k$.
Theorem 3.55: If $\sum a_n$ is a series of elements in $\mathbb R^k$ that converges absolutely, then every rearrangement of $\sum a_n$ converges, and they all converge to the same sum.
Proof: The proof is the same since the Cauchy criterion (Theorem~3.22) holds in $\mathbb R^k$.
#### Exercise 16
(By Dan kyp44 Whitman) | {
"domain": "linearalgebras.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.986777180969715,
"lm_q1q2_score": 0.8044528198925498,
"lm_q2_score": 0.8152324915965392,
"openwebmath_perplexity": 571.0045039447957,
"openwebmath_score": 0.9950652122497559,
"tags": null,
"url": "https://linearalgebras.com/baby-rudin-chapter-3b.html"
} |
atoms
However, there is a good reason to only consider the nucleus. The mass defect and binding energy are consequences of the strong nuclear fore, and thus properties of the nucleus.
The choice of helium-4 is convenient: the helium-4 nucleus is the alpha particle - a common product of radioactive decay and thus well-characterized. Thanks to mass spectrometry, we can determine the mass of an alpha particle very precisely to be $4.00150608\ \text{u}$. Here is the source of that mysterious number. Again, shame on Khan Academy for not being explicit.
The electron has a mass of $5.48579909\times 10^{-4}\ \text{u}$, so a helium-4 atom would be expected to have a mass of one alpha particle and two electrons:
$$4.00150608\ \text{u} + 2\left(5.4858\times 10^{-4}\ \text{u}\right) = 4.00260324\ \text{u}$$ | {
"domain": "chemistry.stackexchange",
"id": 5767,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "atoms",
"url": null
} |
Force And Bending Moment Gate Lectures - Shear Force And Bending Moment Problems For Gate - Shear Force And Bending Moment Gate - SFD BMD Problems. Firstly identify the key points at which you will work out the shear force and bending moment at. V - shear force M - bending moment A sign convention is necessary for shear and moment diagrams if the results obtained from their use are to be interpreted properly. BEAMS: SHEARING STRESS (6. $$The slope of the shear force diagram is equal to the load intensity. moment-curvature relationship (5. • A uniform beam in pure bending I Mc σ max = r M M The maximum stress is where I is the Area Moment of Inertia about the Centroid, and c is the distance from the Neutral Axis, or Centroid. For the beam shown below, calculate the shear force (V) and bending moment (BM) diagrams for the beam. Expected delivery within 24 Hoursrs. But I dont know where to start. Shear force and bending moment questions. Expected delivery within 24 Hoursrs. The | {
"domain": "toysgarage.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9808759587767816,
"lm_q1q2_score": 0.8019391394880531,
"lm_q2_score": 0.8175744673038222,
"openwebmath_perplexity": 871.2057930072225,
"openwebmath_score": 0.7455957531929016,
"tags": null,
"url": "http://anxr.toysgarage.it/shear-force-and-bending-moment-questions-and-answers.html"
} |
physical-chemistry, chemistry-in-fiction
Pigments may change their colour upon exposure to air. Pigments like lead white turned over time black, for example.
Pigments may interact with the oil, forming complexes, of different mechanical and complexation strength:
(source)
Components may migrate across the picture and locally, and reactions may occur. The formation of soaps of lead and zinc are the most prominently known ones, for example based on palmitic, stearic, or azelaic acid. These processes may alter colors, even rendering them transparent enough to recognise the support of the paint, and they may eventually protrude the surface of the paintings as shown from a topview:
(source, p. 14)
or cross section:
(source)
These may not simply be "washed off" as a normal cleansing would do, as water and humidity in general amplify the problem. If left untreated, the painting however will age and degrade.
Further reading may be found, for example, here, here, here, here/here. | {
"domain": "chemistry.stackexchange",
"id": 8358,
"lm_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, chemistry-in-fiction",
"url": null
} |
• Yes, I have tried squaring it, but I wanted to know is there any another approach. Apr 25, 2019 at 13:17
• My answer gives the derivation of exact pattern Apr 25, 2019 at 13:37
$$|A-\lambda I| = (3-\lambda)(-1-\lambda) - 1\times(-4)\\= 4-3-2\lambda+\lambda^2 \\= 1-2\lambda+\lambda^2=\\(1-\lambda)^2$$
so $$\lambda =1$$ double root.
Which eigenspace?
$$\text{null}(A-\lambda I)\\\begin{bmatrix}2&-4\\1&-2\end{bmatrix}$$
We see $$[2,1]^T$$ is eigenvector but also there can be only one because of degeneracy.
Therefore $$A$$ is not diagonalizable. You have to try find some other type of matrix than diagonal matrix for $$D$$ to be if you want to put $$A$$ on form $$PDP^{-1} =A$$. For example you can try
1. Jordan Canonical Form or
2. Smith's form | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9773707973303964,
"lm_q1q2_score": 0.8287789297488933,
"lm_q2_score": 0.847967764140929,
"openwebmath_perplexity": 203.258796593091,
"openwebmath_score": 0.9974600672721863,
"tags": null,
"url": "https://math.stackexchange.com/questions/3201878/if-a-left-beginsmallmatrix-3-4-1-1-endsmallmatrix-right-the/3201900"
} |
• @RobertLewis When you consider the ring as a group under addition, the group identity is the additive identity of the ring $0$ not the multiplicative identity $1$ – Jonathan Dunay Jun 15 '18 at 3:50 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808678600414,
"lm_q1q2_score": 0.8190085328578987,
"lm_q2_score": 0.8354835432479661,
"openwebmath_perplexity": 379.0322521149145,
"openwebmath_score": 0.9640219211578369,
"tags": null,
"url": "https://math.stackexchange.com/questions/2820247/why-0-must-be-in-the-kernel-of-a-ring"
} |
sides is called the legs of a trapezoid is$ 10 $.. { D_1D_2\over 2 }$ $and my teacher marked me wrong this quadrilateral from either bottom angle the. Are two triangles ABCD, ∠A+∠B+∠C+∠… trapezoidal Rule formula a quadrilateral with a of. Right like that is 5 units the midpoints of the sides you can use Pythagoras Theorem twice determine... Has length there are two triangles and a rectangle are congruent, so I do n't know what did. Same thing within trapezoid: we know that the diagonal the left side, meaning the! Free Algebra Solver... type anything in there 've found an issue with this question, let... 50$ cm found because is the diagonal can be solved root of diagonal of a trapezium formula... Trapezium can be solved if you 've found an issue with this question, please let us.... | {
"domain": "co.za",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9511422255326288,
"lm_q1q2_score": 0.8140361594054789,
"lm_q2_score": 0.8558511414521923,
"openwebmath_perplexity": 741.5422622618602,
"openwebmath_score": 0.5157669186592102,
"tags": null,
"url": "https://sa-websolutions.co.za/3afqa8/3a31c2-diagonal-of-a-trapezium-formula"
} |
graphs, trees
Initially all edges are unmarked
Select a simple path $v_i\dots v_j$ containing at least two unmarked edges such as $(v_i,v_j) \notin E$ (vertices $v_i$ and $v_j$ are not connected). If there is no path containing two unmarked edges, then select a path containing one unmarked edge (this means we are done)
Connect $v_i$ and $v_j$ (thereby creating a cycle).
Mark all edges of the (newly created) cycle $v_i\dots v_j$
If there is unmarked edge then go to step 2
Halt | {
"domain": "cs.stackexchange",
"id": 9901,
"lm_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, trees",
"url": null
} |
ros, navigation, odometry, bagfile, transform
$ rosmsg show Odometry
[nav_msgs/Odometry]:
std_msgs/Header header
uint32 seq
time stamp
string frame_id
string child_frame_id
geometry_msgs/PoseWithCovariance pose
geometry_msgs/Pose pose
geometry_msgs/Point position
float64 x
float64 y
float64 z
geometry_msgs/Quaternion orientation
float64 x
float64 y
float64 z
float64 w
float64[36] covariance
geometry_msgs/TwistWithCovariance twist
geometry_msgs/Twist twist
geometry_msgs/Vector3 linear
float64 x
float64 y
float64 z
geometry_msgs/Vector3 angular
float64 x
float64 y
float64 z
float64[36] covariance | {
"domain": "robotics.stackexchange",
"id": 28729,
"lm_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, navigation, odometry, bagfile, transform",
"url": null
} |
torque, power, speed
This sort of dynamic analogy is appropriate when dealing with air movement in ducts but it doesn't work so well when there are no ducts as such and where the scale lengths are of order ~hundreds of miles.
Instead, we look at the kinetic energy carried by parcels of high-speed air and the aerodynamic ("wind") loads imposed by those air parcels on things like trees, houses, cars and people.
Wind loads (expressed in terms of pounds per square foot) are proportional to the square of the wind velocity, which means doubling the wind velocity increases the loads by a factor of four. This effect is what makes hurricanes and tornadoes so destructive. | {
"domain": "physics.stackexchange",
"id": 51818,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "torque, power, speed",
"url": null
} |
catkin-make, catkin
CATKIN_IGNORE CMakeFiles gtest turtle_bot_random
may@MooMoo:~/Desktop/Tree/Programming/ros/TurtleBotRandom/build$ cd turtle_bot_random
may@MooMoo:~/Desktop/Tree/Programming/ros/TurtleBotRandom/build/turtle_bot_random$ ls
catkin_generated cmake_install.cmake Makefile tbsub
CMakeFiles CTestTestfile.cmake tbrandom | {
"domain": "robotics.stackexchange",
"id": 22350,
"lm_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, catkin",
"url": null
} |
beginner, php, array, statistics
$k = ST::sumProductMeanDeviation($arr1, $arr2);
$ssmd1 = ST::sumSquareMeanDeviation($arr1);
$ssmd2 = ST::sumSquareMeanDeviation($arr2);
$product = $ssmd1 * $ssmd2;
$res = sqrt($product);
if ($res == 0) {return ConstEQ::NEAR_ZERO_NUMBER;}
$correlation = $k / $res;
if ($correlation == 0) {return ConstEQ::NEAR_ZERO_NUMBER;} else {return $correlation;}
}
/**
*
* @return a number equal to sum of product mean deviation of each array values
*/
public static function sumProductMeanDeviation($arr1, $arr2)
{
$sum = 0;
$num = count($arr1);
for ($i = 0; $i < $num; $i++) {$sum = $sum + ST::productMeanDeviation($arr1, $arr2, $i);}
return $sum;
} | {
"domain": "codereview.stackexchange",
"id": 34513,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "beginner, php, array, statistics",
"url": null
} |
special-relativity
Okay, so we understand circles a little better now. But as already said, rotation in two space dimensions is almost the same thing as boost in (1+1) space-time dimensions. In the same way that rotations (around origin) preserve circles, boosts preserve hyperbolas. So instead of working with $\sin$ and $\cos$ you'll work with hyperbolic functions $\sinh$ and $\cosh$ and instead of $\phi$ you'll obtain rapidity $\eta$. | {
"domain": "physics.stackexchange",
"id": 436,
"lm_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",
"url": null
} |
machine-learning, decision-trees, cross-validation, data-science-model, grid-search
Title: plotting a decision tree based on gridsearchcv i was trying to plot the decision tree which is formed with GridSearchCV, but its giving me an Attribute error.
AttributeError: 'GridSearchCV' object has no attribute 'n_features_'
However if i try to plot a normal decision tree without GridSearchCv, then it successfully prints.
code [decision tree without gridsearchcv]
# dtc_entropy : decison tree classifier based on entropy/information Gain
#plotting : decision tree on information/entropy based
from sklearn.tree import export_graphviz
import graphviz
feature_names = x.columns
dot_data = export_graphviz(dtc_entropy, out_file=None, filled=True, rounded=True,
feature_names=feature_names,
class_names=['0','1','2'])
graph = graphviz.Source(dot_data)
graph ### --------------> WORKS | {
"domain": "datascience.stackexchange",
"id": 7418,
"lm_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, decision-trees, cross-validation, data-science-model, grid-search",
"url": null
} |
These basins are typically quite complicated, but if you look at what is going on in the complex plane, it can be a little clearer what's going on. The real line runs horizontally, halfway down these plots. If all you know is what is happening on the real axis, which is what you are seeing in your problem, it can be difficult to predict where a given point is going to end up.
Newton-Raphson can behave badly even in seemingly easy situations. I am considering the use of N-R for minimization (rather than root finding, but the same applies). Even in the case of convex functions, N-R may not converge.
For example: $$f(x)=\ln(e^x+e^{-x})$$ is $C^{\infty}$, strictly convex and admits a single (global) minimum in 0.
Yet, if we try to use N-R to find the minimum (i.e. the root of the derivative), the algorithm fails if started from a point $|x|>1.09$ (approx). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808736209153,
"lm_q1q2_score": 0.8427119270833242,
"lm_q2_score": 0.8596637451167997,
"openwebmath_perplexity": 658.4361987979945,
"openwebmath_score": 0.7813798189163208,
"tags": null,
"url": "https://math.stackexchange.com/questions/2407659/why-does-the-newton-raphson-method-not-converge-for-some-functions/2408116"
} |
reference-request, graph-algorithms, approximation-algorithms, approximation-hardness
I was however unable to find anything implying a positive result about polynomial time approximations on bipartite graphs. After a bit more searching, it appears that what I'm looking for is unlikely to exist.
In [1], it is proven that approximating the minimum maximal independence number (which is equivalent to the minimum size of an independent dominating set) within a factor of $O(n^{1-\epsilon})$ is $\mathrm{NP}$-hard for any $\epsilon > 0$. This remains true even when restricted to bipartite graph (this is the part I missed when I first came across this paper).
[1] Halldórsson, Magnús M., Approximating the minimum maximal independence number, Inf. Process. Lett. 46, No. 4, 169-172 (1993). ZBL0778.68041. | {
"domain": "cstheory.stackexchange",
"id": 5173,
"lm_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, graph-algorithms, approximation-algorithms, approximation-hardness",
"url": null
} |
polymers, plastics, esters
This article from Wikipedia states that polyethylene terephthalate (PET or PETE) is the most common type of polyester. PET is the plastic from which almost all plastic soda and beverage bottles are made. This leads me to wonder if the polyester from which clothes are commonly made are PET, and if not, what types of other polyesters (e.g. polyglycolide, polycaprolactone, polyethylene adipate, polybutylene succinate, etc.) clothes may be made from.I'm aware that most plastics can be stretched into long thin filaments/strands and wound into threads in a process similar to how natural-fiber threads are made. My question is specifically whether or not PET is commonly used as the polyester in clothes, and if not, what is? I've done some Google searches but can't find any references; maybe I just haven't gotten the search string right. Thanks. | {
"domain": "chemistry.stackexchange",
"id": 9502,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "polymers, plastics, esters",
"url": null
} |
time-complexity, sorting
If the integers are not distinct, you can replace booleans with counters to obtain an algorithm with complexity $O(m + n)$. In general, you can sort arbitrary items with integer keys by keeping an array of lists, where the $i$-th list will contain all items with key $i$. The output is just concatenation of these lists (and hence this sorting algorithm is stable as long as you append new elements at the end of the lists).
If you apply the above (stable) algorithm multiple times on your input, where the $j$-th execution sorts the integers w.r.t. the $j$-th least significant digit you obtain Radix Sort. | {
"domain": "cs.stackexchange",
"id": 14887,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "time-complexity, sorting",
"url": null
} |
rosbridge
Originally posted by trianta2 with karma: 293 on 2013-12-23
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 16515,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rosbridge",
"url": null
} |
javascript, object-oriented
So for the moment, I'm just using a switch case to handle this currently (albeit in a super ugly way):
if (viewObject.terms.length > 0) {
switch(viewObject.terms.length) {
case 1:
data.term_id_1 = viewObject.terms[0].term_id;
data.ticker_1 = viewObject.terms[0].its_ticker;
break;
case 2:
data.term_id_1 = viewObject.terms[0].term_id;
data.ticker_1 = viewObject.terms[0].its_ticker;
data.term_id_2 = viewObject.terms[1].term_id;
data.ticker_2 = viewObject.terms[1].its_ticker;
break;
case 3:
data.term_id_1 = viewObject.terms[0].term_id;
data.ticker_1 = viewObject.terms[0].its_ticker;
data.term_id_2 = viewObject.terms[1].term_id;
data.ticker_2 = viewObject.terms[1].its_ticker;
data.term_id_3 = viewObject.terms[2].term_id;
data.ticker_3 = viewObject.terms[2].its_ticker;
break;
} | {
"domain": "codereview.stackexchange",
"id": 16167,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, object-oriented",
"url": null
} |
quantum-field-theory, symmetry-breaking, variational-principle, higgs, classical-field-theory
Then one, in order to make this part vanish, assumes the field to be constant $\phi(x)=a \ \in \mathbb{R}$ and then minimizes the potential $$V[\phi]=-\frac{1}{2}\mu^2\phi^2+\frac{\lambda}{4!}\phi^4$$ now seen to be not anymore a functional of fields, but merely a $V: \mathbb{R} \to \mathbb{R}$ funcion which sends $a \mapsto V(a)$.
The question
My question is the following: How do we say that this is true?
Why can not there be a field configuration $\phi(x)=\chi(x)$ which is not constant and therefore does not make the quadratic part vanish, but still gives a much smaller potential and therefore an overall a smaller energy?
Some more reasoning I did:
Thinking of the analogy in calculus, it seems to me that this statement is similar to the following: | {
"domain": "physics.stackexchange",
"id": 10183,
"lm_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, symmetry-breaking, variational-principle, higgs, classical-field-theory",
"url": null
} |
bash, linux
Now, the output of your sed command is not what you expect:
$ type foo | sed -E 's/^.*`(.*).$/\1/'
$
That will return nothing since the ^.*` means "match the longest possible string from the beginning of the string to a backtick" and, therefore, will match everything except the final '. A better approach would be to use a tool that has non-greedy matching like perl:
$ type foo | perl -pe 's/^.*?\`(.*).$/\1/'
ls `which sudo`
You will also need to eval it in order for it to run correctly:
$ "$(type foo | perl -pe 's/^.*?\`(.*).$/\1/')"
bash: ls `which sudo`: command not found
$ eval $(type foo | perl -pe 's/^.*?\`(.*).$/\1/')
/sbin/sudo | {
"domain": "codereview.stackexchange",
"id": 22154,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "bash, linux",
"url": null
} |
regression, r, finance, gini-index
0 14.88228812 17.26129882 -1.299654895
0 13.46595308 17.26136258 -4.948858859
0 15.6823775 17.26142633 -0.976068273
0 12.80490915 17.26145821 -2.103263152
0 14.80132735 17.26149008 -6.06110278
0 14.94400522 17.26152196 -2.778127905
0 15.07907215 17.26152196 -6.098750561 Unfortunately, there are multiple measures called gini coefficients or gini index and they are used for different things in different domains. So you are for sure not the first person to face this problem.
Luckily, for your domain it is clear what coefficient to use.
Gini coefficient for (credit risk) scorecards
The gini coefficient to evaluate the predictive power of a credit risk scorecard is given by
$$gini = 2*rocauc-1$$
This is (one of) the standard measure for evaluating credit risk scorecards, so this should be the one your colleague is calculating.
So for your code, just remove the line giin <- gin/(1-0.006059979) from your code and use gin and you should be fine. | {
"domain": "datascience.stackexchange",
"id": 11627,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "regression, r, finance, gini-index",
"url": null
} |
lisp, scheme, sicp
A few tests:
> (church-numeral->int zero)
0
> (church-numeral->int one)
1
> (church-numeral->int two)
2
> (church-numeral->int (add-1 two))
3
> (church-numeral->int (add-1 (add-1 two)))
4
A Church-numeral addition should take two Church numerals as input, and not integers, as in your code.
We use the insight above about increment functions and additive identities to notice that integer addition is simply repeated incrementing. If we wish to add integers a and b, we begin with the number b and increment it a times to get a + b.
The same applies to Church numerals. Instead of using integer increment function and integer additive identity, we use the Church increment function add-1 and we begin with a Church numeral as the additive identity. Thus, we can implement Church-numeral addition as:
(define (plus cn-a cn-b)
((cn-a add-1) cn-b))
A few examples:
(define three (plus one two))
(define four (plus two two))
(define five (plus two three))
(define eight (plus three five)) | {
"domain": "codereview.stackexchange",
"id": 224,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "lisp, scheme, sicp",
"url": null
} |
matlab, algorithm, theory
I am really confused about initial condition of position . should either I choose a initial condition at Discrete-Time Integrator1, or adding a difference of 2 adders into position.
In here: damping=0 ( i want to check the case without Passivity controller)
k=30000 and I added initial condition to Discrete-Time Integrator1 is 50
[![enter image description here][3]][3] It's usually best to contact the author directly if you have a specific question about a specific paper.
The simulations are there only to illustrate the principal of the passivity observer and controller, so it makes sense they did not elaborate on them too much.
The first simulation uses velocity and position as the input and appears to have an initial position just outside the wall.
The second simulation probably has no inputs and just lets an initial condition evolve over time, with an initial position 50mm outside the wall. | {
"domain": "robotics.stackexchange",
"id": 1347,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "matlab, algorithm, theory",
"url": null
} |
Use the fact for any integer $n$, one of the numbers inside $n,n+1,n+2,n+3$ divisible by $4$ and one of them is divisible by $2$ but not $4$.
This easy fact says us any $4$ consecutive integers divisible by $8$.
We will use this fact in induction step. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9840936064221572,
"lm_q1q2_score": 0.8422376399704359,
"lm_q2_score": 0.8558511451289037,
"openwebmath_perplexity": 84.38057382088834,
"openwebmath_score": 0.8499935269355774,
"tags": null,
"url": "https://math.stackexchange.com/questions/1739918/use-induction-to-prove-that-that-8n-4n-for-all-positive-integers-n"
} |
sql-server, vb6
If Val(BalTax) <= 0 Then
HConn.Execute ("insert into tblBookLedgerTemp values('" & Year(Date) & "','" & Date & "','" & C5 & "','" & TanG & "','" & Muka & "','" & Val(Tan5) & "','0','" & Replace(PostUser, "'", "''") & "')")
GOVVal = Val(Tan5)
PERFCHECK3
ElseIf Val(BalTax) > 0 And Val(BalTax2) < 0 Then
CBAL1 = Val(BalTax)
CBAL2 = Round(Val(Tan5) - Val(CBAL1), 2)
HConn.Execute ("insert into tblBookLedgerTemp values('" & Year(Date) & "','" & Date & "','" & TT11 & "','" & TanG & "','" & Muka & "','" & Val(CBAL1) & "','0','" & Replace(PostUser, "'", "''") & "')")
HConn.Execute ("insert into tblBookLedgerTemp values('" & Year(Date) & "','" & Date & "','" & C5 & "','" & TanG & "','" & Muka & "','" & Val(CBAL2) & "','0','" & Replace(PostUser, "'", "''") & "')")
GOVVal = Val(CBAL2)
PERFCHECK3
Else
HConn.Execute ("insert into tblBookLedgerTemp values('" & Year(Date) & "','" & Date & "','" & TT11 & "','" & TanG & "','" & Muka & "','" & Val(Tan5) & "','0','" & Replace(PostUser, "'", "''") & "')") | {
"domain": "codereview.stackexchange",
"id": 29299,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "sql-server, vb6",
"url": null
} |
# How to compute/estimate the eigenvalues of this matrix
I'm trying to find the eigenvalues of a matrix $$A=\begin{bmatrix}2/3 & -1/4 & -1/4 \\ -1/4 & 2/3 & -1/4 \\ -1/4 & -1/4 & 2/3\end{bmatrix}$$
The eigenvalues of this matrix, are the roots $$\lambda$$ of the equation $$det(A-\lambda I)=0$$. Expanding this determinant with Sarrus's Rule gives a polynomial of a third degree, the solutions can apparently be estimated by iterative methods. Before I start exploring those avenues, however, I'd like to know if there is a more practical method to compute the eigenvalues of this matrix.
## 2 Answers
It's equal to $$- \frac{1}{4}J + \frac{11}{12} I$$, where $$I$$ is the identity matrix and $$J$$ is the matrix of all $$1$$s. Note that $$J$$ has two eigenvalues: $$0$$ with multiplicity $$2$$ (since it has a rank of $$1$$) and $$3$$ with multiplicity $$1$$, with eigenvector $$(1, 1, 1)$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9859363741964573,
"lm_q1q2_score": 0.8150852308561973,
"lm_q2_score": 0.8267117962054048,
"openwebmath_perplexity": 147.09249581437433,
"openwebmath_score": 0.9667751789093018,
"tags": null,
"url": "https://math.stackexchange.com/questions/3573575/how-to-compute-estimate-the-eigenvalues-of-this-matrix"
} |
c++, linked-list, queue, constructor
The class Queue also contains an inner private Node class which contains the pointers first, next, etc:
private:
int nrOfElements;
class Node
{
public:
Node* next;
T data;
Node(T data)
{
this->data = data;
}
};
Node* first;
So, I would appreciate any suggestions/examples of how the copy constructor code above could be improved, as I'm a bit lost on the task. Remove redundancy
{
Node* saveFirst;
Node* walker;
first = other.first;
walker = new Node(first->data);
saveFirst = walker;
while (first->next != nullptr)
{
walker->next = new Node(first->next->data);
walker = walker->next;
first = first->next;
}
walker->next = nullptr;
first = saveFirst;
}
this->nrOfElements = other.nrOfElements; | {
"domain": "codereview.stackexchange",
"id": 13585,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, linked-list, queue, constructor",
"url": null
} |
vba, excel
Dim R1 As Range, R2 As Range, R3 As Range, R4 As Range, R5 As Range, R6 As Range, R7 As Range, MultiRange As Range
Dim StartRow As Integer, EndRow As Integer
'Selection for Negative Control
Cells.Find(What:="Name", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
StartRow = ActiveCell.Row + 1
Cells.Find(What:="Group Summaries", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
EndRow = ActiveCell.Row - 1
Range("A" & StartRow, "O" & EndRow).Select
Set R1 = Selection
'Selection for Positive Control
Cells.Find(What:="Name", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
StartRow = ActiveCell.Row + 1 | {
"domain": "codereview.stackexchange",
"id": 14181,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "vba, excel",
"url": null
} |
ros-kinetic, ubuntu, ubuntu-xenial
Title: No definition of [boost] for OS version [xenial]
I'm installing ROS kinetic from source code on Ubuntu 16.04.6 LTS, by following instructions on http://wiki.ros.org/kinetic/Installation/Source
However when I proceed to below step, I got strange errors.
$ rosdep install --from-paths src --ignore-src --rosdistro kinetic -y
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies: | {
"domain": "robotics.stackexchange",
"id": 33959,
"lm_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-kinetic, ubuntu, ubuntu-xenial",
"url": null
} |
ros
any idea?
Originally posted by omrib on ROS Answers with karma: 31 on 2013-12-09
Post score: 3
Original comments
Comment by Arn-O on 2013-12-12:
Hi. Same issue here. (posted on the Gazebo side: http://answers.gazebosim.org/question/5099/rospack-could-not-find-the-controller_interface/). It looks like the package is broken on the repo, since it is ... empty.
Comment by comrob_commander on 2013-12-14:
I can confirm this, how to fix it?
this helped for me:
sudo apt-get install ros-hydro-ros-controllers
Originally posted by comrob_commander with karma: 56 on 2013-12-14
This answer was ACCEPTED on the original site
Post score: 4
Original comments
Comment by omrib on 2013-12-14:
tnx Comrob it works!!
Comment by dmeltz on 2013-12-28:
works for me also ! thanks a lot ! | {
"domain": "robotics.stackexchange",
"id": 16398,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
python, python-3.x, recursion, error-handling, minesweeper
class Minesweeper:
CLEAR = 0
MINE = 9
def __init__(self, width = 9, height = 10, mine_count = 12):
self.revealed_locations = []
print(f'Default size is {width}*{height}, {mine_count} mines')
default_size = input('Play default size? [Y/n]: ')
if default_size.lower() == 'n':
self.width = prompt_int('width', 0, 99)
self.height = prompt_int('height', 0, 99)
self.mine_count = prompt_int('number of mines',
0, self.width * self.height - 1)
else:
self.width = width
self.height = height
self.mine_count = mine_count
self.minefield = [[Minesweeper.CLEAR] * self.width
for _ in range(self.height)] | {
"domain": "codereview.stackexchange",
"id": 36956,
"lm_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, recursion, error-handling, minesweeper",
"url": null
} |
thermodynamics, water, phase-transition, ice
For thin fluids (with low viscosity), the convective effect of effective heating/cooling due to fluid motion is dominant.
For very thick fluids (with very high viscosity), so thick that you might mistake them for solids, heat can flow from particle to particle in a conductive manner, and conduction is dominant.
For some-what thick fluids, we may see a mix of these factors. The higher the heat capacity (corresponding to lower $\kappa$) of the fluid, the weaker is the conductive mechanism. | {
"domain": "physics.stackexchange",
"id": 57306,
"lm_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, water, phase-transition, ice",
"url": null
} |
turing-machines
Title: Turing machine to compute $⌈\log_2n⌉$ with 1 tape and unary input/output I'm trying to figure out how to make the action table for a Turing Machine computing $⌈\log_{2}(n)⌉$. The input and output shall be unary (meaning $3$ should represent $111$). I can only deal with 1 tape.
Also, I would prefer having 7 transition states, 1 final state, 24 actions and 5 symbols, but any other numbers are fine too. At the end of the computation, the TM head should be at the 1st $1$ from the left, of the output.
For $⌈\log_{2}(0)⌉$, I would like to have the symbol $N$ on the tape.
I would also like an easy-to-understand explanation, if possible. One simple approach is repeated halving.
Remove a single 1 from the input (if you fail, output N).
Then go over the tape in passes. Each pass deletes every other 1 encountered (starting with the first). The number of passes required to delete all 1s is $\lceil \log_2 n \rceil$. You can count the number of passes as you go. | {
"domain": "cs.stackexchange",
"id": 17794,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "turing-machines",
"url": null
} |
electromagnetism, group-theory, maxwell-equations, duality
\end{align*} $$
The duality symmetry I can spy in this is multiplying $\vec{F}$, $\rho$ and $\vec{j}$ with the same complex number, which is equivalent to the earlier $SO(2)$ and a rescaling.
Is this the full group? If not, what am I still missing? Yes, OP is right. The EM duality symmetry group of Maxwell equations is $SO(2)\times \mathbb{R}_+$, where $SO(2)$ is the EM rotation group and $\mathbb{R}_+$ is dilations. For generalizations, see Ref. 1.
References: | {
"domain": "physics.stackexchange",
"id": 60774,
"lm_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, group-theory, maxwell-equations, duality",
"url": null
} |
astronomy
Title: How distorted does the Andromeda Galaxy appear to us due to the speed of light? The Andromeda Galaxy appears to us at an angle to the galactic disk, i.e. we are not in the Andromeda Galaxy disc's plane, nor are we near the direction that the galaxy's pole points. Therefore, due to the geometry and distances involved, it would seem to me that we are seeing the 'far edge' a few thousand years later than we are seeing the 'near edge'. How far can a galaxy spin during that those few thousand years, and therefore how distorted are we seeing Andromeda? Can we infer how Andromeda or other large spiral galaxies seen at an angle would look if light were to travel instantly? | {
"domain": "physics.stackexchange",
"id": 5482,
"lm_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",
"url": null
} |
c++, opengl
struct _Programs
{
luck::program* program;
std::vector<_Meshs> meshs;
};
struct _States
{
luck::opengl_state state;
std::vector<_Programs> programs;
};
And this is the render function, run every frame
void renderable_system::render(luck::entity current_camera)
{
auto& c_spatial = current_camera.getComponent<spatial_component>();
glm::mat4 mat_projection = camera_system::calculate_projection(current_camera);
glm::mat4 mat_view = camera_system::calculate_view(current_camera);
//Query for objects inside the frustum, this returns every object with a spatial_component
auto entities = _spatial_system->_tree.query_frustum(mat_projection * mat_view); | {
"domain": "codereview.stackexchange",
"id": 9266,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, opengl",
"url": null
} |
physical-chemistry, computational-chemistry, molecular-mechanics
By looking at equation 1, it is not fully clear to me what negative pressure would imply, so I looked how the equation is derived.
The derivation starts from the Clausius virial function
\begin{equation}
W(r_{1},...,r_{n})=\sum_{i}^{N}r_{i}\cdot F_{i}^{TOT} \tag{2}
\end{equation}
where $F_{i}^{TOT}$ is the total force acting on particle $i$.
This can be averaged over the whole MD trajectory, and integrated to obtain
\begin{equation}
\big<W\big> = -\lim_{t\rightarrow 0}\frac{1}{t}\int^{t}_{0}d\tau\sum_{i=1}^{N}m_{i}|r'(\tau)|^{2} \tag{3}
\end{equation}
from which, by using equipartition of energy, one can obtain
\begin{equation}
\big<W\big>=-3Nk_{b}T \tag{4}
\end{equation}
where 3 is the dimensionality, $N$ is the number of particles, $T$ is temperature and $k_{b}$ is the Boltzmann constant.
The force exerted by the container walls can be taken in to account by 'splitting' the $F_{i}^{TOT}$ term in to internal and external part, and then
evaluate $\big<W^{EXT.}\big>$ using: | {
"domain": "chemistry.stackexchange",
"id": 7585,
"lm_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, computational-chemistry, molecular-mechanics",
"url": null
} |
performance, sql, sql-server, stored-procedure
FROM Mitarbeiter_Einrichtung
WHERE RefMitarbeiterId = INNERPLAN.RefMitarbeiterId
AND ( ( YEAR(GültigAb) = YEAR(@oldDate) AND MONTH(GültigAb) <= MONTH(@oldDate) )
OR YEAR(GültigAb) < YEAR(@oldDate) )
)
) | {
"domain": "codereview.stackexchange",
"id": 11013,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, sql, sql-server, stored-procedure",
"url": null
} |
ros
//We average the analog reading to elminate some of the noise
int averageAnalog(int pin){
int v=0;
for(int i=0; i<4; i++) v+= analogRead(pin);
return v/4;
}
long adc_timer;
void loop()
{
adc_msg.adc0 = averageAnalog(0);
adc_msg.adc1 = averageAnalog(1);
adc_msg.adc2 = averageAnalog(2);
adc_msg.adc3 = averageAnalog(3);
adc_msg.adc4 = averageAnalog(4);
adc_msg.adc5 = averageAnalog(5);
p.publish(&adc_msg);
nh.spinOnce();
}
I tried to get these values by writing a subscriber node program ,
import rospy
from std_msgs.msg import String
def callback(data):
rospy.loginfo(rospy.get_caller_id() + 'adc_value %d', data.data)
def listener(): | {
"domain": "robotics.stackexchange",
"id": 28251,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
condensed-matter, photons, solid-state-physics, electronic-band-theory, photonics
Question 2: When we say that a band has a certain Chern number, we usually refer to a completely filled band? So in order to fill a band completely in a photonic crystal, wouldn't I need an infinite number of photons? For example one photon in each Wannier state? | {
"domain": "physics.stackexchange",
"id": 90127,
"lm_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, photons, solid-state-physics, electronic-band-theory, photonics",
"url": null
} |
actionlib
when I catkin_make, error:
CMakeFiles/t3_sendGoals.dir/src/t3_sendGoals.cpp.o:在函数‘actionlib::GoalManager<move_base_msgs::MoveBaseAction_<std::allocator<void> > >::initGoal(move_base_msgs::MoveBaseGoal_<std::allocator<void> > const&, boost::function<void (actionlib::ClientGoalHandle<move_base_msgs::MoveBaseAction_<std::allocator<void> > >)>, boost::function<void (actionlib::ClientGoalHandle<move_base_msgs::MoveBaseAction_<std::allocator<void> > >, boost::shared_ptr<move_base_msgs::MoveBaseFeedback_<std::allocator<void> > const> const&)>)’中: | {
"domain": "robotics.stackexchange",
"id": 29308,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "actionlib",
"url": null
} |
general-relativity, classical-mechanics, cosmology, astronomy
Title: Simplifying Friedmann's Equation So we have one of Friedmann's equation:
$$\rho_c = \frac{3H^2}{8\pi G}$$
Using This website, resources where gathered for specific times in the universe. The resources being the Hubble constant at the specific times (i.e. 3.38By). The critical density was worked out for the specific times using the Hubble constant. The critical density was in Kg/m-3 units and was converted into amu/m-3 units, by timing the value by 6.02214129 × 10^26.
I then graphed the values: | {
"domain": "physics.stackexchange",
"id": 16292,
"lm_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, classical-mechanics, cosmology, astronomy",
"url": null
} |
fluid-dynamics, water, vortex, coriolis-effect
Title: How to show that the Coriolis effect is irrelevant for the whirl/vortex in the sink/bathtub? There is a common myth that water flowing out from a sink should rotate in direction governed by on which hemisphere we are; this is shown false in many household experiments, but how to show it theoretically? The Coriolis acceleration goes like $-2\omega \times v$, which for the sake of an order of magnitude estimate we can take to be $a\sim \omega v$. But in order to get an observable effect, we don't just need an acceleration, we need a difference in acceleration between the two ends of the tub, which are separated by some distance $L\sim 1$ m. The accelerations differ because $v=\omega r$, and $r$ differs by $\Delta r\sim L$. The result is that the difference in acceleration is $\omega^2 L$, which is on the order of $10^{-8}$ m/s2. This is much too small to have any observable effect in an ordinary household experiment. | {
"domain": "physics.stackexchange",
"id": 44104,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics, water, vortex, coriolis-effect",
"url": null
} |
ros
Originally posted by akumar3.1428 on ROS Answers with karma: 61 on 2022-11-07
Post score: 0
I figure out that It is essential to run rosbridge on the computer where you want to send data to. After installing rosbridge using the following command sudo apt-get install ros-<rosdistro>-rosbridge-server and launching using the command roslaunch rosbridge_server rosbridge_websocket.launch it was working perfectly. I would like to suggest to take care of the port number as rosbridge usually use 9090 and any different port number in the code could lead to error.
I am closing this issue as it has been solved. If the problem persists, please comment and the issue will be reopened if appropriate.
Originally posted by akumar3.1428 with karma: 61 on 2022-11-08
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 38108,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
energy, energy-conservation, potential-energy
Title: Energy conservativation of a system of particles Let's say I have a system of 1000 particles in a 2D box. When they hit a wall, they bounce back. The particles also affect each other with this force:
$$F={1 \over r^2}$$
So:
$$F_x={\Delta x \over r^3}$$
$$F_y={\Delta y \over r^3}$$
where
$$\Delta x_i=x_i-x_j$$
$$\Delta y_i=y_i-y_j$$
And the total energy of the system is
$$E_k=\Sigma_i v_i^2$$
I expect $E_k$ remains constant during time. Am I making any mistakes?
I have written a C++ program and found that kinetic energy keeps increasing in time: A few things: | {
"domain": "physics.stackexchange",
"id": 36241,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "energy, energy-conservation, potential-energy",
"url": null
} |
ros
Title: odom frame, robot base link frame and local cost map are not in the same plane
I followed the ros navigation tutorial from omniverse isaac sim, and discovered that the odom, local costmap and robot base link are not in the same plane.
(I wanted to upload the screenshot of the rviz result and tf tree, but I lack of points..)
Sorry if this is the basic question and thanks for your advices in advance.
Originally posted by mirakim on ROS Answers with karma: 21 on 2022-11-29
Post score: 1
Original comments
Comment by Ranjit Kathiriya on 2022-11-29:
Now you will be able to upload screenshot,
Kindly upload screenshot to elaborate well..want to help you out l.
Originally posted by Davies Ogunsina with karma: 96 on 2022-11-29
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 38158,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros",
"url": null
} |
python, parsing, configuration
if type == self.FE_TYPE:
evg_match=re.search("fmri\(evg\d+\.\d+\)", line)
if evg_match:
evg_lines.append(line)
if type == self.FE_TYPE or type == self.FIRST_TYPE:
ev_name_match=re.search("fmri\(evtitle\d+\)", line)
cope_name_match=re.search("fmri\(conname_real\.\d+\)", line)
cope_def_match=re.search("fmri\(con_real\d+\.\d+\)", line)
if cope_name_match:
name=self.get_fsf_value(line,cope_name_match.end())
index=self.get_fsf_indice(cope_name_match.group())
cope_names[index]=name
if cope_def_match:
cope_def_lines.append(line)
if ev_name_match:
name=self.get_fsf_value(line,ev_name_match.end())
index=self.get_fsf_indice(ev_name_match.group())
ev_names[index]=name | {
"domain": "codereview.stackexchange",
"id": 1798,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, parsing, configuration",
"url": null
} |
php, security, api
Title: PHP secure server2server communication I read a lot about security mechanisms used in different APIs. But I'm still wondering if my own implementation is secure or not since it seems that there will ever be a risk of something you forgot ...
The scenario:
I have 2 PHP-running systems: Client and Server. There are multiple clients and one server but the communication is always between one client and the server. Both have their own user database (userID x may represent a user in both systems). The API is hosted on the server side so communication is always directed from client to server. Each client has a unique and numeric auto increment ID and a unique and secure key (UUID) which is only known by the client itself and the server. | {
"domain": "codereview.stackexchange",
"id": 22737,
"lm_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, security, api",
"url": null
} |
game, design-patterns, objective-c
Beyond the return type, the method name needs some work. There are 3 words that are misleading and confusing. ForCharacter and and don't belong in this method name.
First of all, ForCharacter. What character? Perhaps the result is used for a character, but the method doesn't care how its result is used and it's name shouldn't indicate how its result is supposed to be used. The method name should indicate what the method does and with what parameters.
And and is only used in method names to indicate multiple actions and never used to indicate multiple arguments. The number of arguments is rarely confusing... since they all have names.
So truly, the method name should look like this:
- (instancetype)initWithWorldSize:(CGSize)worldSize startingFloor:(int)startingFloor; | {
"domain": "codereview.stackexchange",
"id": 8754,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "game, design-patterns, objective-c",
"url": null
} |
What do we do with a system of equations when we can't solve it? This is probably the main application in 18.06. So you've seen this problem before. What do we do if Ax equal b has no solution? So typically, b would be a vector of measurements, like we're tracking a satellite, and we get some measurements. But often we get too many measurements. And of course, there's a little noise in them. And a little noise means that we can't solve the equations.
That may be the case everybody knows is, where this equation is like expressing a straight line going through the data points. So the famous example of least squares is fit a straight line to the b's, to b1, b2. We've got m measurements. We've got m measurements. The physics or the mechanics of the problem is pretty well linear. But of course, there's noise. | {
"domain": "mit.edu",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987946222968067,
"lm_q1q2_score": 0.8455349135177815,
"lm_q2_score": 0.8558511524823263,
"openwebmath_perplexity": 472.62105521153546,
"openwebmath_score": 0.7132152318954468,
"tags": null,
"url": "https://ocw.mit.edu/courses/mathematics/18-065-matrix-methods-in-data-analysis-signal-processing-and-machine-learning-spring-2018/video-lectures/lecture-9-four-ways-to-solve-least-squares-problems/"
} |
mathematical-physics, curvature, matrix-model
I was wondering if mathematicians have explored the manifold of commuting hermitian matrices. In fact even a reference to a convenient parametrisation of the maximal flag manifold $F_n$ would greatly help me in deriving a general expression for the scalar curvature. Any comments/suggestions are welcomed. I actually solved the problem. The key idea is to use the fact that the metric depends on the internal manifold (the flag) only through the Maurer-Cartan forms and hence the scalar curvature cannot depend on the position in the internal manifold. One can then expand the elements of $SU(N)$ near the origin. Keep the metric exact in terms of the lambdas and to second order in the flag directions. One can then perform explicit calculations of the scalar curvature.
In case someone needs this in the future, this is the result for the scalar curvature: | {
"domain": "physics.stackexchange",
"id": 13562,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mathematical-physics, curvature, matrix-model",
"url": null
} |
Edit: I checked data for two more spacecrafts on the same website and they also seem to be behaving similarly. This is either something I don't know of, or the data is garbage.
You are correct to a point that the RA of the ascending node and argument of perigee won't change over time without some external force acting upon the satellite. In a simplified gravitational field, an object's orbital plane remains fixed.
Unfortunately, reality is a lot more messy.
Earth's gravitational field differs significantly from that created by a hypothetical point mass - this is known as the Geopotential Model. In particular, the Earth's oblateness (equatorial bulge), defined by the J2 coefficient, has a significant effect on orbits. It causes them to precess over time, changing the RA/longitude of their ascending nodes.
Furthermore, perturbing influences from other bodies in the solar system need to be accounted for when accurately plotting orbits - they can have small but non-negligible effects. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9621075733703925,
"lm_q1q2_score": 0.817763705246689,
"lm_q2_score": 0.8499711756575749,
"openwebmath_perplexity": 822.4351898223122,
"openwebmath_score": 0.752416729927063,
"tags": null,
"url": "https://space.stackexchange.com/questions/35479/can-the-right-ascension-and-argument-of-perigee-of-a-spacecrafts-orbit-keep-var/35480"
} |
experimental-physics, newtonian-gravity
Title: Gravitational inverse-square law I was looking at the gravitational inverse-square law:
$$
F_G = G \frac{Mm}{r^2}
$$
This law comes from some experimental data? Why it is an exact inverse-square law? Could it be
$$
F_G = G \frac{Mm}{r^{2.00000000000000001}}
$$
or there is a mathematical method to find exactly this law? To answer your question of whether or not there is experimental data, here is one of what I am sure are many papers regarding the classical definition of the gravitational force: http://www.physics.uci.edu/~glab/papers/HoskinsPaper.pdf | {
"domain": "physics.stackexchange",
"id": 4464,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "experimental-physics, newtonian-gravity",
"url": null
} |
# Probability Problem: A box contains 100 balls
A box contains 100 balls, numbered from 1 to 100. If two balls are selected at random and at the same time from the box, what is the probability that the numbers on the balls will be:
a) consecutives
b) 2 multiples of 6
c) odd and even
d) 2 divisors of 60
a) $P=\left(\dfrac{1}{100} \times \dfrac{1}{99}\right)100=\dfrac{1}{99}$
b) $P=\left(\dfrac{16}{100} \times \dfrac{15}{99}\right)= \dfrac{4}{165}$
c) $P=\left(\dfrac{50}{100} \times \dfrac{50}{99}\right)2=\dfrac{50}{99}$
d) $P=\left(\dfrac{10}{100} \times \dfrac{9}{99}\right)=\dfrac{1}{110}$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9893474872757474,
"lm_q1q2_score": 0.8042082406337095,
"lm_q2_score": 0.8128673201042492,
"openwebmath_perplexity": 114.77191324698607,
"openwebmath_score": 0.9065122008323669,
"tags": null,
"url": "https://math.stackexchange.com/questions/2483512/probability-problem-a-box-contains-100-balls"
} |
quantum-field-theory, lagrangian-formalism, quantum-chromodynamics, greens-functions, propagator
Regarding the last part: the symmetry-based construction of the theory has little to do with the propagator. Concepts such as propagator and vertex are objects that are introduced to construct a perturbation theory. One reason why it makes from second order terms about fields is because, as we saw above, second order terms about fields have various useful properties, such as the possibility of Gaussian integrals. On the other hand, when defining a field theory on a lattice, it is not always necessary to introduce propagators, etc. In other words, for perturbation theory, it is convenient to keep the second-order terms of the theory separate from the rest of the theory, so we keep them separate. | {
"domain": "physics.stackexchange",
"id": 94980,
"lm_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, lagrangian-formalism, quantum-chromodynamics, greens-functions, propagator",
"url": null
} |
ros, ros-kinetic, cmake, robotis
mx_msgsConfig.cmake
mx_msgs-config.cmake
Add the installation prefix of "mx_msgs" to CMAKE_PREFIX_PATH or set "mx_msgs_DIR" to a directory containing one of the above files. If "mx_msgs" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): svenzva_ros/svenzva_utils/CMakeLists.txt:4 (find_package)
-- Configuring incomplete, errors occurred! See also "/home/czm/problem02/build/CMakeFiles/CMakeOutput.log". See also "/home/czm/problem02/build/CMakeFiles/CMakeError.log". Makefile:318: recipe for target 'cmake_check_build_system' failed make: * [cmake_check_build_system] Error 1 Invoking "make cmake_check_build_system" failed
i also used
$ rosdep install -r --from-path src --ignore-src
but it make no sense.
Originally posted by iMatch on ROS Answers with karma: 3 on 2018-12-11
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 32152,
"lm_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-kinetic, cmake, robotis",
"url": null
} |
Frobenius coin problem
Suppose that you only have coins worth, say 3 and 5 euros. According to Sylvester result we can find the Frobenius nr $g(3,5)=15-3-5=7$ so 7 is the largest integer that cannot be written as $a_{1}k_{1}+a_{2}k_{2}$ for $k_{1},k_{2}\in\mathbb{N}$ and $a_{1},a_{2}$ are the values of these coins.
a) how do you pay 8€,9€ and 10€ with these coins?
b)use a) to show that it is possible to pay all amounts that are greater than 10€ with the coins 3€ and 5€.
c) show that it is impossible to pay the amount of 7€ with these coins.
I am afraid I do not understand 100% the whole idea behind the Frobenius numbers.
a) can we just take 3€+5€=8€ and 3€+3€+3€=9€ and 5€+5€=10€ this seems suspicious of how easy it is....
b)do I have to use both coins? or just 3€ or 5€? 11€=3€+5€+3€
12€=3€+3€+3€+3€
13€=3€+5€+5€
14€=5€+3€+3€+3€
.
.
c) if we could pay 7€ with these coins we could have written
$7€=k_{1}5€+k_{2}3€$ but this is impossible as $k_{1},k_{2}\in\mathbb{N}$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9770226300899744,
"lm_q1q2_score": 0.8361859421677031,
"lm_q2_score": 0.8558511506439708,
"openwebmath_perplexity": 185.79245009605427,
"openwebmath_score": 0.7790004014968872,
"tags": null,
"url": "https://math.stackexchange.com/questions/401192/frobenius-coin-problem"
} |
c#, algorithm, coordinate-system
Line: -1
Column: 0
Line: 0
Column: -1
Column: 1
Line: 1
Column: 0
The second idea is the horizontal for loop (the inner loop). We take the absolute of the line and subtract it with 1. This provides us the right first and last sequence since we've terminated the only difference between them: the negative sign.
Than we add +2 to the index for each run since the only line surviving this is the one in the middle ("0"). Remember: we subtract 1, so the 0-line starts with "-1".
I think this is quite a brainfuck and that's why I wonder if there's a more elegant way to solve this. Is the code evolving from these ideas somehow improvable?
This code is extremely hard to read and much longer than it needs to be.
Use documented naming conventions for C#.
Make small methods that do one thing well. | {
"domain": "codereview.stackexchange",
"id": 22046,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, algorithm, coordinate-system",
"url": null
} |
• Determine the Dimension of a Mysterious Vector Space From Coordinate Vectors Let $V$ be a vector space and $B$ be a basis for $V$. Let $\mathbf{w}_1, \mathbf{w}_2, \mathbf{w}_3, \mathbf{w}_4, \mathbf{w}_5$ be vectors in $V$. Suppose that $A$ is the matrix whose columns are the coordinate vectors of $\mathbf{w}_1, \mathbf{w}_2, \mathbf{w}_3, […] • Vector Space of 2 by 2 Traceless Matrices Let$V$be the vector space of all$2\times 2$matrices whose entries are real numbers. Let $W=\left\{\, A\in V \quad \middle | \quad A=\begin{bmatrix} a & b\\ c& -a \end{bmatrix} \text{ for any } a, b, c\in \R \,\right\}.$ (a) Show that$W$is a subspace of […] • Determine the Values of$a$so that$W_a$is a Subspace For what real values of$a$is the set $W_a = \{ f \in C(\mathbb{R}) \mid f(0) = a \}$ a subspace of the vector space$C(\mathbb{R})$of all real-valued functions? Solution. The zero element of$C(\mathbb{R})$is the function$\mathbf{0}$defined by […] • Subspaces of the Vector Space of All Real Valued | {
"domain": "yutsumura.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9907319849771951,
"lm_q1q2_score": 0.8053336535699759,
"lm_q2_score": 0.8128673201042492,
"openwebmath_perplexity": 102.89623008059844,
"openwebmath_score": 0.9981648325920105,
"tags": null,
"url": "https://yutsumura.com/vector-space-of-functions-from-a-set-to-a-vector-space/"
} |
python, beginner, game, simulation
def pick_guess():
"""User guesses winning door"""
guess = int(input("Please choose a door (1-3): ").strip())
return guess
b = pick_guess()
if a == b:
def montys_door_if_a_is_b():
"""If answer = guess, pick one of the remaining doors to open"""
global x
door = [1,2,3]
door.remove(a)
x = random.choice(door)
return x
c = montys_door_if_a_is_b()
print("You chose door {}".format(b))
print("I choose door {}".format(c))
def montys_final_choice():
"""Tells user which 2 doors are now left"""
door = [1,2,3]
door.remove(x)
door.remove(a)
y = door[0]
return y
d = montys_final_choice()
print("You're left with doors {} and {}".format(b,d))
choice = input("Will you SWITCH to door {}? y/n: ".format(d)) | {
"domain": "codereview.stackexchange",
"id": 25432,
"lm_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, game, simulation",
"url": null
} |
computability, turing-machines, undecidability
Run the machine, keeping track of all its past configurations. If it ever goes beyond point $n$, return "yes, $M$ passes position $n$". Otherwise, the machine is somewhere between 0 and $n$. If the machine ever repeats a configuration--its state, the symbols on the tape, and its position on the tape are identical to what they were before--return "no, $M$ never passes position $n$."
By the pidgeonhole principle, this has to happen in no more than $t+1$ steps. So all of the above is decidable; after at most $t+1$ simulated steps you get an answer. | {
"domain": "cs.stackexchange",
"id": 413,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computability, turing-machines, undecidability",
"url": null
} |
electromagnetism, electromagnetic-radiation, magnetic-fields, inertial-frames, electromagnetic-induction
Title: Why is energy in magnetic field dependent upon frame since field is a physical quantity (wave)? Why does energy in magnetic field change with changing frame. I mean magnetic fields are physical things that are released by source charge. So how can the energy released by a source charge change upon frame of test charge? Any sensible answer?
I know and believe that magnetic fields just can't be a mathematical construct! They are real and affect us somehow
If anything contains energy then it must be physical and real not a mathematical construct!
Why does energy in magnetic field change with changing frame.
Energy is inherently frame variant. It is the timelike component of the four-momentum. Energy has the same relationship to momentum as time has to space. All energy changes with changing frame, including the energy in the electromagnetic field. | {
"domain": "physics.stackexchange",
"id": 83340,
"lm_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, electromagnetic-radiation, magnetic-fields, inertial-frames, electromagnetic-induction",
"url": null
} |
c++, algorithm, recursion, c++20, constrained-templates
Title: A recursive_find_if_all Template Function Implementation in C++ This is a follow-up question for recursive_any_of and recursive_none_of Template Functions Implementation in C++. I am trying to follow the suggestion of G. Sliepen's answer to implement recursive_find_if_all template function in this post.
The experimental implementation
recursive_find_if_all Template Function Implementation
// recursive_find_if_all template function implementation
template<class T, class Proj = std::identity, class UnaryPredicate>
requires(std::invocable<Proj, T>) && (std::invocable<UnaryPredicate, T>)
constexpr auto recursive_find_if_all(T&& value, UnaryPredicate&& p, Proj&& proj = {}) {
return std::invoke(p, std::invoke(proj, value));
} | {
"domain": "codereview.stackexchange",
"id": 45353,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, algorithm, recursion, c++20, constrained-templates",
"url": null
} |
spectrophotometry, drugs
UV analysis. So I was wondering if it would be a good idea to centrifuge the samples, or just wait for it to precipitate on its own? And if centrifuge, would it be better to first centrifuge the stock solution and then dilute or first dilute and then centrifuge the acquired diluted solution? Thanks in advance. I'd agree with Zhe that "this is a non trivial problem." Method development is tricky if you don't have a standard analysis procedure. | {
"domain": "chemistry.stackexchange",
"id": 7559,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "spectrophotometry, drugs",
"url": null
} |
ros, wiki
Originally posted by Pi Robot on ROS Answers with karma: 4046 on 2013-10-08
Post score: 4
Original comments
Comment by William on 2013-10-08:
@Dirk Thomas any ideas?
Since the moinmoin wiki has exceed its "recommended" page limit by far the search is not using the moinmoin specific search at all. Instead it used Google search. So there is no "keyword" search but just "plain text" search.
I don't know why the previously integrated Google search was so bad but I guess it was not updated correctly during the transition to the new hosting. Anyway a normal google search seems to bring up the expected results (e.g. http://lmgtfy.com/?q=ar_kinect+site%3Awiki.ros.org).
I created a new Google custom search profile. Now the results of the search should be more appealing.
Originally posted by Dirk Thomas with karma: 16276 on 2013-10-08
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by Pi Robot on 2013-10-08:
Awesome--works great now. Many thanks! | {
"domain": "robotics.stackexchange",
"id": 15792,
"lm_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, wiki",
"url": null
} |
c#, json, asp.net-web-api
// ...
} | {
"domain": "codereview.stackexchange",
"id": 30960,
"lm_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#, json, asp.net-web-api",
"url": null
} |
ruby, ruby-on-rails
Title: Creation of a Select in a View I have the following code in a VIEW:
<select name="selected_budget_mode" class="" onchange="OnBudgetModeChanged(this)">
<option value="0"
<% if params[:current_budget_mode].to_i == 0 %>selected
<% end %>><%= show_budget_mode(0) %></option>
<option value="1"
<% if params[:current_budget_mode].to_i == 1 %>selected
<% end %>><%= show_budget_mode(1) %></option>
<option value="2"
<% if params[:current_budget_mode].to_i == 2 %>selected
<% end %>><%= show_budget_mode(2) %></option>
</select> | {
"domain": "codereview.stackexchange",
"id": 13439,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ruby, ruby-on-rails",
"url": null
} |
c#, entity-framework, database, search, repository
return query;
}
internal static IQueryable<Contact> FilterContactQuery(IQueryable<Contact> query, ContactSearchParameters searchParameters)
{
if (searchParameters == null)
return query;
query = FilterContactQuery(query, searchParameters.ClientSearchParameters);
query = FilterContactQuery(query, searchParameters.CompanySearchParameters);
if (!string.IsNullOrWhiteSpace(searchParameters.CellNumberSearchParameter))
query = query.Where(x => x.CellNumber.Contains(searchParameters.CellNumberSearchParameter));
if (!string.IsNullOrWhiteSpace(searchParameters.OfficeNumberSearchParameter))
query = query.Where(x => x.OfficeNumber.Contains(searchParameters.OfficeNumberSearchParameter));
if (!string.IsNullOrWhiteSpace(searchParameters.EmailSearchParameter))
query = query.Where(x => x.Email.Contains(searchParameters.EmailSearchParameter)); | {
"domain": "codereview.stackexchange",
"id": 22817,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, entity-framework, database, search, repository",
"url": null
} |
noise, sampling, power-spectral-density
If you were to divide that that power by the peak value of $S_y(f)$, you would have the equivalent noise bandwidth of the system.
$$\begin{align}
2B &= \frac{\frac{k_\mathrm{B} T}{C}}{2 k_\mathrm{B} T R} \\
\\
&= \frac{1}{2RC}
\end{align}$$
I am calling it "$2B$" to be consistent with the convention that the bandwidth $B$ is one-sided (only the positive frequency) and $2B$ is the two-sided bandwidth. That would be the same power or variance you would get with the same white noise strength $\eta$ (which is not variance, despite what Royi or someone else might call it) and an open channel of spectrum with a one-sided bandwidth of $B$. | {
"domain": "dsp.stackexchange",
"id": 12202,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "noise, sampling, power-spectral-density",
"url": null
} |
species-identification, arachnology
Fishing spiders are similar to the larger wolf spiders in size, shape, and coloration. Species in the genus Dolomedes are called fishing spiders because most live near water and have been reported to catch small fishes and aquatic insects from the water as they walk on the surface. The species Dolomedes tenebrosus is more frequently associated with wooded areas (it would be more accurately classified as a tree-dwelling spider) and is a common household invader in these locations. It occurs from New England and Canada south to Florida and Texas. | {
"domain": "biology.stackexchange",
"id": 4332,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "species-identification, arachnology",
"url": null
} |
c++, recursion, template, c++20, constrained-templates
auto recursive_transform_result4 = recursive_transform<2>(
test_deque2,
[](int x)->std::string { return std::to_string(x); }); // For testing
std::cout << "string: " + recursive_transform_result4.at(0).at(0) << '\n';
// std::list<int> -> std::list<std::string>
std::list<int> test_list = { 1, 2, 3, 4 };
auto recursive_transform_result5 = recursive_transform<1>(
test_list,
[](int x)->std::string { return std::to_string(x); }); // For testing
std::cout << "string: " + recursive_transform_result5.front() << '\n'; | {
"domain": "codereview.stackexchange",
"id": 44442,
"lm_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++, recursion, template, c++20, constrained-templates",
"url": null
} |
over an interval, the function value at the midpoint is evaluated. The theorem is demonstrated in Figure 2. Getting root of an equation by Bisection Method through C programming language. follow the algorithm of the bisection method of solving a nonlinear equation, 2. 2004 Judith Koeller The bisection method can be used to approximate a solution p to an equation f(p)=0 where f(x) is a continuous function. Mujahid Islam Md. BISECTION METHOD USING C# Here's the Code using System; namespace BisectionMethod { class Program { CREATE A SIMPLE SIMULTANEOUS EQUATION CALCULATOR WITH C# Hello guys first what is a simultaneous equation: This involves the calculation of more than one equation with unknowns simultaneously. The problem is that it seems like the teachers recommended solution to the task isn't quite right. Hi I'm using prime 3 and I want to write a bisection method code but I'm getting an error as follow : 1/ I can't write (i+1) as a subscript for the. What are synonyms for | {
"domain": "zite.pw",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754474655618,
"lm_q1q2_score": 0.8588918084029662,
"lm_q2_score": 0.8723473763375643,
"openwebmath_perplexity": 521.1656787315939,
"openwebmath_score": 0.6526755094528198,
"tags": null,
"url": "http://hons.zite.pw/bisection-method.html"
} |
fluid-dynamics, water, flow, bernoulli-equation
Here, because the top reservoir is very large, then $v_0\approx 0$ and $v_1$ can then be calculated from Bernoulli ($v_1\approx \sqrt{2gh}$ with $h$ the length of the pipe)
Then $v_1\gg v_0$.
But the velocity inside the pipe is always the same, that is $v_1$, for the reason outlined higher up. And $v_0$ lays of course outside the tube. | {
"domain": "physics.stackexchange",
"id": 74969,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics, water, flow, bernoulli-equation",
"url": null
} |
fermions, quarks, weak-interaction, chirality, baryons
In an imaginary, notional world, you might have zero quark masses, in which case the right- and left-chiral quarks would not couple to each other (yet); they'd only couple to gluons, the mediators of the strong interactions, that "glue" them together into hadrons, here nucleons. The gluons also produce a googzillion of virtual quark-antiquark pairs that give their nucleons their characteristic features, and, more importantly, they "confine" the quarks to a "large" area, a blob of diameter about a fermi. The quarks cannot escape this confinement radius. | {
"domain": "physics.stackexchange",
"id": 65173,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fermions, quarks, weak-interaction, chirality, baryons",
"url": null
} |
1 ? the This is the reason I like best. While we can use other methods to solve such a problem, if we know the multiplicative inverse of our coefficient matrix, then we can easily solve the problem by simply multiplying both sides by the inverse. A second-order matrix can be represented by . 's' : ''}}. Step 2:. a number multiplied by it’s multiplicative inverse gives the multiplicative identity. Here are three ways to find the inverse of a matrix: 1. See Also . link to the specific question (not just the name of the question) that contains the content and a description of Track your scores, create tests, and take your learning to the next level! If we multiply matrix A by the inverse of matrix A, we will get the identity matrix, I. From the top row, we get 1(11) + -2(5) = 11 - 10 = 1. All other trademarks and copyrights are the property of their respective owners. Reduce the left matrix to row echelon form using elementary row operations for the whole matrix (including the right one). | {
"domain": "gridserver.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9814534344029238,
"lm_q1q2_score": 0.8544506708232129,
"lm_q2_score": 0.8705972600147106,
"openwebmath_perplexity": 696.4878762898684,
"openwebmath_score": 0.757369875907898,
"tags": null,
"url": "https://s12762.gridserver.com/1gb40i0t/43d397-master-electrician-test"
} |
ros, pose, base-link, transform
Title: Finding a frame pose given pose (calculated) of another frame
Hello everyone,
I am publishing r_gripper_pick_pose as, say, :
<node name="btw_bl_rpp" pkg="tf" type="static_transform_publisher" args=
"3 1 8 0 0 0 1 base_link r_gripper_pick_pose 10"
respawn="false" output="screen" />
I calculate the pose (with direction) for this frame (r_gripper_pick_pose) (say to pick up sth). Lets call it Calc_grasp_pose.
How can I find the base_link (i.e, robot pose) pose wrt the Calc_grasp_pose?
I guess I can not use TF for this as there is no frame being published which is b/w existing farmes and r_gripper_pick_pose. i.e, how can I use TF, if at all, to get new pose with transformation between two poses instead of two frames?
I am using ros electric.
Update:-
For clarification consider the following figure : | {
"domain": "robotics.stackexchange",
"id": 13847,
"lm_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, pose, base-link, transform",
"url": null
} |
python, beginner, python-2.x, tic-tac-toe
You can set locations in a list using the index, so board[ind] = 'x'.
You can use in to match multiple values, such as if start in 'xY', if start == "X" or start == "x":. However, since you just want to do a case-insensitive match, you can start.upper() == 'X' to convert start to an uppercase value and then just match the uppercase version. Or better yet just do raw_input('foo').upper() to make it uppercase from the beginning.
You have separate functions for handling x and o moves. It would be simpler to have one function that accepts the player as an argument.
You can use .format(*board) to expand all the values in the list board to individual arguments to format.
Rather than checking particular combinations manually, you can check particular combinations of indices that correspond to a "win" and check if those all have the same pieces. | {
"domain": "codereview.stackexchange",
"id": 22286,
"lm_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, tic-tac-toe",
"url": null
} |
$\displaystyle \rho \equiv \rho\downharpoonright_{H^G} \oplus \rho\downharpoonright_{(H^G)^\perp}$
into a trivial representation ${\rho\downharpoonright_{H^G}}$, and a representation ${\rho\downharpoonright_{(H^G)^\perp}}$ with no non-trivial invariant vectors. (Indeed, this is the only such decomposition up to isomorphism; we leave this as an exercise to the reader.) For instance, if ${G}$ is a finite group and we consider the regular representation ${\tau}$ (so ${H = \ell^2(G)}$), then ${H^G}$ is the one-dimensional space of constants ${{\bf C}}$, while ${(H^G)^\perp}$ is the space ${\ell^2(G)_0}$ of functions of mean zero, so we have the decomposition
$\displaystyle \tau \equiv {\bf C} \oplus \tau\downharpoonright_{\ell^2(G)_0}.$
Note that if ${G}$ is an infinite discrete group, then there are already no non-trivial invariant vectors in ${\ell^2(G)}$ (why?), so the decomposition in this case is trivial:
$\displaystyle \tau \equiv 0 \oplus \tau\downharpoonright_{\ell^2(G)}.$ | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9940889309686339,
"lm_q1q2_score": 0.8032906701740407,
"lm_q2_score": 0.8080672112416737,
"openwebmath_perplexity": 84.97322490766847,
"openwebmath_score": 0.9605917930603027,
"tags": null,
"url": "https://terrytao.wordpress.com/2011/12/06/254b-notes-2-cayley-graphs-and-kazhdans-property-t/"
} |
general-relativity, hamiltonian-formalism, hamiltonian
Please elucidate. One should be careful to distinguish the Hamiltonian associated with particle motion in a gravitational field and the Hamiltonian associated with the gravitational field itself. The theorem on page three of the article you linked (is this the theorem you were referring to?) concerns the action for a free particle, not the Einstein-Hilbert action.
Nevertheless, there is a sense in which the Hamiltonian associated to the Einstein-Hilbert action is zero, and this is problematic when it comes to defining the energy of a spacetime. The resolution lies in the surface terms arising when the Hamiltonian is varied. The Hamiltonian of GR as obtained by the usual Legendre transform procedure is
$$ H = \int \mathrm{d}^3 x \, (\pi^{ij} \dot{h}_{ij} - \mathcal{L}) = \int \mathrm{d}^3 x \, (\mathcal{H} N+ N^i\mathcal{H}_i ) \,,$$
where $N$ is the lapse function, $N^i$ is the shift vector, and | {
"domain": "physics.stackexchange",
"id": 44939,
"lm_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, hamiltonian-formalism, hamiltonian",
"url": null
} |
eigen
[ rosmake ] Output from build of package pr2_teleop written to:
[ rosmake ] /home/kadir/.ros/rosmake/rosmake_output-20110225-084802/pr2_teleop/build_output.log
[rosmake-1] Finished <<< pr2_teleop [FAIL] [ 1.08 seconds ]
[ rosmake ] Halting due to failure in package pr2_teleop.
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:
[ rosmake ] Built 52 packages with 1 failures.
[ rosmake ] Summary output to directory | {
"domain": "robotics.stackexchange",
"id": 4865,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "eigen",
"url": null
} |
python, python-3.x, recursion
[('Quadrupel',), ('Tripel',), ('Dubbel',), ('La Trappe Quadrupel 2000/2001',), ('La Trappe Tripel',),
('La Trappe Enkel / La Trappe Blond',), ('La Trappe Dubbel',), ("Tilburg's Dutch Brown Ale",)],
[('Quadrupel',), ('Tripel',), ('Dubbel',), ('La Trappe Quadrupel 2000/2001',), ('La Trappe Tripel',),
('La Trappe Enkel / La Trappe Blond',), ('La Trappe Dubbel',), ("Tilburg's Dutch Brown Ale",)],
[('Robertus',), ('Christoffel Blond',)],
[('Lager',)],
[('La Rossa',), ('Birra Moretti La Rossa',)],
[('Premium Beer',)],
[('Mocny BOSS / BOSS Beer',), ('Porter Czarny Boss / Black BOSS Porter',)],
[('Houblon',), ('McChouffe',), ('La Chouffe Golden Ale',), ('Chouffe-Bok',), ('Bière de Mars',)],
[('Winter',), ('Grand Cru',), ('Triple',), ('Blonde',), ('Brune / Brown',)], | {
"domain": "codereview.stackexchange",
"id": 38369,
"lm_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, recursion",
"url": null
} |
ionic-compounds
Title: Why does a Fluoride ion only have a -1 charge and not a -2 charge or more? Transition elements can form ions with different charges. Why can't elements other than transition elements form ions with different charges? If it is a Fluoride ion, why does it have to be an anion of charge -1? Why can't it have a -2 charge, or more? The octet rule is usually used to explain the charges that atoms in groups I, II, VI, and VII have in ionic compounds, by saying something like "noble gases are stable, therefore having 8 valence electrons must be stable for some reason." This is true, but understanding why noble gas configurations are stable is important, and without knowing that, it does seem like magic that some atoms don't adopt a noble gas configuration in ionic compounds. | {
"domain": "chemistry.stackexchange",
"id": 1540,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ionic-compounds",
"url": null
} |
ros, gazebo, pioneer
Original comments
Comment by F.Brosseau on 2016-06-06:
I don't see the warnings. A little update ? :)
Comment by gvdhoorn on 2016-06-06:
Please format xml (launch files, urdf) and error messages with the Preformatted text button (the one with 101010 on it). Just select the text you want to format, then press the button (or ctrl+k). Otherwise your question is rather hard to read. Thanks.
Comment by M_wasiel13 on 2016-06-07:
Hi,
The description has been updated. I hope now it is more clear. Waiting for your response because I think this warning causes my problems with work of base_local_planner
Comment by F.Brosseau on 2016-06-07:
Do you have an error ? These two warnings just tell you that you don't use the odometrySource and publishTf tags so it will use default values. Values for odometrySource are WORLD or ENCODER. You can set it by adding WORLD for example.
Comment by F.Brosseau on 2016-06-07: | {
"domain": "robotics.stackexchange",
"id": 24817,
"lm_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, gazebo, pioneer",
"url": null
} |
ros, namespace
Title: How do I control 2 PR2 robots in gazebo at the same time?
I can teleoperate on pr2 robot through roslaunch pr2_teleop_general pr2_teleop_general_keyboard.launch.
I am also able to move pr2 robot by writing a C++ script. But I want to have 2 pr2 robots in my customised world and control move both of them. I am using ROS-Indigo with gazebo version 2.2.2 on Ubuntu 14.04. | {
"domain": "robotics.stackexchange",
"id": 24890,
"lm_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, namespace",
"url": null
} |
cc.complexity-theory, np-hardness, big-list, randomness, reductions
Linear divisibility
Binary quadratic diophantine equations
are NP-complete, but the same is not known for deterministic reductions (as far as I know, for slightly out-dated discussion of this situation see here). $\gamma$-reducibility was introduced in the paper "Reducibility, randomness, and intractibility" by Leonard Adleman and Kenneth Manders (proofs for the problems above were proposed also there).
There are other such examples in "A Catalog of Complexity Classes", but I haven't checked what is known about their NP-completeness under deterministic reductions. | {
"domain": "cstheory.stackexchange",
"id": 684,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cc.complexity-theory, np-hardness, big-list, randomness, reductions",
"url": null
} |
space-telescope, hubble-telescope
I can't find a place in nasa.gov that says that the Hubble works like a cell phone, but of course the principle is the same.
An optical system takes parallel light coming from various directions and focuses each parallel bundle to a small point.
We used to say this is how a camera works back when cameras were big and had obvious lenses on one end and big rectangles of photographic film on the other, but most people just use the tiny camera inside their phone.
Sources: left, right
The Hubble telescope is also a camera but with a much bigger lens. It is built a lot more like these; the first two are cameras, the third is a telescope without an imager. From this answer to Can an astronomical telescope view objects on Earth? which basically explains that a telescope is just a big camera :-)
Sources: left, right
Source
Is the digital camera built to see billions of light years away, or does Hubble have some technology on it that allows it to zoom into the deep space? | {
"domain": "astronomy.stackexchange",
"id": 5539,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "space-telescope, hubble-telescope",
"url": null
} |
general-relativity, speed-of-light, causality
I can understand the time symmetric diagram as this corresponds to the Schwarzschield solution.
Can anyone tell me if the second diagram with tilted time asymmetric lightcones is also correct, and if so how? (And what is the relation between the two diagrams?) How can one have a time asymmetric diagram of gravity if our experience of gravity is time symmetric?
Could we have a time symmetric diagram in which things can come out of a black hole and fall back in again? There is no "correct" shape of the light cone, because a drawing of the light cones is always done in some coordinate system, and the result will look different in different coordinate systems. Away from the event horizon, I can use a coordinate change to make the light cones point inward, outward, or even upside down. | {
"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
} |
functions for an electron in a box (here a one-dimensional square well with infinite walls) are just the sine and cosine series determined by the boundary conditions. (b) Fourier series 8. Graphing the Sawtooth Function. So sinω0t, sin2ω0t forms an orthogonal set. The Fourier series is named after Joseph Fourier, who introduced the series as he solved for a mathematical way to describe how heat transfers in a. svg 512 × 30,720; 169 KB Fourier series square wave circles animation. Consider the function H(a) defined for a ∈ R by H(a) = ∫a+T a f(x)dx. Fourier series sawtooth wave circles animation. Most of this course will be concerned with Fourier Series and Fourier Transforms (see later). The sawtooth wave is the odd 2ˇ-periodic function defined on ˇ x ˇby the formula sawtooth(x) = 8 >> >< >> >: 1 2 (ˇ x) 0 Series > Fourier Series > Interactive Entries > Interactive Demonstrations > Fourier SeriesSawtooth Wave Consider a string of length plucked at the right end and fixed at the left. | {
"domain": "cenews24.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9877587218253717,
"lm_q1q2_score": 0.8165917829206087,
"lm_q2_score": 0.826711791935942,
"openwebmath_perplexity": 740.4227252301312,
"openwebmath_score": 0.8933987021446228,
"tags": null,
"url": "http://vwhi.cenews24.it/fourier-series-of-sawtooth-wave-pdf.html"
} |
electrostatics, electric-fields, potential, voltage, integration
By definition $\phi _{0}$ is the work per unit charge required to bring a positive test charge that is very far away to the vicinity of $r_{0}$.
$$\phi_{0}=\int_{\infty}^{r_{0}}-\textbf{E}\cdot\textbf{dl}$$
decomposing $\textbf{dl}$ into two orthogonal vectors $$\textbf{dl}=\textbf{dr}+\textbf{dr}_{\perp}$$
the integral becomes
$$\phi_{0}=\int_{\infty}^{r_{0}}-\textbf{E}\cdot \textbf{dr}$$
We define $\hat{\textbf{r}}$ as the unit vector pointing radially away from $q$.
$\textbf{E}$ will be expressed as
$$\textbf{E}=\frac{q}{r^{2}}\hat{\textbf{r}}$$
and $\textbf{dr}$ as $$\textbf{dr}= \textrm{dr} \, \hat {\textbf{r}}$$
where, and I think this is important, $\textrm{r}$ starts from $\infty$ and goes all the way down to $r_{0}$, in other words, $\textrm{r}$ is decreasing, thereby making $\textbf{dr}$ point in the $-\hat{\textbf{r}}$ direction.
Going back to our integral
$$\phi _{0}= \int_{\infty}^{r_{0}}\frac{q}{r^2}\hat{\textbf{r}}\cdot \textrm{dr}\,\hat{\textbf{r}}$$ | {
"domain": "physics.stackexchange",
"id": 61370,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrostatics, electric-fields, potential, voltage, integration",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.