text stringlengths 1 1.11k | source dict |
|---|---|
genetics, molecular-biology, philosophy-of-science
Title: Crick’s Central Dogma — Counter Cases I was recently reading about non-coding RNAs being a counter example to Central Dogma of Biology. Can someone add more cases which violate the Central Dogma? Thanks!
UPDATE - Reference of lncRNAs violating Central Dogma:
Although the central dogma remains a core tenet of cellular and
molecular biology, the appreciation of lncRNAs as functional genomic
elements that defy the central dogma may be essential for fully under-
standing biology and disease. [Iyer et al. Nature, 2015] Crick’s Central Dogma was actually: | {
"domain": "biology.stackexchange",
"id": 6007,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "genetics, molecular-biology, philosophy-of-science",
"url": null
} |
electromagnetism, electric-fields, electric-current
Title: Doubt about Faraday's Law Faraday's law states that
the circulation of the electric field E around a closed loop is equal to the rate of change of the magnetic flux through the area enclosed by the loop | {
"domain": "physics.stackexchange",
"id": 72727,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, electric-fields, electric-current",
"url": null
} |
kinect, rosaria
Title: Installation of RosAria in ROS kinect
I followed the tutorial of RoaAria How to start ROSARIA . First, I brought RosAria into the workspace. Then I installed the ARIA from Adept MobileRobots. When I tried to build rosaria using catkin_make, I encountered the following error.
CMakeFiles/RosAria.dir/LaserPublisher.cpp.o: In function `LaserPublisher::publishPointCloud()':
LaserPublisher.cpp:(.text+0x112b): undefined reference to `ArRangeBuffer::getBuffer[abi:cxx11]()'
collect2: error: ld returned 1 exit status
rosaria/CMakeFiles/RosAria.dir/build.make:156: recipe for target '/home/tezhang/catkin_ws/devel/lib/rosaria/RosAria' failed
make[2]: *** [/home/tezhang/catkin_ws/devel/lib/rosaria/RosAria] Error 1
CMakeFiles/Makefile2:3376: recipe for target 'rosaria/CMakeFiles/RosAria.dir/all' failed
make[1]: *** [rosaria/CMakeFiles/RosAria.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed | {
"domain": "robotics.stackexchange",
"id": 24749,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "kinect, rosaria",
"url": null
} |
swift, cryptography, aes
let dataLength = self.length
let bufferSize = dataLength + kCCBlockSizeAES128
let buffer = malloc(bufferSize)
var numBytesEncrypted = 0
let cryptStatus = CCCrypt(operation, CCAlgorithm(kCCAlgorithmAES128), CCOptions(kCCOptionPKCS7Padding), keyPtr, kCCBlockSizeAES128, nil, self.bytes, dataLength, buffer, bufferSize, &numBytesEncrypted)
if cryptStatus == CCCryptorStatus(kCCSuccess) {
// bytesNoCopy will transfer ownership to the NSData object returned, so we don't need to explicitly call free here
return NSData(bytesNoCopy: buffer, length: numBytesEncrypted)
}
// If the operation failed, we never transferred memory ownership, so free the buffer
free(buffer)
return nil
}
}
A few notes: | {
"domain": "codereview.stackexchange",
"id": 21651,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "swift, cryptography, aes",
"url": null
} |
fluid-dynamics, viscosity
Capillary tube or Rankine viscometer - I don't know the governing equations required for this device.The basic principle of operation of the Rankine method is that a pellet of clean mercury, introduced into a properly sized glass tube filled with a gas, completely fills the cross section of the tube. Forming a perfect internal seal between the spaces on its either side, the mercury pellet will, at any inclination of the tube, quickly come to a steady descending velocity. This descending pellet acts as a piston, forcing the gas through a fine capillary.This mercury “piston” establishes a constant pressure difference across the fine capillary.The weight of the pellet and the internal diameters of both tubes being known, the time of descent of the mercury between given points permits calculation of the volume rate of flow of the gas through the capillary under constant pressure difference, providing data which allows the computation of the viscosity of the gas. | {
"domain": "physics.stackexchange",
"id": 27561,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "fluid-dynamics, viscosity",
"url": null
} |
ros, launch-file, dependencies
* joy: found flag "-L/opt/ros/fuerte/lib", but no matching "-Wl,-rpath,/opt/ros/fuerte/lib"
* std_msgs: found flag "-L/opt/ros/fuerte/lib", but no matching "-Wl,-rpath,/opt/ros/fuerte/lib"
* navfn: found flag "-L/opt/ros/fuerte/lib", but no matching "-Wl,-rpath,/opt/ros/fuerte/lib"
* gmapping: found flag "-L/opt/ros/fuerte/lib", but no matching "-Wl,-rpath,/opt/ros/fuerte/lib"
* costmap_2d: found flag "-L/opt/ros/fuerte/lib", but no matching "-Wl,-rpath,/opt/ros/fuerte/lib"
* move_base_msgs: found flag "-L/opt/ros/fuerte/lib", but no matching "-Wl,-rpath,/opt/ros/fuerte/lib"
* diagnostic_msgs: found flag "-L/opt/ros/fuerte/lib", but no matching "-Wl,-rpath,/opt/ros/fuerte/lib"
* dynamic_reconfigure: found flag "-L/opt/ros/fuerte/lib", but no matching "-Wl,-rpath,/opt/ros/fuerte/lib"
* bondcpp: found flag "-L/opt/ros/fuerte/lib", but no matching "-Wl,-rpath,/opt/ros/fuerte/lib"
* pluginlib: found flag "-L/opt/ros/fuerte/lib", but no matching "-Wl,-rpath,/opt/ros/fuerte/lib" | {
"domain": "robotics.stackexchange",
"id": 13021,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, launch-file, dependencies",
"url": null
} |
lambda-calculus, combinatory-logic
Title: Is the SK2 calculus a complete basis, where K2 is the flipped K combinator? Specifically, if I defined a new $K_2$ as
$$K_2 = \lambda x. (\lambda y. y)$$
instead of
$$K = \lambda x. (\lambda y. x)$$
would the $\{S, K_2,I\}$-calculus be a compete basis?
My guess is "no," just because I can't seem to be able to construct the regular K combinator from the $S$, $I$, and $K_2$ combinators, but I don't have an algorithm to follow, nor do I have good intuition about making things out of these combinators.
It seems like you can define
$$K_2 = K I$$
with the regular $\{S, K, (I)\}$-calculus, but I couldn't really work backwards from that to get a derivation of $K$ in terms of $K_2$ and the rest. | {
"domain": "cs.stackexchange",
"id": 13856,
"lm_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, combinatory-logic",
"url": null
} |
metric-tensor, tensor-calculus, perturbation-theory, linear-algebra, trace
&= \sqrt{-\det{b}}\left(1 + \frac{1}{2}\operatorname{tr}(b^{-1}h)-\frac{1}{4}\operatorname{tr}{(b^{-1}h)^2} + \frac{1}{8}\operatorname{tr}^2{(b^{-1}h)}\right) + \mathcal O(h^3)\\
\end{align}
In physics notation this reads
$$
\sqrt{-g}=\sqrt{-b}\left(1+\frac{1}{2} h_{\mu}^{\mu}-\frac{1}{4} h^{\mu \nu} h_{\mu \nu}+\frac{1}{8}\left(h_{\mu}^{\mu}\right)^{2}\right)+\mathcal{O}\left(h^{3}\right)
$$
How to make match these 2 terms : $\frac{1}{2} h_{\mu}^{\mu}$ and $\frac{1}{2} \operatorname{tr}\left(b^{-1} h\right)$ ?
Any help is welcome. $b$ is their notation for the original metric $g_{\mu\nu}$ and
$b^{-1}$ is just their notation for the inverse metric $g^{\mu\nu}$. So ${\rm tr} \{b^{-1}h\}=g^{\mu\alpha} h_{\alpha \mu}={h^\mu}_\mu$, and so on. | {
"domain": "physics.stackexchange",
"id": 71259,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "metric-tensor, tensor-calculus, perturbation-theory, linear-algebra, trace",
"url": null
} |
string-theory, cosmology, universe, multiverse
There are different universes, but all these universes have different physical laws. For example, the Einstein gravitational equations are only applicable in a subset of these universes, there can be a universe where the gravitational equations take a different form of mathematical expression; and in a weak gravitational field limit, the gravitational force follows a 'proportional square law' instead of newton's 'inverse square law'. | {
"domain": "physics.stackexchange",
"id": 5688,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "string-theory, cosmology, universe, multiverse",
"url": null
} |
homework-and-exercises, newtonian-mechanics, rotational-dynamics
Any help appreciated! Actually you proved, with the third equation, that the translational speed does not depend on the radius $r$ of
the cylinder, or on its mass $m$, but only on $g$ and $\alpha$. Indeed it reads like a differential equation defining the motion of the cylinder.
If the translational speed of the cylinder axis does not depend on the radius, then the angular speed has to depend on it, since they are related by the relation $v=\omega r$.
I do not see how that fact can be overcome by any computation
including the total momentum of the system. This momentum can be
computed from the speed at distance $l$, but will depend on the radius
$r$, because it is squared in the moment of inertia, but not in the
angular speed. Getting the total momentum by other means, such as resolving the differential equation will not do any better. Imho (but I have not practiced this sport for a long time).
But having $r$ in the expression of the angular speed is not a crime. | {
"domain": "physics.stackexchange",
"id": 8568,
"lm_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, rotational-dynamics",
"url": null
} |
message-filters, ros-jade
Title: How to configure Time sequence message filter
Hello,
I want to use time sequence message filter. I wrote the code according to API defined here Link
This is my code
void callback(const std_msgs::StringConstPtr& info)
{
ROS_INFO("Call is called ");
}
int main(int argc, char **argv)
{
ros::init(argc, argv, "test");
ros::NodeHandle n;
message_filters::Subscriber<std_msgs::String> sub(n, "my_topic", 1);
message_filters::TimeSequencer<std_msgs::String> seq(sub, ros::Duration(0.1), ros::Duration(0.01), 10);
seq.registerCallback(callback);
ros::spin();
return 0;
}
It gives this error
In file included from /opt/ros/jade/include/message_filters/subscriber.h:43:0,
from /lhome/luqman/Work/radar_ros_ws/src/bbox_rviz/src/test_doc.cpp:2: | {
"domain": "robotics.stackexchange",
"id": 28525,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "message-filters, ros-jade",
"url": null
} |
optics, visible-light, reflection
(higher-res versions: one two)
The floor is equally bright on the area that the mirror is reflecting the floor's light back at it and the area where it isn't.
Shouldn't the floor be brighter with more photons on it than before?
"Why don't objects get brighter when I reflect their light back at them?" | {
"domain": "physics.stackexchange",
"id": 95000,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "optics, visible-light, reflection",
"url": null
} |
c, strings, formatting
Title: Format string processing similar to date or printf() I wrote a function that is supposed to take a format string similar to what date accepts and replace all format specifiers with strings provided by a callback function.
Format specifiers are sequences of a % plus another character; %% for a literal %
Replace the format specifier with the string provided by the callback function
If the callback function returns NULL, no replacement should take place (leave the specifier in)
The callback function receives the character following % as argument
An optional pointer can be passed through to the callback function
If the last character of the format string is %, it should be left as-is
The result of the processing is to be placed in the provided buffer
If the provided buffer isn't big enough, simply stop processing
Always null-terminate the provided buffer, even if it isn't big enough | {
"domain": "codereview.stackexchange",
"id": 38905,
"lm_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, strings, formatting",
"url": null
} |
botany, ecology, plant-physiology, trees
Title: What is the fate of the typical tree? Walking through the local established broadleaf forests dominated by oak and tulip poplar (Eastern U.S.), it is common to find patches of young tree saplings, say 10-20 oak or tulip poplar saplings growing in close proximity. The obvious restriction on living space means that probably at most one of these trees will make it to maturity. In fact, judging by the apparent lack of mid-aged trees of these types in the woods, it seems very possible that none of these trees will last much longer. I'm curious: at what point and how would these trees die? The answer might also help me take better care of trees I've planted in my yard.
I can easily speculate about some causes:
Competition for water/nutrients in the soil
Not enough sunlight
Animal predators
Pathogens | {
"domain": "biology.stackexchange",
"id": 10855,
"lm_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, ecology, plant-physiology, trees",
"url": null
} |
statistical-mechanics, ideal-gas
Wikipedia mentions a minimum of $10^{-12} \textrm{ Torr}$ for the cold cathode method of pressure measurement. This is equivalent to $1.3\cdot10^{-12} \textrm{ hPa}$. However, using the ideal gas law for $V = 1\textrm{ m}^3$, $T = 300\textrm{ K}$ and $n = 100$ yields $p = 4\cdot 10^{-21}\textrm{ hPa}$, that is, 9 orders of magnitude less.
I would therefore be very surprised if it were possible to measure the number of particles in this system correctly. However, the result will change if the volume or temperature changes. For example, for $V = 1 \textrm{ mm}^3$, we get $p = 4\cdot 10^{-12}\textrm{ hPa}$, which is at least in the same range as the number given by Wikipedia. | {
"domain": "physics.stackexchange",
"id": 5158,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statistical-mechanics, ideal-gas",
"url": null
} |
thermodynamics, energy, temperature, kinetic-theory
In summary, and to directly answer your question, the details of "why and how kinetic energy of the particles of a system" increase when heat is provided depend on how that heat energy is absorbed into the system. | {
"domain": "physics.stackexchange",
"id": 91576,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "thermodynamics, energy, temperature, kinetic-theory",
"url": null
} |
between two datasets while PCA defines a new orthogonal coordinate system that optimally describes variance in a single dataset. , it tries to decompose it into two matrices such that {\displaystyle \alpha _{k}'\alpha _{k}=1,k=1,\dots ,p} Eigenvectors for: Now we must solve the following equation: First let’s reduce the matrix: This reduces to the equation: There are two kinds of students: those who love math and those who hate it. Factor analysis is generally used when the research purpose is detecting data structure (that is, latent constructs or factors) or causal modeling. A key difference from techniques such as PCA and ICA is that some of the entries of In matrix form, the empirical covariance matrix for the original variables can be written, The empirical covariance matrix between the principal components becomes. = E Finance. Another limitation is the mean-removal process before constructing the covariance matrix for PCA. 6, pp. = ∗ Eigenvalues and eigenvectors of matrices are | {
"domain": "decortech.pl",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9811668734137682,
"lm_q1q2_score": 0.8067047406864422,
"lm_q2_score": 0.8221891327004132,
"openwebmath_perplexity": 850.2870432599236,
"openwebmath_score": 0.8346825242042542,
"tags": null,
"url": "http://www.decortech.pl/slug/application-of-eigenvalues-and-eigenvectors-in-statistics-78ff40"
} |
biochemistry, immunology, autoimmune
Title: Where happens MHCII coordination to a self-peptide, and what happens if the bond would be irreversible? MHC-II proteins are presenting antigens on the surface of cells with lysosomal activities where they eventually might get transported off by some T-cell receptor-anti-gens, as far as I understand (pls apologise and correct me if I am wrong). I would be interested in two questions regarding this specific immuno-cascade reaction. | {
"domain": "biology.stackexchange",
"id": 7996,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "biochemistry, immunology, autoimmune",
"url": null
} |
ros, python, ros2
def execute_callback(self, goal_handle):
self.get_logger().info('Executing goal...')
feedback_msg = Frame.Feedback()
feedback_msg.progress = self.current_frame
while self.current_frame < goal_handle.request.order:
time.sleep(.5)
feedback_msg.progress = self.current_frame
self.get_logger().info(f'Feedback: {feedback_msg.progress}')
goal_handle.publish_feedback(feedback_msg)
goal_handle.succeed()
result = Frame.Result()
result.response = self.current_frame
return result | {
"domain": "robotics.stackexchange",
"id": 35226,
"lm_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, python, ros2",
"url": null
} |
php, sql, mysql, mysqli, sql-injection
// Check username is present and add error message if necessary
if(!$username){
$errors[] = "Username required";
}
// Check for any errors
if(count($errors)){
// Some errors were found...
} else {
// Error free so far...
}
Alternatively, if you're interested in learning more about OOP implement a basic error reporting class which you can re-use across your webpages.
MySQLi
You don't appear to have turned on error reporting for mysqli; which you should aim to do so that you can catch any errors/bugs down the road.
Prepared Statements
There's really no excuse not to be using prepared statements for SQL queries. There are a number of benefits for both security, simplicity, and readability: with very few downsides.
$sql = "SELECT * FROM user WHERE username = " . sanitizeString($username) . " AND status = " . sanitizeInteger($status);
// Becomes...
$sql = "SELECT * FROM user WHERE username = ? AND status = ?"; | {
"domain": "codereview.stackexchange",
"id": 40568,
"lm_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, sql, mysql, mysqli, sql-injection",
"url": null
} |
space-travel, radiation-pressure, solar-sails
Thank you The bulk of the acceleration will be done in the short period where the lasers are trained on the sails. The intensity of the lasers (100 GW or so) is going to be many orders of magnitude larger than sunlight (about 1000 W/m$^2$) and starlight (about 32 million times weaker than sunlight). So the main velocity vector will be set by the lasers, although I can imagine a careful design taking a bit of solar influence into account (not just the light, but also the solar gravity of 0.0059 N/kg that actually will be slightly higher than the light pressure of the sail if is not lighter than about 0.5 g/m$^2$).
In space the starlight is essentially isotropic, so it will not have a major effect.
Once the probe is launched there is really no reason to retain the solar sail and it could be discarded from the probe chip, removing most of the light pressure issues. | {
"domain": "physics.stackexchange",
"id": 48268,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "space-travel, radiation-pressure, solar-sails",
"url": null
} |
• I would just like to add that while this method may seem roundabout, it can help you avoid making silly mistakes; I've seen many students blindly apply the GP formula and get questions wrong because they didn't verify that the summation index started from 0! – Tenno Nov 2 '15 at 19:27
Hint:
Think of the high school identity: $$a^n-b^n=(a-b)(a^{n-1}+a^{n-2}b+\dotsm+ab^{n-2}+b^{n-1}).$$
If the $n$th term in a series is $\lambda a^n$ then $$s_n = \sum_{i=0}^n \lambda a^i$$ $$a s_n = \sum_{i=1}^{n+1} \lambda a^{i}$$ $$s_n - a s_n = (1-a)s_n = \lambda - \lambda a^{n+1}$$ So that $$\sum_{i=0}^n \lambda a^i = \lambda\frac{1- a^{n+1}}{1-a}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211531789392,
"lm_q1q2_score": 0.8452048008923523,
"lm_q2_score": 0.8670357615200474,
"openwebmath_perplexity": 242.44034573832866,
"openwebmath_score": 0.8807125687599182,
"tags": null,
"url": "https://math.stackexchange.com/questions/1509893/finding-formula-for-nth-partial-sum"
} |
c, windows, logging, portability
log("[F8]");
break;
case VK_F9:
log("[F9]");
break;
case VK_F10:
log("[F10]");
break;
case VK_F11:
log("[F11]");
break;
case VK_F12:
log("[F12]");
break;
case VK_F13:
log("[F13]");
break;
case VK_F14:
log("[F14]");
break;
case VK_F15:
log("[F15]");
break;
case VK_F16:
log("[F16]");
break;
case VK_F17:
log("[F17]");
break;
case VK_F18:
log("[F18]");
break;
case VK_F19:
log("[F19]");
break;
case VK_F20:
log("[F20]");
break; | {
"domain": "codereview.stackexchange",
"id": 7025,
"lm_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, windows, logging, portability",
"url": null
} |
##### Page 12
Example:
Find
I
|
z
|
=2
sin
z
z
2
-
1
dz.
We now generalise the theorem relating integrals and residues to deal with functions which
have more than one singularity.
Theorem:
(Residue Theorem) Let
γ
be a simple closed contour oriented anti-clockwise.
If
f
is analytic on and inside
γ
except for a finite number of isolated singularities
z
1
,...,z
n
inside
γ
, then
Z
γ
f
(
z
)
dz
=2
πi
n
X
k
=1
Res
z
=
z
k
f.
Proof:
By the Cauchy-Goursat Theorem,
Z
γ
f
(
z
)
dz
=
Z
γ
1
f
(
z
)
dz
+
Z
γ
2
f
(
z
)
dz
+
···
+
Z
γ
n
f
(
z
)
dz,
where the
γ
k
are non-intersecting circles around
z
k
, inside
γ
, oriented anti-clockwise.
If
f
(
z
)=
n
=
-∞
c
k
n
(
z
-
z
k
)
n
is the Laurent series for
f
z
k
, then
Z
γ
k
f
(
z
)
dz
=
X
n
=
-∞
Z
γ
k
c
k
n
(
z
-
z
k
)
n
=2
πic
k
-
1
=2
πi
Res
z
=
z
k
f.
12 | {
"domain": "studypaq.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9884918519527643,
"lm_q1q2_score": 0.8011517928751418,
"lm_q2_score": 0.8104789040926008,
"openwebmath_perplexity": 4385.489671318439,
"openwebmath_score": 0.8856775164604187,
"tags": null,
"url": "https://www.studypaq.com/docs/Complex-An-98888/Complex_Analysis_3"
} |
android
i exported to 192.168.0.95:4711 and this is where the app is connecting
solved with help from gvdhoorn
export ROS_MASTER_URI=http://192.168.0.95:4711/
export ROS_IP=192.168.0.95
roscore -4711
connecting in the app to http://192.168.0.95
in a new window
doing same export
rqt
publishing messages
Please clear out any cached data on the android device (app properties, clear all local data). Open new terminals on your desktop. Redo the steps. Your android device should not give you the same "unable to resolve" error if you're not using hostnames.
Originally posted by stefan on ROS Answers with karma: 15 on 2014-08-08
Post score: 0
This looks like a networking issue:
Unable to resolve host "Ubuntu-Test": No address associated with hostname | {
"domain": "robotics.stackexchange",
"id": 18962,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "android",
"url": null
} |
biochemistry, molecular-biology, respiration
15. Schell JC, Rutter J. The long and winding road to the mitochondrial pyruvate carrier. Cancer & Metabolism. 2013;1:6. doi:10.1186/2049-3002-1-6.
16. Wikipedia contributors. "Cori cycle." Wikipedia, The Free Encyclopedia. Wikipedia, The Free Encyclopedia, 28 Feb. 2017. Web. 7 Apr. 2017.
17. Smirnova, E., Griparic, L., Shurland, D. L. & van der Bliek, A. M. Dynamin-related protein Drp1 is required for mitochondrial division in mammalian cells. Mol. Biol. Cell 12, 2245–2256 (2001).
18. Tondera, D. et al. SLP-2 is required for stress-induced mitochondrial hyperfusion. EMBO J. 28, 1589–1600 (2009).
19. Frezza, C. et al. OPA1 controls apoptotic cristae remodeling independently from mitochondrial fusion. Cell 126, 177–189 (2006). | {
"domain": "biology.stackexchange",
"id": 5211,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "biochemistry, molecular-biology, respiration",
"url": null
} |
Hint: $\frac{99\pi}6=8\cdot2\pi+\frac\pi2$
And $\sin$ and $\cos$ are periodic of period $2\pi$...
Alt. hint: for a shortcut in this particular case, note that:
$$\require{cancel} \left(\sqrt{3}+i\right)^3= \bcancel{\left(\sqrt{3}\right)^3}+3\cdot\left(\sqrt{3}\right)^2i + \bcancel{3 \cdot \sqrt{3}i^2}+i^3=9 \cdot i-i = 8i$$
Then of course $\;\left(\sqrt{3}+i\right)^{99}=\left(\left(\sqrt{3}+i\right)^3\right)^{33}=\ldots\,$
Leave the $99$ in the exponent of $2$, and calculate which of the twelve angles ($0,\frac\pi6,\dots,\frac{11\pi}6$) the $\frac{99\pi}6$ falls modulo $2\pi$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765610497292,
"lm_q1q2_score": 0.8012038301161429,
"lm_q2_score": 0.8175744828610095,
"openwebmath_perplexity": 785.9137580143323,
"openwebmath_score": 0.9360626339912415,
"tags": null,
"url": "https://math.stackexchange.com/questions/2727081/power-of-a-complex-number-find-sqrt3-i99/2727084"
} |
} \ ) is.. Equal to this derivative is e to the chain rule to u-substitution means: _____ a rule of,. Strangely, the subtlest standard method is just a review, this is the reverse rule. Rule, it means we 're having trouble loading external resources on our website to find integrals functions. Well if this is just the product rule run backwards technique when the integrand a! Easier to determine enables you to integrate the product rule enables you to integrate composite functions so you learn... This chain rule, integration reverse chain rule: Problems and Solutions function times derivative. This browser for the next few examples, I 'll do this in a, let me do in! A basic introduction into u-substitution wait, how does this relate to u-substitution complicated.. € ∫f ( g ( x ) ) g ' ( x ) +C! If this is just a review, this is the result of a function times derivative. The value of the function times the derivative of that you can learn solve! Evaluating many complicated integrals | {
"domain": "com.br",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.971992481016635,
"lm_q1q2_score": 0.8141603003994349,
"lm_q2_score": 0.8376199572530448,
"openwebmath_perplexity": 765.4364274888999,
"openwebmath_score": 0.9885673522949219,
"tags": null,
"url": "http://www.blog.formica.com.br/vegan-express-vbdch/dc6a0e-integration-chain-rule"
} |
general-relativity, black-holes
Title: Why does the event horizon of a black hole not look like a bright sphere? All infalling matter-energy appears to an external observer as frozen in time at the event horizon. Why then is this horizon not extremely bright due to radiation that is able to escape radially? So should all black holes not appear as a bright sphere? As Ben says, black holes that have accretion disks shine very brightly indeed due to heating of the matter in the disk as it falls inwards. However not all black holes have accretion disks. For example the black hole at the centre of our galaxy does not, and I suspect you're asking why it is no longer shining brightly. | {
"domain": "physics.stackexchange",
"id": 8662,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "general-relativity, black-holes",
"url": null
} |
ros, ros-kinetic, image-proc
Originally posted by DGCHAO on ROS Answers with karma: 3 on 2018-08-12
Post score: 0
I've had issues where libraries have been linked to over specific versions of the shared objects. There is a simple but slightly messy fix. You can create a symlink from libopencv_calib3d.so.3.3 to libopencv_calib3d.so.3.2 you may have to repeat this for quite a few of the openCV shared objects but I've always managed to get things working using this method.
Hope this helps.
Originally posted by PeteBlackerThe3rd with karma: 9529 on 2018-08-12
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 31519,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros, ros-kinetic, image-proc",
"url": null
} |
ros, ros-melodic, rosbag, nodes
Title: Bag file recorded from ROS node
Hello. I have a simple question about if its possible to record topics from within a rosnode. The goal is to autonomously have a robot collecting data for a period of time given specific locations of the environment.
My node looks like this so far but the file seems not to be created:
#!/usr/bin/python
import rospy
import rosbag
from std_msgs.msg import Int32, String
rospy.init_node("bagtest")
rate = rospy.Rate(2)
bag = rosbag.Bag('test13.bag','w')
#Set up message from String
s = String()
s.data = 'foo'
#Set up message from Int32
i = Int32()
i.data = 42
bag.write('chatter', s)
bag.write('numbers', i)
bag.close()
while not rospy.is_shutdown():
print("this is my first node")
rate.sleep()
The launch file looks like this:
<launch>
<node pkg="data_acquisition_package" type="testbag.py" name="bagtest" output="screen"></node>
</launch> | {
"domain": "robotics.stackexchange",
"id": 34932,
"lm_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, rosbag, nodes",
"url": null
} |
geochemistry, mass-extinction
Title: Are there any metal anomalies other than iridium in the K-Pg boundary? The iridium anomaly marks the elevated concentration of iridium in sedimentary deposits of the Cretaceous-Paleogene boundary. The iridium is said to come from the impactor, which is supposed to have much higher iridium contents than Earth's crust.
What about other metals? Is there an observed increase of other elements as well? For example, osmium is another extremely rare element in the crust. Is there an osmium anomaly as well? If not, why is the anomaly restricted to iridium and not the other metals? According to the conference article Can Siderophile Element Abundances and Ratios across the K-Pg Boundary be used Discriminate between Possible Types of Projectiles?, (Belza et al. 2013) state that the enrichment is not only in Iridium, but also in the other Platinum Group Elements and siderophile elements.
From the article Platinum-group elements (PGE) and rhenium in marine sediments across the Cretaceous– | {
"domain": "earthscience.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": "geochemistry, mass-extinction",
"url": null
} |
automata, finite-automata
Note that this is only an exponential lower bound, whereas the obvious construction has factorial complexity. However, you can improve on this construction. Given $n$ words, the idea is to guess which $n/2$ words will appear first and which $n/2$ words will appear last, and to recurse on each half. We obtain the recurrence
$$ T(n) = \binom{n}{n/2}\cdot 2T(n/2) \leq 2^n T(n/2). $$
Expanding the recurrence and using a trivial base case $T(1) = 1$, we get
$$
T(n) \leq 2^{n+n/2+\cdots} < 4^n,
$$
which is only exponential. In actuality, $T(1)$ is the size of the largest word to be matched, so the bound above should be multiplied by that. | {
"domain": "cs.stackexchange",
"id": 10555,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "automata, finite-automata",
"url": null
} |
waves, acoustics, frequency, wavelength, intensity
about what graph is a person talking?are these graphs incorrect?if yes,then what is frequency or amplitude,if not,then tell me one thing,we say that loudness or pitch of a sound is determined by its amplitude or frequency,so,here,what frequency or amplitude are we talking about? frequency or amplitude of the pressure-position graph,that is, frequency or amplitude of compression or rarefaction travelling,or is it the amplitude or frequency of the movement of a single air particle,do we talk about its frequency and amplitude? I give this one more try. | {
"domain": "physics.stackexchange",
"id": 86447,
"lm_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, acoustics, frequency, wavelength, intensity",
"url": null
} |
homework-and-exercises, electrostatics, charge, integration, dirac-delta-distributions
My attempt:
I think the answer is $\rho(\mathbf{r})=Q\delta^3(\mathbf{r}-R\hat{\mathbf{r}})$ because the Dirac delta function will blow up only if the radial component of $\mathbf{r}$ is $R$. But I just wanted to confirm. The delta function you wrote down is tricky to interpret (what’s the definition of $\hat{r}$ inside a delta function?), and while it could be made rigorous, there’s a more systematic approach that is widely generalizable.
You want to find a distribution $\rho$ which only has support on the spherical shell $r=R$, and has spherical symmetry. As an ansatz, we may write
$$\rho=A\delta(r-R).$$
The next requirement is that the total charge is $Q$. This gives
$$\int\mathrm{d}^3\textbf{x}\,\rho(\textbf{x})=4\pi\int_0^{\infty}\mathrm{d}r\,r^2\rho(r)=4\pi R^2A=Q.$$
Thus, $A=Q/4\pi R^2$, and
$$\rho=\frac{Q}{4\pi R^2}\delta(r-R).$$ | {
"domain": "physics.stackexchange",
"id": 57915,
"lm_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, electrostatics, charge, integration, dirac-delta-distributions",
"url": null
} |
javascript, performance, complexity
Title: Car Pooling algorithm time complexity I created a solution for the car pooling algorithm.
Problem:
You are driving a vehicle that has capacity empty seats initially available for passengers. The vehicle only drives east (ie. it cannot turn around and drive west.)
Given a list of trips, trip[i] = [num_passengers, start_location, end_location] contains information about the i-th trip: the number of passengers that must be picked up, and the locations to pick them up and drop them off. The locations are given as the number of kilometers due east from your vehicle's initial location.
Return true if and only if it is possible to pick up and drop off all passengers for all the given trips.
Example 1:
Input: trips = [[2,1,5],[3,3,7]], capacity = 4
Output: false
Example 2:
Input: trips = [[3,2,7],[3,7,9],[8,3,9]], capacity = 11
Output: true | {
"domain": "codereview.stackexchange",
"id": 39081,
"lm_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, performance, complexity",
"url": null
} |
python, python-3.x, console, unix
if args.header:
print('{:=^{}}'.format(filename, shutil.get_terminal_size().columns // 2))
for _ in range(args.repeat):
with open(filename, 'rb') as file:
for line in file:
nonblank_line = re.match('.*\S.*', line.decode(errors='replace'))
print(
' {:>{}} '.format(line_number, longest_line_number_length) if args.number or (args.number_nonblank and nonblank_line) \
else ' ' * (longest_line_number_length + 6) if args.number_nonblank else '', # For -E under -b
line.decode(errors='backslashreplace').rstrip('\n\r').replace('\t', tabs).translate(nonprinting),
sep='', end=ends
)
if args.number or (args.number_nonblank and nonblank_line):
line_number += 1
Demo: | {
"domain": "codereview.stackexchange",
"id": 24437,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, console, unix",
"url": null
} |
experimental-physics, terminology, definition, error-analysis, statistics
Also, In my lab class, we are taught to choose our uncertainties based on what we think the limitations of our instruments are. However, I have seen a few other people use the standard deviation of their measurements and call this the uncertainty. Is this the more common method? I think this would clear up some of the problems I am having. The key difference between these equations is the nature of the error: While the first is used for systematic error, the second is used for random errors.
The first equation is the total derivative of a function $f=f(x,y)$ at the point $(x_0, y_0)$
$$
\tag1
df = df(x_0,y_0) = \frac{\partial f(x_0,y_0)}{\partial x} dx +\frac{\partial f(x_0,y_0)}{\partial y} dy
$$ | {
"domain": "physics.stackexchange",
"id": 73753,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "experimental-physics, terminology, definition, error-analysis, statistics",
"url": null
} |
java, spring
Remove unnecessary data
But regardless of the Queue entity the first/last information is however completely unnecessary, since you also have the ordinal number on each node. Because that column also needs an index, you can do the first/last query efficiently with order by and limit.
SELECT * FROM Node
ORDER BY position
LIMIT 1 | {
"domain": "codereview.stackexchange",
"id": 39703,
"lm_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, spring",
"url": null
} |
torque
Now if the rod does not rotate for the two forces then the resultant of them ($F$) must be pass through $O$ and for this ${F_2}^{'}$ and ${F_1}^{'}$ should intersect at a point on the perpendicular line $OP$. | {
"domain": "physics.stackexchange",
"id": 24668,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "torque",
"url": null
} |
I continued this pattern (with the help of a computer) and got
1 / 2
1 / 2
3 / 4
3 / 4
15 / 16
15 / 16
35 / 32
35 / 32
315 / 256
315 / 256
693 / 512
693 / 512
3003 / 2048
3003 / 2048
6435 / 4096
6435 / 4096
109395 / 65536
109395 / 65536
230945 / 131072
230945 / 131072
969969 / 524288
969969 / 524288
2028117 / 1048576
2028117 / 1048576
16900975 / 8388608
16900975 / 8388608
35102025 / 16777216
At this point the program crashed (probably because I was creating a giant list of the possible outputs which was pretty inefficient).
I'm having a hard time figuring this out inductively, though perhaps that is not the best approach. How should I go about solving this? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9850429156022933,
"lm_q1q2_score": 0.8250916048592075,
"lm_q2_score": 0.8376199572530448,
"openwebmath_perplexity": 332.2555564335337,
"openwebmath_score": 0.8454294204711914,
"tags": null,
"url": "https://math.stackexchange.com/questions/3172398/arithmetic-mean-of-error-of-n-coin-flips-from-n-2"
} |
java, spring, hibernate, crud
response.sendRedirect("http://localhost:8080/crud");
return "home";
}
return "addDog";
}
@RequestMapping("addSnake")
public String addAnimal(HttpServletRequest request,HttpServletResponse response, @ModelAttribute("snakeDto") @Valid SnakeDTO snakeDto, BindingResult result) throws IOException{
if(request.getMethod().equalsIgnoreCase("post") && !result.hasErrors()){
Snake snake = new Snake();
snake.setName(snakeDto.getName());
snake.setAge(snakeDto.getAge());
snake.setDateOfBirth(snakeDto.getBirthDay());
snake.setWeight(snakeDto.getWeight());
snake.setLength(snakeDto.getLength());
snake.setVenomous(snakeDto.isVenomous());
animalDAO.addAnimal(snake);
response.sendRedirect("http://localhost:8080/crud");
return "home";
}
return "addSnake";
} | {
"domain": "codereview.stackexchange",
"id": 19900,
"lm_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, spring, hibernate, crud",
"url": null
} |
electrostatics, coulombs-law, dielectric
Title: Coulomb force between two point charges in a dielectric medium In a dielectric medium with relative dielectric constant $\epsilon_r$, what is the Coulomb force between two free point charges $q_1$ and $q_2$ at distance $r$? Is it equal to the Coulomb force in vacuum divided by $\epsilon_r$ or $\epsilon_r^2$, i.e., whether the formula is
$$F=\frac{q_1q_2}{4\pi\epsilon_0\epsilon_rr^2}\quad\mbox{or}\quad\frac{q_1q_2}{4\pi\epsilon_0\epsilon_r^2r^2}?$$ | {
"domain": "physics.stackexchange",
"id": 45988,
"lm_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, coulombs-law, dielectric",
"url": null
} |
turtlebot
Title: How can i send the 2d navigation goal to rviz by voice command using pocketsphinx(Turtle bot)
How can i send the 2d navigation goal to rviz by voice command using pocketsphinx | {
"domain": "robotics.stackexchange",
"id": 14820,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "turtlebot",
"url": null
} |
ros-indigo, transform
I stamp this marker frame tranform with time t_0 instead of the current time t_k, because the image is taken at time t_0 and the calculated distance from marker to camera should be superposed with the robots/camera position at t_0. So using the above br.sendTransform callback, will the marker frame be superposed correctly to tf from time t_0?
Also at current time t_k, how do I get the markers pose w.r.t. the world frame back at time t_0?
Any clue will be appreciated!
Many thanks in advance.
Originally posted by XenoNaij on ROS Answers with karma: 1 on 2018-04-20
Post score: 0
Your basic operations of publishing the computed transform to the marker at the old timestamp seems to be the right approach.
For how to look it up you should use the advanced API and select the "fixed frame" where you expect the position to be constant. The tutorial on this is here: cpp or python
For a more complete understanding I'd recommend going through the full tutorials. http://wiki.ros.org/tf2/Tutorials | {
"domain": "robotics.stackexchange",
"id": 30699,
"lm_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-indigo, transform",
"url": null
} |
• Sorry to all of you reading my answer - I just realised the final answer doesn't make any sense. I will try to correct the error within $10$ minutes as much as I can. – Toby Mak Sep 15 '17 at 8:58
• The question asks for line segments, not lines that intersect inside of the square – Dominik Sep 15 '17 at 9:01
• Lines and line segments are the same things, except that one is a shortened version of another. I made sure in my answer that I did not include any solutions with intersections outside the square, for example by setting $a = 1-b$. It doesn't matter whether they are lines or line segments - their equations are essentially very similar. – Toby Mak Sep 15 '17 at 9:08
• Consider the line segments through $(0, 0.5)$, $(0.5,0.5)$ resp. $(0.75, 0.25)$, $(0.75, 0.75)$. They do not intersect, but would intersect according to yourcalculations. – Dominik Sep 15 '17 at 9:11 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9881308796527184,
"lm_q1q2_score": 0.8379031232065578,
"lm_q2_score": 0.8479677545357568,
"openwebmath_perplexity": 182.85489979118597,
"openwebmath_score": 0.9235252141952515,
"tags": null,
"url": "https://math.stackexchange.com/questions/2430323/what-is-the-likelihood-of-two-line-segments-crossing"
} |
python, validation, csv
Title: CSV file parser with some checks for header fields and duplicate rows I have built a sample Parser class on top of the csv module for basic checks that we normally need as the first step of pre-processing. I would love a bit of feedback on the code and any areas that I can improve upon in the code to make it more efficient.
import csv
from exceptions import CompulsoryHeaderCheckFailed
class CsvParser:
def __init__(self, file: str, compulsory_headers: list):
self.file = file
self.compulsory_headers = compulsory_headers
self.duplicate_rows = []
self.good_rows = []
self.bad_rows = []
self.log = []
def diff_headers(self):
reader = csv.reader(open(self.file))
header = next(reader)
return set(self.compulsory_headers) - set(header)
def passes_compulsory_header_check(self):
return True if not self.diff_headers() else False | {
"domain": "codereview.stackexchange",
"id": 43192,
"lm_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, validation, csv",
"url": null
} |
distance metric the pairwise distances between our observations ( )! Statistics in Excel Made easy is a collection of 16 Excel spreadsheets that contain formulas... Highly correlated and even if their scales are not the same length: 1 ) ) &. Of representing distance between two points in 2 or more variables are highly correlated and even their... Scales are not the same the similarity of items we recommend using Chegg Study to get distances in KM.... In Excel Made easy is a collection of 16 Excel spreadsheets that built-in! Observations in one matrix and returns a dist object, a more precise Definition of open (! Dimensional space using this measure see TSDatabaseDistances distance matrix among all pairings i would the! One single point to a projection that preserves distances and then calculate the Euclidean distance of dataset R ( Examples. The following formula: the two numeric series using the Pythagorean distance output file to have each individual measurement a! Get distances in | {
"domain": "saecof.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9433475715065793,
"lm_q1q2_score": 0.8481839600872672,
"lm_q2_score": 0.8991213691605412,
"openwebmath_perplexity": 869.39782788379,
"openwebmath_score": 0.7398490309715271,
"tags": null,
"url": "http://www.saecof.com/szx3a7w/b9a6b6-euclidean-distance-in-r"
} |
quantum-information, quantum-computer
EDIT:
Concerning the matrix, it is possible to construct the matrix for example in this way:
$$
\frac{1}{\sqrt{3}}
\begin{pmatrix}
1 & 1 & 0 &-1 \\
1 & -1 & 1 &0 \\
1 & 0 & -1 &1 \\
0 & 1 & 1 &1 \\
\end{pmatrix}
$$
The matrix is unitary (you can check this by a direct multiplication) and the required state is returned for input $|00\rangle$. You do not have to bother about other inputs because you can always set all input qubits to state $|0\rangle$. | {
"domain": "physics.stackexchange",
"id": 75000,
"lm_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-information, quantum-computer",
"url": null
} |
discrete-signals, noise, smoothing
Exercise 3.74: Alyssa P. Hacker is designing a system to process
signals coming from physical sensors. One important feature she wishes
to produce is a signal that describes the zero crossings of the input
signal. That is, the resulting signal should be 1 whenever the input
signal changes from negative to positive, -1 whenever the input signal
changes from positive to negative, and 0 otherwise. (Assume that the
sign of a 0 input is positive.) For example, a typical input signal
with its associated zero-crossing signal would be … 1 2 1.5 1 0.5
-0.1 -2 -3 -2 -0.5 0.2 3 4 … … 0 0 0 0 0 -1 0 0 0 0 1 0 0 … ...
The associated second exercise is: | {
"domain": "dsp.stackexchange",
"id": 7342,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "discrete-signals, noise, smoothing",
"url": null
} |
neural-network
That's actually it. It has to be there in certain types of common problems because it's the answer to those problems, not because it was chosen for nice properties. | {
"domain": "datascience.stackexchange",
"id": 3950,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "neural-network",
"url": null
} |
performance, vba, excel
Case "SumEarnedValue"
For n = 1 To 10 Step 1
rangesum = "P" + CStr(n) + "_EARNED_VALUE"
rangeapproved = "P" + CStr(n) + "_APPROVAL"
If RangeExists(rangesum) = False Then Exit For
If Range(rangeapproved).Value = "Y" Then
tempsum = WorksheetFunction.Index(Range(rangesum), 0, Application.Caller.Column - (WorksheetFunction.Index(Range(rangesum), 0, 1).Column - 1))
Else
tempsum = 0
End If
If tempsum = "-" Then tempsum = 0
finalsum = finalsum + tempsum
Next n
EstimateFunctions = finalsum
Case "SumPercentComplete"
For n = 1 To 10 Step 1
rangesum = "P" + CStr(n) + "_PERCENT_COMPLETE"
rangeapproved = "P" + CStr(n) + "_BUDGET_SUMMARY"
If RangeExists(rangesum) = False Then Exit For | {
"domain": "codereview.stackexchange",
"id": 30515,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "performance, vba, excel",
"url": null
} |
python, beginner, numpy, pyside
from DigitData import DigitData
class DigitLabel(QLabel):
def __init__(self, digit_matrix):
super(DigitLabel, self).__init__()
self.img = QImage(int(28), int(28), QImage.Format(24))
self.img.fill(125)
self.setPixmap(QPixmap(self.img))
square = np.reshape(digit_matrix, (28, 28))
# TODO: save pixel data in QImage as true grayscale 8 bit
# TODO: place data into QImage without loop
# TODO: deal with the j and i flipping fix
for i in range(28):
for j in range(28):
pass
pixel_intensity = square[j, i]
color = qRgb(pixel_intensity, pixel_intensity, pixel_intensity)
self.img.setPixel(i, j, color)
self.setPixmap(QPixmap(self.img))
class DigitTable(QWidget):
looped = Signal(int)
def __init__(self):
super(DigitTable, self).__init__()
self.load_flag = None | {
"domain": "codereview.stackexchange",
"id": 36117,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, numpy, pyside",
"url": null
} |
geophysics, seismology, seismic, data-formats, machine-learning
The EBCDIC header is a 40 by 80 character sheet that is a remnant from the times of punchhole cards (I'm not joking). Usually it contains info about the state of the seismic. Processing workflow, acquisition geometries etc. The binary header has some more fixed data about the data set. The trace headers contrain every separate data set from the acquisition. Nice blog by Agile Scientific here.
You can read about the details of seismic processing and conventions in the open access book "Seismic Data Analysis". It used to be several hundred dollars and has been cited in every seismic lecture I have ever attended. However, I'll give you some answers now.
Common Midpoints
CMP stacking, weighted CMP and NMO are highly entangled. | {
"domain": "earthscience.stackexchange",
"id": 1310,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "geophysics, seismology, seismic, data-formats, machine-learning",
"url": null
} |
slam, navigation
https://github.com/ethz-asl/ethzasl_icp_mapping
http://www.ros.org/wiki/ethzasl_icp_mapping
http://www.ros.org/wiki/ethzasl_icp_mapping
Originally posted by Stéphane Magnenat with karma: 83 on 2013-03-12
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 8778,
"lm_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",
"url": null
} |
$$(\sum_{i=0}^{\infty}a_i)^2 = \sum_{i=0}^{\infty}\sum_{j=0}^{\infty}a_ia_j = \sum_{k=0}^{\infty}\sum_{n=0}^{k}a_na_{k-n}$$
Maybe you could do the same for $$\int \int$$.
• Thanks for this. The Jensen inequality you cited: isn't it rather the Cauchy-Schwarz inequality on two real functions with the second function being constant? – user135626 Mar 16 '18 at 15:06
• @user135626 perhaps. I was sleepy awhile ago and am sleepy now but I recall I triple checked C-S ineq. I don't think it's C-S. I think it's Jensen's, which happens to look like C-S. I remember because the first time I learned Jensen's, my classmates observed it looked liked C-S. – BCLC Mar 16 '18 at 16:52
• I don't know why this answer got downvoted. – Matt Samuel Apr 2 '18 at 3:15
• @user135626 no, you're right. Edited. – BCLC Apr 2 '18 at 3:48
• @user135626 edited again. I was thinking of Hölder not Jensen. Hölder is related to CBS though. – BCLC Apr 2 '18 at 16:15 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9597620619801095,
"lm_q1q2_score": 0.8157700936439878,
"lm_q2_score": 0.849971181358171,
"openwebmath_perplexity": 951.873427639966,
"openwebmath_score": 0.9404883980751038,
"tags": null,
"url": "https://math.stackexchange.com/questions/2693076/simplifying-square-of-integral-in-general"
} |
distribution such as a Normal or exponential. If you compare two samples, for example, you simply compare the quantiles of both samples. The colours should correspond to the same sample in each plot. We look at some of the basic operations associated with probability distributions. Walsh, Aden Young. The most problematic plot hole is the simple fact that Doctor Strange's entire Endgame plan doesn't make any sense at all. For each of the exercises (X-Y scatter-plot, QQ-Normal plot, Histogram plot and Time/Index plot) empirically study the effects of the power transform as a tool for normalizing the data. For example, in a uniform distribution, our data is bounded between 0 and 1. Tried-and-True Content Marketing Examples. ) l l l l l l l l l l l l l l l l l 0 2 4 6 8 0. The default data values should be good, but you should provide good labels. Normal probability plots work well as a quick check on normality. For an example, refer to Normal QQ and general QQ plots. Students will be able | {
"domain": "agenziafunebretassoni.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307668889047,
"lm_q1q2_score": 0.816919037802322,
"lm_q2_score": 0.8397339656668286,
"openwebmath_perplexity": 1034.3576954213952,
"openwebmath_score": 0.5142551064491272,
"tags": null,
"url": "http://thrr.agenziafunebretassoni.it/qq-plot-example.html"
} |
general-relativity, cosmology, spacetime, differential-geometry, curvature
$$R = 6 \left(\frac{\ddot{a}}{a} + \frac{\dot{a}^2}{a^2} + \frac{k}{a^2}\right).$$
You can, though, compute the Ricci scalar for the spatial section. Using the metric
$$\text{d}s^2 = - \text{d}t^2 + a(t)^2 \left(\frac{\text{d}r^2}{1 - k r^2} + r^2 \text{d}\Omega^2\right),$$
which has spatial metric
$$\text{d}l^2 = \frac{a(t)^2 \text{d}r^2}{1 - k r^2} + a(t)^2 r^2 \text{d}\Omega^2,$$
I got (with the aid of the Mathematica package OGRE) the expression
$${}^{(3)}R = \frac{6k}{a^2(t)}.$$
Hence, you can understand $k$ as being proportional to the Ricci scalar of the spatial section. | {
"domain": "physics.stackexchange",
"id": 85361,
"lm_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, cosmology, spacetime, differential-geometry, curvature",
"url": null
} |
catkin
Title: Sourcing workspace generated by a catkin_make install
I'm trying to distribute a binary version of my package. I have the catkin_make install command create the install directory in the right place and copy the required libs. The contents of the install directory are as follows:
include
(contains exported packages with generated header files for messages)
lib
(contains 3rd party dependencies as well as exported packages with executables)
share
(contains exported packages with misc. files such as package.xml)
My problem is that when I copy this directory to a new computer, I can't use ROS to run anything from it. I tried doing the following on the new machine within the distributed install directory:
Create a src directory
Run catkin_init_workspace
Run catkin_make to generate the devel and build directories
Source the generated devel/setup.bash script | {
"domain": "robotics.stackexchange",
"id": 24233,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "catkin",
"url": null
} |
statistical-mechanics, condensed-matter
Title: Hamiltonian of a simple graph I have a spin system: | {
"domain": "physics.stackexchange",
"id": 6759,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "statistical-mechanics, condensed-matter",
"url": null
} |
control, quadcopter
body_ang_current_.phi = 0.5 * body_ang_current_.phi_dot_2 * pow( real_duration, 2 ) + ( body_ang_previous_.phi_dot * real_duration ) + body_ang_previous_.phi;
body_ang_current_.theta = 0.5 * body_ang_current_.theta_dot_2 * pow( real_duration, 2 ) + ( body_ang_previous_.theta_dot * real_duration ) + body_ang_previous_.theta;
body_ang_current_.psi = 0.5 * body_ang_current_.psi_dot_2 * pow( real_duration, 2 ) + ( body_ang_previous_.psi_dot * real_duration ) + body_ang_previous_.psi;
/* Copy the new value into the previous one (for the next loop) */
body_pos_previous_.x = body_pos_current_.x;
body_pos_previous_.y = body_pos_current_.y;
body_pos_previous_.z = body_pos_current_.z;
body_pos_previous_.x_dot = body_pos_current_.x_dot;
body_pos_previous_.y_dot = body_pos_current_.y_dot;
body_pos_previous_.z_dot = body_pos_current_.z_dot; | {
"domain": "robotics.stackexchange",
"id": 463,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "control, quadcopter",
"url": null
} |
java, spring, jwt
int no = 0;
for (String allowedUser : allowedUsers) {
if (!allowedUser.equals(currentUser)) {
no++;
}
}
if (no == allowedUsers.length) {
throw new UnauthorizedAccessException("Un-authorized access", 0xd1561);
} else {
return jwt;
}
}
}
Controller method - where the annotation is used
@GetMapping(
path = "/api/event/post",
produces = MediaType.APPLICATION_JSON_VALUE
)
@Authorize(value = {UserSupport.USER, UserSupport.ADMIN, UserSupport.END_USER})
public ResponseEntity<?> getLiveLocations(
HttpServletRequest request,
JwtProperties jwt
) throws
MongoException,
ParseException,
JwtException,
UnsupportedEncodingException,
ResourceNotFoundException,
UnauthorizedAccessException {
//do something
} | {
"domain": "codereview.stackexchange",
"id": 31181,
"lm_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, spring, jwt",
"url": null
} |
c++, strings, c++11
Also, have a look where you use std::strcpy. This is guaranteed to not do what you expect if a string has a '\0' in it. E.g.: string s = string{""}+'\0'+'\0'; string copy = s; copy == s // false. Use memcpy with the number of characters you are copying (Usually the fix would be: std::strcpy(a, other.ptr_.get()) -> std::memcpy(a, other.ptr_.get(), other.sz_ + 1); // + 1 for nul terminator)
These functions should be const:
const_iterator string::cbegin() const;
const_iterator string::cend() const;
const_reverse_iterator string::crbegin() const;
const_reverse_iterator string::crend() const; | {
"domain": "codereview.stackexchange",
"id": 33058,
"lm_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++, strings, c++11",
"url": null
} |
civil-engineering, bridges, corrosion
roughly estimate what would happen to an unprotected structure with time. Of course the NASA studies are using modern grades of steel, the Golden Gate steel was produced in the 1930s, so there could be a greater annual loss. This is atmospheric corrosion; the structural steel that is within range of the seawater spray and splash zone will actually experience a more severe corrosion condition, and protective measures there will likely include sacrificial anode systems in addition to coatings. That is, an anode material such as zinc is electrically connected to the structural steel in seawater spray exposure zones because it is more susceptible to corrosion. It is sacrificed in order to direct corrosion activity away from the structural steel. These also must be replaced at intervals. There are also impressed current systems too, these are called cathodic protection and they work in a similar fashion. | {
"domain": "engineering.stackexchange",
"id": 487,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "civil-engineering, bridges, corrosion",
"url": null
} |
c#
public Dispose() => _client.Dispose();
}
Usage might be clear.
private ApiHelper _api = new ApiHelper("https://myserver/api", "riot", pass);
async Task GetExampleAsync()
{
var args = new Dictionary<string, string>
{
["param1"] = "value1",
["param2"] = "value2"
};
// https://myserver/api/apimethod?param1=value1¶m2=value2
string response = await _api.GetAsync("apimethod", args);
}
async Task PostExampleAsync()
{
// { "msg": "Hello World" }
string json = JsonSerializer.Serialize(new { msg = "Hello World" });
string response = await _api.PostStringAsync("apimethod", json);
} | {
"domain": "codereview.stackexchange",
"id": 41520,
"lm_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
} |
java, linked-list, circular-list
The else should be on the same line that the last }.
Variable declaration
I always like to start the class with class and instance variables. It will let me know what my class is using. So private node<T> head; should be before the constructor.
I would suggest that you avoid using single letters as a variable name. Reading x and p does not help to know what it's used for. Try to use descriptive name, there is no or almost no length limitation, so be creative!
Documentation
I see that you have good comments for your public methods. I would suggest that you use JavaDoc. It will almost change nothing, just some syntax changes. Here is one example of a JavaDoc :
/**
* Here is the description of what the method is doing. Some specific things that will
* be helpful to the caller like {@link OtherClass#methodName()}
* @param aParam What your param is or used for in your method
* @return what your method is returning
* @see OtherClass
*/ | {
"domain": "codereview.stackexchange",
"id": 8317,
"lm_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, linked-list, circular-list",
"url": null
} |
Some truly interesting details you have written.Aided me a lot, just what I was searching for .
16. archangel says:
Thank you a bunch for sharing this with all of us you really understand
17. Thanks for the article. Fantastic.
18. apparel says:
sharing in delicious. And naturally, thanks to your effort!
19. Say, you got a nice article.Much thanks again. Cool.
20. Great, thanks for sharing this article.Thanks Again. Will read on…
21. Thank you for your article post.Thanks Again. Awesome.
22. Photography says:
Great, thanks for sharing this blog.Really thank you! Will read on…
23. What a lovely blog page. I will surely be back. Please maintain writing!
24. This is very interesting, You are a very skilled blogger. I have joined your rss feed and look forward to seeking more of your excellent post. Also, I have shared your website in my social networks!
25. to read more says:
Im obliged for the article.Thanks Again. Much obliged. | {
"domain": "techiemathteacher.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9907319852508435,
"lm_q1q2_score": 0.8122945502035194,
"lm_q2_score": 0.8198933337131076,
"openwebmath_perplexity": 3217.996444268413,
"openwebmath_score": 0.18717144429683685,
"tags": null,
"url": "http://techiemathteacher.com/2014/05/20/arithmetic-progression/"
} |
observational-astronomy, astrophysics, spectroscopy, data-analysis, spectrometry
Title: Where do Astronomers usually get their wavelengths? Where do they turn to look up standard, accepted values for spectral features? When identifying isolated observed spectral features or fitting complex observed spectra or even running complex numerical simulations, one needs a reliable, standard table of known wavelengths and other parameters like splitting, intensity relationships, etc.
Question: Where do Astronomers usually get their wavelengths? Are there a few favorite references where astronomers turn to look up standard, accepted values for spectral features?
Somewhat related: | {
"domain": "astronomy.stackexchange",
"id": 5770,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "observational-astronomy, astrophysics, spectroscopy, data-analysis, spectrometry",
"url": null
} |
ros, navigation, pose, ros-kinetic, quaternion
a body-local referenced orientation
an external reference for your orientation
option 2 would require some external reference. Perhaps a marker. Option 1 depends on things like odometry and state estimation.
Kindly don't treat this as a seperate question
it is a separate / follow-up question though.
Comment by spiritninja on 2019-06-26:
Alright. Thanks a lot for helping out! | {
"domain": "robotics.stackexchange",
"id": 33256,
"lm_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, pose, ros-kinetic, quaternion",
"url": null
} |
python, beginner, game, python-2.x, dice
#Drawing the Board
print("\n") | {
"domain": "codereview.stackexchange",
"id": 20215,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, game, python-2.x, dice",
"url": null
} |
filters, filter-design, finite-impulse-response, infinite-impulse-response
Of course, when referring to "recursive" or "non-recursive" we always talk about implementations with finitely many operations per output sample. Clearly, any discrete-time LTI system can be described by a generally infinite convolution sum, but that is not what we mean by "non-recursive". | {
"domain": "dsp.stackexchange",
"id": 10025,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "filters, filter-design, finite-impulse-response, infinite-impulse-response",
"url": null
} |
microbiology, dna-sequencing, microbiome, metagenomics
Thank you very much
There is simply no variation in the 16S rRNA gene between different species/strains that it would be useful to tell apart for a more accurate analysis.
The amount of sequence variation depends on the region of the 16S rRNA gene amplified, and the choice of region depends on the desired universality of your primers as well as the read length constraints of the sequencing platform. Put simply, choice of target for 16S amplicon sequencing is a tradeoff between breadth and specificity. Typically, 16S sequencing connotes the use of primers targeting the V3, V4, and/or V5 regions of the 16S gene. Such primers are often optimized for taxonomic breadth (i.e. to differentiate as many organisms as possible) and designed to create amplicons that are readily sequenced on an Illumina platform.1 Thus, strain-level differentiation is limited in vanilla 16S analyses, though use of a multi-region framework can greatly increase phylogenetic resolution.2 | {
"domain": "biology.stackexchange",
"id": 11779,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "microbiology, dna-sequencing, microbiome, metagenomics",
"url": null
} |
c#, winforms, pdf
for (var pageNumber = PdfFirstPageNumber;
pageNumber <= pdfReader.NumberOfPages;
pageNumber++)
{
var pdfContentByte = pdfStamper.GetOverContent(
pageNumber);
var textField = new TextField(
pdfStamper.Writer,
new iTextSharp.text.Rectangle(
TimeStampFieldTopLeftXCoordinate,
TimeStampFieldTopLeftYCoordinate,
TimeStampFieldBottomRightXCoordinate,
TimeStampFieldBottomRightYCoordinate),
null);
var childField = textField.GetTextField();
parentField.AddKid(childField); | {
"domain": "codereview.stackexchange",
"id": 20218,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, winforms, pdf",
"url": null
} |
c++, neural-network
std::vector <double> outnums{};
std::vector <std::string> INstrings{};
std::vector <std::string> OUTstrings{};
std::string nums{};
std::string in{};
std::string out{};
std::string allin{};
double totalloss{};
double loss{};
double single{};
double batchcount{ 0.0 };
double alphaval{};
double lambdaval{};
std::ifstream file("N.txt");
while (file.is_open())
{
while (file >> nums)
{
if (nums == "in:")
{
std::getline(file, in);
allin += in;
}
else if (nums == "out:")
{
std::getline(file, out);
OUTstrings.push_back(out);
INstrings.push_back(allin);
allin.clear();
}
else;
}
break;
}
for (int i = 0; i < 100; i++)
{
alphaval = arrAlpha[i];
lambdaval = arrLambda[i]; | {
"domain": "codereview.stackexchange",
"id": 40542,
"lm_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++, neural-network",
"url": null
} |
php, object-oriented
Title: PHP Register Form - OOP I'm trying to build my first object oriented system. I'm not sure that my register function below is the best way of approaching this within OOP.
class User {
public $username;
private $email;
private $password;
public function register() {
//Check if the username input is set.
if(isset( $_POST['username'] )) {
//Assign the variables.
$this->username = $_POST['username'];
$this->email = $_POST['email'];
$unhashed_pass = $_POST['password'];
//Hash the password
$this->password = password_hash($unhashed_pass, PASSWORD_BCRYPT);
$sql = "INSERT INTO 'users' ('id', 'username', 'email', 'password') VALUES (NULL, '$this->username', '$this->email', '$this->password')";
$results = mysql_query($sql);
if($results) {
//Query was successful
echo "Success";
} else {
echo mysql_error();
}
}
}
} | {
"domain": "codereview.stackexchange",
"id": 11587,
"lm_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",
"url": null
} |
audio
As you can see from the diagram, the signal $x[n]$ is filtered by (convolved with) $\vec{w}_n$ to produce output signal $\hat{d}[n]$. We then subtract $\hat{d}[n]$ from the desired signal $d[n]$ to produce the error signal $e[n]$. Note that $\vec{w}_n$ is a vector of coefficients, not a number (hence we don't write $w[n]$). Because it changes every iteration (every sample), we subscript the current collection of these coefficients with $n$. Once $e[n]$ is obtained we use it to update $\vec{w}_n$ by an update algorithm of choice (more on that later). If input and output satisfy a linear relationship that does not change over time and given a well-designed update algorithm, $\vec{w}_n$ will eventually converge to the optimal filter and $\hat{d}[n]$ will be closely following $d[n]$.
Echo cancellation | {
"domain": "dsp.stackexchange",
"id": 42,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "audio",
"url": null
} |
java, performance, algorithm, strings, interview-questions
This works seamlessly, but my predicament is that these folks don't want you to just get a bloody veracious output, they want a highly optimized output i.e. spatial and temporal requirements as to your program should to be as minimum as can be. And mine is nowhere near the epitome of the optimal solution
If anybody feels that they can alter my code or come up with something better that'd be optimal, I'd be much obliged! I'd use an object to hold the compiled version of the process for maximum efficiency. This would allow user to create a stripping tool and re-use it for maximum throughput.
Also you have the opportunity to create Strippers. :)
public class Test {
/**
* Use a Stripper to encode the stripping process.
*/
private static class Stripper { | {
"domain": "codereview.stackexchange",
"id": 9573,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, performance, algorithm, strings, interview-questions",
"url": null
} |
c++, strings, c++11, circular-list, arduino
const char *pcCurrentSubstr = pcSubstr;
const char *pStr = buffer + head;
bool seen = false;
for (; *pStr != 0 && *pcCurrentSubstr != 0; ++pStr){
if(pStr == (buffer + MAX_BUFFER_SIZE)){
pStr = buffer;
}
if(*pStr != *pcCurrentSubstr){
pcCurrentSubstr = pcSubstr;
if(seen){
--pStr;
}
seen = false;
continue;
}
seen = true;
++pcCurrentSubstr;
}
return (*pcCurrentSubstr == 0);
} | {
"domain": "codereview.stackexchange",
"id": 12692,
"lm_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++, strings, c++11, circular-list, arduino",
"url": null
} |
c++, recursion, unit-testing, boost, c++20
BOOST_AUTO_TEST_CASE(vector_test_4dimension_double)
{
constexpr int nested_layer = 4;
constexpr int element_count = 3;
typedef double TestType;
TestType input = 1;
BOOST_TEST((n_dim_container_generator<std::vector, nested_layer, element_count, TestType>(input)) ==
(n_dim_vector_generator<nested_layer, TestType>(input, element_count)));
BOOST_TEST(true);
}
BOOST_AUTO_TEST_CASE(vector_test_4dimension_long_double)
{
constexpr int nested_layer = 4;
constexpr int element_count = 3;
typedef long double TestType;
TestType input = 1;
BOOST_TEST((n_dim_container_generator<std::vector, nested_layer, element_count, TestType>(input)) ==
(n_dim_vector_generator<nested_layer, TestType>(input, element_count)));
BOOST_TEST(true);
}
BOOST_AUTO_TEST_CASE(vector_test_5dimension_char)
{
constexpr int nested_layer = 5;
constexpr int element_count = 3;
typedef char TestType;
TestType input = 1; | {
"domain": "codereview.stackexchange",
"id": 40088,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, recursion, unit-testing, boost, c++20",
"url": null
} |
mechanical-engineering, structural-engineering, structural-analysis, beam, strength
Title: Design procedure used in beam design In the design of beams, the principal stresses and absolute maximum shear stresses are not calculated. Instead, we calculate maximum bending stress using flexure formula and equate it to allowable stress to get dimensions of cross-section and then using these dimensions we calculate maximum shear stress on cross-section.
If maximum shear stress on cross-section comes out to be less than allowable stress, then design is safe. But there is a possibility that maximum shear stress in the beam (whose location is at the top and bottom of cross-section; Absolute max shear stress= (max. bending stress)/2) )exceeds allowable shear stress, then the beam will fail.
So, why do we use this design procedure if this gives unsafe design? The design process isn't exactly as you describe it. More specifically you write: | {
"domain": "engineering.stackexchange",
"id": 4411,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mechanical-engineering, structural-engineering, structural-analysis, beam, strength",
"url": null
} |
c++, linked-list, pointers, heap
Currently I'm aware that each node is created on the Heap.
No such thing as heap in C++ (or stack technically).
You mean dynamically allocated memory in the situation.
Note: Though the language does not specify the need for a stack most implementations will use one. But the concept itself is not useful for thinking about C++ objects. You should look up "Automatic/Static/Dynamic" storage duration.
I have no idea how to delete the nodes in a LinkedList once the LinkedList itself is deleted.
If you create something with new ou delete it with delete. I'll cover that below. When an object is destroyed (either manually or by going out of scope) its destructor will always be called.
I'm also not sure how to create a linkedlist without pointers.
I don't think I could do that either.
Also, should I potentially add an abstract class/or a c++ version of an interface for my LinkedList to follow. | {
"domain": "codereview.stackexchange",
"id": 36699,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, linked-list, pointers, heap",
"url": null
} |
$$\frac{a_n}{n} + \frac{n}{a_n^2} + \frac{a_n}{n^3} \ge 3\sqrt[3]{\frac{a_n}{n}\cdot \frac{n}{a_n^2}\cdot \frac{a_n}{n^3}} = \frac{3}{n}.$$
Since $\sum\limits_{n = 1}^\infty \frac{3}{n}$ diverges, so does the series $\sum\limits_{n = 1}^\infty (\frac{a_n}{n} + \frac{n}{a_n^2} + \frac{a_n}{n^3})$ by comparison.
I'm not sure if this qualifies as a comparison test, but the first two terms within your parantheses, i.e. $a_n/n + n/a_n^2$ is enough to establish divergence. Note that since all your terms are positive, you can split up the series into two series. if $\sum_n n/a_n^2$ converges then $a_n$ is bounded below by a positive constant (otherwise $n / a_n^2$ would occasionally be arbitrarily large, infinitely many times). However then $\sum_n a_n/n$ diverges by comparison to the harmonic series. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9881308807013051,
"lm_q1q2_score": 0.8032192941886043,
"lm_q2_score": 0.8128673133042217,
"openwebmath_perplexity": 87.53853621012475,
"openwebmath_score": 0.9477359056472778,
"tags": null,
"url": "https://math.stackexchange.com/questions/1294611/show-that-this-series-is-divergent-using-the-comparison-test"
} |
ros, ros2, boost, find-package, buildfarm
Title: Buildfarm - Failing to find dependencies
I'm having trouble building a ros2 package on the buildfarm. It seems to be having issues finding the packages listed in CMakeLitst.txt. Error messages are as follows:
22:44:28 CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:567 (message):
22:44:28 Imported targets and dependency information not available for Boost version
22:44:28 (all versions older than 1.33)
22:44:28 Call Stack (most recent call first):
22:44:28 /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
22:44:28 /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
22:44:28 CMakeLists.txt:9 (find_package)
22:44:28
22:44:28
22:44:28 CMake Error at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1947 (message):
22:44:28 Unable to find the requested Boost libraries.
22:44:28
22:44:28 Unable to find the Boost header files. Please set BOOST_ROOT to the root | {
"domain": "robotics.stackexchange",
"id": 35284,
"lm_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, ros2, boost, find-package, buildfarm",
"url": null
} |
ros, ros-melodic, yaml
I tried to install yaml
python2.7 -m pip install pyyaml
Installation was successful, but it does not change anything
Previously I had no problems running ROS code (this talker.py too), but I have made a pause in my learning and after return, nothing is working
I am using WSL (Ubuntu 18.04 bionic)
Thank you for your help!
Originally posted by beliavskij on ROS Answers with karma: 26 on 2019-07-07
Post score: 0
Original comments
Comment by gvdhoorn on 2019-07-07:
Do you have any other Python interpreters / IDEs / runtime environments installed? Anaconda by any chance?
What is the output of which python and python -c 'import yaml'?
Comment by beliavskij on 2019-07-07:
Yes, I do, I have an anaconda and my default Python is Python 3
(base) ➜ ~ python --version
Python 3.7.1
(base) ➜ ~ which python
/home/belia/miniconda3/bin/python
(base) ➜ ~ python -c 'import yaml'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'yaml' | {
"domain": "robotics.stackexchange",
"id": 33354,
"lm_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, yaml",
"url": null
} |
c#, object-oriented, game, multithreading, collision
void IGameView.Release()
{
pen.Dispose();
myFont.Dispose();
}
private void GameForm_Paint(object sender, PaintEventArgs e)
{
Graphics graphics = e.Graphics;
graphics.DrawImage(gameObjects, new Point(0, 0));
// No dispose here because we're using double buffering
} | {
"domain": "codereview.stackexchange",
"id": 7158,
"lm_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, game, multithreading, collision",
"url": null
} |
java, sorting
public static void main(String[] args) {
try (Scanner in = new Scanner(System.in)) {
System.out.println("Enter how many numbers you want to sort");
int count = in.nextInt();
System.out.println("Enter the numbers you want to sort");
List<Integer> list = new ArrayList<>();
for(int i = 0; i < count; i++) {
list.add(in.nextInt());
}
selectionSort(list);
System.out.println("Sorted entered are: ");
for (int x : list) {
System.out.print(x + " ");
}
}
} | {
"domain": "codereview.stackexchange",
"id": 35521,
"lm_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, sorting",
"url": null
} |
of days from your most recent coupon payment.. The Principal is the amount of interest receivable on a bond is the accrued interest in payment! To someone else 2 ) Balance Sheet, the original amount invested, or recent... Most of the bond the ACCRINT function returns the accrued interest price... Day count by the daily interest rate x time period = interest expense for a particular bond and the are. = no of days since last payment = since nothing is specified it is an accrual accounting to compute to... Good practical example to understand the calculation of the accrued interest Dividend | Top 8 Key Differences Should... Any interest accrued since the last payment = since nothing is specified it is the amount of the follow! Principal is the amount borrowed, the daily interest rate and the payments are semiannual or annual percentage and best! A range of topics from accounting, economics, Finance and more for the calculation is$ 1,000 0.00017... Rs.1000 with annual payment method, it is | {
"domain": "showasis.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211619568682,
"lm_q1q2_score": 0.8206294614214917,
"lm_q2_score": 0.8418256532040707,
"openwebmath_perplexity": 1831.8093895159877,
"openwebmath_score": 0.3076755404472351,
"tags": null,
"url": "http://showasis.com/6dkm33/4aca6d-accrued-interest-formula"
} |
java, game, ai
ScoreSet: A Map<AbstractScorer, Double> for keeping track of the weights that should be applied to the scorers
ScoreStrategy: Interface for providing the list of fields that should be scored
ScoreTools.java: Just a couple of utility methods | {
"domain": "codereview.stackexchange",
"id": 14942,
"lm_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, game, ai",
"url": null
} |
java, multithreading, thread-safety
A whole list of options.
Here's mine:
while (isRunning() && thread == Thread.currentThread()) {
String userInput = Input.readLine();
commandHandler.handle(userInput);
}
public synchronized void stop() {
System.out.println("Halting " + threadName + "...");
setRunning(false);
thread = null;
System.out.println("Halted " + threadName + ".");
}
This should take care of most of the issues with minimum effort. The rest, I opt to ignore because I think them too rare to occur.
Alternatively, I'd rewrite my application flow so that I don't get into all sorts of crazy start-stop-start-start-stop situations. I'd prefer to change the flow to use Application only once per instance - a simple lifecycle of "start, stop, remain dead". | {
"domain": "codereview.stackexchange",
"id": 18193,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, multithreading, thread-safety",
"url": null
} |
c++, matrix, c++20, constant-expression
constexpr SmallerMatrix first_minor(int i, int j) const
requires (M == N && M > 1)
A more "C++20-ish" clever way to write that would be
constexpr auto first_minor(int i, int j) const
-> matrix<std::clamp(M-1, 1, M), std::clamp(N-1, 1, N)>
requires (M == N && M > 1)
(As long as you have already taken my advice to use int for index_t, that is. Otherwise the compiler will complain that std::clamp has deduced conflicting types for its template type parameter. All this stuff kind of hangs together as one system. :))
Finally, write some unit tests! You could have improved this question by linking to a complete compilable example on Godbolt. That would have made it easier to play around with the first_minor metaprogramming, for example. | {
"domain": "codereview.stackexchange",
"id": 40986,
"lm_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++, matrix, c++20, constant-expression",
"url": null
} |
Sep 11. I have to sort the array based on the item's value per cost. The greedy method is a powerful technique used in the design of algorithms. 1 Fractional Knapsack Let’s consider a relaxation of the Knapsack problem we introduced earlier. Example: S = G(V;E);w : E !Z, for any u;v 2V, f(u;v), distance between u and v. Kinds of Knapsack Problems. Julstrom (2015) represent the greedy algorithms, genetic algorithms and greedy genetic algorithms solved the quadratic 0-1 knapsack problem. A heuristic algorithm used to quickly solve this problem is the nearest neighbor (NN) algorithm (also known as the Greedy Algorithm). Greedy Algorithms with examples' b-18298 LGS, GBHS&IC, University Of South-Asia, TARA-Technologies. There are n items in a store. See more: knapsack problem greedy algorithm example, knapsack problem dynamic programming, greedy algorithm knapsack problem with example, greedy algorithm for knapsack problem, 0 1 knapsack problem dynamic programming, program knapsack problem | {
"domain": "alexborsci.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9744347853343058,
"lm_q1q2_score": 0.8243157354115724,
"lm_q2_score": 0.8459424353665381,
"openwebmath_perplexity": 704.8932837987658,
"openwebmath_score": 0.5109421610832214,
"tags": null,
"url": "http://alexborsci.it/greedy-algorithm-knapsack-problem-with-example.html"
} |
java, parsing
}
private ExpressionNode assignment(final Context context,
final ExpressionNode.VariableNode expr) {
nextToken();
final ExpressionNode assigned = expression(context);
final ExpressionNode assignment = new ExpressionNode.AssignmentNode(
expr, assigned);
if (lookahead.getType() != TokenType.SEMI) {
throw new ParserException("Expected semicolon, got "
+ lookahead.getText());
}
nextToken();
return assignment;
}
private ExpressionNode expression(final Context context) {
if (lookahead.getType() == TokenType.IF) {
return ifExpr(context);
}
final ExpressionNode expr = signedTerm(context);
return lowOp(expr, context);
} | {
"domain": "codereview.stackexchange",
"id": 10352,
"lm_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, parsing",
"url": null
} |
star, the-sun, planet, solar-system, earth
The photosphere is about 500 km thick. I don't trust the numbers enough to calculate the pressure at the bottom of the photosphere with any accuracy. If you take a 500,000 meter column at the above density, .0002 kg/m^3, that's 100 kg or 220 lbs per column, worked out to square inches (PSI), .14 psi - 1/100th the pressure on the surface of Earth - but these numbers are terrible and prone to high inaccuracy. I just put this out there to show that the pressure and density at the bottom of the photosphere is still low, but not as low as 1 part in 6000 of Earth's surface. | {
"domain": "astronomy.stackexchange",
"id": 2759,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "star, the-sun, planet, solar-system, earth",
"url": null
} |
I have absolutely no Idea what they are telling me...
Can someone please post a simple explanation for the rationale behind the explanation, or (even better) provide an alternative simple approach?
Thanks!
I took 100! in excel, and I've got this = 9.3326E+157
So, 100! ends with a lot more 0 than 24.
Did i miss something?
Really appreciated for explanation.
Math Expert
Joined: 02 Sep 2009
Posts: 59587
Re: How many zeros does 100! end with? [#permalink]
### Show Tags
16 Nov 2018, 04:54
2
olgaromazan wrote:
AndreG wrote:
How many zeros does 100! end with?
A. 20
B. 24
C. 25
D. 30
E. 32
expl.
Find how many times the factor 5 is contained in 100!. That is, we have to find the largest such that 100! is divisible by . There are 20 multiples of 5 in the first hundred but 25, 50, 75, and 100 have to be counted twice because they are divisible by $$25 = 5^2$$ . So, the answer is 24.
The correct answer is B. | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9511422213778251,
"lm_q1q2_score": 0.8642248513448179,
"lm_q2_score": 0.9086179037377831,
"openwebmath_perplexity": 1646.7932991234186,
"openwebmath_score": 0.8042828440666199,
"tags": null,
"url": "https://gmatclub.com/forum/how-many-zeros-does-100-end-with-100599.html?sort_by_oldest=true"
} |
rosjava
Title: Can't run a ros package created with rosjava
Hello,
I'm using rosjava from mercurial and ros electric from Ubuntu repository. I created a ros package following http://www.ros.org/wiki/rosjava/Build instructions. I try to execute it with:
$ rosrun rosjava_bootstrap run.py diarobot diarobot.scenario.diarobot.deploy.Deploy
but I get the following output:
Buildfile: /home/cassou/Documents/robotics/stacks/diarobot/dependencies.xml
get-dependencies: | {
"domain": "robotics.stackexchange",
"id": 6641,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rosjava",
"url": null
} |
integrals... Functions 2 1 cos 2 a method of integration you in our website tutorial about is. Well-Known trigonometric functions number of antiderivatives integration method that is used to find the indefinite integral and were to. | {
"domain": "appanies.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9609517072737737,
"lm_q1q2_score": 0.808953791046555,
"lm_q2_score": 0.8418256452674008,
"openwebmath_perplexity": 1709.0699604763088,
"openwebmath_score": 0.8960931897163391,
"tags": null,
"url": "http://appanies.com/md7wf4/special-integration-formula-16ea79"
} |
ros, laser-assembler
Originally posted by jcgarciaca on ROS Answers with karma: 67 on 2015-10-24
Post score: 1
You require two mre things:
Remap scan topic to tilt_scan
Your transformations (tf messages) are missing.
Originally posted by Shantnu with karma: 86 on 2016-06-08
This answer was ACCEPTED on the original site
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 22828,
"lm_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, laser-assembler",
"url": null
} |
species-identification
Title: What is this large brown bug with pincers? What is this large, brown insect with pincers? Seen in Waltham, Massachusetts. You probably have a specimen of a stag beetle.
In Europe we have a very big one: Lucanus Cervus
but it seems to be absent in US.
Then I found an interesting web-site referring to the different stag beetle and mentioning the link to the European one.
In this above site, they mention you have to look into the antenna and as they are not very visible on your picture I think it would be difficult to define precisely what is the exact taxon of the one you found.
For specifically Massachussets region, I found this interesting link.
and they refers to Lucanus Cepreolus, but I would not be 100% sure it is this one as the antennas are not present on your picture.
References
http://beneficialbugs.org/bugs/Ground_Beetles/stag_beetles.htm
http://bugguide.net/node/view/3104/bgpage
http://www.insectidentification.org/insects-by-type-and-region.asp? | {
"domain": "biology.stackexchange",
"id": 7505,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "species-identification",
"url": null
} |
java, stream, lambda
Title: Find all line numbers of prefix duplicates with streams All line indices of lines from a text that begin with the same line prefix should be found. The prefixes and the corresponding line numbers should be returned. Streams and lambdas should be used as techniques if possible.
The format of a line is always as follows:
anyText_anyText_number_number
where anyText_anyText is the prefix, and one line has at least 7 chars.
For example:
a_b_0_1
c_d_5_8
c_d_9_3
b_d_1_12
should return {c_d=[2, 3]}.
The prefixes (here c_d) could be any text (inclusive additional underscores, but without newlines...).
This is my try:
public static void main(final String[] args) {
String s = """
a_b_0_1
c_d_5_8
c_d_9_3
b_d_1_12"""; | {
"domain": "codereview.stackexchange",
"id": 45303,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, stream, lambda",
"url": null
} |
java, optimization, design-patterns, tic-tac-toe, ai
} else if(((buttons[0].getText().equals("O") && buttons[1].getText().equals("O"))
|| (buttons[4].getText().equals("O") && buttons[6].getText().equals("O"))
|| (buttons[5].getText().equals("O") && buttons[8].getText().equals("O")))
&& buttons[2].getText().equals("")
){
buttons[2].setText("O");
buttons[2].setEnabled(false);
} else if(((buttons[4].getText().equals("O") && buttons[5].getText().equals("O"))
|| (buttons[0].getText().equals("O") && buttons[6].getText().equals("O")))
&& buttons[3].getText().equals("")
){
buttons[3].setText("O");
buttons[3].setEnabled(false);
} else if(((buttons[0].getText().equals("O") && buttons[8].getText().equals("O"))
|| (buttons[1].getText().equals("O") && buttons[7].getText().equals("O"))
|| (buttons[3].getText().equals("O") && buttons[5].getText().equals("O")) | {
"domain": "codereview.stackexchange",
"id": 12118,
"lm_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, optimization, design-patterns, tic-tac-toe, ai",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.