text stringlengths 1 1.11k | source dict |
|---|---|
c++, opengl
} Polling versus events
In the update function you're polling the state. This means that every single frame, you're requesting state. In this case, it's about a few keys but if you have support for multiple players and controllers, this method is going to get computationally expensive. Responding on events is a little more complex, but worth considering for larger projects. Have a look at events in sdl. The same happens in the render function, where you set the material every single frame. Why not set the material when the material changes, so in the update? It is weird that a render function changes materials!
Structure
It may be that copy/pasting your code may have changed it a little, but at certain places you have more spaces than others, sometimes the { is on a newline, sometimes it is on the same, the destructor is in the headers while the constructor is not, ...
C versus C++ | {
"domain": "codereview.stackexchange",
"id": 15232,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, opengl",
"url": null
} |
ros, opencv3
Title: Make ros to link against Opencv3
I have ros indigo and opencv 3.0.0 installed on my system and wanted to install object recognition kitchen with ork.rosinstall from their installation tutorial. I can't even compile the ork. Before, when I had opencv 2.4.8 everything was alright. I read somewhere that ros is linked against opencv 2.4 so I wonder if it is even possible to run it with opencv 3. While compiling ORK a get these errors, which I didn't get when I had 2.4.8 version of opencv. I could installed old version back but it doesn't seem as a good solution to me.
Base path: /home/tomas/ws
Source space: /home/tomas/ws/src
Build space: /home/tomas/ws/build
Devel space: /home/tomas/ws/devel
Install space: /home/tomas/ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/tomas/ws/build"
####
####
#### Running command: "make -j8 -l8" in "/home/tomas/ws/build"
####
[ 0%] Built target rosgraph_msgs_generate_messages_py
[ 1%] Built target openni_wrapper | {
"domain": "robotics.stackexchange",
"id": 23179,
"lm_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, opencv3",
"url": null
} |
The idea is to extract all powers of $5$ and $2$ from $n!$, and write it as $10^A2^BC$ with $C$ odd and not a multiple of $5$. Then $A$ is the number of trailing zeros. And whatever $2^BC$ is modulo 10 is the preceding digit. To that end, these two reduction formulas are useful. They use $$n\underset{2}{!}=1\cdot3\cdot5\cdots(\text{last odd number}\leq n)$$ and $$n\underset{5}{!}=1\cdot3\cdot7\cdot9\cdot11\cdot13\cdot17\cdots(\text{last such number}\leq n)$$ and the reduction rules (which are easy to verify) are \begin{align} n! &= n\underset{2}{!} \times \left\lfloor\frac{n}{2}\right\rfloor! \times 2^{ \left\lfloor\frac{n}{2}\right\rfloor}\\ n\underset{2}{!} &= n\underset{5}{!} \times \left(2\left\lfloor\frac{n+5}{10}\right\rfloor-1\right)\underset{2}{!} \times 5^{\left\lfloor\frac{n+5}{10}\right\rfloor}\hspace{2pc}n\geq5 \end{align} The first of these is something you may have seen before. The second is the result of trying to find a similar formula that excludes multiples of $5$. A | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9863631679255075,
"lm_q1q2_score": 0.8441800413421596,
"lm_q2_score": 0.8558511396138365,
"openwebmath_perplexity": 432.1386783752567,
"openwebmath_score": 0.9818198680877686,
"tags": null,
"url": "https://math.stackexchange.com/questions/926795/find-the-last-non-zero-digit-of-28"
} |
rust, circular-list
pub fn push(&mut self, item: u8) -> Result<(), FifoError> {
if self.buffer_full() {
Err(FifoError::FifoFull)
} else {
...
}
Add assert_eq!(None, buffer.pop()); to the end of every test where feasible, e,g.
pop_item_that_was_pushed_to_buffer
popping_returns_first_pushed_first
pop_beyond_write_index_continuing_on_works
buffer_wraps_around
For further exercices I would recommend:
Implement Iterator/IntoIterator/FromIterator
Next, implement Debug, which is fairly easy (Hint: Take a look at the implementation of Debug for slice)
Make it accept a generic type | {
"domain": "codereview.stackexchange",
"id": 33115,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "rust, circular-list",
"url": null
} |
### 2013 IMO SL #G2
Let $\omega$ be the circumcircle of a triangle $ABC$. Denote by $M$ and $N$ the midpoints of the sides $AB$ and $AC$, respectively, and denote by $T$ the midpoint of the arc $BC$ of $\omega$ not containing $A$. The circumcircles of the triangles $AMT$ and $ANT$ intersect the perpendicular bisectors of $AC$ and $AB$ at points $X$ and $Y$, respectively; assume that $X$ and $Y$ lie inside the triangle $ABC$. The lines $MN$ and $XY$ intersect at $K$. Prove that $KA=KT$.
### 2017 IMO SL #N2 | {
"domain": "imomath.xyz",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9802808765013518,
"lm_q1q2_score": 0.8037257493387865,
"lm_q2_score": 0.8198933271118221,
"openwebmath_perplexity": 235.67042242887985,
"openwebmath_score": 0.7559158802032471,
"tags": null,
"url": "https://www.imomath.xyz/2022/02/"
} |
computer-architecture, cpu-cache
Title: Calculating miss rates of word-addressable and direct-mapped cache This a problem in a computer architecture course that's giving me some trouble:
You have an application whose memory access pattern is a stream and its entire data set is 128kB. The data cache in your machine has a capacity of 64kB. It is word-addressable and direct-mapped with 32B lines. It is able to fetch one line at a time.
Given the access pattern: 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, …, 32768, where each access is a 4B word.
What is the miss rate?
Can the miss rate be reduced by using a larger cache?
Can the miss rate be reduced if the size of the data set were reduced? | {
"domain": "cs.stackexchange",
"id": 3062,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computer-architecture, cpu-cache",
"url": null
} |
exponential growth and decay functions. Exponential growth and decay. 31 A sculpture is increasing in value at a rate of 8% per year, and its value in 2000 was $1200. Some of the worksheets for this concept are Exponential growth and decay, Exponential growth and decay functions, Graphing exponential, Graphing exponential functions, 4 1 exponential functions and their graphs, Exponential growth, 1 exploration identifying graphs of As a rule, the formatting styles are standardized and accepted by the majority of educational and research solving exponential growth and decay problems institutions. In this tutorial, learn how to turn a word problem into an exponential decay function. Ex 1) A population of 422, 000 increases by 12% each year. Hence, = and setting we have . What is the value of the car after 7 years? How to solve exponential growth and decay word problems. Exponential Growth and Decay Word Problems. Section 3. Online exponential growth/decay calculator. Hand out the | {
"domain": "thebuildsuccess.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357567351325,
"lm_q1q2_score": 0.8470853127300599,
"lm_q2_score": 0.8652240808393984,
"openwebmath_perplexity": 853.2557488221838,
"openwebmath_score": 0.5186667442321777,
"tags": null,
"url": "http://thebuildsuccess.com/lw8kc/how-to-do-exponential-growth-and-decay-word-problems.html"
} |
simulation, stage
Title: Modify stage appearance
Is there a way of modifying the appearance of the "floor" of the field in certain regions without adding obstacles? I'm making a simulation where bee-like robots congregate under areas of high temperature, and I want to show these regions of high temperature by coloring the floor of the field in those regions differently than the rest (so there will be big red circles in some spots and the rest will be the normal checkerboard pattern). Is this an option, or do I have to configure my own visualization window or something?
Originally posted by katniss on ROS Answers with karma: 1 on 2013-04-23
Post score: 0 | {
"domain": "robotics.stackexchange",
"id": 13931,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "simulation, stage",
"url": null
} |
c, unit-testing, linked-list
node* find( llist* list, int value ) {
node* tmp = list->head;
while( tmp != NULL && tmp->value != value ) {
tmp = tmp->next;
}
return tmp;
}
size_t len( llist* list ) {
size_t len = 0;
node* current = list->head;
while( current ) {
++len;
current = current->next;
}
return len;
}
void free_llist( llist* list ) {
node* current = list->head;
while( current ) {
node* tmp = current->next;
free( current );
current = tmp;
}
list->head = list->tail = NULL;
}
void print_llist( llist* list ) {
node* cur = list->head;
while( cur ) {
printf( "%d\r\n", cur->value );
cur = cur->next;
}
}
And some trivial unit tests that should all pass, probably should be more comprehensive:
#include "linked_list.h"
#include <stdio.h>
#include <assert.h>
void test_push_back();
void test_push_front();
void test_len();
void test_insert();
void test_find(); | {
"domain": "codereview.stackexchange",
"id": 787,
"lm_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, unit-testing, linked-list",
"url": null
} |
c#, .net, floating-point
Title: BigDecimal class with arbitrary precision I recently came across a need to display very large decimal numbers and realized that I could use a BigDecimal class. After some tinkering I decided to leverage the BigInteger class to do the heavy lifting.
using System;
using System.Numerics;
using System.Text; | {
"domain": "codereview.stackexchange",
"id": 22059,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, .net, floating-point",
"url": null
} |
electromagnetism, special-relativity, thought-experiment
is there charge separation in the small copper patches in figure a) ?
one of the patches is taken separately in the experiment b) . A small copper plate in a local co-moving magnetic field is rotated as shown. Is there charge separation in the copper plate?
Assuming the above answers are YES, then in c) again a copper plate is situated in a constant magnetic field $\vec{B}$. If one separates the charges (in the copper plate) with an electric field $\vec{E}$, will the small plate start rotating?
Yes, there is a separation of charges. See the Hall effect, which in principle is no different from the Lorentz force. What you are describing is an electric generator. For the generator to work effectively, you need an input and output of electrons that are subject to the Lorentz force between the magnetic field.
Yes. See homopolar motor.
Yes. This is how an electric motor works. | {
"domain": "physics.stackexchange",
"id": 98230,
"lm_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, special-relativity, thought-experiment",
"url": null
} |
java, dynamic-programming
Title: Longest contiguous Increasing Subset in java I have tried to come up with a solution to the longest increasing subsequence problem.Can this solution be optimized further?
Example 1:
Input: {5,4,3,7,8,9,11}
Output: 3, 7, 8, 9, 11
Example 2:
Input: {1,2,1,2,1}
Output: 1, 2 (the latest one)
Implementation:
public class LongestIncreasingSubsequence {
public static ArrayList<Integer>[] getLongestIncreasingSubsequence(int[] array, ArrayList<Integer>[] list,
int index) {
list[index] = new ArrayList<Integer>();
if (index == 0) {
list[index].add(array[index]);
}
else {
if (array[index] > array[index - 1]) {
list[index].addAll(list[index - 1]);
}
list[index].add(array[index]);
}
if (index == array.length - 1)
return list; | {
"domain": "codereview.stackexchange",
"id": 18827,
"lm_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, dynamic-programming",
"url": null
} |
machine-learning, statistics
Title: Root Mean Squared Error (RMSE) - significance of square root What is the significance of the square root in root-mean-square-error? Essentially, my question is: what is the difference between (rms error) and (rms error)$^2$? It depends on what you are using the RMSE for. If you are merely trying to compare two models/estimators, then there is no significance to the square root. However, if you are trying to plot the error in terms of the same units as you made the measurements/estimates, then you need to take the square root to transform the squared units to the original units (much like variance vs standard deviation) | {
"domain": "datascience.stackexchange",
"id": 348,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, statistics",
"url": null
} |
pr2
['fl_caster_rotation_joint', 'fl_caster_l_wheel_joint', 'fl_caster_r_wheel_joint', 'fr_caster_rotation_joint', 'fr_caster_l_wheel_joint', 'fr_caster_r_wheel_joint', 'bl_caster_rotation_joint', 'bl_caster_l_wheel_joint', 'bl_caster_r_wheel_joint', 'br_caster_rotation_joint', 'br_caster_l_wheel_joint', 'br_caster_r_wheel_joint', 'torso_lift_joint', 'head_pan_joint', 'head_tilt_joint', 'laser_tilt_mount_joint', 'r_upper_arm_roll_joint', 'r_shoulder_pan_joint', 'r_shoulder_lift_joint', 'r_forearm_roll_joint', 'r_elbow_flex_joint', 'r_wrist_flex_joint', 'r_wrist_roll_joint', 'r_gripper_joint', 'r_gripper_l_finger_joint', 'r_gripper_r_finger_joint', 'r_gripper_r_finger_tip_joint', 'r_gripper_l_finger_tip_joint', 'l_upper_arm_roll_joint', 'l_shoulder_pan_joint', 'l_shoulder_lift_joint', 'l_forearm_roll_joint', 'l_elbow_flex_joint', 'l_wrist_flex_joint', 'l_wrist_roll_joint', 'l_gripper_joint', 'l_gripper_l_finger_joint', 'l_gripper_r_finger_joint', 'l_gripper_r_finger_tip_joint', | {
"domain": "robotics.stackexchange",
"id": 5871,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "pr2",
"url": null
} |
operating-systems, deadlocks
Not all unsafe states are deadlock, however. An unsafe state may lead
to deadlock
Can someone please explain how deadlock != unsafe state ?
I also caught the same line here
If a safe sequence does not exist, then the system is in an unsafe
state, which MAY lead to deadlock. ( All safe states are deadlock
free, but not all unsafe states lead to deadlocks. ) Deadlock means something specific: there are two (or more) processes that are currently blocked waiting for each other.
In an unsafe state you can also be in a situation where there might be a deadlock sometime in the future, but it hasn't happened yet because one or both of the processes haven't actually started waiting.
Consider the following example:
Process A Process B
lock X lock Y # state is "unsafe"
unlock Y
lock Y # state is back to "safe" (no deadlock this time. We got lucky.) | {
"domain": "cs.stackexchange",
"id": 7369,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "operating-systems, deadlocks",
"url": null
} |
homework-and-exercises, newtonian-mechanics, classical-mechanics, forces
Here's why. Because the rod is massless in your scenario, during the collision the two masses can be simply thought of as being free. Your have worked out this scenario in your post. Then starting from just after the collision, what the rod serves to do is to simply constrain the motion to that of a circle. Hence we need the tension force to provide the centripetal force as you have analyzed.
Ok, now let's see why the other teacher might be right. If the rod is massive, then (it plus the mass at the end)'s center of mass is not at the end. Say that it is some distance $x$ away from the end where the mass is attached (or equivalently, $L-x$ away from the hinge). Furthermore let's assume that the rod has a uniform density. Removing this assumption makes the problem much harder, but it is still tractable. | {
"domain": "physics.stackexchange",
"id": 7339,
"lm_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, classical-mechanics, forces",
"url": null
} |
catkin
Title: catkin build does not place executable in devel folder
I have a ROS1 noetic project with the following CMakeLists.txt.
cmake_minimum_required(VERSION 3.0.2)
project(ball_tracker_ros)
find_package(ball_tracker REQUIRED)
find_package(catkin REQUIRED roscpp prophesee_event_msgs)
add_executable(${PROJECT_NAME} src/ball_tracker_ros.cpp)
# Specify libraries to link a library or executable target against
# target_link_libraries(${PROJECT_NAME}_node ${catkin_LIBRARIES} )
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}
ball_tracker::ball_tracker)
target_include_directories(
${PROJECT_NAME}
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${catkin_INCLUDE_DIRS})
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17) | {
"domain": "robotics.stackexchange",
"id": 36733,
"lm_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
} |
classical-mechanics, lagrangian-formalism, hamiltonian-formalism, variational-principle, variational-calculus
Title: Why isn't it important, after which coordinates the Variation of the action integral is done? I often read,that if the lagrangian $L=p\dot{q}-H$ of a pair of coordinates in phase space $(q,p)$ and $P\dot{Q}- K $, for some new pair of coordinates $(Q,P)$ only differ by a total time derivative $dF/dt$, the Variation of the action functional doesn't differ too, which implies that the canonical equations for the new coordinates hold.
My question now is: if the action functional $S(q,p,t)=S'(Q,P,t) + c$ | {
"domain": "physics.stackexchange",
"id": 50401,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "classical-mechanics, lagrangian-formalism, hamiltonian-formalism, variational-principle, variational-calculus",
"url": null
} |
fixed point determination, stability analysis and measure of the mean convergence time, which is confirmed by our analytical convergence time model. If w be complex n t h root of unity and r is an integer not divisible by n, then the sum of the r th powers of the nth roots of unity is. For example, if x = 2, the exponential function 2 x would result in 2 2 = 4. (ii) there is no positive integer m wrote: > Hi, > Is there a function in R to calculate the nth root, similar to the > MATLAB function NTHROOT()?. 2 mins read. Calculate powers and roots of complex numbers in polar form is simple: For a power: (r 0 be a positive real number. A root of unity in a field F is an element a in F such that a n = 1 for some positive integer n Explanation of Primitive n-th root of unity Primitive n-th root of unity | Article about Primitive n-th root of unity by The Free Dictionary. The first root has direction /n. Moreover you can calculate degree & radicant. Then, we can say that when the number ‘r’ | {
"domain": "mdeparis.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9865717464424894,
"lm_q1q2_score": 0.8156104942687764,
"lm_q2_score": 0.8267117898012105,
"openwebmath_perplexity": 471.26140074529457,
"openwebmath_score": 0.7266640067100525,
"tags": null,
"url": "http://mdeparis.it/pqrr/nth-root-in-r.html"
} |
python, python-3.x, file-system, compression
def sync_root(root, arg):
target = arg.target[0]
compress = arg.compress[0]
threads = []
for path, _, files in os.walk(root):
for source in files:
source = path + '/' + source
threads.append(threaded_sync_file(source,
target + source, compress))
# sync_file(source, target + source, compress)
for thread in threads:
thread.join()
if __name__ == '__main__':
arg = parse_input()
print('### Start copy ####')
for root in arg.source:
sync_root(root, arg)
print('### Done ###') | {
"domain": "codereview.stackexchange",
"id": 32612,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, python-3.x, file-system, compression",
"url": null
} |
c++, beginner, number-guessing-game
return abort;
}
Then your computerGuesser() function becomes this:
bool computerGuesser() {
char guessInformation;
int min = DEFAULT_MIN;
int max = DEFAULT_MAX;
int guess;
bool abort = false;
std::cout
<< "Think of a number which the computer shall guess. (Please don't change the number during the task ;)\n";
for (int numberOfGuesses = 1; !abort; ++numberOfGuesses) {
guess = guessNumber(min, max);
guessInformation = promptUser(guess);
abort = handleGuess(guessInformation, numberOfGuesses);
}
return abort;
} | {
"domain": "codereview.stackexchange",
"id": 27697,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, beginner, number-guessing-game",
"url": null
} |
algorithm, object-oriented, game, objective-c, ai
The way to solve this problem is: when you fill in the board, fill it in with a special kind of cell, UNKNOWN, and have your AI treat UNKNOWN specially (for example, treat it as never matching any of its neighbors).
Your allPotentialMatches function is ridiculously inefficient. Try replacing it with something like
-(NSMutableArray *) allPotentialMatches
{
NSMutableArray *result = [NSMutableArray array]; | {
"domain": "codereview.stackexchange",
"id": 14310,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithm, object-oriented, game, objective-c, ai",
"url": null
} |
visualization, data-analysis
Python or R : If you are comfortable in either of the 2 languages, you can easily generate visualizations in them. I cannot speak for R as I don't use it but in python there is a library called Dtale which automates exactly what you want. Just import the data into the function and it will generate multiple stats and visualizations for you.
PowerBI or Tableau : No code solution for visualizations. ALthough I don't know how these can magically generate stats or visualizations! But it is extremely easy for you to do so as these tools require a drag and drop functionality.
However the problem is not the tool but rather the large dataset size. If you have sufficient memory then there's no issue but if you are limited by your RAM then you would have to use batches to perform your analysis. Also there are some python BigData libraries that can be used. Either way what you want can easily be done.
Cheers! | {
"domain": "datascience.stackexchange",
"id": 11767,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "visualization, data-analysis",
"url": null
} |
computational-chemistry, intermolecular-forces, density-functional-theory
First, some background. Equation 3:
$$
E^{(2)} = \sum_{AB} \sum_{n=6,8,10,\dots} s_{n} \frac{C_{n}^{AB}}{r_{AB}^{n}} f_{d,n}(r_{AB})
$$ | {
"domain": "chemistry.stackexchange",
"id": 7315,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "computational-chemistry, intermolecular-forces, density-functional-theory",
"url": null
} |
python, finance, machine-learning
#######################
# Comparing the models with percentages.
100*metrics
# Comparing the models with a bar graph.
fig, ax = plt.subplots(figsize=(8,5))
metrics.plot(kind='barh', ax=ax)
ax.grid();
# Adjusting the precision and recall values for the logistic regression model and the Naive Bayes Classifier model.
precision_nb, recall_nb, thresholds_nb = precision_recall_curve(y_true=y_test, probas_pred=NBC.predict_proba(X_test)[:,1])
precision_lr, recall_lr, thresholds_lr = precision_recall_curve(y_true=y_test, probas_pred=logistic_regression.predict_proba(X_test)[:,1])
# Plotting the new values for the logistic regression model and the Naive Bayes Classifier model.
fig, ax = plt.subplots(figsize=(8,5))
ax.plot(precision_nb, recall_nb, label='NaiveBayes')
ax.plot(precision_lr, recall_lr, label='LogisticReg')
ax.set_xlabel('Precision')
ax.set_ylabel('Recall')
ax.set_title('Precision-Recall Curve')
ax.hlines(y=0.5, xmin=0, xmax=1, color='r')
ax.legend()
ax.grid(); | {
"domain": "codereview.stackexchange",
"id": 33547,
"lm_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, finance, machine-learning",
"url": null
} |
$$\left(\int_a^b f\right)^2 \leqslant (b-a)\int_a^b (f)^2$$
Discrete finite analogue:
$$(\sum_{i=1}^{n}a_i)^2 = \sum_{i=1}^{n}\sum_{j=1}^{n}a_ia_j$$
Discrete infinite analogue with changing indices:
$$(\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$$. | {
"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"
} |
ros, ros-control, gazebo-ros, roscpp, ros-indigo
Title: Problem fetching the ros_controller state from controller/state topic
I am using ROS-Indigo on Ubunu 14.04. While using MoveIt! with ros-controllers I wanted to capture the data published on
coro/coro_arm_controller/state topic. However while the acceleration and effort fields, segmentation fault error is coming.
Below is my code. Can anyone suggest me on what to do next ??
#include "ros/ros.h"
#include <control_msgs/JointTrajectoryControllerState.h>
#include <trajectory_msgs/JointTrajectoryPoint.h>
#include <vector>
using namespace std; | {
"domain": "robotics.stackexchange",
"id": 30424,
"lm_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-control, gazebo-ros, roscpp, ros-indigo",
"url": null
} |
organic-chemistry, reaction-mechanism
Title: Oxymercuration demercuration, PCC, NaCN/HCl reaction In this reaction of the alkene, the correct answer is below but I don't understand why it goes to that. This is my thought process - reagents 1 and 2 do oxymercuration demercuration and makes a secondary alcohol, then reagent 3 turns the alcohol into a ketone, and finally reagent 4 and 5 performs nucleophilic addition and turns the alcohol into a tetrahedral with CN attached (my steps I drew below). What am I doing wrong here? Thanks Check the mechanism of the last reaction here.
http://www.chem.ucalgary.ca/courses/350/Carey5th/Ch20/ch20-3-5-1.html
It is not the displacement of nitrile by carboxylic acid(which you do not have, btw). It is the combination of water addition and the displacement of ammonia by second equivalent of water. | {
"domain": "chemistry.stackexchange",
"id": 10798,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "organic-chemistry, reaction-mechanism",
"url": null
} |
nuclear-physics, radiation, half-life
Your description the characteristic parameter is the half-life, $\tau$ and so $N(t) = N_0\,2^{-t/\tau}$.
Another often used parameter is the decay constant, $\lambda$ which is the constant of proportionality in the assumption that the activity (rate of decay $\frac {dN(t)}{dt}$) is proportional to the number of undecayed nuclei $N(t)$, ie $\dfrac{dN(t)}{dt} \propto N(t) \Rightarrow \dfrac{dN(t)}{dt} =-\lambda\, N(t) \Rightarrow N(t)=N_0\,e^{-\lambda\, t}$
These two parameters which characterize the decay, decay constant and half life, are related $\lambda \,\tau=\ln2$ and you will note that logarithms, $\ln \equiv \log_{\rm e}$, are involved when comparing parameters.
$N(\tau) = \frac {N_0}{2} = N_0\,e^{-\lambda\, \tau}\Rightarrow 2= e^{\lambda\, \tau}\Rightarrow \ln2= \ln \left(e^{\lambda\, \tau}\right )=\lambda \tau \ln e =\lambda \tau$. | {
"domain": "physics.stackexchange",
"id": 97086,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "nuclear-physics, radiation, half-life",
"url": null
} |
specific-reference, galaxy-clusters
Title: Coma Cluster X-Ray Mass Does anyone have a reliable reference for the x-ray mass of the Coma Cluster? I've got a value of $3\times10^{13}\: M_⊙$ from Gursky's 1971 report. Anything more recent would be appreciated. Gas mass $(5.5 \pm 0.6) \times 10^{14} (H_0/50)^{-5/2} M_{\odot}$ within $5(H_0/50)^{-1}$ Mpc, where $H_0$ is the Hubble parameter in km/s per Mpc - Hughes (1989).
Or $(5.1 \pm 1.5) \times 10^{14} (H_0/50)^{-5/2} M_{\odot}$ within $5(H_0/50)^{-1}$ Mpc - Briel et al. (1992). | {
"domain": "physics.stackexchange",
"id": 25332,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "specific-reference, galaxy-clusters",
"url": null
} |
standard-model
If those heavier analogues did not exist, would the universe be much different from how it is right now? Would it affect, for instance, the life cycle of stars or the abundance of elements in the universe? What is the importance of higher generations of particles in cosmology? From [1]: "Nature is very good at blowing up stars. We [theoretical physicists] are not." That's a reference to the fact that we still don't completely understand why core-collapse supernovae explode. We do know that most ($\sim$ 99%) of the radiated energy from a core-collapse supernova is in the form of neutrinos [2], and we do know that this includes significant contributions from all flavors (generations) of neutrinos [2][3]. The core-collapse environment is so extreme that neutrino-neutrino interactions are significant [4]. According to [5], the core-collapse environment is the only known environment in which significant neutrino-neutrino interactions can be observed. | {
"domain": "physics.stackexchange",
"id": 66221,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "standard-model",
"url": null
} |
Hope it helps.
Thanks a ton !!.. loved the approach !
Senior Manager
Status: Not afraid of failures, disappointments, and falls.
Joined: 20 Jan 2010
Posts: 266
Concentration: Technology, Entrepreneurship
WE: Operations (Telecommunications)
Re: Help: Factors problem !! [#permalink]
### Show Tags
14 Oct 2010, 13:58
1
Factors of a perfect square can be derived by using prime factorization and then using the formula to find perfect square's factors.
In this case $$(36)^2= (2^2*3^2)^2=2^4*3^4$$ or $$(36)^2=(6^2)^2=(6)^4=(2*3)^4=2^4*3^4$$
And now you can use the formula explained above by Bunuel to determine the answer, which is $$(4+1)*(4+1)=5*5=25=Odd$$(Trick is there must be odd number of factors of a perfect square and only 25 is odd in answer choices, so it can be solved within 30 seconds or less ) | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9744347860767305,
"lm_q1q2_score": 0.8466150305317466,
"lm_q2_score": 0.8688267728417087,
"openwebmath_perplexity": 5490.911460627911,
"openwebmath_score": 0.8478909134864807,
"tags": null,
"url": "https://gmatclub.com/forum/how-many-factors-does-36-2-have-99145.html"
} |
• Hi Jens Schwaiger, thanks for your reply. I think i get it. But when computing the U(f,P) is the upper sum for the sub-interval [1,1.5) is this equal to zero because we have an open interval at x=1.5. If that is the case we choose the left-end point which would give zero. Just hoping you will clarify if I got this idea correct. – Palu Apr 21 '18 at 21:25
• When calculating the expressions $L(f,P)$ and $U(f,P)$ the suprema and infima in the subintervals are always taken with respectively to the closed subintervals. Compare for instance math.stackexchange.com/questions/2723771/…. – Jens Schwaiger Apr 22 '18 at 3:02 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9825575173068325,
"lm_q1q2_score": 0.8122918837153653,
"lm_q2_score": 0.8267117898012104,
"openwebmath_perplexity": 314.65639631583275,
"openwebmath_score": 0.8419541120529175,
"tags": null,
"url": "https://math.stackexchange.com/questions/2746896/functions-integrable-over-finite-interval"
} |
ros, tf2, rostime, transform
Comment by tfoote on 2018-10-09:
From your use case you should not be truncating your timestamps. What you're trying to do is basically extrapolate into the future by a small bit, but rounding all your timestamps. This has been explored many times and almost always leads to unintended consequences.
Comment by tfoote on 2018-10-09:
You cannot apply a transform until the data is available. It can actually make a difference when during the 40ms between a 25Hz signal is processed. I'd strongly recommend that you look at using a Message Filter in your pipeline to hold the data for the few milliseconds until the data is available.
Comment by tfoote on 2018-10-09:
http://wiki.ros.org/tf2/Tutorials/Using%20stamped%20datatypes%20with%20tf2%3A%3AMessageFilter
Comment by gvdhoorn on 2018-10-10:
And this was exactly why I asked about the xy-problem.
Comment by lahiruherath on 2018-10-10: | {
"domain": "robotics.stackexchange",
"id": 31881,
"lm_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, tf2, rostime, transform",
"url": null
} |
inorganic-chemistry, metallurgy, extraction
activator for sphalerite ($\ce{ZnS}$) flotation with xanthate collectors. When
untreated, xanthate cannot attach to the sphalerite surface because it forms a zinc-xanthate compound that quickly dissolves:
$$\ce{ZnS(s) + Xanthate -> S(s) + ZnXanthate (aq)}$$
The surface of the sphalerite can be activated by reacting it with a metal ion that does not form a soluble xanthate, such as soluble copper from dissolved copper sulfate:
$$\ce{ZnS(s) + CuSO4(aq) -> CuS(s) + ZnSO4(aq)}$$
This forms a thin film of copper sulfide on the sphalerite surface, which allows for stable attachment of the xanthate, rendering the sphalerite particle hydrophobic and floatable. Other metals such as silver and lead can also be used to activate zinc, but copper is cheaper than silver and less toxic than lead.
I read the following in a website which mentions the research as follows : | {
"domain": "chemistry.stackexchange",
"id": 7074,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "inorganic-chemistry, metallurgy, extraction",
"url": null
} |
quantum-field-theory, scattering, path-integral, s-matrix-theory, greens-functions
I understand that for the canonical quantization procedure, i.e. when $\phi$ is a field operator, $G^{(n)}(x_1,\ldots,x_n)$ is the vacuum expectation value. However, if I understand it correctly, in the path-integral approach we consider $\phi$ to be a classical field. I don't understand how rhyme these two different pictures.
Furthermore, for the canonical quantization formalism, we can represent the S-matrix:
\begin{equation}
S_{fi} = \langle f | S | i \rangle
\end{equation}
by Feynman diagrams. On the other hand, for the path-integral approach we seem to represent $G^{(n)}(x_1,\ldots,x_n)$ by Feynman diagrams. Do these Feynman diagram for the two different approaches somehow represent the same scattering amplitude?
Basically, I feel like I can't see the forest for the trees, and I am hoping someone can clarify the above described problems. | {
"domain": "physics.stackexchange",
"id": 11762,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-field-theory, scattering, path-integral, s-matrix-theory, greens-functions",
"url": null
} |
(NB - velocity here refers to a vector quantity, i.e. both speed and direction.)
Consider the diagram on the right, which is the left diagram scaled by $\frac 2T$.
\begin{align} \triangle O'B'P'= \tfrac 12 \cdot 2v\cdot w\cdot \sin\beta &=\tfrac 12\cdot gT\cdot \tfrac {2R}T\cos\alpha \\ vw\sin\beta&=gR\cos\alpha\\ vw\sin\beta&=gk\\ \color{red}{v^*w^*}&\color{red}{=gk} \end{align}
As $g,k,$ are fixed, $v,w$ will be at a minimum when $\sin\beta$ is at a maximum, i.e. $\sin\beta=1 (\beta=\tfrac\pi2)$, hence $v^*, w^*$ are mutually perpendicular. Note that $w^2=v^2-2gh$ per energy conservation, and as $h$ is fixed, minimum $w^*$ corresponds to minimum $v^*$.
EARLIER SOLUTION (posted 21 March 2018)
For minimum velocity (i.e. minimum kinetic energy), \begin{align} {v^*}^2+{w^*}^2&=2gR\qquad\qquad\;\tag{1}\end{align} where $^*$ indicates quantities corresponding to the minimum velocity case. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9838471684931717,
"lm_q1q2_score": 0.8401196459605744,
"lm_q2_score": 0.8539127548105611,
"openwebmath_perplexity": 905.4962721899723,
"openwebmath_score": 0.9667984843254089,
"tags": null,
"url": "https://math.stackexchange.com/questions/2660468/projectile-vw-gk-for-minimum-launch-velocity"
} |
python, algorithm, python-3.x, sorting
Correctness
Input
3
4 5 7
5
6 9 5 7 1
Output
1 4 5 6 7 9
5 7
Input
6
1 1 8 9 0 5
4
0 7 3 4
Output
0 1 3 4 5 7 8 9
0
Question:
0) How to avoid such syntax? while arrayOneIndex < sizeOfArrayOne and arrayTwoIndex < sizeOfArrayTwo
1) Does the code require better error handling?
2) Can this code get more pythonic? Advice 1
PEP 8 has some (minor) complains: the names of functions and their arguments should be funky_functions instead of funkyFunctions, and funky_argument instead of funkyArgument.
Advice 2
In Python, you can say
def funky1():
for i in range(10):
yield i
def funky2():
arr = []
for i in range(10):
arr.append(i)
return arr | {
"domain": "codereview.stackexchange",
"id": 26245,
"lm_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, algorithm, python-3.x, sorting",
"url": null
} |
An"intuitive explanation of Fourier theory" by Steven Lehar. Fourier series decomposes a periodic function into a sum of sines and cosines with different frequencies and amplitudes. SciPy offers the fftpack module, which lets the user compute fast Fourier transforms. My name is Thibaut. Looking for abbreviations of WFT? It is Windowed Fourier transform. When both the function and its Fourier transform are replaced with discretized counterparts, it is called the discrete Fourier transform (DFT). Per the sympy documentation for fourier_transform(): If the transform cannot be computed in closed form, this function returns an unevaluated FourierTransform object. That's fine, but not very clear from the title. This calculator is online sandbox for playing with Discrete Fourier Transform (DFT). This course is a very basic introduction to the Discrete Fourier Transform. DFT is part of Fourier analysis, which is a set of math techniques based on decomposing signals into sinusoids. vSig will be | {
"domain": "flcgorizia.it",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9838471628097781,
"lm_q1q2_score": 0.8322780687569786,
"lm_q2_score": 0.845942439250491,
"openwebmath_perplexity": 552.3158417307098,
"openwebmath_score": 0.6439871788024902,
"tags": null,
"url": "http://ozad.flcgorizia.it/fourier-transform-python.html"
} |
electrostatics, electric-fields, charge, gauss-law
Title: What is the induced charge distribution on inner surface of a symmetrical conducting shell when a charge is placed off-centre? Let us assume that we have a symmetrical conducting hollow shell with a charge $Q$ on its surface. Now let us bring a point charge $q$ inside the shell cavity and place it at any point except at the centre (let say at $x=a$ assuming that origin is at the centre. I know that this will induce negative charges on the inner surface of the shell, but how do I find the distribution of the negative charges on the inner surface? The well knows fact is 'Electric field inside the conductor is zero in static condition'. Now let's suppose you put a charge $q$ somewhere inside the shell. And Say it doesn't produce any charge on the inner surface. Then If you make a gaussian surface passing through the conducting shell, there will be a non-zero flux through it. But it's not possible. Thus there must be an equal amount of charge should be induced to make the electric | {
"domain": "physics.stackexchange",
"id": 72931,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electrostatics, electric-fields, charge, gauss-law",
"url": null
} |
ros, c++, path, ros-kinetic
## Declare a C++ library
# add_library(${PROJECT_NAME}
# src/${PROJECT_NAME}/testPath.cpp
# )
add_executable(${PROJECT_NAME}_node src/test.cpp)
The linking error I'm getting :
undefined reference to
« ros::package::getPath(std::__cxx11::basic_string<char,
std::char_traits,
std::allocator > const&) »
Any leads on how to make this work?
Originally posted by Vic on ROS Answers with karma: 71 on 2022-05-03
Post score: 1
Where do you call target_link_libraries(... ${catkin_LIBRARIES}) in your CMakeLists.txt?
Originally posted by gvdhoorn with karma: 86574 on 2022-05-03
This answer was ACCEPTED on the original site
Post score: 3
Original comments
Comment by Vic on 2022-05-04:
You were right. Adding
target_link_libraries(${PROJECT_NAME}_node
${catkin_LIBRARIES}
) | {
"domain": "robotics.stackexchange",
"id": 37632,
"lm_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, c++, path, ros-kinetic",
"url": null
} |
• A couple of things. First $52-8=44\neq 42$. And for $P(x=3)$ we have $44\cdot 43$ in the numerator whereas it is $52\cdot 51\cdot 50$, so not equally many factors. Thus it should be $(52-k)!$ to have $k$ factors, but $(44-k+1)!$ to only have $k-1$ factors for that product. Finally, we may not succeed until drawing the $45$-th card. Not only the $43$-th. But the last bit there hardly makes a difference - they are both so unlikely. – String Apr 22 '15 at 20:00
• Made some silly mistakes there. Thanks for the help in cleaning it up. – Paddling Ghost Apr 22 '15 at 20:10
• No problem. Looks good now! (+1) – String Apr 22 '15 at 20:12 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9835969674838368,
"lm_q1q2_score": 0.8087027376222923,
"lm_q2_score": 0.8221891327004132,
"openwebmath_perplexity": 286.7831518121771,
"openwebmath_score": 0.8375306725502014,
"tags": null,
"url": "https://math.stackexchange.com/questions/1247170/expected-number-of-cards-drawn-before-drawing-a-4-or-5"
} |
lambda-calculus, evaluation-strategies
When we say "a λ-calculus with call-by-value", is it equivalent to say "λ_v-calculus"? I am reading Sabry and Felleisen's paper "Reasoning about Programs in Continuation-Passing Style". That paper mentioned λ_v-calculus and in p.8 it says (λx.x)(yy) has no βv-redex. After some research, I think I can answer this question by myself now.
Short answer
Wikipedia is correct, that is
If the $\lambda $-calculus uses call by value reduction strategy, the term $(\lambda x.x)(y y)$ is a normal form.
Long answer
Standard $\lambda $-calculus does not distinguish reduction strategies. It only gives you some Reduction Rules (e.g. $\beta $-rule). You searching for a β-redex in a given term, as long as you find a β-redex, you can reduce one step.
This means that
You can reduce a $\beta $-redex inside a $\lambda $-abstraction.
You can reduce the operand $\beta $-redex first and then reduce the operator $\beta $-redex.
At any step, you can use either call-by-value or call-by-name reduction strategy. | {
"domain": "cs.stackexchange",
"id": 17950,
"lm_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, evaluation-strategies",
"url": null
} |
ros, drone, hector-quadrotor
<!-- Start Gazebo with wg world running in (max) realtime -->
<include file="$(find hector_gazebo_worlds)/launch/willow_garage.launch"/>
<!-- Spawn simulated quadrotor uav -->
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor.launch" >
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_kinect.xacro"/>
</include>
</launch>
I just found a drone model using kinect but would like to use the R200 camera.
EDIT:
I am trying to add the R200 camera model to quadrotor base. My quadrotor_with_r200.urdf.xacro file looks like this:
<?xml version="1.0"?>
<robot name="quadrotor" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:property name="M_PI" value="3.1415926535897931" />
<!-- Included URDF Files -->
<xacro:include filename="$(find hector_quadrotor_description)/urdf/quadrotor_base.urdf.xacro" />
<!-- Instantiate quadrotor_base_macro once (has no parameters atm) -->
<xacro:quadrotor_base_macro /> | {
"domain": "robotics.stackexchange",
"id": 29633,
"lm_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, drone, hector-quadrotor",
"url": null
} |
regression, feature-extraction, feature-engineering, kaggle, feature-scaling
These are all techniques to build an unbiased estimator. I don't think it has anything to do with convergence as others have said (sometimes you may also want to normalize your data, but that is a different topic).
Following the linear regression assumptions is important if you want to either interpret the coefficients or if you want to use statistical tests in your model. Otherwise, forget about it.
Applying the logarithm or normalizing your data, is also important because linear regression optimization algorithms typically minimize $\|\hat y - y\|^2$, so if you have some big $y$ outliers, your estimator is going to be VERY concerned about minimizing those, since it is concerned about the squared error, not absolute error. Normalizing your data is important in those case and this is why scikit-learn has a normalize option in the LinearRegression constructor. | {
"domain": "datascience.stackexchange",
"id": 1849,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "regression, feature-extraction, feature-engineering, kaggle, feature-scaling",
"url": null
} |
If $f$ and $g$ are differentiable at $x$ then there exists $c$ so that $f+c>0$ and $g+c>0$ in a neighborhood of $x$. So the argument with the logarithm shows that $[(f+c)(g+c)]'=(f+c)'(g+c)+(f+c)(g+c)'$. But $$[(f+c)(g+c)]'=(fg)'+cf'+cg'$$and $$(f+c)'(g+c)+(f+c)(g+c)'=f'g+fg'+cf'+cg'.$$
• The log trick proves the product rule for $f+c$ and $g+c$, and then with a little algebra that implies the product rule for $f$ and $g$. – David C. Ullrich Nov 12 '17 at 23:05 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9755769092358048,
"lm_q1q2_score": 0.8330575588412877,
"lm_q2_score": 0.853912747375134,
"openwebmath_perplexity": 147.1725821306248,
"openwebmath_score": 0.8688954710960388,
"tags": null,
"url": "https://math.stackexchange.com/questions/2516812/product-rule-proof-involving-logarithm-and-implicit-differentiation-really-water"
} |
homework-and-exercises, classical-mechanics, coordinate-systems, hamiltonian-formalism, hamiltonian
This is my position vector:
\begin{equation}
\vec{r} = (a\cos{(\omega_0 t)} + l\sin{\theta})\hat{\imath} + (a\sin{(\omega_0 t)}-l\cos{\theta})\hat{k}
\end{equation}
(The angle that describes the movement of the suspension point on the circle is $\omega_0 t$ for being uniform)
From this, using the definition of potential and kinetic energy, the lagrangian is:
\begin{equation}
L = \frac{m}{2}(a^2\omega_0^2 + 2la\omega_0\dot{\theta}(\sin{(\theta - \omega_0 t)}) + l^2\dot{\theta}^2) - mg(a\sin{(\omega_0 t)}-l\cos{\theta})
\end{equation}
Now, i tried to make my hamiltonian with the definition
\begin{equation}
H = p_i\dot{q_i} - L
\end{equation}
But... for the problem, i think that this form is useless for the Hamilton equations. Then it occurred to me to use
\begin{equation}
H = T + U = \frac{m}{2}l^2\dot{\theta}^2 + mg(a\sin{(\omega_0 t)}-l\cos{\theta})
\end{equation} | {
"domain": "physics.stackexchange",
"id": 67712,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, classical-mechanics, coordinate-systems, hamiltonian-formalism, hamiltonian",
"url": null
} |
machine-learning, prediction, accuracy, model-evaluations
Accuracy is pointless in a case like this where data is highly imbalanced: by always predicting the majority class the classifier reaches more than 90% accuracy. The precision/recall/f1-score measures are much more informative. You may notice that your macro F1-score is actually better in the second case, even though the dataset is harder with the undefined values. | {
"domain": "datascience.stackexchange",
"id": 11785,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, prediction, accuracy, model-evaluations",
"url": null
} |
java, multithreading, priority-queue
Wrong usage of ternary operator ?
In peek:
return this.fetchByCustomPriority ? this.queue.peek() : (this.customPriorityQueue != null ? this.customPriorityQueue.peek() : null)
if the condition is true, the first member is returned, otherwise the second is returned. I suspect if fetchByCustomPriority is true, you'll want to use the customPriorityQueue, so you need to invert arguments 2 and 3.
Uneven popping
In push, you push messages on both queues.
In pop(), you either pop the queue, or the customPriorityQueue. This means both queues act differently depending on if fetchByCustomPriority is true or false. This makes your object inconsistent and breaks Queue interface contract:
ComparableQueueElement comparableQueue = new ComparableQueueElement(aComparator);
comparableQueue.push(element);
comparableQueue.setFetchByCustomPriority(true);
comparableQueue.pop(); // returns element
comparableQueue.setFetchByCustomPriority(false);
comparableQueue.pop(); // returns element AGAIN!! | {
"domain": "codereview.stackexchange",
"id": 24348,
"lm_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, priority-queue",
"url": null
} |
correctness-proof, mathematical-foundations, philosophy
In other words, if step $X$ in a proof is correct, then making a mistake in step $Y$ will not mess up step $X$ ever. But if a line of code $X$ is correctly written down, then making a mistake in line $Y$ will influence the working of line $X$, so that whenever we write line $X$ we have to take into account its relation to all other lines. We can use encapsulation and all those things to kind of limit this, but it cannot be removed completely.
This means that the procedure for checking for errors in a mathematical proof is essentially linear in the number of proof-steps, but the procedure for checking for errors in computer code is essentially exponential in the number of lines of code.
What do you think? | {
"domain": "cs.stackexchange",
"id": 20157,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "correctness-proof, mathematical-foundations, philosophy",
"url": null
} |
show f i ≤ fin.max n.succ f, from or.elim s12
(
assume a0 : i.val < n.succ,
let i' : fin n.succ := fin.mk i.val a0 in
have s13 : (fin.cast_succ i').val = i.val := eq.refl (fin.cast_succ i').val,
have s14 : (fin.cast_succ i') = i := fin.eq_of_veq s13,
have s15 : f' i' ≤ fin.max n f' := IH f' i',
have s16 : f' i' = f (fin.cast_succ i') := eq.refl (f' i'),
have s17 : f (fin.cast_succ i') ≤ fin.max n f' := eq.subst s16 s15,
have s18 : f i ≤ fin.max n f' := eq.subst s14 s15,
show f i ≤ fin.max n.succ f, from le_trans s18 s9
)
(
assume a1 : i.val = n.succ,
have s19 : i = fin.last n.succ := fin.eq_of_veq a1,
show f i ≤ fin.max n.succ f, from eq.subst (eq.symm s19) s7
)
}
end | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9683812345563902,
"lm_q1q2_score": 0.8306465399943904,
"lm_q2_score": 0.8577681086260461,
"openwebmath_perplexity": 3348.954673009072,
"openwebmath_score": 0.3846169710159302,
"tags": null,
"url": "https://leanprover-community.github.io/archive/stream/113489-new-members/topic/formalizing.20definitions.20for.20real.20analysis.html"
} |
homework-and-exercises, general-relativity, spacetime, curvature, sun
Calculating the curvature is pretty straightforward if we're allowed to make a few approximations. If we start with a spherically symmetric non-rotating mass then we can solve Einstein's equation to get the spacetime geometry around the object. This was done by Karl Schwarzschild only a few months after Einstein published his theory of general relativity, and the solution is the Schwarzschild metric:
$$ ds^2 = -\left(1 - \frac{2GM}{c^2r}\right)c^2 dt^2 + \frac{dr^2}{1 - \frac{2GM}{c^2r}} + r^2d\theta^2 + r^2\sin^2\theta d\phi^2 \tag{1} $$
Now the Sun isn't spherical, and it is rotating, but it isn't very aspherical and it isn't rotating very fast so to a good approximation our equation (1) will describe the spacetime curvature around it. In fact equation (1) is the equation used by Einstein when he achieved one of GR's first triumphs by calculating the perihelion shift of Mercury. | {
"domain": "physics.stackexchange",
"id": 36462,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, general-relativity, spacetime, curvature, sun",
"url": null
} |
python, unit-testing
... has the assertEqual inside a for loop. Is this bad style?
No, not at all, it is just fine as-is.
A unit test should look like AAA, arrange act assert.
It could have just a single instance of that,
and then we move on to another AAA in the next test method.
But here, we have to do a bit of Arrange work before
we're ready for the rest, and it makes perfect sense
to loop as you have done.
An even simpler test method might start with
self.assertEqual(count_set_bits(10), 2)
self.assertEqual(count_set_bits(11), 3) | {
"domain": "codereview.stackexchange",
"id": 45123,
"lm_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, unit-testing",
"url": null
} |
P.s.: I've tried lots of things, like using Function[] for Hamiltonian and throwing variables back and forth, but with no effective result. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9697854138058638,
"lm_q1q2_score": 0.8102397417989682,
"lm_q2_score": 0.8354835309589074,
"openwebmath_perplexity": 1400.0040617313937,
"openwebmath_score": 0.5715140104293823,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/102890/solve-motion-from-hamiltons-equations"
} |
black-holes
Another method is to measure emissions from gas accreting onto the black hole, and show the emissions match those expected. For example this was done for the archetypal black hole Cygnus X-1, and provides evidence that it is indeed a rotating black hole. | {
"domain": "physics.stackexchange",
"id": 23533,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "black-holes",
"url": null
} |
cosmology, relativity
Title: Homogeneity of space How do I verify homogeneity and isotropy of space, for example for hyperbolic space? My idea is to verify that Lorentz transformations in 4-vectors can move any desired point on the hyperboloid into the origin, and can rotate the hyperboloid about the origin by an arbitrary angle. The problem is I do not know how to map these statements into a precise mathematical language. Can you please help me? The hyperbolic space is defined by the constraint, $$t^2-\vec{x}^2=1 \quad \textbf{(1)},$$ where we think of $t$ as being a time coordinate and $\vec{x}=(x,y,z)$ as a spatial coordinate. This space is homogeneous and isotropic in the spatial coordinates which is what you are trying to prove.
Isotropy | {
"domain": "physics.stackexchange",
"id": 14302,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "cosmology, relativity",
"url": null
} |
special-relativity, spacetime, coordinate-systems, inertial-frames
Morin's book does account for mutual translation of the two frames' origins, so that's correct (even though not standard). But I hope the above answers your actual question on why we usually don't account for translation in Lorentz transformations - because it's considered separately as another symmetry.
I had the same doubt as yours, so it might be worthwhile checking out Derivation of the Lorentz transformation without assuming that clocks are synchronized when origins align and its answer if you like. | {
"domain": "physics.stackexchange",
"id": 68740,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "special-relativity, spacetime, coordinate-systems, inertial-frames",
"url": null
} |
quantum-field-theory, temperature, big-bang, symmetry-breaking, higgs
When you deal with nonzero temperatures, thermal effects take the part. Precisely, thermodynamical system is described by the minimum not the energy $E$, but the large thermodynamical potential $G$. Heuristically it is explained by changing the structure of the ground state and excitations for nonzero temperature. (added) At zero temperature the vacuum is the state with zero "real" particles; it is filled, however, by quantum fields and their "virtual" excitations. At nonzero temperatures, however, these excitations become real, and instead of zero particles state we have the state with "thermal bath". This, of course, makes the contribution in observed quantities; for example, it definitely changes VEVs, since they are depended on the definition of vacuum. Such difference makes impossible to interpret QFT at finite temperature $T$ as QFT with typical energies $E \sim T$ of processes, as we may do with classical phycics due to equipartition theorem. (added) | {
"domain": "physics.stackexchange",
"id": 28969,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-field-theory, temperature, big-bang, symmetry-breaking, higgs",
"url": null
} |
quantum-mechanics, operators, wavefunction, probability, complex-numbers
Short brief on Dirac's bra-ket notation: The ket, like the wavefunction represent a particular state of the system, but it's not actually the wavefunction of the system. It is represented as $\vert\psi\rangle$. The wave function of the system can be derived from the ket, and the ket representing a state, called the state ket, is a vector in the vector space spanned by the eigen kets of the operator $A$, just as like we speak the eigen functions of the operator $A$. Now, for the wavefunction, we have a corresponding complex wave function. Similarly, the complex dual of a state ket is called a state bra and is represented by $\langle\psi\vert$. | {
"domain": "physics.stackexchange",
"id": 36085,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "quantum-mechanics, operators, wavefunction, probability, complex-numbers",
"url": null
} |
homework-and-exercises, electromagnetism, electricity, magnetic-fields, electric-current
the arctan becomes $-\pi$ from $l_2$ limits evaluation; thus the result would be:
$$\frac{\mathbf F_{1,2}}{l} =\frac{\mu_0 i_1 i_2}{4R} \mathbf { \hat R_{1,2} }$$
This differs only by a factor of $2/\pi$ from the true solution. So I guess there is just one tiny issue that we have not considered. (For instance, are we really sure that the closed-circuit equation is applicable here?) | {
"domain": "physics.stackexchange",
"id": 36617,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "homework-and-exercises, electromagnetism, electricity, magnetic-fields, electric-current",
"url": null
} |
homework-and-exercises, newtonian-mechanics, kinematics, vectors, rotational-kinematics
Title: Why is $R\cos{a} = mg$ in circular motion compared and not $R = mg\cos{a}$?
Normally, if an object of mass $m$ is inclined to the horizontal at an angle $b$, we set the reaction force of the object on the inclined plane as $R = mg\cos{b}$ (if we resolve the force of gravity so the line of action coming out of the plane is perpendicular to it).
However in circular motion*. it's assumed that $R\cos{b} = mg$. In the example above, one would have to do this in order to arrive to the correct answer, instead of $R = mg\cos{b}$. Using $R = mg\cos{b}$ seems natural enough, as I am resolving vertically, however, both equations would produce two different values for $R$. Why is this?
To show what I mean:
If we set the reaction force in this question as $mg\cos{a}$, then the centripetal force will be $mg\cos{b}\cos(\pi/2-b) = mg\cos{b}\sin{b} = \frac{1}{2}mg\sin(2b)$ | {
"domain": "physics.stackexchange",
"id": 70128,
"lm_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, kinematics, vectors, rotational-kinematics",
"url": null
} |
react.js, jsx
return (
<div className="progress-bar-container" style={style}>
{this.props.children}
</div>
);
}
} The function render() in only supposed to render. It is not supposed to compute some style, set variables, have any logic other than render: (Functions Names Should Say What They Do). This should respect the SRP (Single Responsiblity Principle), as well as another clean code rule: 'A Function Should Do One Thing'.
What could be code smell in your first file:
A unused constructor should not be there at all,
The percentage calculation should be put in a function of its own
The color choice should be placed in a function of its own
What could be code smell in your second file:
A unused constructor should be removed
For both files, you could also add some prop types verifications using the library 'prop_types'.
As for your questions, with short answers: | {
"domain": "codereview.stackexchange",
"id": 37579,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "react.js, jsx",
"url": null
} |
python, beginner, python-3.x, beautifulsoup
PARSER = argparse.ArgumentParser(
description="a commandline clip downloader.")
PARSER.add_argument('clipcode', nargs='+',
help="a ten-digit clipcode.")
PARSER.add_argument('-p', '--proxy',
help="A http proxy to use; e.g. http://localhost:8000")
PROXY = PARSER.parse_args().proxy
CLIPCODES = PARSER.parse_args().clipcode
if PROXY:
print("Grabbing through http proxy: %s\n" % PROXY)
os.environ['http_proxy'] = PROXY
for i in CLIPCODES:
if not i.isdigit() or not len(i) == 10:
sys.exit(
"'\033[1m%s\033[0m' is not a valid ten-digit clipcode," % i,
"please check your input and try again.") | {
"domain": "codereview.stackexchange",
"id": 11906,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "python, beginner, python-3.x, beautifulsoup",
"url": null
} |
ros, drone
Title: How to extract image of bebop camera to my computer
I'm trying to processing images obtained of bebop 1 camera from my computer, but I can not access the images. Can you help me ?
I'm using the autonomy_bebop driver but the documentation does not show me how to get images and then process them.
Originally posted by VinicioSP on ROS Answers with karma: 13 on 2017-04-18
Post score: 0
After running the bebop driver you should get an image_raw topic (use rostopic list). You can also verify the camera feed with the GUI tool rqt_image_view. If you see the image feed, then you can process the image data in your program like any other image topic. See image_transport tutorials.
Originally posted by jacobperron with karma: 1870 on 2017-04-19
This answer was ACCEPTED on the original site
Post score: 1 | {
"domain": "robotics.stackexchange",
"id": 27635,
"lm_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, drone",
"url": null
} |
(Original image)
57.
This is a well-known problem called
Moser's circle problem. The sequence given by "maximal number of regions with $$n$$ blue dots" for increasing values of $$n$$ is $$1,2,4,8,16,31,57,\dots$$ (OEIS A000127). It's famously deceptive because the first few terms make it look like it's going to be simply the powers of 2, as another answer guessed, but it isn't.
• Well done, you got me again! – Weather Vane Sep 18 at 14:49
• What are other deceptive sequences? (non-trivial ones that have real applications)? – smci Sep 18 at 23:07
• @smci Dunno. This is my go-to example for a sequence that seems to go one way and actually goes another. – Rand al'Thor Sep 19 at 5:12
An answer from @Randal'Thor was posted while I prepared this.
57
Which I obtained by counting successive diagrams.
This is confirmed by the sequence
2,4,8,16,31,57
which is shown by OEIS to be A000127
Maximal number of regions obtained by joining n points around a circle by straight lines. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9857180669140007,
"lm_q1q2_score": 0.8012580034307247,
"lm_q2_score": 0.8128673201042492,
"openwebmath_perplexity": 641.8037961654524,
"openwebmath_score": 0.5629377961158752,
"tags": null,
"url": "https://puzzling.stackexchange.com/questions/89273/haselbauer-dickheiser-test-no-3-circle-divided-by-lines-between-a-blue-dots"
} |
c++, algorithm, recursion, template, c++20
// recursive_reverse_foreach_all template function implementation
template<class T, class State>
requires (recursive_depth<T>() == 0)
constexpr void recursive_reverse_foreach_all(T& value, State& state) {
std::invoke(state.f, std::invoke(state.proj, value));
}
template<class T, class State>
requires (recursive_depth<T>() != 0)
constexpr void recursive_reverse_foreach_all(T& inputRange, State& state) {
for (auto& item: inputRange | std::views::reverse)
impl::recursive_reverse_foreach_all(item, state);
}
}
template<class T, class Proj = std::identity, class F>
constexpr auto recursive_foreach_all(T& inputRange, F f, Proj proj = {})
{
impl::recursive_for_each_state state(std::move(f), std::move(proj));
impl::recursive_foreach_all(inputRange, state);
return std::make_pair(inputRange.end(), std::move(state.f));
} | {
"domain": "codereview.stackexchange",
"id": 45416,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c++, algorithm, recursion, template, c++20",
"url": null
} |
laser
Since light has a speed that exceeds escape velocity, I can't see that gravity actually pulls the beam to the ground. My question is, does the beam continue in a straight line, eventually leaving the atmosphere, and going off into space, or would the curvature of the earth keep the beam orbitting the earth for some time?
And, how far would such a beam go? At a certain distance, I would assume that orbitting spacecraft would eventually be hit by the beam, or if it closely followed the earth, it seems like the beam would eventually cause a swath of destruction as far as it went.
So, how long would it take for the beam to be dissipated in the air just as a matter of course?
The pulse should be way too long to be tactical, right? | {
"domain": "physics.stackexchange",
"id": 33539,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "laser",
"url": null
} |
Originally Posted by qwerty10
In selecting the first girl who sits on her own, aren't we in effect selecting someone as head of the table, so taking that person as given? Then we wouldnt have 3 possibilities as that person wouldnt count in the sum. For example, when we have to order 6 people around a cirular we can select one person as "head of the table" then there are 5! possibilites of ordering the other people around this "head of table"
No that is in fact wrong. She does count because she is alone. So there are three ways to pick her.
____________________________
Here is a second way to work it.
There are $(6)(6)=36$ ways to seat all the men and all the women together. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9790357634636667,
"lm_q1q2_score": 0.8027049023934777,
"lm_q2_score": 0.819893340314393,
"openwebmath_perplexity": 442.79657025525324,
"openwebmath_score": 0.5886744856834412,
"tags": null,
"url": "http://mathhelpforum.com/discrete-math/175895-circular-permutations-print.html"
} |
java, design-patterns, mvc, android
GameResultDisplay.java
public interface GameResultDisplay {
void show(GameResult gameResult);
}
GameResultDisplayAndroidToastImpl.java
public class GameResultDisplayAndroidToastImpl implements GameResultDisplay {
private final Activity activity;
public GameResultDisplayAndroidToastImpl(Activity activity) {
this.activity = activity;
}
@Override
public void show(GameResult gameResult) {
Toast.makeText(activity, gameResult.name(), Toast.LENGTH_LONG).show();
}
}
GameBoard.java
public interface GameBoard {
void setOnCellClickListener(OnCellClickListener onCellClickListener);
void showMove(Matrix.Position pos);
void showFireLine(List<Matrix.Position> positions);
void clear();
}
GameBoardAndroidImpl.java
public class GameBoardAndroidImpl implements GameBoard {
private final Matrix<ImageView> cells;
private CellIcon currentIcon; | {
"domain": "codereview.stackexchange",
"id": 5091,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "java, design-patterns, mvc, android",
"url": null
} |
What would it even mean to have $f(x,0)$ or $f(0,y)$ considering $\ln(x^2y)$ wouldn't be defined for $x=0$ or $y=0$?
Actually, would I have to show instead that the local extrema are not absolute extrema? Do I do that by finding another point that gives a lower or higher function value (depending on whether it's a local min or max)? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9572778073288128,
"lm_q1q2_score": 0.8038586874733352,
"lm_q2_score": 0.839733963661418,
"openwebmath_perplexity": 386.52406709604435,
"openwebmath_score": 0.6661906838417053,
"tags": null,
"url": "https://math.stackexchange.com/questions/1784787/without-extreme-value-theorem-how-do-we-find-absolute-extrema/1790826"
} |
dna-sequencing, database, blast
Title: What direction is a sequence in databases written? In many databases, the DNA sequences for proteins are given as a string of a,t,g,c without specifying whether the starting is from 5' or from 3'.
Also it is not specified if it is the coding or non coding strand.
Is it because all the sequences are written from 5' to 3' of coding strand only? Directionality
It is indeed the convention to represent nucleic acid sequences in the 5ʹ to 3ʹ direction.
This is implied in the IUPAC/IUB document on Abbreviations and Symbols for Nucleic Acids, Polynucleotides and their Constituents, although not stated explicitly — presumably because this was written in 1974, before the large nucleic acid databases were established.
Strand
In general you can assume nothing about which strand a particular feature is located on. You need to refer to the context or documentation for the particular database that you are using. | {
"domain": "biology.stackexchange",
"id": 8434,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "dna-sequencing, database, blast",
"url": null
} |
tensorflow, lstm, prediction
Title: validation_split in time series data for lstm model I have an LSTM network and I use it to predict. My whole data is an array with 10 rows and 1000 columns (10, 1000). I want to divide the data to train with size (10, 600), validate (10, 200) and test (10, 200). When I have the train data, I want to change the data to a an array with size (10*600, 1) and then train the model. However, in the tensorflow, we have validation_splitand I am not sure that this validation is same as the method that I want. Here is a simple example:
import pandas as pd
import numpy as np
import tensorflow as tf
from tensorflow import keras
from keras.models import Sequential
from keras.layers import LSTM, Dense, Dropout
from keras.layers.recurrent import LSTM
X_total = np.randm.rand(10, 1000)
#here is an example with a sample data
X_train = np.random.rand(10,5,2)
Y_train = np.random.rand(10,2)
X_test = np.random.rand(3, 5, 2) | {
"domain": "datascience.stackexchange",
"id": 10653,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "tensorflow, lstm, prediction",
"url": null
} |
machine-learning, azure-ml, machine-learning-model
You can drop whatever column you don't want to use and add them together after getting the scores. Though you might need to reorder columns etc.
Or...
There is a block called Edit Metadata which can be used to do what you need. Select whatever columns from the column selector you don't want to use and use the option Fields > Clear Feature from the block properties. These columns won't be used in the calculations but will be present when you visualise the Score Model output together with the rest of the columns and the scores. Moreover, columns in that output statistics will be labelled as Feature type if they were used in the calculations. So you straightaway know which columns were actually used in the calculations or not. Block help is quite useful here. | {
"domain": "datascience.stackexchange",
"id": 2702,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "machine-learning, azure-ml, machine-learning-model",
"url": null
} |
March 15th, 2015 at 8:03 pm
Posted in Mathematics
For those readers who understand spoken French (or simply appreciate the musicality of the language) and are interested in the history of mathematics, I warmly recommend listening to the recording of a recent programme of Radio France Internationale entitled “Pourquoi Bourbaki ?” In addition to the dialogue of Sophie Joubert with Michèle Audin and Antoine Chambert-Loir, one can hear some extracts of older émissions with L. Schwartz, A. Weil, H. Cartan, J. Dieudonné, for instance.
February 27th, 2015 at 7:31 pm
Аналитическая теория чисел
Thanks to the recent Russian translation of my book with Henryk Iwaniec, I can now at least read my own last name in Cyrillic; I wonder what the two extra letters really mean…
Analytic Number Theory in Russian
February 9th, 2015 at 9:06 pm
Posted in Language,Mathematics
An ideal hypothetical list | {
"domain": "ethz.ch",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307684643189,
"lm_q1q2_score": 0.8106838084510738,
"lm_q2_score": 0.8333245973817158,
"openwebmath_perplexity": 2721.254008989967,
"openwebmath_score": 0.7639570236206055,
"tags": null,
"url": "http://blogs.ethz.ch/kowalski/page/3/"
} |
waves
The parameter $\omega$ is used to compare the phases of particles' displacements in the medium at various times.
Added later in response to a comment
Below I have drawn two graphs which are often reproduced in connection with waves and the wave equation.
I have done that to show that they look very similar and yet are totally different. | {
"domain": "physics.stackexchange",
"id": 27951,
"lm_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",
"url": null
} |
and $$(a-\mu)\cdot(b-c)=(b-\mu)\cdot(c-a)=(c-\mu)\cdot(a-b)=0\tag9$$ Therefore, \begin{align} |a-b|^2 &=|(a-\mu)-(b-\mu)|^2\\ &=|a-\mu|^2+|b-\mu|^2-2(a-\mu)\cdot(b-\mu)\\ &=|a-\mu|^2+|c-\mu|^2-2(a-\mu)\cdot(c-\mu)\\ &=|(a-\mu)-(c-\mu)|^2\\ &=|a-c|^2 \end{align}\tag{10} The step where $$b$$ changes to $$c$$ follows from $$|c-\mu|=|b-\mu|$$ and $$(a-\mu)\cdot(c-b)=0$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109529751892,
"lm_q1q2_score": 0.8330933721105134,
"lm_q2_score": 0.8459424314825852,
"openwebmath_perplexity": 127.76440380736949,
"openwebmath_score": 0.9601011276245117,
"tags": null,
"url": "https://math.stackexchange.com/questions/3611312/finding-the-triangle-with-the-maximum-area-with-a-given-perimeter"
} |
mass, momentum, velocity, definition
$$
i\hbar = \left[\hat{r},\hat{p}\right] = \left[\hat{r}, m \hat{v}\right] = \left[m \hat{r}, \hat{v}\right] = \left[\hat{q},\hat{v}\right]
$$
So from these examples one could get the impression that $q$ and $p$ play very symmetric roles in physics. But the quantity $q$ doesn't even have a name, or does it? Why is mass times position not used in physics? I would call this quantity "first moment of mass" or just "moment of mass". Have a look at this wikipedia article to read about the general concept of moments in physics. | {
"domain": "physics.stackexchange",
"id": 31980,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "mass, momentum, velocity, definition",
"url": null
} |
electromagnetism, electric-circuits, electric-current, electrical-resistance, voltage
My question is then this - if the charge carriers in a circuit are motivated by an electric force, then how can current be a constant value? I am assuming current to be a measurement of how much charge crosses a cross-sectional area perpendicular to the direction of flow, per time; furthermore, shouldn't the velocity components of the charge carriers in the direction of flow, which is proportional to current, increase because of the electric force that is motivating them in that direction? | {
"domain": "physics.stackexchange",
"id": 76076,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, electric-circuits, electric-current, electrical-resistance, voltage",
"url": null
} |
unitarity, quantum-enhanced-machine-learning
\quad+ &|\langle 1 | q \rangle |^2 \text{Tr}_2\left(|1 \rangle \langle 1 | \otimes e^{-i \Delta t S}(|x^{k}\rangle \langle x^{k}| \otimes \sigma) e^{i \Delta t S} \right)\tag{iv}
\end{align}
Note that each the expressions in lines (a)-(d) are mutually orthogonal to eachother based on the operator contained in the first register, and the same is true for lines (i)-(iv). So we can only recover the desired equality if line (a) is equal to line (i), and line (b) is equal to line (ii), and so on. Clearly we have (a) = (i), so we need to show (b) = (ii) and (d) = (iv), but only up to $O(\Delta t^2)$.
We can derive the following (for example, see this question):
\begin{align}
\text{Tr}_1 ((\rho \otimes \sigma) S) &= \sigma \rho \tag{4} \\
\text{Tr}_1 (S(\rho \otimes \sigma) ) &= \rho\sigma \tag{5} \\
\exp (i \Delta t S) &= \cos (\Delta t) \mathbb{I} + i \sin (\Delta t )S \tag{6}
\end{align} | {
"domain": "quantumcomputing.stackexchange",
"id": 3249,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "unitarity, quantum-enhanced-machine-learning",
"url": null
} |
ros, catkin-make, rosmake, raspbian
Title: right way of using rosmake?
Hi,
In groovy environment I have used catkin_make to build my packages most of the time, But I am not clear with use of rosmake. I have few packages which use rosmake to build, I have gone through several tutorials and answers in this forum, still I have not figured out the right way of using rosmake.
below are the steps I followed, for one particular package which uses rosmake:
$ mkdir -p ~/rosbuild_ws/
> $ cd ~/rosbuild_ws/
$ rosws init . /opt/ros/groovy
> $ svn co http://prairiedog.googlecode.com/svn/trunk/gencam_cu/
$ cd gencam_cu/src
> $ sudo gedit CMakeList.txt
and I add link_directories(/usr/lib/uv4l/uv4lext/armv6l/) on the top, I save and exit.
now when I issue
$ rosmake gencam_cu | {
"domain": "robotics.stackexchange",
"id": 19738,
"lm_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, catkin-make, rosmake, raspbian",
"url": null
} |
c#, xml
public class UITemplateAssocList : TemplateListBase<UITemplateAssoc>
{
public UITemplateAssocList(XmlNodeList listOfUITemplates)
: base(listOfUITemplates)
{
}
public void FancyLogicA(string data)
{
foreach(var node in Templates)
{
// differing logic
}
}
}
public class ConcreteTemplateB : TemplateListBase<SomeOtherKindOfNode>
{
// ..
public void FancyLogicB(XmlNodeList list)
{
for (var node in list)
{
if (LikeThisNode(node)) AddTemplate(node);
}
}
} | {
"domain": "codereview.stackexchange",
"id": 1348,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "c#, xml",
"url": null
} |
particle-physics, standard-model, protons, baryons, proton-decay
Title: Why is the proton the only stable hadron? The title pretty much explains the question, but I've always thought that it'd be a neutron because of its 0 charge. Protons, neutrons and in general hadrons are in the quantum mechanical regime and are not elementary. Elementary are the quarks with their positive and negative charges. Here is the main quantum mechanical image of a proton in rough lines
and here is a neutron
Again in rough lines, they are quantum mechanically bound by the potential with the additions of two fundamental forces, the strong QCD force, and the electromagnetic force. In quantum mechanics, as stated also in the comments, systems are stable when they are in the lowest energy state, and this state happens to be the proton.
The title pretty much explains the question, but I've always thought that it'd be a neutron because of its 0 charge. | {
"domain": "physics.stackexchange",
"id": 44863,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "particle-physics, standard-model, protons, baryons, proton-decay",
"url": null
} |
welding
Title: What treatment is necessary after welding carbon steel pipes? When welding stainless steel pipes, the welds need some treatment (e.g. ball blasting and pickling). Is there anything equivalent for carbon steel (not stainless)? I'm looking at a tender document where someone specified pickling etc. for C-steel and I'm wondering wether someone copy-pasted from the specifications for stainless steels. Other than inspection/NDE , the only treatment would be for appearance. For stick , you need to knock off the slag to examine it for quality. In some situations the hardness would be a concern and minor grinding for hardness tests would be needed. Stainless is the same; clean for inspection/NDE, anything else like glas bead blasting and pickling is for cosmetics. Let me add, if you have a non-engineer manager who just paid millions $ for a piece of stainless equipment , you don't want to see it arrive with gold,blue and black surfaces along the welds. So most vendors will clean-up the | {
"domain": "engineering.stackexchange",
"id": 3401,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "welding",
"url": null
} |
algorithms, strings, information-retrieval
A new puppy in New York is happy with it's New York life.
You first start looking at the words in the text as pairs where the first pair is (a,new), the second is (new,puppy), (puppy,in), ... ,(York,life). The resulting trie will look something like this:
In order to find which pair appears the most times you need to count how many times you reach each leaf. | {
"domain": "cs.stackexchange",
"id": 13181,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "algorithms, strings, information-retrieval",
"url": null
} |
$\blacksquare$
## Proof 3
$\ds \tan 15^\circ$ $=$ $\ds \tan \frac {30^\circ} 2$ $\ds$ $=$ $\ds \frac {\sin 15^\circ} {\cos 15^\circ}$ Tangent is Sine divided by Cosine $\ds$ $=$ $\ds \frac {\frac {\sqrt 6 - \sqrt 2} 4} {\frac {\sqrt 6 + \sqrt 2} 4}$ Sine of $15^\circ$ and Cosine of $15^\circ$ $\ds$ $=$ $\ds \frac {\sqrt 6 - \sqrt 2} {\sqrt 6 + \sqrt 2}$ simplifying $\ds$ $=$ $\ds \frac {\left({\sqrt 6 - \sqrt 2}\right)^2} {\left({\sqrt 6 + \sqrt 2}\right) \left({\sqrt 6 - \sqrt 2}\right)}$ multiplying top and bottom by $\sqrt 6 - \sqrt 2$ $\ds$ $=$ $\ds \frac {6 - 2 \sqrt 6 \sqrt 2 + 2 } {6 - 2}$ multiplying out, and Difference of Two Squares $\ds$ $=$ $\ds \frac {8 - 4 \sqrt 3} 4$ simplifying $\ds$ $=$ $\ds 2 - \sqrt 3$ dividing top and bottom by $4$
$\blacksquare$ | {
"domain": "proofwiki.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961632569226,
"lm_q1q2_score": 0.8275714583519981,
"lm_q2_score": 0.8333245953120233,
"openwebmath_perplexity": 120.28474928135743,
"openwebmath_score": 0.9539005756378174,
"tags": null,
"url": "https://www.proofwiki.org/wiki/Tangent_of_15_Degrees"
} |
particle-physics, conservation-laws, standard-model, bosons
So, in the remainder EW sector, you have
Cubics: γWW; ZWW; HWW; HZZ; HHH;
Quartics: γγWW; WWZZ; HHHH; ZZZZ; HHZZ; HHWW; WWWW; ZHWW; γHWW; γZWW .
Reassure yourself you appreciate which terms each comes from. If it looked haphazard, it is only because I skipped the coupling strengths, which reveal the method in the model's madness.
The most interesting ones, in my view, come from the covariant completions of the Higgs doublet "kinetic" terms.
Extra credit: Can you intuit why there are no γγZ, γZZ (duh!), ZZZ, ZHH and ZHHH terms? | {
"domain": "physics.stackexchange",
"id": 63913,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "particle-physics, conservation-laws, standard-model, bosons",
"url": null
} |
navigation, ekf, navsat-transform-node, robot-localization, ekf-localization-node
Title: Strange results with robot_localization and navsat_transform_node
Hi to all, hi @tom-moore
I finally solved all the problems about my system configuration and now I'm able to integrate my GPS data in ekf_localization_node by using the navsat_transform_node.
I'm using two ekf_localization_node instances: the first which includes only continuous data (/imu/data, /husky_velocity_controller/odom) and the second which includes also the gps data (/imu/data, /husky_velocity_controller/odom, /fix).
The /odometry/gps topic publishes non-zero values, so I think it is working fine.
The problem is that I obtain strange results in RVIZ and I can't understand the reason.
It seems that the localization is not working properly, but I can't understand the reason.
In this test, the robot is moving forward, but RVIZ is showing random behavior.
This is my OLD recorded bag file, it contains only the related topics. | {
"domain": "robotics.stackexchange",
"id": 27381,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "navigation, ekf, navsat-transform-node, robot-localization, ekf-localization-node",
"url": null
} |
human-biology, sleep, breathing
Within the brain, the autonomic nervous system is regulated by the hypothalamus. Autonomic functions include control of respiration, cardiac regulation (the cardiac control center), vasomotor activity (the vasomotor center), and certain reflex actions such as coughing, sneezing, swallowing and vomiting. Those are then subdivided into other areas and are also linked to ANS subsystems and nervous systems external to the brain. The hypothalamus, just above the brain stem, acts as an integrator for autonomic functions, receiving ANS regulatory input from the limbic system to do so. (emphasis mine) | {
"domain": "biology.stackexchange",
"id": 8312,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "human-biology, sleep, breathing",
"url": null
} |
python, python-3.x, regex
Title: Sort files in a given folders and provide as a list I have two folders query and subject. The following function sorts alphabetically and provides the query and subject as a separate list. The file names are mixed of numbers and I found the sort function works perfectly well. Any comments to improve?
import os
import re
subject_path = "/Users/catuf/Desktop/subject_fastafiles/"
query_path = "/Users/catuf/Desktop/query_fastafiles"
def sorted_nicely(l):
""" Sort the given iterable in the way that humans expect. https://blog.codinghorror.com/sorting-for-humans-natural-sort-order/ """
convert = lambda text: int(text) if text.isdigit() else text
alphanum_key = lambda key: [ convert(c) for c in re.split('([0-9]+)', key) ]
return sorted(l, key = alphanum_key)
def subject_list_fastafiles():
subject_fastafiles = sorted_nicely([fastafile for fastafile in os.listdir(subject_path) if os.path.isfile(os.path.join(subject_path, fastafile))]) | {
"domain": "codereview.stackexchange",
"id": 35923,
"lm_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, regex",
"url": null
} |
spectroscopy
When people wish to assign XPS to a certain oxidation state or assign a certain compound, here are some of the steps that help people in interpretation. | {
"domain": "chemistry.stackexchange",
"id": 16466,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "spectroscopy",
"url": null
} |
It was introduced on the previous two pages covering deformation gradients and polar decompositions. Select the size of the matrix and click on the Space Shuttle in order to fly to the solver! We will say the angle is 45 degrees of clockwise rotation. The final step is to plug these values into the formulas above to determine the new points. The next step is to determine the angle of rotation, theta. isRotationMatrix. Power of a matrix. | {
"domain": "portaliep.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9702399043329857,
"lm_q1q2_score": 0.8207671169821578,
"lm_q2_score": 0.84594244507642,
"openwebmath_perplexity": 976.7134243082082,
"openwebmath_score": 0.4890100955963135,
"tags": null,
"url": "http://portaliep.com/iep/cepheid-stock-yiuim/x3l2a9t.php?id=b702cf-rotation-matrix-calculator"
} |
The only r-values are in the denominator, so as $r\rightarrow\infty$, the rational term also becomes zero. Graphically, you can see this happen as the cubic “unrolls” onto $y=7x-4$ as you drag $|x|\rightarrow\infty$. Essentially, this shows both graphically and algebraically that $y=7x-4$ is the limiting degenerate curve the cubic function approaches as two of its transformed real roots grow without bound.
## Recognizing Patterns
I’ve often told my students that the best problem solvers are those who recognize patterns from past problems in new situations. So, the best way to become a better problem solver is to solve lots of problems, study the ways others have solved the problems you’ve already cracked (or at least attempted), and to keep pushing your boundaries because you never know what parts of what you learn may end up providing unexpected future insights. | {
"domain": "wordpress.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9907319878505035,
"lm_q1q2_score": 0.8962662254973889,
"lm_q2_score": 0.9046505376715775,
"openwebmath_perplexity": 980.6773426566747,
"openwebmath_score": 0.803494930267334,
"tags": null,
"url": "https://casmusings.wordpress.com/tag/polynomial/"
} |
black-holes, experimental-physics, astrophysics, gravitational-waves, statistics
Some analytical approximations for estimating the signal-to-noise ratios (SNR) of detections are presented by Flanagan & Hughes (1997). They show that the SNR of the detection of an inspiral depends on the strain amplitude $h$, where $h$ (see equation 1 here) is given by
$$ h = \propto \mu M^{2/3} \nu^{2/3} r^{-1},$$
where $\mu$ is the reduced mass, $M$ is the total mass, $\nu$ is the source frequency and $r$ is the distance to the source.
We can express the reduced mass as $M f(1-f)$, where the mass of binary component 1 is $fM$ and the mass of the other component is $(1-f)M$.
Keeping $M$ and the other quantities constant (note that during inspiral, $\nu$ increases, so all binaries go through the same frequency band unless they merge), then we see that $h$ is maximised if $f = 0.5$ and we have an equal-mass binary system. | {
"domain": "physics.stackexchange",
"id": 53879,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "black-holes, experimental-physics, astrophysics, gravitational-waves, statistics",
"url": null
} |
fluid-dynamics, flow, turbulence
I would think that it would be the other way around due to the fact that a laminar flow is more organized and less chaotic that turbulent.
Turbulent flow resists change better than laminar flow because, in a way, it has a life of it's own, and small airflow changes may get damped out, but with laminar flow, it is much easier to disturb it and cause it to separate from the wing.
Golf balls and aircraft wings explains this idea in much more detail, (and is much better than my answer all round.) | {
"domain": "physics.stackexchange",
"id": 23816,
"lm_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, flow, turbulence",
"url": null
} |
swift, swiftui
And my SoundView:
struct SoundsView: View {
@EnvironmentObject var theme: ThemeManager
//var soundManager = SoundManager()
@StateObject var soundViewVM = SoundViewViewModel()
var body: some View {
List {
ForEach(soundViewVM.sounds) { sound in
Button {
//soundManager.playSound(name: sound.name)
soundViewVM.toggleItems(soundItem: sound) | {
"domain": "codereview.stackexchange",
"id": 43204,
"lm_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, swiftui",
"url": null
} |
java, swing, audio
{
frame = new JFrame();
this.withFrameSize(300, 300)
.withDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
private UIBuilder withLayout(@NotNull Supplier<LayoutManager> layoutSupplier) {
Objects.requireNonNull(layoutSupplier);
frame.setLayout(layoutSupplier.get());
return this;
}
private UIBuilder withContentPane(@NotNull Supplier<Container> contentPaneSupplier) {
Objects.requireNonNull(contentPaneSupplier);
frame.setContentPane(contentPaneSupplier.get());
return this;
}
public UIBuilder withTitle(@NotNull String title) {
Objects.requireNonNull(title);
frame.setTitle(title);
return this;
} | {
"domain": "codereview.stackexchange",
"id": 44996,
"lm_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, swing, audio",
"url": null
} |
electromagnetism, magnetic-fields
Title: What exactly is a magnetic field? If I have a charge $Q$, then at any point in space I can assign an electric field vector to it,
$$E(x,y,z)=\frac{KQ}{R^{2}}\hat{l}$$
And it's how one defines an electric field.
I was just thinking how can we understand magnetic field in the same sense?
Does unit magnetic particles makes sense? As you have written, the electric field of a charge $Q$ is
$$\mathbf{E}(x,y,z)=\frac{1}{4\pi\epsilon_0}\frac{Q}{R^2}\hat{\mathbf{R}}$$
In a similar manner you can write down the magnetic field
of a charge $Q$ (see for example here).
But here you need also to account for the
velocity $\mathbf{v}$ with which the charge is moving.
Notice that a cross product is involved,
resulting in a magnetic field $\mathbf{B}$
curling around the velocity vector $\mathbf{v}$.
$$\mathbf{B}(x,y,z)=\frac{\mu_0}{4\pi}\frac{Q\mathbf{v}}{R^{2}}\times\hat{\mathbf{R}}$$
Actually both formulas above are only approximations | {
"domain": "physics.stackexchange",
"id": 93082,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "electromagnetism, magnetic-fields",
"url": null
} |
linear-regression, data-analysis
│ ├── Design & Post Production - Retouched Image(s)
│ │ └── Social --- 1 Orig.
│ └── Online Advertising - Static Banner
│ └── Display --- 22 Orig.
└── Estimate #1907 $16,443
├── Cost Breakdown
│ ├── Animation & VFX: $3,675
│ ├── Audio & Music: $3,235
│ ├── Development: $8,498
│ └── Talent: $1,036
└── Deliverable Breakdown
├── Animation/Motion Graphics - 2D Animated Video
│ └── Social --- 1 Orig.
├── Audio/Record & Mix - VO Recording
│ └── Audio --- 2 Orig.
├── Design & Post Production - Retouched Image(s)
│ └── Social --- 1 Orig.
└── Online Advertising - Static Banner
└── Display --- 22 Orig. | {
"domain": "datascience.stackexchange",
"id": 7651,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "linear-regression, data-analysis",
"url": null
} |
ros-kinetic
then please show what you configured on which host.
Comment by Vic on 2021-06-03:
Network between RobotComputer and MasterComputer : ethernet LAN (just an ethernet cable between the 2 computers). IP adresses are 198.168.100.40 (RobotComputer) and 198.168.100.50 (MasterComputer).
Net mask is 255.255.255.0
Both device ping each other.
Network between NodeComputer and MasterComputer : ethernet LAN (just an ethernet cable between the 2 computers). IP adresses are 10.0.0.2 (NodeComputer) and 10.0.0.1 (MasterComputer).
Net mask is 255.255.255.0
Both device ping each other.
I exported ROS_MASTER_URI and ROS_IP and ROS_HOSTNAME
Focusing on the "faulty" network :
On NodeComputer,
ping 10.0.0.1
export ROS_MASTER_URI=http://10.0.0.1:11311/
export ROS_IP = 10.0.0.2
export ROS_HOSTNAME = 10.0.0.2
Should had RTFM better.
One of ROS requirement in Networking :
"There must be complete, bi-directional connectivity between all pairs of machines, on all ports. " | {
"domain": "robotics.stackexchange",
"id": 36478,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "ros-kinetic",
"url": null
} |
forces, free-body-diagram
Even if the gecko can control the van der Waals force, I doubt that it can be done so precisely. I think it more likely that the van der Waals attractive force is always slightly greater than gravity, pulling the gecko into the ceiling. The usual repulsive inter-molecular forces then come into play to oppose the net upward force on the gecko. The normal contact force is reactive and adjusts to provide a perfect balance of forces.
So in addition to its weight (downward) and the van der Waals force of attraction from the ceiling (upward) I think there is also a small additional 'normal' (in both meanings of the word!) contact force from the ceiling acting downward on the gecko. This is where I disagree with Harm Moolenaar. (I do not understand what Joce is saying - possibly the same as Harm?) | {
"domain": "physics.stackexchange",
"id": 31336,
"lm_label": null,
"lm_name": null,
"lm_q1_score": null,
"lm_q1q2_score": null,
"lm_q2_score": null,
"openwebmath_perplexity": null,
"openwebmath_score": null,
"tags": "forces, free-body-diagram",
"url": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.