text stringlengths 1 1.11k | source dict |
|---|---|
The second challenge I found emerged from the introduction the coordinate system: an underlying 2×2 system of equations. There are multiple ways to tackle a solution to a linear system, but this strikes me as yet another high hurdle for younger students.
Finally, I’m a bit surprised by my current brain block on multiple approaches for this problem. I suspect I’m blinded here by my algebraic bias in problem solving; surely there are approaches that don’t require this. I’d love to hear any other possibilities.
POINT P VARIES
Because I was given properties of point P and not its location, the easiest approach I could see was to position the square on the xy-plane with point B at the origin, $\overline{AB}$ along the y-axis, and $\overline{BC}$ along the x-axis. That gave my point P coordinates (x,y) for some unknown values of x & y. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130547786954,
"lm_q1q2_score": 0.8108852170970462,
"lm_q2_score": 0.8198933403143929,
"openwebmath_perplexity": 1002.0390663806481,
"openwebmath_score": 0.7301233410835266,
"tags": null,
"url": "https://casmusings.wordpress.com/tag/system-of-equations/"
} |
classical-computing, applications, history
total, implying that the factorization will be several orders of magnitude faster on your laptop. The practical improvement in time complexity won't be noticeable unless and until the number of qubits increases by at least 10 times or so (I'm not considering the D-Wave machines which have over 1000 qubits, as they use a different mechanism known as quantum annealing which is effective only in a few narrow ranges of problems). But, arguably even the number of qubits is on a steady rise. Recently Google announced a 72-qubit machine ( | {
"domain": "quantumcomputing.stackexchange",
"id": 256,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-computing, applications, history",
"url": null
} |
is that we want P(W1 & WE), where W1 and W2 are the events W1 ={first is white} and W2 = {second is white}. A basic probability law is P(W1 & W2) = P(W1) * P(W2|W1), where P(W2|W1) is the conditional probability of W2, given that W1 has occurred. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9632305360354471,
"lm_q1q2_score": 0.818718191143325,
"lm_q2_score": 0.8499711756575749,
"openwebmath_perplexity": 291.87834102911194,
"openwebmath_score": 0.7594638466835022,
"tags": null,
"url": "https://www.physicsforums.com/threads/simple-probability-problem.859685/"
} |
rqt
Title: ImportError for rqt plugin
Hello,
I want to create a rqt plugin for bagfile comparison called rqt_bag_comparison. Therefore I have followed the tutorial "Create your new rqt plugin", step by step.
When trying to start the plugin from the rqt_gui, I get the following error message:
RosPluginProvider.load(rqt_bag_comparison/BagComparisonPlugin) exception raised in __builtin__.__import__(rqt_bag_comparison.bag_comparsion, [BagComparison]):
Traceback (most recent call last):
File "/opt/ros/groovy/lib/python2.7/dist-packages/rqt_gui/ros_plugin_provider.py", line 77, in load
module = __builtin__.__import__(attributes['module_name'], fromlist=[attributes['class_from_class_type']], level=0)
ImportError: No module named bag_comparsion | {
"domain": "robotics.stackexchange",
"id": 18892,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rqt",
"url": null
} |
drcsim
Original comments
Comment by davetcoleman on 2014-01-21:
Ok, I'm now on default branch for Gazebo and am compiling from source. While running make I get:
/home/dave/ros/ws_gazebo/gazebo/interfaces/player/player.h:22:38: fatal error: libplayercore/playercore.h: No such file or directory
I have libplayercore3.0-dev installed
Comment by Jose Luis Rivero on 2014-01-21:
You have two options: check that libplayercore/playercore.h is present in your system under /usr/include. If so, compile with VERBOSE=1 and check that there is a -I/usr/include/player3.0 as compiler parameter. In both are right, it should compile. The other option is to get rid of all the player support in gazebo (are you planning on using it?) just uninstall it: sudo apt-get remove libplayer*
Comment by davetcoleman on 2014-01-21: | {
"domain": "robotics.stackexchange",
"id": 3533,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "drcsim",
"url": null
} |
fourier-transform, crystals, coulombs-law
the possibility of increasing the system's size by suitably varying the shape of the system to keep the sequence of energies as close as possible to any real number arbitrarily chosen. This way, the series may converge to whatever real number we like. | {
"domain": "physics.stackexchange",
"id": 74810,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fourier-transform, crystals, coulombs-law",
"url": null
} |
dust, deep-sky-observing, hydrogen, vacuum, proton
If not, I ask on the latter: this "1 proton per cubic meter", on the scale of billions of light years - does it produce a dimming/colouring of what we see that we have to take into account? In the same way distant mountains become blue because air isn't 100% transparent? One way of thinking about this is in terms of the physics of the cosmic microwave background. The cosmic microwave background occurs as a phenomenon when a nearly homogeneous universe transitions between being hot and ionised and opaque to electromagnetic radiation to being slightly cooler, mainly neutral and transparent to visible and longer wavelength light. | {
"domain": "astronomy.stackexchange",
"id": 6653,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dust, deep-sky-observing, hydrogen, vacuum, proton",
"url": null
} |
python, programming-challenge, python-3.x, collatz-sequence
Title: Efficient solution to Project Euler 14 (Longest Collatz sequence) This is an iterative review. I asked for reviews on a Collatz sequence generator here. I tried to address all of the suggestions that were made.
I've added a new function get_longest_collatz(n), which can be used to solve Project Euler problem 14 (the question states: which number under a million has the longest Collatz sequence?)
The solution makes use of memoization.
def collatz(n):
"""
Generator for collatz sequence beginning with n.
n must be 0, 1, 2 ...
>>> list(collatz(1))
[1]
>>> list(collatz(10))
[10, 5, 16, 8, 4, 2, 1]
"""
yield n
while n > 1:
n = n // 2 if n % 2 == 0 else 3 * n + 1
yield n
def get_longest_collatz(n):
"""
Returns the number less than n with the longest collatz sequence. | {
"domain": "codereview.stackexchange",
"id": 22550,
"lm_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, programming-challenge, python-3.x, collatz-sequence",
"url": null
} |
ros, gazebo, ros-melodic, ubuntu, ubuntu-bionic
Title: Can Robot Models for simulations be used in all ROS versions?
I'm having trouble in simulating robots in gazebo as most models use ROS indigo in their documentaries as well as in Ros.org domentaries; basically all robots I've encountered so far.
Such as (fetch robot):
sudo apt-get install ros-indigo-fetch-gazebo-demo
which prints out this Error:
indigo-fetch-gazebo-demo
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ros-indigo-fetch-gazebo-demo
so I tried just changing indigo to my current version (Melodic_
sudo apt-get install ros-melodic-fetch-gazebo-demo
but the same error prints out:
melodic-fetch-gazebo-demo
Reading package lists... Done Building
dependency tree Reading state
information... Done
E: Unable to locate package ros-melodic-fetch-gazebo-demo
Am I doing anything wrong?
or the model just hasn't been updated for melodic? (if so, what robot models are for melodic?) | {
"domain": "robotics.stackexchange",
"id": 31896,
"lm_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, ros-melodic, ubuntu, ubuntu-bionic",
"url": null
} |
newtonian-mechanics, classical-mechanics, lagrangian-formalism, variational-principle, time-reversal-symmetry
Title: Time reversal on potential $V(\frac{d^n {\vec x}( t)}{d t^n})$ with any odd or even power time-derivative on the position function In this post, I tried to challenge what @Richard Myers said in his answer in https://physics.stackexchange.com/a/633205/42982. I followed what he said, except I kept a common widely used notation $\overset{T}{\to}$ to imply the function assignment before and after the time reversal.
The symmetries of the action (or Lagrangian) are always symmetries of the associated Euler-Lagrange equations.
The symmetries of the Euler-Lagrange equations are not always symmetries of the associated action (or Lagrangian).
Question How do we exam the time-reversal symmetries? On the Lagrange that depends on not just
the position function $\vec{x}(t)$ but also the explicit higher derivative
$\frac{d^n {\vec x}( t)}{d t^n}$ and the explicit $t$ dependence:
$$
L=\frac{1}{2} m \frac{d^2 \vec{x}(t) }{d t^2} -V ( \vec{x}(t),
\frac{d^n {\vec x}( t)}{d t^n}, t) | {
"domain": "physics.stackexchange",
"id": 78542,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "newtonian-mechanics, classical-mechanics, lagrangian-formalism, variational-principle, time-reversal-symmetry",
"url": null
} |
where $$b^{\dagger}$$ is complex conjugate (i.e. for $$x \in \mathbb{C}$$: if $$x = x_{re} + ix_{im}$$ then $$x^{\dagger} = x_{re} - ix_{im}$$).
In your case $$a_{1} = \cos(\theta)$$ and $$a_{2} = i\sin(\theta)$$. Since you are interested in product $$\langle a|a \rangle$$, $$a_{1}^{\dagger} = \cos(\theta)$$ because it is a real number and $$a_{2}^\dagger = -i\sin(\theta)$$ you have
$$\langle a|a \rangle = a_{1}a_{1}^{\dagger}+a_{2}a_{2}^{\dagger} = \cos^{2}(\theta) -i^{2}\sin^{2}(\theta) = \cos^2(\theta) + sin^{2}(\theta) = 1$$
Alternatively you can use normalization condition $$|a|^2+|b|^2 = 1$$:
$$|a|^2 = |\cos(\theta)|^2 = \cos^{2}(\theta)$$
and
$$|b|^2 = |i\sin(\theta)|^2 = |i|^2|\sin^{2}(\theta)| = 1^2\cdot \sin^{2}(\theta)$$
And again you have $$\cos^{2}(\theta) + \sin^{2}(\theta) = 1$$.
Overall, your quatum state is properly defined.
You asked "What is wrong in my calculation?" | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9732407191430025,
"lm_q1q2_score": 0.8001879321800679,
"lm_q2_score": 0.822189121808099,
"openwebmath_perplexity": 485.8548686512557,
"openwebmath_score": 0.8301193118095398,
"tags": null,
"url": "https://quantumcomputing.stackexchange.com/questions/9552/how-can-i-check-if-the-following-are-possible-states-of-a-qubit/9558"
} |
general-relativity, special-relativity, wormholes
Multiple images presumably are present, but there's so much going on that it's hard to notice, or we see only closeups that don't actually span more than one. If I look carefully at certain frames, I can mostly persuade myself that there are multiple images of certain objects — though they are naturally quite distorted. It's also easy to see the Einstein ring, with stars zipping around it, and presumably being multiply lensed — though it's hard to pick out duplicate points of light. Moreover, the paper about the visual-effects development shows and describes multiple images in several places. But the paper illustrates them by showing a scene dominated by Saturn, so it's easy to pick out the multiple images; there are so many nebulous elements being layered into the movie that it's harder to discern what's what. Also, in a different part of the movie, we see a black hole with an accretion disk, where the multiple images are clearly visible. | {
"domain": "physics.stackexchange",
"id": 73104,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, special-relativity, wormholes",
"url": null
} |
Suppose you have $$(k-1)d<x\leq kd<(k+1)d<\ldots<(k+n)d\leq y<(k+n+1)d.$$ Then, you always have $\lfloor{\frac{y}{d}}\rfloor=k+n$ is $k+n$. On the other hand, if $x$ is divisible by $d$, then $\lfloor{\frac{x}{d}}\rfloor=k$, whereas if $x$ isn't divisible by $d$, then $\lfloor{\frac{x}{d}}\rfloor=k-1$. To rectify this, instead use $\lceil{\frac{x}{d}}\rceil$ which always returns $k$. Your solution is then $$n+1=(n+k)-k+1=\color{blue}{\left\lfloor{\frac{y}{d}}\right\rfloor-\left\lceil{\frac{x}{d}}\right\rceil+1}.$$
p.s. $$(k-1)d<x\leq kd\implies(k-1)d\leq x-1<kd\implies\left\lfloor{\frac{x-1}{d}}\right\rfloor=k-1$$ so that $$n+1=(n+k)-(k-1)=\color{red}{\left\lfloor{\frac{y}{d}}\right\rfloor-\left\lfloor{\frac{x-1}{d}}\right\rfloor}.$$ The formulas in blue and red produce the same answer. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9822877002595528,
"lm_q1q2_score": 0.8774868434883939,
"lm_q2_score": 0.8933094074745443,
"openwebmath_perplexity": 128.91082374914626,
"openwebmath_score": 0.7896967530250549,
"tags": null,
"url": "https://math.stackexchange.com/questions/929882/what-is-wrong-with-my-algorithm-for-finding-how-many-positive-integers-are-divis"
} |
python, file-system
Title: Pretty print braces for source code analyzer I wrote a simple utility script to process source code files, extract and pretty print braces. It could be very useful for spotting the ugliest files in a code repository. So, I tidied it up a little bit and open-sourced it here.
I would very like to have your suggestions and comments on how to make this Python code better in any way.
__author__ = 'Murat Derya Ozen'
PROGRAM_DESCRIPTION = """
Spot the ugliest files in a code repository.
Given a path to a file or a directory, this program parses source files to extract,
pretty print and calculate the number of curly brackets, i.e braces.
*** Samples usages ***
> python pretty_print_braces file --path /root/repo/svn/trunk/SomeJavaClass.java | {
"domain": "codereview.stackexchange",
"id": 5016,
"lm_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, file-system",
"url": null
} |
machine-learning, feature-selection, computer-vision, feature-engineering, convolutional-neural-network
Is this related to learned features?
The "handcrafted features" were commonly used with "traditional" machine learning approaches for object recognition and computer vision like Support Vector Machines, for instance. However, "newer" approaches like convolutional neural networks typically do not have to be supplied with such hand-crafted features, as they are able to "learn" the features from the image data. Or to paraphrase Geoff Hinton, such feature extraction techniques were "what was common in image recognition before the field became silly". | {
"domain": "datascience.stackexchange",
"id": 1988,
"lm_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, feature-selection, computer-vision, feature-engineering, convolutional-neural-network",
"url": null
} |
homework-and-exercises, rotational-dynamics, reference-frames, angular-velocity
Clearly in this case, angular velocity vector from the rotation about the centre of the contact-point circle ($\mathbf{\Omega}\mathbf{\hat{z}}$)and the angular velocity vector from the rotation about $\mathbf{\hat{x_3}}$ do not share a common origin (if you extend a line from the centre of the coin perpendicular to the surface of the coin, it clearly will not always pass through the centre of the contact-point circle).
I think my understanding is flawed. Why can you add angular velocities in this case? Starting with the rotations matrix
\begin{align*}
&[\,_1^3\,\mathbf S\,]=[\,_1^2\,\mathbf S\,]\,[\,_2^3\,\mathbf S\,]\quad\Rightarrow\quad
[\,_1^3\,\mathbf{\dot{S}}\,]=[\,_1^2\,\mathbf{\dot{S}}\,]\,[\,_2^3\,\mathbf S\,]+
[\,_1^2\,\mathbf S\,]\,[\,_2^3\,\mathbf{\dot{S}}\,]\\
&\text{with}\quad \mathbf{\dot{S}}=\mathbf{\tilde{\omega}}\,\mathbf S\quad
\mathbf{\tilde{\omega}}= \left[ \begin {array}{ccc} 0&-\omega_{{z}}&\omega_{{y}}
\\ \omega_{{z}}&0&-\omega_{{x}}\\ | {
"domain": "physics.stackexchange",
"id": 84961,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, rotational-dynamics, reference-frames, angular-velocity",
"url": null
} |
Numpy, while the n-dimensional column vector in linear algebra is a two-dimensional array with shape (n, 1) in Numpy. It has the fast computational power and can work on the numpy arrays too. solve. I'm referencing Numerical Linear Algebra by Holger Wendland, where he gives his definition of the power method in the following way: Apr 23, 2017 · Basic Linear Algebra Subprograms (BLAS) is a specification that prescribes a set of low-level routines for performing common linear algebra operations such as vector addition, scalar multiplication, dot products, linear combinations, and matrix multiplication. 22. Many, many other array functions useful linear algebra, Fourier transform, and random number capabilities Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. The linalg the documentation lists many options. • Scipy. It also has functions for working in domain of linear algebra, fourier transform, and matrices. Sep 21, | {
"domain": "com.tr",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9796676490318648,
"lm_q1q2_score": 0.8054720904238226,
"lm_q2_score": 0.8221891283434876,
"openwebmath_perplexity": 1287.0371048408572,
"openwebmath_score": 0.26150327920913696,
"tags": null,
"url": "http://barisdokumaci.com.tr/diskon-nettoto-rwns6/linear-algebra-in-python-numpy.php"
} |
ros, transform, tf2
tf2_test_tf2_point.cpp:(.text._ZNK7tf2_ros15BufferInterface9transformIN13geometry_msgs13PointStamped_ISaIvEEEEERT_RKS6_S7_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3ros8DurationE[_ZNK7tf2_ros15BufferInterface9transformIN13geometry_msgs13PointStamped_ISaIvEEEEERT_RKS6_S7_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3ros8DurationE]+0x69): undefined reference to `ros::Time const& tf2::getTimestamp<geometry_msgs::PointStamped_<std::allocator<void> > >(geometry_msgs::PointStamped_<std::allocator<void> > const&)' | {
"domain": "robotics.stackexchange",
"id": 25203,
"lm_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, transform, tf2",
"url": null
} |
general-relativity, special-relativity, cosmology, space-expansion, dark-energy
So, were we to use special relativity to explain expansion, there would also be another observer/frame of reference to which space would be contracting. By using general relativity, we can have space expand to people in all reference frames by having some non-boring structure of spacetime onto which we add the effects of various types of energy. | {
"domain": "physics.stackexchange",
"id": 85181,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, special-relativity, cosmology, space-expansion, dark-energy",
"url": null
} |
java, array
Why are you storing numeric answer values as strings? This feels like a hack to allow you to store the candidate names in the same array. A better solution would be to use an int array to hold the answer values and store the names separately.
public static void main(String[] args) throws Exception {
int[][] candidateAnswers = {
{ 1, -1, 0, 1, -1, 1, 0, 1, 1, 0 },
{ 0, 1, -1, 1, 0, -1, 1, 1, 0, 1 },
{ 1, 1, -1, 1, 1, 1, 1, -1, -1, 1 },
{ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
{ 1, 1, -1, 1, 1, 1, 1, -1, -1, 1 } };
int[] voterAnswers = { 1, 0, -1, 1, 1, 0, 1, -1, -1, 0 }; | {
"domain": "codereview.stackexchange",
"id": 11915,
"lm_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, array",
"url": null
} |
homework-and-exercises, classical-mechanics, lagrangian-formalism
squaring this gives us:
$$d\vec r^2=l^2 d\theta_1^2 +\f{l^2}{4} d\theta_2^2 +l d\theta_1 d\theta_2 \hat e_{\theta_1} \cdot\hat e_{\theta_2}$$
$$=l^2 d\theta_1^2 +\f{l^2}{4} d\theta_2^2 +l d\theta_1 d\theta_2 (\cos(\theta_1)\cos(\theta_2)+\sin(\theta_2) \sin(\theta_2))$$
This is something called the 'second fundamental' and is used all over physics (notably in GR). Dividing this by $dt^2$ gives us:
$$V_{CM}^2=l^2 \dot\theta_1^2 +\f{l^2}{4} \dot\theta_2^2 +l \dot\theta_1 \dot\theta_2 (\cos(\theta_1)\cos(\theta_2)+\sin(\theta_2) \sin(\theta_2))$$
now if we assume small oscillations this means that $\theta_i$ and there derivatives are small hence expanding only to second order in small quantities gives us:
$$V_{CM}^2=l^2 \dot\theta_1^2 +\f{l^2}{4} \dot\theta_2^2 +l \dot\theta_1 \dot\theta_2 $$
which explains the origin of the first term. Taking the small angle approximation here is equivalent to assuming only motion in the x-direction but this method feels more satisfactory. | {
"domain": "physics.stackexchange",
"id": 40889,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, classical-mechanics, lagrangian-formalism",
"url": null
} |
you can also check by multiplying the slopes. Which answer choice describes the two lines? always 7. Q. Chapter 3. Perpendicular. The slopes of perpendicular lines are opposite reciprocals of each other. Q. SURVEY . These lines lie in the same plane and intersect in right angles. Answer. Additionally, you will create a scatter plot of the slopes and discuss a function that will match the plotted points. Median response time is 34 minutes and may be longer for new subjects. Parallel and Perpendicular lines. How are the slopes of perpendicular lines related? point to rotate the lines (changing the slope).The red and blue lines remain fixed as perpendiculars of each other. Perpendicular. The product of the slopes of two perpendicular lines is equal to -1. In Figure 1, lines l and m intersect at Q. The angle between the two lines should be equal to 90 degrees. opposites. Parallel lines have _____ slopes. Vocabulary parallel lines perpendicular lines 5. Aakash. Describe the difference | {
"domain": "yamadaresearch.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9678992951349231,
"lm_q1q2_score": 0.8107317662161666,
"lm_q2_score": 0.8376199572530449,
"openwebmath_perplexity": 500.62039674547015,
"openwebmath_score": 0.5127927660942078,
"tags": null,
"url": "https://yamadaresearch.com/c-h-jij/e11119-covid-19-disease-investigator-jobs"
} |
javascript, jquery, event-handling
Is there a huge problem that I don't see with this approach (like switch performance etc.)?
I am interested if this is bad coding or just an interesting approach to the problem.
Additionally, does a software design pattern exist, that is defined to do such functionality?
I guess a better approach would have been the following, but now that it is that way..
function process(functionString, caller, event){
var functions = functionString.split(";");
for (var index = 0; index < functions.length; ++index) {
if (functionObj.hasOwnProperty(functions[index]){
functionObj[functions[index]](caller,event);
}
}
} | {
"domain": "codereview.stackexchange",
"id": 16345,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "javascript, jquery, event-handling",
"url": null
} |
waves, electromagnetic-radiation
$$\sigma^2 = \iint_{-\infty}^{\infty} |\mathbf{a}|^2 |F(\mathbf{a})|^2\ {\rm d}^2 a . $$
(Here we assumed the first moment is zero.) Then the result would give one a scale for the size of the spectrum on the Fourier plane. If this scale is much smaller than the radius of the propagating waves on the Fourier plane
$$ \sigma \ll \frac{1}{\lambda} , $$
then the beam is paraxial.
For a more comprehensive understanding of this, one needs to study Fourier optics. | {
"domain": "physics.stackexchange",
"id": 36030,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "waves, electromagnetic-radiation",
"url": null
} |
Finding the transitive closure of a digraph can be accomplished by running DFS on every vertex of the digraph and storing the resulting reachability array for each each vertex from which DFS was run. However, it can be impractical for large graphs because it uses space proportional to $V^2$ and time proportional to $V(V + E)$.
## Dynamic Connectivity
Answers: Is a pair of nodes connected?
Data Structure: Array, indexed by any given site to the value corresponding to the component its a part of: id[site] = component. All sites are initially set to be members of their own component, i.e. id[5] = 5.
General Flow: Sites are all partitioned into singleton sets. Successive union() operations merge sets together. The find() operation determines if a given pair of sites are from the same component.
A site is an element or node in a disjoint set. The disjoint set is known as a component, which typically models a set or graph. Two sites are connected if they are part of the same component. | {
"domain": "jip.dev",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9867771759145342,
"lm_q1q2_score": 0.8113174618351043,
"lm_q2_score": 0.8221891239865619,
"openwebmath_perplexity": 1229.7954954713152,
"openwebmath_score": 0.49524566531181335,
"tags": null,
"url": "https://jip.dev/notes/algorithms/"
} |
c#, comparative-review, finance
Title: Reversible tax calculator class I have a class that contains 2 properties of the same type. decimal NetAmount and decimal GrossAmount
I would like to initialize it using either GrossAmount or NetAmount and based on the one specified calculate the second one.
Which way is the most elegant and why? (parameter validation is omitted for brevity)
1
public class TaxedPrice
{
private TaxedPrice()
{ }
public decimal NetAmount { get; private set; }
public decimal GrossAmount { get; private set; }
public static TaxedPrice FromNet(decimal netAmount, decimal taxRate)
{
return new TaxedPrice
{
NetAmount = decimal.Round(netAmount, 2, MidpointRounding.AwayFromZero),
GrossAmount = decimal.Round(netAmount.ApplyTax(taxRate), 2, MidpointRounding.AwayFromZero)
};
} | {
"domain": "codereview.stackexchange",
"id": 32141,
"lm_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#, comparative-review, finance",
"url": null
} |
molecular-genetics, reproduction, sex, cloning, sexual-reproduction
Generally yes for mammals and birds. In animals where the sex is determined by sex chromosomes, the sex of the clone will be dependent by the sex of the donor.
In animals (ie turtles and crocodiles) where the sex is determined by external factors (ie temperature), then the sex of clones will not be dependent on its donor.
would it be theoretically possible to create a male clone where a
single woman contributes both the egg and somatic cells used in the
cloning process? | {
"domain": "biology.stackexchange",
"id": 8787,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "molecular-genetics, reproduction, sex, cloning, sexual-reproduction",
"url": null
} |
condensed-matter, quantum-computer
It can be easily verified that these loop operators follows the algebra: $Q_1P_2=-P_2Q_1$, $Q_2P_1=-P_1Q_2$, $[Q_1,Q_2]=[P_1,P_2]=[Q_1,P_1]=[Q_2,P_2]=0$ (by checking the bound overlaps). The 4 loop operators can be divided into two anti-commuting pairs. To construct the representation for these operators, we start from $\{Q_1,P_2\}=0$. The anti-commutation relation requires $Q_1$ and $P_2$ to be represented by two Pauli matrices, say $Q_1\bumpeq\sigma_3$ and $P_2\bumpeq\sigma_1$. The same applies for $\{Q_2,P_1\}=0$. However the representation space must be enlarged such that the commutation relations between the anti-commuting pairs are also satisfied:
$$Q_1\bumpeq\sigma_3\otimes\sigma_0, Q_2\bumpeq\sigma_0\otimes\sigma_3, P_1\bumpeq\sigma_0\otimes\sigma_1, P_1\bumpeq\sigma_1\otimes\sigma_0.$$ | {
"domain": "physics.stackexchange",
"id": 3650,
"lm_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, quantum-computer",
"url": null
} |
black-holes, astrophysics, relativistic-jets
the particles within them are at very high energy (particle/particle collisions will release a lot of energy, recombination of ions with electrons will release a lot of energy) and also because of the presence of large amounts of anti-matter (resulting in annihilation reactions which release gamma rays). | {
"domain": "physics.stackexchange",
"id": 3102,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "black-holes, astrophysics, relativistic-jets",
"url": null
} |
knapsack-problems
Title: Nonlinear Knapsack with small integer weights I have a problem that looks like a 0-1 Knapsack problem, except that the value of each item is a vector of length about 5, $v=(v_1,\dots,v_5)$. I want to maximize the product of components of the sum of the value vectors that are selected. In other words, if $S$ is the set of value vectors for the selected items, I want to maximize
$$\prod_{i=1}^5 \sum_{v \in S} v_i.$$
I know that there is a dynamic programming algorithm for that would be very fast for a normal Knapsack with my parameters (max weight 100, about 100 different items) but it isn't directly applicable to my problem, as in my case an optimal weight $w$ solution doesn't help find a weight $w+1$ solution. | {
"domain": "cs.stackexchange",
"id": 19194,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "knapsack-problems",
"url": null
} |
other vector. That is why the dot product and the angle between vectors is important to know about. The standard coordinate vectors in R n always form an orthonormal set. These topics have not been very well covered in the handbook, but are important from an examination point of view. But I'm not sure if calculating many pairs of dot products is the way to show it. Now without calculations (though for a 2x2 matrix these are simple indeed), this A matrix is . Subsection 5.5.1 Matrices with Complex Eigenvalues. When an observable/selfadjoint operator $\hat{A}$ has only discrete eigenvalues, the eigenvectors are orthogonal each other. Correlation and covariance matrices that are used for market risk calculations need to be positive definite (otherwise we could get an absurd result in the form of negative variance). Featured on Meta “Question closed” … Cos(60 degrees) = 0.5, which means if the dot product of two unit vectors is 0.5, the vectors have an angle of 60 degrees between them. | {
"domain": "co.th",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9553191309994468,
"lm_q1q2_score": 0.8001943832241109,
"lm_q2_score": 0.8376199714402812,
"openwebmath_perplexity": 297.12156421399203,
"openwebmath_score": 0.8455731868743896,
"tags": null,
"url": "http://usg.co.th/log/reviews/d1a8d7-how-to-check-if-eigenvectors-are-orthogonal"
} |
Explicitly: $x^2 + \frac{4}{3}y^2$ is growing a lot faster than the other term: $2xy + 4y$,
(This does not prove it is an absolute minimum, I just was showing you the limit.)
Explicitly, for all $(x,y)$, we have:
$$f_{xx}\mid_{(x,y)} = 2, \;\;\; f_{yy}\mid_{(x,y)} = \frac{8}{3},\;\;\; f_{xy}\mid_{(x,y)}= -2$$ This implies: $$D(H)\mid_{(x,y)} = f_{xx}f_{yy} - f_{xy}^2 = \frac{16}{3} - 4 = \frac{4}{3}$$ Where $D(H)$ is the determinant of the hessian matrix. Since $D(H)\mid_{(6,6)}>0$ and $f_{xx}\mid_{(6,6)} > 0$ we have a local minimum.
Moreover, since both $f_{xx}$ and $f_{yy}$ are positive at the critical point and the discriminant is positive, the surface must be concave upward in every direction. Thus, this must be an elliptic paraboloid with a global minimum at $(6,6)$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.986777180386425,
"lm_q1q2_score": 0.8021189288708526,
"lm_q2_score": 0.8128673269042767,
"openwebmath_perplexity": 340.4083205363989,
"openwebmath_score": 0.9048357605934143,
"tags": null,
"url": "http://math.stackexchange.com/questions/279668/nonlinear-optimization-question"
} |
terminology, metrology, experimental-technology
Title: Is a micrometer a type of caliper? Wikipedia says:
A caliper is a device used to measure the distance between two opposite sides of an object.
Therefor under this definition doesn't a micrometer also count as a caliper? As a result of numerous comments and some investigation I have rewritten my answer.
The Oxford English dictionary defines "caliper" as follows:
1 (calipers} An instrument for measuring external or internal
dimensions, having two hinged legs resembling a pair of compasses and
in-turned or out-turned points.
1.1 A measuring instrument having one linear component sliding along another, with two parallel jaws and a vernier scale.
Merriam Webster's dictionary has a slightly different definition for "caliper" and this is similar to the definition mentioned by @Dmckee:
Any of various measuring instruments having two usually adjustable
arms, legs, or jaws used especially to measure diameter or thickness
—usually used in plural a pair of calipers | {
"domain": "physics.stackexchange",
"id": 39244,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "terminology, metrology, experimental-technology",
"url": null
} |
Your error is believing $$\int -x y(x) \, \mathrm{d}x = \frac{-1}{2}x^2 y$$. But $$y$$ is not some constant in this integral; it is a function that depends on $$x$$. Otherwise, what is written could be the absurdity (when, say $$y(x) = \frac{1}{x^2}$$), "$$\int -x \cdot \frac{1}{x^2} \,\mathrm{d}x = \frac{-1}{2} x^2 \cdot \frac{1}{x^2} + C_1 = C$$" rather than the correct $$\int -x \cdot \frac{1}{x^2} \,\mathrm{d}x = \ln|x| + C \text{.}$$
Quick way to verify this: Implicitly differentiate your antiderivative to see if you get the integrand and differential element back:\begin{align*} \left( \frac{-1}{2}x^2 y(x) \right)' &= \frac{-1}{2}x^2 (y(x))' + \left( \frac{-1}{2}x^2 \right)' y(x) \\ &= \frac{-1}{2}x^2 \,\mathrm{d}y(x) + \left( \frac{-1}{2} \cdot 2 x \,\mathrm{d}x \right) y(x) \\ &= \frac{-1}{2}x^2 \,\mathrm{d}y(x) - x y(x) \,\mathrm{d}x \text{,} \end{align*} which isn't quite "$$- x y\,\mathrm{d}x$$". | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9648551525886193,
"lm_q1q2_score": 0.8312595856667754,
"lm_q2_score": 0.8615382147637196,
"openwebmath_perplexity": 529.4400590860699,
"openwebmath_score": 0.9999525547027588,
"tags": null,
"url": "https://math.stackexchange.com/questions/3124604/solving-the-linear-first-order-differential-equation/3124608"
} |
special-relativity, reference-frames, mass-energy
Wouldn't therefore the center of mass be placed above the proton, but between it and the photon? What would the linear momentum of the proton be if we assume it at rest in the laboratory frame of reference? Draw an energy-momentum diagram (adding the timelike 4-momentum of the proton and the lightlike 4-momentum photon (tip to tail) to get the timelike 4-momentum of the system). It'll look like a triangle... in fact like a Doppler-effect problem.
Then, find the component of the proton 4-momentum that is orthogonal to the 4-momentum of the system. (The analogous component of the photon 4-momentum should be opposite this, leading to a total spatial momentum of zero in the center-of-momentum frame.)
Follow the strategy at
Lowest kinetic energy of particle for which reaction is possible (invariant mass)
applied to that reaction in a recent question
What is the minimum energy of a photon for the reaction to occur?.
See also: Momentum diagram for two colliding Particles | {
"domain": "physics.stackexchange",
"id": 85345,
"lm_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, reference-frames, mass-energy",
"url": null
} |
special-relativity, speed-of-light, approximations, galilean-relativity
Based on that, you can see that $\gamma$ really just tells you how the hyperbola is stretched away from the horizontal line. For low speed between the two observers, these displacements stay close to the hyperbola vertex, so the $\gamma$ effect dies out. But both displacements are still rotated. It is only because $\beta \ll 1$ that you can say the rotation of the spatial displacement is negligible if you want. And by not applying that same approximation to the time displacement, since it doesn't matter if you apply it or not, you end up back at the Galilean transform. | {
"domain": "physics.stackexchange",
"id": 75837,
"lm_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, speed-of-light, approximations, galilean-relativity",
"url": null
} |
acid-base
What you're describing is a super acid, that is not used in aqueous solution Take HCl for example. This is a classic strong acid, that will protonate a wide range of structures. But if we take something that is a VERY, VERY poor base (something that really does not want a proton), such as an alkane, HCl can't protonate it. The proton will rather stay with chlorine than protonate the alkane. That is one of the things you can do with the acid you mentioned.
The strength of an acid depends on many different factors, but it all comes down to how strongly the $\ce{H^+}$ is bound to the acid structure. If it is very loosely bound, the structure is high in energy, and the proton would like to find a more stable structure to partake in. In this case protonating an alkane to form a carbocation and molecular hydrogen is low enough in energy, that the acid can protonate it. | {
"domain": "chemistry.stackexchange",
"id": 1147,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "acid-base",
"url": null
} |
In [3]: x1 = 1e-3; x2 = 2e-3; x3 = 3e-3; x4 = 4e-3; 4*max(x1, x2, x3, x4)/(x1+x2+x3+x4)
Out[3]: 1.6
The mistake I made is that the Jacobian in the infinity norm is equal to 1, not $n$. As such, the relative condition number of the sum is:
$$\kappa=1$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232874658905,
"lm_q1q2_score": 0.8314119291510819,
"lm_q2_score": 0.845942439250491,
"openwebmath_perplexity": 1163.7651889814892,
"openwebmath_score": 0.9114854335784912,
"tags": null,
"url": "https://scicomp.stackexchange.com/questions/28361/what-is-a-relative-condition-number-of-a-sum-of-positive-values"
} |
ros, ros-melodic, ros-control, diff-drive-controller, hardware-interface
#Publish to TF directly or not
enable_odom_tf: true
#Name of frame to publish odometry in
odom_frame_id: odom
# Publish the velocity command to be executed.
# It is to monitor the effect of limiters on the controller input.
publish_cmd: true
Finally here's a link to our hardware interface node, because it's too long to include here. We appreciate your time and help!
EDIT: console output of diff_drive.launch
$ roslaunch rover_4_core diff_drive.launch
... logging to /home/nate/.ros/log/4f103afa-5e62-11ea-8022-b827eb2d9e86/roslaunch-natebook-9951.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
xacro: in-order processing became default in ROS Melodic. You can drop the option.
started roslaunch server http://172.20.171.238:38857/
SUMMARY
======== | {
"domain": "robotics.stackexchange",
"id": 34541,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros-melodic, ros-control, diff-drive-controller, hardware-interface",
"url": null
} |
$$y-4=-4(x+2)$$
The others did point out your error, so I will just add the way I'd do it:
The tangent line we are looking for is in the form of $$g(x)=ax+b$$ for the function $$f(x)=x^2$$ at $x=-2$. We know that their derivate and their value most be equal at the given point, so we have that $$a=2*(-2)=-4$$ and $$(-2)^2=-4(-2)+b$$ $$4=8+b$$ $$b=-4$$ So the eqution for the tangent line is $$y=-4x-4$$ I like this method because I do not need to remember to the equation of the line through a given point.
You need a point and a slope. The point is $(2,4)$ and the slope is $y'(2)=4.$
Thus the equation is $$y-4=4(x-2)$$ or $$y=4x-4$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9719924761487654,
"lm_q1q2_score": 0.8057222766609615,
"lm_q2_score": 0.8289387998695209,
"openwebmath_perplexity": 249.49495130915386,
"openwebmath_score": 1.0000088214874268,
"tags": null,
"url": "https://math.stackexchange.com/questions/2744119/how-to-find-the-equation-of-the-tangent-to-the-parabola-y-x2-at-the-point/2744133"
} |
c++, object-oriented, parsing
nodesThatTheRecursionDealsWith.begin(),
nodesThatTheRecursionDealsWith.end());
input[i].children.push_back(
*iteratorPointingToTheElseIfToken); // Will appear as the "Else"
// token to the compiler.
input.erase(
input.begin() + i + 1,
iteratorPointingToTheEndIfToken == input.end()
? input.end()
: iteratorPointingToTheEndIfToken +
1); // If there is an "EndIf" token, delete it as well.
} else // No "ElseIf" token, but maybe there is an "Else" token. Let's
// search for it!
{
auto iteratorPointingToTheElseToken = iteratorPointingToTheThenToken;
counterOfIfBranches = 0;
while (iteratorPointingToTheElseToken <
iteratorPointingToTheEndIfToken) {
if (!counterOfIfBranches and
iteratorPointingToTheElseToken->text == "Else") | {
"domain": "codereview.stackexchange",
"id": 38968,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, object-oriented, parsing",
"url": null
} |
electromagnetism, electrostatics, polarization
Title: Why is the net charge of a polarized sphere zero? I have to find the electric field produced by a polarized sphere, with the polarization of $\textbf P(\textbf r) = k \textbf r$. Why do they, in the solution, assume the whole net charge to be zero? How do I know that there's no "additional" charge added to the sphere somehow? Because you assume that you start with a neutral sphere to begin with. Then suppose you take an electron at the bottom of the sphere and move it to the top. And you do this for a bunch of them. So the top is more negative than the bottom, but the sphere is still neutral, as all you did was move the electrons you already had. You didn't add any additional charges to the sphere, you just rearranged them. | {
"domain": "physics.stackexchange",
"id": 36987,
"lm_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, electrostatics, polarization",
"url": null
} |
electrostatics, electric-fields, potential, voltage
Title: Can we give a desired direction to the electric field by connecting the wires to one terminal having some potential? Let's say we have a battery and one wire is connected to the one terminal having let's say some positive potential and other end of the wire is connected to the plate which is from one side it is metallic and the other side is made of a material which have a larger dielectric constant so that it should not create electric fields on the backside from where the wire is connected to the plate. | {
"domain": "physics.stackexchange",
"id": 85185,
"lm_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",
"url": null
} |
cc.complexity-theory, computability, oracles
To explore P vs NP for different representations of $0'$, let $Ω$ be the Chaitin's constant, and $UΩ$ be the Chaitin's constant with bits queried sequentially (or bit index in unary). The Chaitin's constant (machine halting probability) encodes the halting problem, but looks like random data. A caveat is that $Ω$ and I think $\text{P}^Ω$, $\text{NP}^Ω$, $\text{P}^{UΩ}$, and $\text{NP}^{UΩ}$ depend on the choice of (reasonable) encoding.
We have:
$\text{P}^Ω ≠ \text{NP}^Ω$ (the polynomial hierarchy is infinite relative to a random oracle)
$\text{P}^{UΩ} = \text{NP}^{UΩ}$ iff NP = RP
$\text{P}^{U\mathcal{H}} = \text{NP}^{U\mathcal{H}}$ iff NP is in P/poly ($U\mathcal{H}$ is powerful but sparse)
$\text{P}^{U\mathcal{H}'} = \text{NP}^{U\mathcal{H}'} = \text{PSPACE}^\mathcal{U\mathcal{H}'}$
Also, the distinction between decision oracles and function oracles is relevant to fine-grained complexity but not for P vs NP as restricting to decision oracles gives at most a quadratic slowdown. | {
"domain": "cstheory.stackexchange",
"id": 5683,
"lm_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, computability, oracles",
"url": null
} |
python, image, opencv
cascade = cv2.CascadeClassifier(cascade_fn)
nested = cv2.CascadeClassifier(nested_fn)
cam = create_capture(video_src, fallback='synth:bg=../data/lena.jpg:noise=0.05')
while True:
ret, img = cam.read()
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
gray = cv2.equalizeHist(gray)
t = clock()
rects = detect(gray, cascade)
vis = img.copy()
draw_rects(vis, rects, (0, 255, 0))
if not nested.empty():
for x1, y1, x2, y2 in rects:
roi = gray[y1:y2, x1:x2]
vis_roi = vis[y1:y2, x1:x2]
subrects = detect(roi.copy(), nested)
print("Face detected")
image = vis_roi
cv2.imwrite('security.jpg', image)
cv2.destroyWindow('facedetect')
sys.exit()
dt = clock() - t
draw_str(vis, (20, 20), 'time: %.1f ms' % (dt*1000))
cv2.imshow('facedetect', vis) | {
"domain": "codereview.stackexchange",
"id": 21820,
"lm_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, image, opencv",
"url": null
} |
quantum-field-theory, condensed-matter, solid-state-physics, greens-functions
Title: Is lesser Green function independent from Matsubara in equilibrium? Given a Matsubara Green function $\mathscr{G}(i\omega)$, analytic continuation $i\omega \mapsto \omega+i0^+$ leads to the retarded/advanced Green functions $g^{r(a)}$. There is also an ansatz in equilibrium for the lesser Green function $g^<=f(\omega)(g^a-g^r)$ with $f(\omega)$ the Fermi distribution, which is found in some lecture notes (slide 31) without much further explanation.
Question: In equilibrium, does this ansatz always hold? Or if any other references mentioning this? Yes, it is a rather general statement known as the "fluctuation-dissipation theorem". It essentially follows from the "Kubo–Martin–Schwinger (KMS) condition". In terms of two-point functions, the latter can be written as
\begin{equation}
G^{>}(t,\mathbf{x};t',\mathbf{x}')
=
\pm \mathrm{e}^{-\beta\mu} G^{<}(t+\mathrm{i}\beta,\mathbf{x};t',\mathbf{x}'),
\end{equation}
where the plus (minus) sign corresponds to bosons (fermions). | {
"domain": "physics.stackexchange",
"id": 91575,
"lm_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, condensed-matter, solid-state-physics, greens-functions",
"url": null
} |
cell-biology, proteins, amino-acids
Title: Can proteins move outside cells? I am trying to learn about basic cell biology, and have what is probably an extremely simple question.
So this is how I understand it so far:
Proteins are made from amino acids. This process is called protein biosynthesis, which is carried out by the ribosomes. So proteins are made by the ribosomes in every single cell.
So are the proteins made by the ribosomes to stay in the cell? Or can a protein move to other cells, and if so, what's the reason behind it? Yes. All proteins actually begin to get synthesized on cytoplasmic ribosomes but if they are going to be used for extracellular purposes, they are tagged and whole ribosome is taken to ER where protein synthesis is completed. The proteins are exocytosed with help of Golgi body, the post office tagging and packaging organelle (the Golgi body packages these proteins into the vesicles that fuse with the plasma membrane). | {
"domain": "biology.stackexchange",
"id": 1080,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cell-biology, proteins, amino-acids",
"url": null
} |
ros, navigation, ros-melodic, navsat-transform-node, robot-localization
Title: why navsat_transform_node needs imu?
I am new to the field, so this question might be obvious, but I wonder, why IMU is needed once I have GPS absolute position and odometry from robot?
If I have GPS coordinates and odometry, shouldn't be possible to create UTM coordinates? | {
"domain": "robotics.stackexchange",
"id": 35043,
"lm_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, ros-melodic, navsat-transform-node, robot-localization",
"url": null
} |
entanglement, simulation, memory-space, space-complexity
Title: Why does entanglement complicate quantum simulation? To model a single qubit one would need enough memory for $2$ complex numbers. If we have an $N$ qubit system, we would have to store $2N$ complex numbers.
The general statement is that to store an $N$-qubit system, one would require memory for $2^N$ complex numbers. My understanding is that entanglement somehow transforms $2N$ into $2^N$ but I don't understand how.
So why do entangled systems require more memory than non-entangled ones? Welcome to Quantum Computing StackExchange.
To see why it would require $2^n$ complex numbers instead of $2n$ to represent a general entangled $n$-qubit state, let's assume we have a 3-qubit system,
$(\alpha_1, \beta_1), (\alpha_2, \beta_2), (\alpha_3, \beta_3)$
Where $(\alpha_i, \beta_i)$ denotes the representation of the $i^{th}$ qubit in a classical computer memory.
If we apply $X$-gate on the first qubit the state will become,
$(\beta_1, \alpha_1), (\alpha_2, \beta_2), (\alpha_3, \beta_3)$ | {
"domain": "quantumcomputing.stackexchange",
"id": 2750,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "entanglement, simulation, memory-space, space-complexity",
"url": null
} |
imu, navigation, ros-melodic, robot-localization
Originally posted by Subodh Malgonde with karma: 512 on 2018-08-23
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by MH1117 on 2018-09-22:
Hi Malgonde,
I'm using the same sensor you have "IMU Razor 9dof" But i faced issues with creating its model by creating the link and joint and searching for IMU plugin, But it didn't work ,May you help me with this issue,please?
Comment by Subodh Malgonde on 2018-09-23:
What do you mean by it did not work? Did you try rostopic list to check if IMU is publishing data on some topic? My plugin code is there in the OP. The link and joint code would be too long to post as a comment. Please post a separate question and send me the link. I'll answer on that. | {
"domain": "robotics.stackexchange",
"id": 31596,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "imu, navigation, ros-melodic, robot-localization",
"url": null
} |
python, performance, beginner, hash-map, pyqt
model.setHorizontalHeaderLabels(exp_cat_tree_header)
self.TreeCatStat(res, year_item, cat_dict, yy, model)
tree.expandAll()
c = 0
while c < len(exp_cat_tree_header):
tree.resizeColumnToContents(c)
c=c+1
tree.collapseAll()
item_to_expand = year_item
tree.setExpanded(model.indexFromItem(item_to_expand), True)
tree.scrollTo(model.indexFromItem(item_to_expand))
end = time.clock()
#print "%.2gs" % (end - start)
print "calculations:", str(end - start)
self.statusBar.showMessage("Calculations:" + str(end - start)) | {
"domain": "codereview.stackexchange",
"id": 16887,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, performance, beginner, hash-map, pyqt",
"url": null
} |
Alternatively, you can notice that $9^{10}$ ends in $01$, and the product of numbers ending in $01$ ends in $01$, so $9^{2010}=\left(9^{10}\right)^{201}$ ends in $01$.
• Mysterious thing is,I can take 9^2010 and the last 2 digit would be 09.And now were left with 9^3.So therefore,9^2010x9^3=09×29=261,as the last 2 digit to be 61.But the thing is,there isn't an opitoon called "61" and second of all,odd powers last digit should end with the digit "9". – ministic2001 Mar 26 '15 at 7:29
• @ministic2001: No, the last two digits of $9^{2010}$ are $01$; you’re off by $1$ in the cycle. – Brian M. Scott Mar 26 '15 at 7:31
• Ahh right,its 01.So the answer to 9^2013 should be 9^10^201 x 9^3=01×29=29 as the last 2 digits rights? – ministic2001 Mar 26 '15 at 7:35
• @ministic2001: That’s right. – Brian M. Scott Mar 26 '15 at 7:35
• Thank you really much Brian! – ministic2001 Mar 26 '15 at 7:36 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765633889136,
"lm_q1q2_score": 0.81875427742998,
"lm_q2_score": 0.8354835289107307,
"openwebmath_perplexity": 1066.7196079659361,
"openwebmath_score": 0.5263949036598206,
"tags": null,
"url": "https://math.stackexchange.com/questions/1202811/pattern-finding-of-last-few-digit-of-ab"
} |
ros, rviz, moveit, action, rqt-graph
EDIT1
Quoted from official moveit concept introduction
move_group is structured to be easily extensible - individual capabilities like pick and place, kinematics, motion
planning are actually implemented as separate plugins with a common base class. The plugins are configurable
using ROS through a set of ROS yaml parameters and through the use of the ROS pluginlib library. Most users will
not have to configure move_group plugins since they come automatically configured in the launch files generated
by the MoveIt! Setup Assistant.
QUESTION4
From above, I realize that the plugins are configured by pluginlib and yaml parameters, instead of nodes, so obviously there is no node in rqt_graph for motion planner, right?
QUESTION5
What's more, motion planner is part of the move_group node?
QUESTION6
So-called motion planning request, mentioned in many tutorials, is offered by rviz gui or user's code, right? | {
"domain": "robotics.stackexchange",
"id": 26734,
"lm_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, rviz, moveit, action, rqt-graph",
"url": null
} |
grovers-algorithm
Basically, you're right that the number of oracles calls is going to decrease exponentially as the algorithm progresses but the cost of each call is going up exponentially. You end up not getting any benefit. | {
"domain": "quantumcomputing.stackexchange",
"id": 1812,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "grovers-algorithm",
"url": null
} |
By AM/GM: $$\frac{2^{n}-1}{n}=\frac{2^0+2^1+\ldots +2^{n-1}}{n}\geq \left(2^{0+1+\ldots+(n-1)}\right)^{\frac1n}=2^{\frac{n-1}{2}}$$ Therefore, $$0<\frac{n}{2^n}<\frac{n}{2^n-1}\leq 2^{-\frac{n-1}{2}}\rightarrow 0\quad\text{as}\quad n\rightarrow\infty.$$
-
+1 ${}{}{}{}{}$ nice answer – Amr Jun 30 '13 at 16:39
One more answer with another approach I've used several times in this site and I'm surprised nobody's yet used. Put
$$a_n:=\frac n{2^n}\implies \frac{a_{n+1}}{a_n}=\frac{n+1}{2^{n+1}}\frac{2^n}n=\frac12\frac{n+1}n\xrightarrow [n\to\infty]{}\frac12$$
and thus the quotient (D'Alembert's) test gives us that the positive series
$$\sum_{n=1}^\infty\frac n{2^n}\;\;\text{converges}\implies \lim_{n\to\infty}\frac n{2^n}=0$$
-
Essentially, isn't the same answer given by Mhenni Benghorbal? – Seirios Jun 30 '13 at 16:38
Without mentioning series there, yes...but also pretty similar to some others, among them my first answer itself. – DonAntonio Jun 30 '13 at 16:43 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9808759638081522,
"lm_q1q2_score": 0.8109017236128249,
"lm_q2_score": 0.8267117898012104,
"openwebmath_perplexity": 608.5112908855696,
"openwebmath_score": 0.9453651905059814,
"tags": null,
"url": "http://math.stackexchange.com/questions/432999/limit-question-lim-limits-n-to-infty-fracn2n-0"
} |
java
The following is a working code. How can I improve this further? I feel like I am looping the list more times than required.
private List<SomeClazz> populateBeansWithErrors(final Map<SomeClazz, Errors<String>> errorsMap) throws FinancialsSystemRuntimeException {
final List<SomeClazz> someObjs = new ArrayList<>();
for ( final Entry<SomeClazz, Errors<String>> entry : errorsMap.entrySet() )
{
SomeClazz someObj = entry.getKey();
final Errors<String> errors = entry.getValue();
populateErrorColumns(someObj, errors);
someObjs.add(someObj);
}
checkAndSetErrorColumnsForValidRecords(someObjs);
return someObjs;
}
private void checkAndSetErrorColumnsForValidRecords(final List<SomeClazz> someObj) { | {
"domain": "codereview.stackexchange",
"id": 6699,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java",
"url": null
} |
electromagnetism, electrostatics, gauss-law
Title: Infinite Conducting sheet I am studying introductory electricity and magnetism, and this is a conceptual question.
For an infinite conducting sheet, any excess charge is localized onto one side. There is no electric field in the interior of the surface or the other side. The reasoning, as I understand it, is that any such field that exists would cause movement of charge within the surface, and then the surface would not be at equilibrium. Thus, when applying Gauss' Law, the flux through the surface is taken to be 0. See this for what I mean: http://hyperphysics.phy-astr.gsu.edu/hbase/electric/gausur.html#c3 | {
"domain": "physics.stackexchange",
"id": 39925,
"lm_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, electrostatics, gauss-law",
"url": null
} |
special-relativity, spacetime, metric-tensor, tensor-calculus, covariance
One can get the length $L_\gamma$ of a path $\gamma$ by parametrisation of $ds(\lambda)$ (along the path) and integration:
$$L_\gamma = \int_\gamma ds(\lambda) = \int_\gamma \sqrt{ g_{\mu,\nu}(\lambda) \ \frac{dx^\mu(\lambda)}{d \lambda} \ \frac{dx^\nu(\lambda)}{d \lambda}} \ d\lambda$$
This length is also invariant under coordinate transformations since $ds$ is already invariant.
One can now assign a distance $D$ of two points by the minimal path-length which is required to connect those points:
$$ D = \inf \ \{L_\gamma \ | \ \gamma \ \textrm{ connets the two points} \} $$
This is also invariant under coordinate transformations since every $L_\gamma$ is already invariant. I guess this is what you meant by "delta".
All this works for every metric, even for those with off-diagonal elements.
So the distance of two points is invariant under rotations. | {
"domain": "physics.stackexchange",
"id": 20481,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, spacetime, metric-tensor, tensor-calculus, covariance",
"url": null
} |
slam, navigation, lidar, hector-slam, transform
Title: SLAM without odometry, hector_slam + sicktoolbox
Hi.
I've been working on SLAM without odometry in ROS hydro. I'm currently using a SICK Lidar LMS200 which I could succesfully connect to serial and I get communication and data in RVIZ.
I git cloned the files and I started to do some test running ~$ roslaunch hector_slam_launch tutorial.launch and it appears to be working properly so I assume the package was correctly installed.
Then I proceeded to review and modify the files tutorial.launch and ~/catkin_ws/src/hector_slam/hector_mapping/launch/mapping_default.launch and ~/catkin_ws/src/hector_slam/hector_slam_launch/launch/tutorial.launch
The current mapping_default.launch :
<?xml version="1.0"?> | {
"domain": "robotics.stackexchange",
"id": 25023,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "slam, navigation, lidar, hector-slam, transform",
"url": null
} |
r, visualization, ggplot2
Title: How to plot p-values in a circular barplot? Im trying to plot reactome pathway in for of circular bar plot using ggplot2
my data
dput(df2)
structure(list(ID = 1:10, Pathway_names = structure(c(5L, 1L,
7L, 6L, 2L, 3L, 9L, 8L, 10L, 4L), .Label = c("Antigen Presentation: Folding assembly and peptide loading of class I MHC",
"Antigen processing-Cross presentation", "Class I MHC mediated antigen processing & presentation",
"Cytokine Signaling in Immune system", "Endosomal/Vacuolar pathway",
"ER-Phagosome pathway", "Immunoregulatory interactions between a Lymphoid and a non-Lymphoid cell",
"Interferon alpha/beta signaling", "Interferon gamma signaling",
"Interferon Signaling"), class = "factor"), Entities_found = structure(c(1L,
2L, 3L, 4L, 4L, 5L, 6L, 7L, 8L, 9L), .Label = c("51", "54", "55",
"57", "75", "77", "96", "117", "176"), class = "factor"), Entities_pValue = c(1.11e-16,
1.11e-16, 0.003908431, 2.54e-12, 2.77e-10, 0.0053068, 1.64e-13, | {
"domain": "bioinformatics.stackexchange",
"id": 815,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "r, visualization, ggplot2",
"url": null
} |
reference-frames, time, relativity, time-dilation, observers
In general we don't want to re-prove time dilation for every kind of clock. Instead the reasoning runs the other way: if a light clock and another clock are ticking side by side, they'd better also be ticking side by side in another frame, so the other clock must also experience time dilation. Since clocks can rely on classical mechanics, or quantum mechanical effects, or anything else, that means that all our theories should be compatible with special relativity. So we build the theory to be relativistic from the very start. Once you've done that it's not really worth bothering to double-check relativity works in a specific case, as we already know it's going to work for all cases. | {
"domain": "physics.stackexchange",
"id": 96610,
"lm_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-frames, time, relativity, time-dilation, observers",
"url": null
} |
c++
#include <iostream>
#include <tuple>
#include <map>
#include <vector>
#include <algorithm>
using key = std::tuple<std::string, std::string,std::string>;
/* Object we want to merge */
struct Object {
Object(const std::string& x, const std::string& y, const std::string& z ):_x(x),_y(y),_z(z){}
std::string _x;
std::string _y;
std::string _z;
/* This object has more data members */
};
std::map<key,std::vector<Object>> mergeObjects(const std::vector<Object> &v) {
/* Holds the objects without empty elements */
std::map<key,std::vector<Object>> m;
/* Holds the objects with last empty element */
std::map<key,std::vector<Object>> m1;
/* Step 1: Fill maps m and m1 based on whether z is empty or not*/
for(const auto &o:v) {
/* if "z" is empty then put "o" in m1 else in m */
if(o._z.empty()) {
m1[std::make_tuple(o._x, o._y, o._z)].push_back(o);
} else { | {
"domain": "codereview.stackexchange",
"id": 43291,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++",
"url": null
} |
c#, game, tetris
int[,] NewArray = new int[rows, columns];
int NumberOfClockwiseRotations = TypeOfRotation;
for (int RotationNum = 1; RotationNum <= NumberOfClockwiseRotations; RotationNum++)
{
for (int RowNum = 0; RowNum < rows; RowNum++)
{
for (int ColNum = 0; ColNum < columns; ColNum++)
{
NewArray[ColNum, columns - 1 - RowNum] = OldArray[RowNum, ColNum];
}
}
}
return NewArray;
}
#endregion
}
} Let's start with small stuff.
Casing is indeed wrong - it should be lower (Pascal) case for variables, parameters and private fields.
So, eg. instead of
for (int ColNum = 0; ColNum < columns; ColNum++)
should be:
for (int colNum = 0; colNum < columns; colNum++) | {
"domain": "codereview.stackexchange",
"id": 19317,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, game, tetris",
"url": null
} |
zeros are (2 , 0) , (3, 0) and (5,0) So we can say So required equation is Now we have one point (0 , -5) from which graph passes. , for a cubic or third-degree polynomial use 'poly3'. That is, in the complex number system, every th-degree polynomial function has precisely zeros. We substitute for v, using: [4] (Note that u cannot be zero, because p would also be zero, and we have dealt with that case above. For this case, the coe cients can be. Once we have done this, we can use synthetic division repeatedly to determine all of the zeros of a polynomial function. Note that this fact doesn’t tell us what the zero is, it only tells us that one will exist. Our staffs are proffesional and friendly, they will talk to your self enthusiastically with regards to our solutions as well as our expert services. The problems in my book often give me a functon and ask me to find the maclaurin polynomial and write the answer in summation notation. 2is that we can now think of linear functions as | {
"domain": "scientificomarconi.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9910145715128204,
"lm_q1q2_score": 0.803196415200981,
"lm_q2_score": 0.8104789155369048,
"openwebmath_perplexity": 291.7395834823082,
"openwebmath_score": 0.6896295547485352,
"tags": null,
"url": "http://vwyw.scientificomarconi.it/can-a-cubic-polynomial-have-no-zeros.html"
} |
php, object-oriented, classes, prototypal-class-design
Here I call parse function into variable, then print the variable.
Is my design correct with the concept of OOP in PHP? Any suggestion for me to make it better? I'm still new to learning about programming, especially OOP. Ok, given that you're after some CR on your understanding (and usage) of OO techniques, I'll go through your code almost line by line. If my criticisms strike you as blunt, please keep in mind that my goal is to help, not to offend.
Coding standards
This has become a bit of a hang-up of mine, but I can't stress enough how important it is to write code that conforms to some form of standard. PHP, of course, does not (yet) have an official standard as such, but the unofficial PHP-FIG standard is widely accepted, and all major players (Zend, Symfony, CakePHP, ... the list is on the site) subscribe to this standard. As should you.
This entails, among other things: | {
"domain": "codereview.stackexchange",
"id": 7437,
"lm_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, object-oriented, classes, prototypal-class-design",
"url": null
} |
ros, moveit, nao-robot
Title: nao_dcm_bringup problem
Hello everyone,
I am trying to use MoveIt! freamwork with Nao, but when i type the following command
roslaunch nao_dcm_bringup nao_dcm_H25_bringup_remote.launch
I got this
rocess[naoqi_dcm_driver-3]: started with pid [31698]
Could not find network interface named eth0, possible interfaces are ... enp0s31f6 lo
[naoqi_dcm_driver-3] process has died [pid 31698, exit code 1, cmd /opt/ros/kinetic/lib/naoqi_dcm_driver/naoqi_dcm_driver __name:=naoqi_dcm_driver __log:=/home/lipadeadmin/.ros/log/a9641678-46ed-11e7-af09-484d7e9df0b0/naoqi_dcm_driver-3.log].
log file: /home/lipadeadmin/.ros/log/a9641678-46ed-11e7-af09-484d7e9df0b0/naoqi_dcm_driver-3*.log
[INFO] [1496337223.594046]: Controller Spawner: Waiting for service controller_manager/load_controller
I am following this tutorial
Thank you in advance. | {
"domain": "robotics.stackexchange",
"id": 28031,
"lm_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, moveit, nao-robot",
"url": null
} |
electric-circuits, charge, electrical-resistance, capacitance, voltage
Title: When to use $e^{-t/RC}$ - Capacitor discharge and charge Respected Team Members,
I am learning how to calculate the amount of time it takes to charge/discharge a capacitor.
The Formula given in the text book is
$$\ V_{f}=V_{s}(1-e^{-t/RC})$$
But we are also required to use
$$\ V_{f}=V_{s}(e^{-t/RC}) $$
Can you please guide me when to use which ?
I have requested some fellow students and also my professor, and the answer is somewhat ambiguous. For example if t=0 and charging or discharging use the former, if t is a higher value say 40s and counting down then use the latter. Can you please guide me.
Thank you. They are both in essence the same formula.
The claim is that you have a capacitor with a voltage $V(t)$ as a function of time, starting at some value $V_0$, that is in series with a resistor and in parallel with a battery at some voltage $V_1$. | {
"domain": "physics.stackexchange",
"id": 61790,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electric-circuits, charge, electrical-resistance, capacitance, voltage",
"url": null
} |
How then do I interpret $(V^*)^*$?? The dual space of the dual space??
Thanks!
• Yes, it is the dual space of the dual space. Why is that a problem? – wj32 Jun 11 '13 at 10:53
• It's the space of linear maps $V^* \to \mathbb R$. – Najib Idrissi Jun 11 '13 at 10:58
• @nik: Thanks, nik, So they are linear maps of linear maps? I just find it a bit difficult to get my head around... – Dr Strangelove Jun 11 '13 at 11:00
• @DrStrangelove They are linear maps having a linear map as an input and giving a real number as an output. It is quite difficult to get ones head around at first. It was the same for me. You'll get used to it. – Julian Kuelshammer Jun 11 '13 at 11:06
• Luckily, if $V$ is finite dimensional, $(V^*)^*$ is naturally isomorphic to $V$; you can think of $v\in V$ as a map $V^*\to\mathbb{R}$ by $v:f\mapsto f(v)$, and it turns out all linear maps $V^*\to\mathbb{R}$ are of this form. – mdp Jun 11 '13 at 11:07 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9879462208386641,
"lm_q1q2_score": 0.8054058503077527,
"lm_q2_score": 0.8152324826183822,
"openwebmath_perplexity": 142.19051074257354,
"openwebmath_score": 0.9144806861877441,
"tags": null,
"url": "https://math.stackexchange.com/questions/417309/dual-space-of-a-dual-space-what"
} |
php, performance, symfony2, doctrine
return $this;
}
/**
* Get updated
*
* @return \DateTime
*/
public function getUpdated()
{
return $this->updated;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Add tag
*
* @param \Ranger\AppBundle\Entity\Tag $tag
* @return Post
*/
public function addTag(Tag $tag)
{
$this->tag->add($tag);
return $this;
}
/**
* Remove tag
*
* @param \Ranger\AppBundle\Entity\Tag $tag
*/
public function removeTag(Tag $tag)
{
$this->tag->removeElement($tag);
}
/**
* Get tag
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getTag()
{
return $this->tag;
} | {
"domain": "codereview.stackexchange",
"id": 16134,
"lm_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, performance, symfony2, doctrine",
"url": null
} |
graph-theory, pr.probability
PS: For a graph theory enthusiasts, both proofs are worth reading!
Thanks in advance! If you don't care about the constants, then the answer is 'yes' by an easy reduction:
Take a triangle-free graph $G$ with average degree $d_{avg}$. Create a new graph $G'$ which is obtained from $G$ by deleting all vertices with degree $\ge 2d_{avg}$. Obviously, any independent set in $G'$ is an independent set in $G$, and $G'$ is triangle-free. Also, the number of vertices in $G'$ is at least $n(G)/2$. Now we can apply the Alon--Spencer proof. | {
"domain": "cstheory.stackexchange",
"id": 2569,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "graph-theory, pr.probability",
"url": null
} |
java, programming-challenge, combinatorics, heap
//double probability = BigInteger.valueOf(1).divide(possibilities).doubleValue();
life_saver.insert(possibilities, rule_name);
}
int i = 0;
while (life_saver.size() != 0) {
out[i++] = life_saver.delMin();
}
return out;
}
// "<NAME>:_<CHOICES>_<BLANKS>_<SORTED>_<UNIQUE>"
private String[] rule_parser(String rule) {
String[] tokens = rule.split("\\:");
String[] phase2 = tokens[1].split("\\ ");
// algo for inplace merging of two arrays
String[] out = new String[5];
out[0] = tokens[0];
// phase2[0] is empty string
out[1] = phase2[1];
out[2] = phase2[2];
out[3] = phase2[3];
out[4] = phase2[4];
return out;
}
BigInteger one = BigInteger.valueOf(1);
private BigInteger permutation(int n, int k) {
if (k == 0) {
return one;
}
if (k == 1) {
return BigInteger.valueOf(n);
} | {
"domain": "codereview.stackexchange",
"id": 10783,
"lm_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, combinatorics, heap",
"url": null
} |
vba, excel, rubberduck, ms-access, powerpoint
...
Component.CodeModule.InsertLines 1, RD_FOLDER_ANNOTATION & FolderName
I have to mention that Rubberduck deliberately shoves all modules under the same default named-after-the-project folder (they can easily be sorted by component type in the Code Explorer), because we strongly believe grouping modules by component type is utterly useless and counter-productive: when I look at the code for a given functionality, I want to see all the code related to that functionality - and I couldn't care less about the component type of the code I'm looking at... it's mostly all class modules anyway.
A sane way to organize the modules in a project, is by functionality: you want your ThingView user form in the same place as your ThingModel class and your ThingPresenter and the Things custom collection - that way when you're working on that Thing, you don't have to dig up the various pieces in an ever-growing list of components under some useless "Class Modules" folder. | {
"domain": "codereview.stackexchange",
"id": 39154,
"lm_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, rubberduck, ms-access, powerpoint",
"url": null
} |
javascript
fn = {};
fn.setupRotation = function () {
// Show the first image
currentImage = 0;
showImage(currentImage);
// Start the rotation
var interval = setInterval(rotation.advanceRotation, 4000);
};
fn.advanceRotation = function () {
if (currentImage + 1 == count)
currentImage = 0;
else
currentImage++;
hideImages();
showImage(currentImage);
};
return fn;
} ();
rotation.setupRotation();
</script>
And you can see it at work here:
http://james.da.ydrea.ms/riceflourcookies/rotate.html | {
"domain": "codereview.stackexchange",
"id": 822,
"lm_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",
"url": null
} |
lambda-calculus, intuition, equality
While J carefully respects the non-trivial groupoid structure of equality types, in typical dependently typed languages there's no way to actually define a non-trivial element of an equality type. At this point you hit a fork in the road. One route is to add Axiom K which says that the groupoid is actually trivial which makes many proofs much simpler. The other route is to add axioms that allow you to articulate the non-trivial groupoid structure. The most dramatic instance of this is the Univalence Axiom which leads to Homotopy Type Theory. | {
"domain": "cs.stackexchange",
"id": 6059,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "lambda-calculus, intuition, equality",
"url": null
} |
ubuntu-trusty, ubuntu
process[camera_base_link1-13]: started with pid [4505]
process[camera_base_link2-14]: started with pid [4506]
process[camera_base_link3-15]: started with pid [4507]
[ INFO] [1483713468.270806046]: Initializing nodelet with 4 worker threads. | {
"domain": "robotics.stackexchange",
"id": 26655,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ubuntu-trusty, ubuntu",
"url": null
} |
The coffee in the pot is rising at a rate of about $\boxed{0.35\text{ in/min}}$
(b) The cone has radius 3 and height 6.
The coffee in the cone has radius $r$ and height $h$.
The volume of the coffee is: . $V \:=\:\frac{\pi}{3}r^2h$ .[1]
From the similar right triangles, we have: . $\frac{r}{h} \:=\:\frac{3}{6}\quad\Rightarrow\quad r \,=\,\frac{h}{2}$
Substitute into [1]: . $V \:=\:\frac{\pi}{3}\left(\frac{h}{2}\right)^2h \:=\:\frac{\pi}{12}h^3$
Differentiate with respect to time: . $\frac{dV}{dt} \:=\:\frac{\pi}{4}h^2\left(\frac{dh}{dt}\right)$ .[2]
We are given: . $h =5,\;\frac{dV}{dt} =-10$ in³/min
Substitute into [2]: . $-10 \:=\:\frac{\pi}{4}(5^2)\left(\frac{dh}{dt}\right)\ quad\Rightarrow\quad\frac{dh}{dt}\:=\:-\frac{8}{5\pi}$
The coffee in the cone is falling at about $\boxed{0.51\text{ in/min}}$
4. Ah, I start to see it now. The Conical part was a bit confusing; I tried the problem and actually got part A! Part B makes sense now.
Thanks so much for hte help guys! | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9825575152637948,
"lm_q1q2_score": 0.816645847932445,
"lm_q2_score": 0.8311430478583168,
"openwebmath_perplexity": 2155.18095894068,
"openwebmath_score": 0.6759485006332397,
"tags": null,
"url": "http://mathhelpforum.com/calculus/20160-related-rates-3-a.html"
} |
molecular-biology, rna, epigenetics, rna-interference, noncoding-rna
Title: Where in the cell does this enhancer RNA knockdown take place? In Pnueli et al., 2015, they knock down an enhancer RNA using RNAi, testing whether it is a mere byproduct or whether it has a key role in the enhancer's function. They find their system works: the siRNA knocks down the enhancer RNA that it's targeted to, enabling further study. Hooray!
... but I've read that RNAi and the RISC work outside the nucleus, and intra-nuclear effects are further downstream and indirect (example: Gosline et al. assume that effects on introns are indirect). I assume the paper's not wrong, so what's going on?
Conventional wisdom is wrong or incomplete: RNAi can work inside the nucleus too.
Pneuli et al.'s enhancer RNA gets exported to the cytoplasm and then re-imported to act on its target gene.
Something else? | {
"domain": "biology.stackexchange",
"id": 11590,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "molecular-biology, rna, epigenetics, rna-interference, noncoding-rna",
"url": null
} |
optimization, performance, sql, mysql
Title: IMDB website query to find actors by time period I'm using data from a database from the IMDB website. The database consists of five relevant tables.
Actor (id, fname, lname, gender)
Movie (id, name, year, rank)
Director (id, fname, lname)
Cast (pid, mid, role)
Movie_Director(did, mid)
It's worth noting that the id column in Actor, Movie & Director tables is a key for the respective table.
Cast.pid refers to Actor.id, and Cast.mid refers to Movie.id.
Here's the prompt and my initial attempt at solving it. Any help in improving/speeding up the query would be greatly appreciated.
/* List all the actors who acted in at least
one film in 2nd half of the 19th century and
in at least one film in the 1st half of the 20th century */ | {
"domain": "codereview.stackexchange",
"id": 9408,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optimization, performance, sql, mysql",
"url": null
} |
clustering, dbscan
Then apply the DBSCAN of this modified dataset.
I hope I was clear enough, don't hesitate to ask me if it's not the case. If I remember correctly, non-negative matrix factorization (NMF) can be used as a clustering approach that can recover clusters that are along vectors, for example. It may work for your dataset. It factors a data matrix $D \in \mathbb{R}^{m * n}$ into two matrices $W \in \mathbb{R}^{m*k}$ and $H \in \mathbb{R}^{k * n}$. Effectively, $W$ contains the weights that are applied to each vector in $H$ to reconstruct the original data; one way of using this method is to interpret the $n$-dimensional vectors in $H$ as clusters (these vectors would be the 'directions' that your data is along) and the $k$-dimensional vectors in $W$ as the data-example-wise affinities for the different clusters. One method to cluster with this process is to simply place each of the $m$ data examples into the cluster with the index of the highest value in the $W$ vector. | {
"domain": "datascience.stackexchange",
"id": 4142,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "clustering, dbscan",
"url": null
} |
February 23, 2019
February 23, 2019
07:00 AM PST
09:00 AM PST
Learn reading strategies that can help even non-voracious reader to master GMAT RC. Saturday, February 23rd at 7 AM PT
• ### FREE Quant Workshop by e-GMAT!
February 24, 2019
February 24, 2019
07:00 AM PST
09:00 AM PST
Get personalized insights on how to achieve your Target Quant Score.
# Combinatorics and Probability cheat sheet !
Author Message
TAGS:
### Hide Tags
Intern
Joined: 17 Jan 2018
Posts: 3
Combinatorics and Probability cheat sheet ! [#permalink]
### Show Tags
09 Oct 2018, 08:02
6
1
Combinatorics
* Permutation formula: $$^nP_r$$ = $$\frac{n! }{ (n-r)!}$$
* Combination formula: $$^nC_r$$ = $$\frac{n! }{ (r!)*(n-r)!}$$
* $$^nP_n$$ = n!
* $$^nC_r$$ = $$^nC_n_+_r$$
* The number of ways in which n things can be arranged taking them all at a time where p things are exactly the same,q things are exactly the same and r
things are exactly the same.
= $$\frac{n!}{p!*q!*r!}$$ | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126519319939,
"lm_q1q2_score": 0.8091132944476539,
"lm_q2_score": 0.8267117962054049,
"openwebmath_perplexity": 7277.047145392179,
"openwebmath_score": 0.45896288752555847,
"tags": null,
"url": "https://gmatclub.com/forum/combinatorics-and-probability-cheat-sheet-278575.html"
} |
electromagnetism, magnetic-fields
What explains this "channeling" behavior of ferromagnetic materials? In other words, is this explainable using the normal methods for magnetic field calculations such as Biot-Savart and treating the ferromagnet as consisting of infinitesimal dipoles or does the dynamic process of domain alignment need to be considered in calculating the final magnetic field? | {
"domain": "physics.stackexchange",
"id": 38892,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, magnetic-fields",
"url": null
} |
wavelet
Title: What are the settings of Daubechies and Complex Gaussian are called? Hello What are the numbers of Daubechies and Complex Gaussian are called?
I dont know what to call db4 or cgau8. For Daubechies wavelet, convention is dbN, where N is the number of vanishing moments.
In case of Complex Gaussian wavelet number describes derivative order:
$$\mathrm{cgau}(x)=C_n\left[e^{-ix}e^{-x^2}\right]^{(p)}$$ | {
"domain": "dsp.stackexchange",
"id": 2090,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "wavelet",
"url": null
} |
machine-learning, r
Once the predictions have this form, you've demonstrated that you have the knowledge to turn the probability estimate into Vegas odds, so that should be a straightforward process for you. | {
"domain": "datascience.stackexchange",
"id": 4040,
"lm_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, r",
"url": null
} |
homework-and-exercises, newtonian-mechanics, forces, free-body-diagram, string
Title: Constraint relations question Here's a common Newtonian mechanics problem.
Assume conditions to be ideal - pulley is massless, frictionless, strings are inextensible. Two blocks A and B are moving down with a constant speed $u$. We have to find the upward speed of block C when the strings make an angle of theta with the vertical. | {
"domain": "physics.stackexchange",
"id": 98730,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, newtonian-mechanics, forces, free-body-diagram, string",
"url": null
} |
quantum-mechanics, hilbert-space, superposition, schroedingers-cat
Title: Schrodinger's cat paradox problems As long as i understand this paradox says this : There is a cat in closed box with some radioactive stuff in it . Now as radioactivity is a purely quantum process the , the material both decays and doesent at same time , in other words , is in superposition. So should the cat be in some strange form of both dead and alive form in box , until we observe it. | {
"domain": "physics.stackexchange",
"id": 54661,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, hilbert-space, superposition, schroedingers-cat",
"url": null
} |
quantum-field-theory, conformal-field-theory, integration, ads-cft
Title: AdS/CFT scalar 3-point function integral from Feynman parametrization? In this paper the scalar 3-point function in AdS/CFT is obtained by performing the following integral:
The authors comment that they obtain the result by Feynman parameter integration. For practice I wanted to reproduce the same result, so I looked up the Wikipedia page on Feynman parameters: | {
"domain": "physics.stackexchange",
"id": 45627,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-field-theory, conformal-field-theory, integration, ads-cft",
"url": null
} |
python, programming-challenge, python-3.x, tree, time-limit-exceeded
def left_branch(h, parent: Node):
global node_list
global solution
new_node = Node()
new_node.depth = parent.depth + 1
new_node.parent = parent.data
try:
if parent.left_edge:
new_node.data = parent.data//2
node_list.remove(new_node.data)
else:
new_node.left_edge = False
new_node.data = parent.data - int(pow(2, h - new_node.depth))
print(new_node.data)
node_list.remove(new_node.data)
except ValueError:
if not(new_node.data in node_list):
return new_node
solution.update({new_node.data: parent.data})
left = left_branch(h, new_node)
right = right_branch(h, new_node)
new_node.left = left
new_node.right = right
return new_node | {
"domain": "codereview.stackexchange",
"id": 27455,
"lm_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, programming-challenge, python-3.x, tree, time-limit-exceeded",
"url": null
} |
is a fundamental algorithm in computation geometry, on which are many algorithms in computation geometry based. The Delaunay triangulation of V can be produced by projecting con(V+)intod dimensions. I am going to understand his algorithm in next one hour. Here is top 3 in Geometric Algorithms 1-) This book is a reference book about competitive programming which you may like. you consider a hand. Convex Mesh Colliders are limited to 255 triangles. The function given on this page implements the Graham Scan Algorithm, a brief explanation and demonstration of which may be. Computer Graphics Panning with Computer Graphics Tutorial, Line Generation Algorithm, 2D Transformation, 3D Computer Graphics, Types of Curves, Surfaces, Computer Animation, Animation Techniques, Keyframing, Fractals etc. Just duplicate any of the objects named "convex hull" , change the skinkwrap target and move the hull to the object. The Delaunay triangulation objects offer a method for locating the simplex containing | {
"domain": "ciod.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9879462222582661,
"lm_q1q2_score": 0.8054058559000264,
"lm_q2_score": 0.8152324871074607,
"openwebmath_perplexity": 702.2431703921578,
"openwebmath_score": 0.4055248498916626,
"tags": null,
"url": "http://ciod.it/pjtg/convex-hull-algorithm-tutorial.html"
} |
matlab
Title: How to segment femoral and tibial knee cartilage individualy? I am researching in medical image processing area. I want to segment knee cartilage into femoral cartilage and tibial cartilage. But two part have same intensity and only different position(femoral cartilage is above and tibial cartilage is below). I am finding the techniques or method to segment them individualy.Could you help me show to me that techniques? Thank you so much![enter image description here][1] Looks like you have to do some motion tracking of points to separate the two. Is it possible to take images before and after some motion? That way you could model how the cartilage moved as a function of tibia or femoral motion, and you might be able to separate what portions of the cartilage belong to the tibia and femur. | {
"domain": "dsp.stackexchange",
"id": 1619,
"lm_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",
"url": null
} |
botany, growth, light
Title: What happens to plants if they are exposed to "sunlight" 24h a day? I just wondered if one could grow plants faster, if they were exposed to sunlight-like light all the time.
In a similar question which is not the same, I could confirm that plants have different processes going on at day and at night. However, it didn't answer the question about the consequences of permanent exposure to sunlight.
However, I don't understand what would happen if there was light all the time. What would happen to different plants if they are exposed to "sunlight" 24/7?
(Similarly: What is the "optimal" amount of sunlight time for different plants? Is it basically what is common in the environments they typically grow in?) This review (from 2011)1 states that it depends on the plant species and cultivar. | {
"domain": "biology.stackexchange",
"id": 10142,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "botany, growth, light",
"url": null
} |
homework-and-exercises, general-relativity, tensor-calculus
With $R_{\mu\nu\rho\sigma}$ the Riemann curvature tensor and $R_{\mu\nu}$ the Ricci tensor.
Although I was able to derive all of the equations involved, I don't see how to put them together to get the sought-after result.
The only way I saw to get started is the following:
$$K^{\lambda}\nabla_{\lambda}R=\nabla_{\lambda}(K^{\lambda}R)-R\nabla_{\lambda}K^{\lambda}=g^{\mu\sigma}(\nabla_{\lambda}(R_{\sigma\mu}K^{\lambda})-R_{\sigma\mu}\nabla_{\lambda}K^{\lambda}) $$
which immediately runs me into trouble because I don't see how to simplify/manipulate either of the terms to even make use of any of the three 'ingredients' Start with the following form of the Bianchi Identities
$$
\nabla^\mu R_{\mu\nu} = \frac{1}{2} \nabla_\nu R
$$
Contract both sides with $K^\nu$. We find
$$
\frac{1}{2} K^\nu \nabla_\nu R = K^\nu \nabla^\mu R_{\mu\nu} = \nabla^\mu \left( K^\nu R_{\mu\nu} \right) - R_{\mu\nu} \nabla^\mu K^\nu
$$ | {
"domain": "physics.stackexchange",
"id": 65834,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, general-relativity, tensor-calculus",
"url": null
} |
The remaining case, where each of $$f$$ and $$g$$ has at most one non-trivial Jordan block, should be easy.
• @RakoonBerry Any Jordan block $J_k(\lambda)$ of size $k>1$, i.e. any Jordan block whose characteristic/minimal polynomial is $(x-\lambda)^k$ for some $\lambda\in\mathbb C$ and some $k>1$. – user1551 Jul 4 at 16:31 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9830850832642353,
"lm_q1q2_score": 0.8060249105675587,
"lm_q2_score": 0.8198933381139646,
"openwebmath_perplexity": 97.36471994015294,
"openwebmath_score": 0.9363694190979004,
"tags": null,
"url": "https://math.stackexchange.com/questions/3283001/non-nilpotent-and-non-invertible-matrices-that-have-the-same-characteristic-and"
} |
Example(2): Find the greatest coefficient of a binomial expansion $$(2x + 3y)^{12}$$?
Solution: Given, $$n = 12$$, $$a = 2x$$, $$b = 3y$$
Here the value of $$n$$ is an even number, hence $$k = \frac{n}{2}$$ $$k = \frac{12}{2}$$ $$k = 6$$ The greatest coefficient of the binomial expansion. $$= \binom{n}{\frac{n}{2}}$$ $$= \binom{12}{6}$$ This is the greatest coefficient of the binomial expansion of $$(2x + 3y)^{12}$$. We can further solve $$\binom{12}{6}$$ to get the final value. $$\binom{12}{6} = \frac{12!}{(12 - 6)! \ 6!}$$ $$= \frac{12 \times 11 \times 10 \times 9 \times 8 \times 7}{6!}$$ $$= \frac{12 \times 11 \times 10 \times 9 \times 8 \times 7}{6 \times 5 \times 4 \times 3 \times 2 \times 1}$$ $$\binom{12}{6} = 924$$
Example(3): Find the greatest coefficient of a binomial expansion $$(2x + 3y)^7$$?
Solution: Given, $$n = 7$$, $$a = 2x$$, $$b = 3y$$ | {
"domain": "narviacademy.in",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9946150633151776,
"lm_q1q2_score": 0.8084900720344467,
"lm_q2_score": 0.8128673110375457,
"openwebmath_perplexity": 113.03057028419697,
"openwebmath_score": 0.9487995505332947,
"tags": null,
"url": "https://www.narviacademy.in/Topics/mathematics/mathematics-algebra-binomial-expansion-greatest-coefficient.php"
} |
navigation, mapping, rviz, ros-hydro, base-link
My global costmap is
global_costmap:
global_frame: /map
robot_base_frame: base_link
update_frequency: 5.0
static_map: true
The link beetween map and /odom is done in the move_base.launch file :
<node pkg="tf" type="static_transform_publisher" name="odom_map_broadcaster" args="0 0 0 0 0 0 /map /odom 100" />
When I launched roswtf i got this error
Loaded plugin tf.tfwtf
No package or stack in context
================================================================================
Static checks summary:
No errors or warnings
================================================================================
Beginning tests of your ROS graph. These may take awhile...
analyzing graph...
... done analyzing graph
running graph rules...
... done running graph rules
running tf checks, this will take a second...
... tf checks complete
Online checks summary:
Found 3 warning(s).
Warnings are things that may be just fine, but are sometimes at fault | {
"domain": "robotics.stackexchange",
"id": 18906,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, mapping, rviz, ros-hydro, base-link",
"url": null
} |
quantum-mechanics, angular-momentum, atomic-physics, atoms, orbitals
The source you've given is flat-out wrong. The wavefunction it mentions, $\varphi=\frac{1}{\sqrt3}[2p_x+2p_y+2p_z]$, is in no way spherically symmetric. This is easy to check: the wavefunction for the $2p_z$ orbital is $\psi_{2p_z}(\mathbf r)=\frac {1}{\sqrt {32\pi a_0^5}}\:z \:e^{-r/2a_{0}}$ (and similarly for $2p_x$ and $2p_y$), so the wavefunction of the combination is
$$\varphi(\mathbf r)=\frac {1}{\sqrt {32\pi a_0^5}}\:\frac{x+y+z}{\sqrt 3} \:e^{-r/2a_{0}},$$
i.e., a $2p$ orbital oriented along the $(\hat{x}+\hat y+\hat z)/\sqrt3$ axis.
This is an elementary fact and it can be verified at the level of an undergraduate text in quantum mechanics (and it was also obviously wrong in the 1960s). It is extremely alarming to see it published in an otherwise-reputable journal. | {
"domain": "physics.stackexchange",
"id": 75457,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, angular-momentum, atomic-physics, atoms, orbitals",
"url": null
} |
Probability of drawing 2 white and 1 black ball
From a box containing 4 white and 6 black balls, 3 are transferred to another empty box. From new box a ball is drawn and it is black. What is the probability that out of 3 balls transferred 2 are white and one black ?
My approach is as follows : probability = $$\frac{(4C2*6C1)}{(10C3)}$$ = 0.3
another approach i thought was $$\frac{(4*3*6)}{(10*9*8)}$$= 0.1
The answer seems to be 1/6. What am i doing wrong?
• Well, you haven't actually said what you are doing, so nobody can really tell for sure what you are doing wrong. If you post your reasons for the answers you gave, then probably someone will be able to tell you why it's wrong. – David Dec 10 '14 at 12:47 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9835969694071564,
"lm_q1q2_score": 0.8217790831428324,
"lm_q2_score": 0.8354835452961425,
"openwebmath_perplexity": 152.63749523036128,
"openwebmath_score": 0.6846703886985779,
"tags": null,
"url": "https://math.stackexchange.com/questions/1060777/probability-of-drawing-2-white-and-1-black-ball"
} |
physiology, proteins, human-physiology
Title: Why does Edema occur in Kwashiorkor? Edema in lower leg and face is a symptom of Kwashiorkor. It is the most distinguishing feature of it which distinguishes it from Marasmus. Why would decrease in amount of proteins cause Edema? Why doesn't it occur in Marasmus (which is both protein and energy deficiency)?
Why would decrease in amount of proteins cause Edema? | {
"domain": "biology.stackexchange",
"id": 8112,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "physiology, proteins, human-physiology",
"url": null
} |
and compound interest. RRB NTPC - Compound Interest : Aptitude Test (65 Questions with Explanation) Free Test Series in Telugu Free Online exams in Telugu previous year question AP Grama Sachivalayam online telugu in telugu pdf; RRB NTPC - Compound Interest : Aptitude Test (65 Questions with Explanation) pdf free download For All Competitive Exams model papers for. , being reckoned yearly. As a result, students will: Learn the relationship between the interest rate and the total amount in the account. To register Maths Tuitions on Vedantu. Are you a “receiver” or a “payer”?. Compound interest formulas to find principal, interest rates or final investment value including continuous compounding A = Pe^rt. What will the account balance be after 6 years?$6,520. Display Visual 6B. Compound interest will produce a larger return on a long-term investment compared to simple interest. "The return gets greater and bigger with each passing year. A $175,000 loan compounded monthly at 3. You put | {
"domain": "cralstradadeiparchi.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795098861572,
"lm_q1q2_score": 0.815947592901234,
"lm_q2_score": 0.8267117855317474,
"openwebmath_perplexity": 1403.1439827840675,
"openwebmath_score": 0.4161606729030609,
"tags": null,
"url": "http://iptn.cralstradadeiparchi.it/compound-interest-pdf.html"
} |
qiskit, ibm-q-experience, ibm-quantum-devices
Title: I've wrote code on an outdated version of QisKit but what to run it on a quantum computer like mentioned in the title I've got working code on an outdated version of QisKit which I run on my own IDE. However I am wanting to run this on a real quantum computer and I can't do this as IBM quantum lab only works for the current version of QisKit.
I'm wondering if there is anyway around this without having to migrate my code to the current version of QisKit.
Thanks Are you trying to copy your code to IBM Quantum Lab to execute? If that is the case you can downgrade the qiskit version by running !pip install qiskit==[old version] in a Jupyter notebook cell, where [old version] is the version of Qiskit your code was based on, for example 0.20.0. You may need to restart kernel for the old version to be reflected. | {
"domain": "quantumcomputing.stackexchange",
"id": 4393,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "qiskit, ibm-q-experience, ibm-quantum-devices",
"url": null
} |
fluid-mechanics
(M1/M) = (1 + sinθ)/2
If we assume the water is non-compressible the jet thicknesses must have the same ratio and that's the same result as presented in the original solution.
Your "working in the horizontal direction -idea is a misconception". The conservation of the momentum is only true for the "along the surface component". The rest of the momentum is lost because the surface stops the motion in the surface normal direction. | {
"domain": "engineering.stackexchange",
"id": 4145,
"lm_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-mechanics",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.