text
stringlengths
1
1.11k
source
dict
• Yes, that's the right approach if you see $D^{1,\vec{p}}(\Omega)$ as a subset of $L^{p^*}(\Omega)$. If you see $D^{1,\vec{p}}(\Omega)$ as the abstract completion of $C_c^\infty(\Omega)$ (and assume wlog that $\Omega\subseteq K$) then you can canonically embed it in $L^{p_i}(K)$, and you will automatically get this bound. – Teun Jul 9 at 10:31 • I came up with this myself. It was a nice problem for the weekend. :) Now that I've looked in the literature I read that, at least for some different variant of $D^{1,p}$ this is apparently referred to as `common knowledge': pdfs.semanticscholar.org/9abc/…. – Teun Jul 9 at 10:33 • Indeed, I was considering $D^{1,\vec{p}}(\Omega)$ as embedded into $L^{p^*}(\Omega)$. By the "canonical embedding" into $L^{p_i}(K)$, do you mean identifying the Cauchy sequence $(u_n)_n$ with the limit of $(\partial_i u_n)_n$? If so, I don't see how to even make sense of the inequality in that case. – Sambo Jul 9 at 15:45
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429107723175, "lm_q1q2_score": 0.8292343781135144, "lm_q2_score": 0.8418256393148982, "openwebmath_perplexity": 992.5082570380586, "openwebmath_score": 0.9999496936798096, "tags": null, "url": "https://math.stackexchange.com/questions/3274291/does-multiplication-by-a-test-function-stay-in-a-sobolev-space/3286490" }
discrete-signals The problem is that I do not know what terms like 'φ' or How T is equal to 2kπ/ω. I know that I am lacking some elementary knowledge - but please let me know what are the topics / subjects I should hence first cover up such that when I read DSP related formulas, I understand them properly. First, the formulas by itself are from sine/cosine waves, so you should read a little about them first. Here. For the rest, you only have to keep in mind the unities $\phi$ in $\frac{rad}{s}$, $\Delta$ in $rad$ and finally in x(n) is a discrete sine-wave (or sampled) that is why the $n$ in the formula. It is basically the same thing as with the $t$ but in discrete, or sampled, time. The $T$ stands for the Period of the wave. You can perform simply math there to check the following: $$ T = \frac{2k\pi}{\omega} $$ $$ T = \frac{1}{f} $$ $$ \omega = 2\pi f= \frac{2\pi}{T} $$ Then you seen why we can obtain: $$ T = \frac{2\pi}{\omega} $$
{ "domain": "dsp.stackexchange", "id": 1941, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "discrete-signals", "url": null }
python, tensorflow, convolutional-neural-network model.fit(training_generator, epochs=50, callbacks=[stopper.CheckStopTraining()], validation_data=validation_generator) # try to predict my test images for file_name in os.listdir(TEST_DIR): if not file_name.startswith("."): # Prevent to load hidden files that break the code img = os.path.join(TEST_DIR, file_name) img = image.load_img(img, target_size=(IMG_DIM, IMG_DIM)) img = image.img_to_array(img) img = np.expand_dims(img, axis=0) img = np.vstack([img]) prediction = model.predict(img) print(f'{file_name} is {prediction[0]}') I solved the issue. I was dividing by 255 both the training and validation generators, but not the images that I was loading from the computer. I changed this line img = image.img_to_array(img) to this img = image.img_to_array(img) / 255 And now is working. Hope it can help someone else
{ "domain": "datascience.stackexchange", "id": 11603, "lm_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, tensorflow, convolutional-neural-network", "url": null }
python, algorithm, python-3.x, numpy, machine-learning def entropy(attribute_data): """ Calculate Shannon entropy :param attribute_data: data from a single feature/attribute :return: a float representing the Shannon entropy """ _, val_freqs = np.unique(attribute_data, return_counts=True) # probabilities for each unique attribute value val_probs = val_freqs / len(attribute_data) return -val_probs.dot(np.log(val_probs)) def info_gain(attribute_data, labels): """ Calculate information gain :param attribute_data: data from single attribute :param labels: :return: a float representing information gain """ attr_val_counts = get_count_dict(attribute_data) total_count = len(labels) EA = 0.0 for attr_val, attr_val_count in attr_val_counts.items(): EA += attr_val_count * entropy(labels[attribute_data == attr_val]) return entropy(attribute_data) - EA / total_count
{ "domain": "codereview.stackexchange", "id": 19508, "lm_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, numpy, machine-learning", "url": null }
programming scripts. How to solve Eignen Values and Vectors in MATLAB. To see more precisely where they coalesce, we use the function neardefmat,. The eigenvalues are clustered near zero. linalg package computes eigenvalues. Without this section you will not be able to do any of the differential equations work that is in this chapter. Maths with Jay 109,190 views. The numpy linalg package does not sort eigenvalues and eigenvectors. You will need MATLAB, OCTAVE, or some other software package capable of handling matrices and com- puting eigenvalues and eigenvectors. [V,D,P] = eig (A) returns a vector of indices P. As expected, we found two eigenvalues for this 2x2 matrix. 5 The Inverse Power Method. [V,D] = eig (A) returns matrices V and D. eigs (Matlab function) Subset of eigenvalues and eigenvectors. eig function returns a tuple consisting of a vector and an array. The eigenvalue w[1] goes with column 1, etc. EIGENVALUES & EIGENVECTORS. The idea is to find the partitioning with the
{ "domain": "osteriarougeroma.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534392852384, "lm_q1q2_score": 0.8262126709314694, "lm_q2_score": 0.8418256412990657, "openwebmath_perplexity": 429.17433867820245, "openwebmath_score": 0.8734235167503357, "tags": null, "url": "http://lcoj.osteriarougeroma.it/how-to-find-eigenvalues-and-eigenvectors-in-matlab.html" }
statistical-mechanics, field-theory, higgs, mean-field-theory Also, you probably know this, but a divergent correlation length doesn't mean the correlator is diverging; nothing about this situation is pathological. It just means that it falls off as a power law rather than an exponential.
{ "domain": "physics.stackexchange", "id": 58869, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics, field-theory, higgs, mean-field-theory", "url": null }
• Natural question: Can we have such a strong dimensionality reduction phenomena also for other distances, e.g., $\ell_1$ or $\ell_\infty$ norms? • Unfortunately, no -- see the homework. $\ell_2$-distances turn out to be very special.
{ "domain": "mit.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9961155236818676, "lm_q1q2_score": 0.8235004474318067, "lm_q2_score": 0.8267117898012104, "openwebmath_perplexity": 222.72965552289185, "openwebmath_score": 0.9553805589675903, "tags": null, "url": "http://courses.csail.mit.edu/6.854/16/Notes/n6-dim_reduction.html" }
Given that u = tan–¹(y/x), show that d²u/dx² + d²u/dy²=0 find the limiting value of 5n-3÷2n-7 Use the first principal to solve the following questions 5x-1 175000/9*100-100+164294/9*100-100*4 mode of (x+4) is equal to 10..graph it how? 66 ram 6 ram 6 Cajab what is domain in calculus nelson integrals of 1/6-6x-5x² derivative of (-x^3+1)%x^2 (-x^5+x^2)/100 (-5x^4+2x)/100 oh sorry it's (-x^3+1)÷x^2 Misha -5x^4+2x sorry I didn't understan A with that symbol find the derivative of the following y=4^e5x y=Cos^2 y=x^inx , x>0 y= 1+x^2/1-x^2 y=Sin ^2 3x + Cos^2 3x please guys I need answer and solutions differentiate y=(3x-2)^2(2x^2+5) and simplify the result Ga 72x³-72x²+106x-60 okhiria y= (2x^2+5)(3x+9)^2 lemmor solve for dy/dx of y= 8x^3+5x^2-x+5 192x^2+50x-1 Daniel are you sure? my answer is 24x^2+10x-1 but I'm not sure about my answer .. what do you think? Ga 24x²+10x-1 Ga yes ok ok hehe thanks nice dp ekko hahaha Ga hahaha 😂❤️❤️❤️ welcome bro ❤️ Ga y= (2x^2+5)(3x+9)^2 lemmor can i join?
{ "domain": "jobilize.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9912886157996524, "lm_q1q2_score": 0.8057861183279843, "lm_q2_score": 0.8128673178375735, "openwebmath_perplexity": 605.8782818393262, "openwebmath_score": 0.8992012143135071, "tags": null, "url": "https://www.jobilize.com/calculus/course/6-5-physical-applications-applications-of-integration-by-openstax?qcr=www.quizover.com&page=1" }
python, python-3.x, csv Can be expressed as: def _get_tank_names(tanks=None, data=None): tanks = {str(n) for n in tanks} return {t['Product'] for t in data if t['Tank'] in tanks} This converts tanks to a set while performing the str() conversion, to clean things up a bit. Then the result can be generated in a single statement. Gathering like elements So this entire section: # Create new row template tank_names = _get_tank_names(tanks=tanks, data=d1) row_template = {key: None for key in (tank_names + [primary_key])} # New rows from row template d4 = [] for row in d3: # update new row with available keys new_row = {key: row.get(key) for key in row_template} # update new row with matching values for key in new_row: if key in row.values(): new_row[key] = row[data_key] # remove keys with None value new_row = {k: v for k, v in new_row.items() if v is not None} d4.append(new_row)
{ "domain": "codereview.stackexchange", "id": 27894, "lm_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, csv", "url": null }
$\ln(2560 e^{10k})=\ln (2560) + \ln(e^{10k})=\ln (2560) +10k \ln(e)=\ln (2560) + 10k$ I think you confused yourself with whether the base of the power was $e$ or $2560e$ • Your right side would be correct for $\ln((2560e)^{10k})$ (after which you could do $\ln(2560e)=\ln(2560)+1$ but the exponentiation should group more tightly than multiplication, which it does in your earlier lines. – Ross Millikan Oct 2 '15 at 17:40 • I don't understand the question. $1/10$ is the inverse of $10$ – Ross Millikan Oct 2 '15 at 19:29 • You are dividing both sides by $10$. It is the same as solving $2x=3$ by dividing by $2$ and getting $x=\frac 32$ – Ross Millikan Oct 2 '15 at 20:34
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787838473909, "lm_q1q2_score": 0.8047802240386729, "lm_q2_score": 0.8152324960856177, "openwebmath_perplexity": 225.7961129606433, "openwebmath_score": 0.6895954608917236, "tags": null, "url": "https://math.stackexchange.com/questions/1461358/exponential-growth-and-decay-problem-use-the-fact-that-the-world-population-was" }
mechanical-engineering There are six distinct orientations you can grip a hex nut in, each 60 degrees apart. This means that if you can swing your wrench through a 60 degree arc, you can tighten the nut enough to remove the wrench and place it on the next pair of flats. In fact most open end wrenches have the jaws offset 15 degrees form the handle so that by flipping the wrench you can tighten the nut with as little as 30 degrees of access. (Box wrenches often have 12 points, allowing the same principle without the flipping.) A four sided nut would have a significant drawback that even with an offset wrench head, you would need 45 degrees of access to tighten the nut. Additionally, it's much easier to put an open end wrench on a hex nut as the two adjacent faces on the approach side guide the wrench towards the flats. By contrast, if you approach a square nut with the wrench flats not quite parallel to the nut flats, the wrench can very easily jam. Of course when there is space for access with a ratchet
{ "domain": "engineering.stackexchange", "id": 917, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering", "url": null }
java, performance, algorithm, primes conjunct = new int[1000001]; for ( int i = 0; i<1000001 ; i++ ) { conjunct[i] = 0; } int p; for ( int i = 0; i< k ; i++ ) { for ( int j = i; j< k ; j++ ) { int w = just_primes[i]+just_primes[j]; if ( w >= 1000000 && w <= 2000000 ) { p = w - 1000000; conjunct[p]++; } } } int big1 = 0; int big2 = 0; int big3 = 0; int n1 = 0; int n2 = 0; int n3 = 0;
{ "domain": "codereview.stackexchange", "id": 34293, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, algorithm, primes", "url": null }
Here is the programme: A001 LBL A A002 FN= A A003 SOLVE B A004 RTN B001 LBL B B002 PxV=NxRxT B003 RTN I invoke it by XEQ A. p.s. Maybe SF 11 has something to do with it, but I wasn't able to successfully use it... 09-30-2014, 04:44 PM Post: #8 Thomas Radtke Senior Member Posts: 779 Joined: Dec 2013 RE: HP 35s and Solve button (but not in equation catalogue) (09-30-2014 11:52 AM)mcjtom Wrote:  A001 LBL A A002 FN= A A003 SOLVE B A004 RTN B001 LBL B B002 PxV=NxRxT B003 RTN What are you trying to achive by solving A inside of A? This is a recursion and doesn't work. 09-30-2014, 06:27 PM (This post was last modified: 09-30-2014 09:27 PM by Dieter.) Post: #9 Dieter Senior Member Posts: 2,397 Joined: Dec 2013 RE: HP 35s and Solve button (but not in equation catalogue) (09-30-2014 11:52 AM)mcjtom Wrote:  When I try to wrap function in programme, I get SOLVE ACTIVE message. What do I do from there?
{ "domain": "hpmuseum.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9511422241476944, "lm_q1q2_score": 0.8121924697664534, "lm_q2_score": 0.8539127473751341, "openwebmath_perplexity": 3334.7188415092896, "openwebmath_score": 0.3730664551258087, "tags": null, "url": "https://hpmuseum.org/forum/showthread.php?mode=linear&tid=2195&pid=20051" }
ros, ros-kinetic, gazebo-ros Originally posted by prasanna.kumar on ROS Answers with karma: 1363 on 2018-09-10 Post score: 0 Hi, I've tried your SDF model ( without the meshes, just because you didnt give them here ) in a simulation I created for testing collisions and seems to work.
{ "domain": "robotics.stackexchange", "id": 31755, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-kinetic, gazebo-ros", "url": null }
accelerometer, gyroscope, matlab, filter You have: angle=0.99*(angle+(gyro(a,:)))+(0.01*Racc_norm1(a,:)); ang(a,:)=angle; Splitting this up a little, you could rephrase it by pulling the angle term out of its own definition and calling a different variable - prevAngle. Factor the 0.99 that it's multiplied by as well and you get: prevAngle = angle; angle = 0.99*(gyro(a,:))+(0.01*Racc_norm1(a,:)); ang(a,:) = 0.99*prevAngle + angle; So here it's like you've got a complimentary filter in the form of: k = 0.99; angle = k*gyro(a,:) + (1-k)*Racc_norm1(a,:); but, your lag filter is broken, because after that line you have: k2 = 0.99; ang(a,:) = k2*prevAngle + (k2+(1-k2))*angle; which is the same another way of saying what you have, which is: ang(a,:) = k2*prevAngle + (1)*angle;
{ "domain": "robotics.stackexchange", "id": 1185, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "accelerometer, gyroscope, matlab, filter", "url": null }
c++, matrix, bitwise It is then applied to the Matrix typedef: typedef std::vector<MatrixDim> Matrix; The 2D initialization will then become this: Matrix matrix(HEIGHT, MatrixDim(WIDTH)); Now you can finally use this in main() and pass it to the other functions. Before you do that, you'll need a different loop counter type. With an STL storage container, you should use std::size_type. With std::vector<char>, specifically, you'll have: std::vector<char>::size_type; You can use yet another typedef for this: typedef MatrixDim::size_type MatrixDimSize; Here's what the functions will look like with the changes (explanations provided). I've also included some additional changes, which are also explained. The entire program with my changes applied and produces the same output as yours. setbit(): inline void set_bit(Matrix& matrix, MatrixDimSize x, MatrixDimSize y) { matrix[(x) / 8][y] |= (0x80 >> ((x) % 8)); }
{ "domain": "codereview.stackexchange", "id": 6201, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, matrix, bitwise", "url": null }
quantum-mechanics, condensed-matter, solid-state-physics, density-of-states Title: Physical interpretation of density of states The following pictures shows some typical examples of density of states: and for superconductor:
{ "domain": "physics.stackexchange", "id": 42351, "lm_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, condensed-matter, solid-state-physics, density-of-states", "url": null }
image-processing, noise, estimation, denoising, software-implementation Advanced method is based on the merge of the 2 as can be seen in the Block Matching 3D Transform Denoising (BM3D). DXO Labs Denoisers DXO Labs historically has used algorithms developed by Jean Michel Morel's Labs and Students. First iterations were based on the almost vanilla non Local Means algorithms. Later more advanced tooling were added (Multi Scale approach, Noise Estimation, etc..). More advanced iterations are using the concept of Non Local Bayes denoising. The current DXO Prime algorithm is based on the ideas in the paper - Secrets of Image Denoising Cuisine. Topaz Labs Denoisers Topaz Labs with its classic (Non AI) Topaz Denoise has been using non Local Means. This could be concluded from its very specific "Cleaning Artifacts" which are classic to Non Local Means based methods. It had very effective Noise Profiling to performs very well using this method.
{ "domain": "dsp.stackexchange", "id": 7786, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "image-processing, noise, estimation, denoising, software-implementation", "url": null }
physical-chemistry, kinetics Are all oscillating reactions autocatalytic? There is an theoretical model discussed in this post, What's a minimal yet chemically-meaningful kinetic system for an oscillating reaction?. In its simplest form, it is unrealistic because there is no source of Gibbs energy to continuously drive it (i.e. to make at least one of the reactions virtually unidirectional). I am not aware of a experimental system that oscillates yet does not contain autocatalytic elements. It is possible that there is one somewhere, but it is not among the two or three systems typically discussed as example for oscillatory reactions.
{ "domain": "chemistry.stackexchange", "id": 16791, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "physical-chemistry, kinetics", "url": null }
php, http, php5, cache, session return $this; } /** * Sets the expire date for the cookie * * @param $expire int | string | \DateTime | \DateTimeInterface * * @throws \InvalidArgumentException * * @return $this */ public function setExpire($expire) { if($expire instanceof \DateTime || $expire instanceof \DateTimeInterface) { $expire = $expire->format('U'); } elseif( ! is_numeric($expire)) { $expire = strtotime($expire); if(false === $expire || -1 === $expire) { throw new \InvalidArgumentException('The cookie expiration time is not valid.'); } } $this->expire = $expire; return $this; } /** * @param mixed $httponly * * @return $this */ public function setHttponly($httponly) { $this->httponly = (bool)$httponly; return $this; }
{ "domain": "codereview.stackexchange", "id": 22283, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, http, php5, cache, session", "url": null }
of a triangle to deduce a way to calculate the area of a segment. Figure 5 Degree measure and arc length of a semicircle. length of the circumference of the great circle will equal 2ˇrwhere ris the length of the radius of the sphere. Arc length function. In the coming paragraphs, we explain the formula for arc length and give a guide with detailed instructions how to calculate the arc length. Since in any circle the same ratio of arc to radius determines a unique central angle, then for theoretical work we often use the unit circle, which is a circle of radius 1: r = 1. learn Calculus III or needing a refresher in some of the topics from the class. Using u-substitution, we have. Finding an arc length when the angle is given in degrees We know that if θ is measured in radians, then the length of an arc is given by s = rθ. There is such a formula for the case of a parabolic arc, but it's not easy to find. When you change the parameterization to another domain variable such as arc length
{ "domain": "cogoo-epaper.de", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9907319874400309, "lm_q1q2_score": 0.8360738701999422, "lm_q2_score": 0.8438951005915208, "openwebmath_perplexity": 366.12298574545065, "openwebmath_score": 0.8626194000244141, "tags": null, "url": "http://jldy.cogoo-epaper.de/arc-length-formula-calculus.html" }
Functions Applications of Sinusoidal Functions. This lesson will present real world examples that involve inverse trigonometric ratios. The trigonometric functions sine, cosine, and tangent are useful in a wide range of applications, from solving simple problems to advanced and complex problems. Over 90 new problems on differential equations and their applications. Understanding Calculus is a complete online introductory book that focuses on concepts. It studies the relationship between involving lengths and angles of triangle. Objectives: To graph the sine and cosine functions; to identify the graphs of the sine and cosine functions. In maths, you have real life applications on any thing that you study. At x = 0 degrees, sin x = 0 and cos x = 1. Transformations of Sine and. What are the Applications of Trigonometry in Real Life? Ans. (3) The student uses functions and their properties to model and solve real-life problems. Graphing Cosine Function Lesson Plan 1. Graph a sine or cosine
{ "domain": "salesianipinerolo.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.990291521799369, "lm_q1q2_score": 0.8655912851267503, "lm_q2_score": 0.8740772450055544, "openwebmath_perplexity": 489.46033083010536, "openwebmath_score": 0.754558265209198, "tags": null, "url": "http://salesianipinerolo.it/ubdl/real-life-applications-of-sine-and-cosine-functions.html" }
classical-mechanics, hamiltonian-formalism, collision, discrete Title: Formalism to deal with discontinuous potentials in classical mechanics (hard wall, hard spheres) It seems to me that Hamiltonian formalism does not suit well for problems involving instantaneous change of momentum, like particle collisions with hard wall or hard sphere gas model. At least I could not apply it straightforwardly to the simplest possible problem of 1D particle hitting a wall: │/ wall │/ particle │/ ───o────────┼────────────> x │/ │/ │/
{ "domain": "physics.stackexchange", "id": 67732, "lm_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, hamiltonian-formalism, collision, discrete", "url": null }
python, beginner, python-3.x, unit-testing, functional-programming The way you split case[0], case[1], and case[-1] is awkward. I would put the singular expected result first, then use tuple unpacking. For clarity, you should print repr(param) instead of param. Here's how I would write it: def test_fun(fun, cases): print('{:^30} {:^11}'.format('Expected', 'Run')) for expected, *params in cases: funstr = '{}({})'.format(fun.__name__, ', '.join(repr(p) for p in params)) result = fun(*params) success = result == expected print('{:21} -> {:5} ==> {:5} {}'.format(funstr, expected, result, success))
{ "domain": "codereview.stackexchange", "id": 21575, "lm_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, unit-testing, functional-programming", "url": null }
python, errors return getattr(self, func_or_funcs)(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/pandas/core/groupby/groupby.py", line 1227, in size result = self.grouper.size() File "/usr/local/lib/python2.7/site-packages/pandas/core/groupby/ops.py", line 225, in size ids, _, ngroup = self.group_info File "pandas/_libs/properties.pyx", line 36, in pandas._libs.properties.CachedProperty.__get__ File "/usr/local/lib/python2.7/site-packages/pandas/core/groupby/ops.py", line 252, in group_info comp_ids, obs_group_ids = self._get_compressed_labels() File "/usr/local/lib/python2.7/site-packages/pandas/core/groupby/ops.py", line 272, in _get_compressed_labels return compress_group_index(group_index, sort=self.sort) File "/usr/local/lib/python2.7/site-packages/pandas/core/sorting.py", line 379, in compress_group_index comp_ids, obs_group_ids = table.get_labels_groupby(group_index)
{ "domain": "bioinformatics.stackexchange", "id": 967, "lm_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, errors", "url": null }
beginner, c, strings, caesar-cipher Some of the points I'm about to make are related to style. Although you can write programs in C in all sorts of ways, some of them are easier to read than others. What you show is not bad, but it isn't wholly consistent (and consistency is very important — and hard!). Analyzing the current implementation — line by line. #include<stdio.h>
{ "domain": "codereview.stackexchange", "id": 23671, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, c, strings, caesar-cipher", "url": null }
Here a plot of this BoxWhiskerChart: With some additional styling and as a function with optional arguments: bwChart[data_, br_: Erf[1/Sqrt[2]], flimit_: 0.1] := BoxWhiskerChart[data, {{"MedianMarker", 1, Directive[Thickness[0.01], Blue]}, {"MedianNotch", 0.5, Gray}}, Method -> "BoxRange" -> (Quantile[#, {flimit, (1 - br)/2, 1/2, (1 + br)/2, 1 - flimit}, {{1/3, 1/3}, {0, 1}}] &), BarSpacing -> None, AspectRatio -> 0.7, BarOrigin -> Left, ChartElementFunction -> "GlassBoxWhisker", ChartStyle -> 6] - (+1) Thank you! Spent hours to make BoxRange work as an option :) –  kguler Jul 17 '14 at 2:08 This is fantastic. Thank you for the clear explanation! –  user18593 Jul 17 '14 at 22:41
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9748211590308922, "lm_q1q2_score": 0.8102158210791668, "lm_q2_score": 0.8311430394931456, "openwebmath_perplexity": 4181.61332513147, "openwebmath_score": 0.37022465467453003, "tags": null, "url": "http://mathematica.stackexchange.com/questions/55068/boxwhiskerchart-10-90th-percentile-instead-of-min-max" }
This graph is the correction of the graph in the solution of Young as of Jul 26 at 20:13 up to t = 250. It is also instructive to study energy conservation. The extent of non-conservation can serve as a measure for numerical accuracy. The energy is defined as the integral over the energy density as follows ww[t_] = Integrate[ 1/2 D[uun[t, x], t]^2 + 1/2 D[uun[t, xx], xx]^2 /. xx -> x, {x, -a, a}] It can easily be shown to be conserved in time with the given boundary conditions. The initial value is given by ww0 = Integrate[1/2 D[Exp[-xx^2/2], xx]^2 /. xx -> x, {x, -a, a}] (* Out[634]= 1/4 (-2 a E^-a^2 + Sqrt[\[Pi]] Erf[a]) *) Example a = 5 wp = 5 and 10 After running the solution code we proceed as follows: The numerical value of the initial energy is ww0n = ww0[a] // N (* Out[659]= 0.443113 *) The energy values at equidistant instances are (replacing the very slow spatial integrals) wwt = Table[{t, ww[t]}, {t, 0, 15, 0.5}] // N; for comparison the inital value
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9755769078156283, "lm_q1q2_score": 0.8292122549880111, "lm_q2_score": 0.8499711794579723, "openwebmath_perplexity": 4254.047482574005, "openwebmath_score": 0.31788450479507446, "tags": null, "url": "https://mathematica.stackexchange.com/questions/121548/how-to-solve-time-dependent-pde" }
python, performance, python-2.x, image, multiprocessing classStart = (cltimeS.split(":")) del classStart[-1] starttime = ( str(classStart[0]) + str(classStart[1]) ) classEnd = (cltimeF.split(":")) del classEnd[-1] endtime = ( str(classEnd[0]) + str(classEnd[1]) ) for times in timeConstraint: if times[2] == day: if ((int(starttime) + 400) < (int(times[0])) or (int(endtime) + 400) > (int(times[1])+1200)): overlap = True if not overlap: SectionMeetingTimes.append([starttime,endtime,day,condencedClassDic[classToAdd][classSection]["title"],condencedClassDic[classToAdd][classSection]["section"]]) if SectionMeetingTimes: ClassTimes.append(SectionMeetingTimes)
{ "domain": "codereview.stackexchange", "id": 26996, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, python-2.x, image, multiprocessing", "url": null }
thermodynamics, ideal-gas, reversibility, adiabatic On the other hand, a constant pressure irreversible adiabatic expansion or contraction is possible. It requires an initial abrupt decrease or increase in the external pressure, followed by constant external pressure expansion or contraction. Consider a vertically oriented perfectly thermally insulated cylinder fitted with a piston of negligible mass and area $A$. A weight of $mg$ is supported by the piston so that the total external pressure is $mg/A + atm$. The gas is initially in equilibrium with the surroundings and is therefore at the same pressure.
{ "domain": "physics.stackexchange", "id": 70972, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, ideal-gas, reversibility, adiabatic", "url": null }
python, wavelet, scattering scattering = Scattering1D(J, T, Q) File "C:\Users\xwb18152\AppData\Roaming\Python\Python38\site-packages\kymatio\scattering1d\frontend\numpy_frontend.py", line 19, in init ScatteringBase1D.build(self) File "C:\Users\xwb18152\AppData\Roaming\Python\Python38\site-packages\kymatio\scattering1d\frontend\base_frontend.py", line 55, in build min_to_pad = compute_minimum_support_to_pad( File "C:\Users\xwb18152\AppData\Roaming\Python\Python38\site-packages\kymatio\scattering1d\utils.py", line 125, in compute_minimum_support_to_pad _, _, _, t_max_phi = scattering_filter_factory( File "C:\Users\xwb18152\AppData\Roaming\Python\Python38\site-packages\kymatio\scattering1d\filter_bank.py", line 676, in scattering_filter_factory psi_f[0] = morlet_1d( File "C:\Users\xwb18152\AppData\Roaming\Python\Python38\site-packages\kymatio\scattering1d\filter_bank.py", line 135, in morlet_1d morlet_f *= get_normalizing_factor(morlet_f, normalize=normalize) File
{ "domain": "dsp.stackexchange", "id": 10976, "lm_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, wavelet, scattering", "url": null }
matlab, fft, dft % Produce output of third stage of butterfly for k=0:(N/8)-1 X4_0(k+1) = X3_0(k+1) + (Wn^(k*8)) * X3_4(k+1); X4_1(k+1) = X3_1(k+1) + (Wn^(k*8+1)) * X3_5(k+1); X4_2(k+1) = X3_2(k+1) + (Wn^(k*8+2)) * X3_6(k+1); X4_3(k+1) = X3_3(k+1) + (Wn^(k*8+3)) * X3_7(k+1); X4_4(k+1) = X3_0(k+1) + (Wn^(k*8+4)) * X3_4(k+1); X4_5(k+1) = X3_1(k+1) + (Wn^(k*8+5)) * X3_5(k+1); X4_6(k+1) = X3_2(k+1) + (Wn^(k*8+6)) * X3_6(k+1); X4_7(k+1) = X3_3(k+1) + (Wn^(k*8+7)) * X3_7(k+1); end % Merge X4 into final output c = 1; for k = 1:N/8 X5(c:c+7) = [X4_0(k);X4_1(k);X4_2(k);X4_3(k);X4_4(k);X4_5(k);X4_6(k);X4_7(k)]; c = c+8; end
{ "domain": "dsp.stackexchange", "id": 5974, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "matlab, fft, dft", "url": null }
ros Originally posted by blueberry on ROS Answers with karma: 3 on 2016-04-25 Post score: 0 Yes. Assuming you have enough memory/CPU/GPU power you can start as many rviz instances as you like. The only "gotcha" that I can think of is that each instance should have a unique ROS name (just like every other ROS node). This happens automatically with rosrun and can easily be implemented in roslaunch with the anon substitution arg. If by "independent" you mean they shouldn't be able to talk to each other via ROS mechanisms. Then, once again, yes. That is possible. You would just need to set the ROS_MASTER_URI different for each instance (and have a corresponding roscore running). EDIT
{ "domain": "robotics.stackexchange", "id": 24467, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
c++ os << std::hex; os.fill('0'); bool printBlank = false; size_t i = 0; for (; i < bufsize; ++i) { if (i % 8 == 0) { if (i != 0 && showPrintableChars) { render_printable_chars(os, reinterpret_cast<const char*>(&buffer[i] - 8), 8); } os << std::endl; printBlank = false; } if (printBlank) { os << ' '; } os << std::setw(2) << std::right << unsigned(buffer[i]); if (!printBlank) { printBlank = true; } } if (i % 8 != 0 && showPrintableChars) { for (size_t j = 0; j < 8 - (i % 8); ++j) { os << " "; } render_printable_chars(os, reinterpret_cast<const char*>(&buffer[i] - (i % 8)), (i % 8)); } os << std::endl; os.fill(oldFillChar); os.flags(oldFormat); return os; }
{ "domain": "codereview.stackexchange", "id": 37324, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++", "url": null }
lstm, backpropagation Question: When working with LSTM specifically, am I indeed allowed to apply this $\frac{1}{|X|}$ at the end of the backprop once I've summed-up gradients of weights across all timesteps? Or should I always apply $\frac{1}{|X|}$ straight away, to any gradient flowing into the top layers of my network?
{ "domain": "datascience.stackexchange", "id": 4157, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lstm, backpropagation", "url": null }
#### Endorsed by (What does "Endorsed by" mean?) This content has been endorsed by the organizations listed. Click each link for a list of all content endorsed by the organization. • IEEE-SPS This collection is included inLens: IEEE Signal Processing Society Lens By: IEEE Signal Processing Society "This is an introduction to fractional measures of smoothness for functions via Besov spaces that generalize the classical Sobolev smoothness spaces." Click the "IEEE-SPS" link to see all content they endorse. Click the tag icon to display tags associated with this content. #### Affiliated with (What does "Affiliated with" mean?) This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization. • NSF Partnership This collection is included inLens: NSF Partnership in Signal Processing By: Sidney Burrus
{ "domain": "cnx.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471675459397, "lm_q1q2_score": 0.8133580590735038, "lm_q2_score": 0.8267117962054049, "openwebmath_perplexity": 3078.504973747452, "openwebmath_score": 0.2063373178243637, "tags": null, "url": "http://cnx.org/content/m19612/latest/?collection=col10679/latest" }
Also, if you ignore the boundary condition $A_0 = 2$ then you find that $\sqrt2$ is a solution to the main part of the recurrence. i.e. $\sqrt2 = \sqrt2/2 + 1/\sqrt2$. The chapter and videos on recurrences have a lot to say about a kind of cookbook solution to divide and conquer recurrences which they call the Akra-Bazzi Theorem. But this recurrence does not seem to be in the right form for that theorem. If it were in the form $A_{n+1} = A_n/2 + g(n)$ then the theorem would give you an asymptotic bound. But $1/A_n$ is not a simple function of $n$ like a polynomial. Instead it is part of the recurrence. Also, the chapter has a variety of things to say about how to guess the right solution and plug it into an inductive proof, but I haven't had much success. I have tried possible solutions of various forms like $a_n = \sqrt2+a/b^n$ and tried solving for the constants $a$ and $b$ but to no avail.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105259435195, "lm_q1q2_score": 0.8566898254537173, "lm_q2_score": 0.8774767890838837, "openwebmath_perplexity": 119.9180937019314, "openwebmath_score": 0.9323938488960266, "tags": null, "url": "https://math.stackexchange.com/questions/1802813/prove-upper-bound-for-recurrence" }
machine-learning, python, r, statistics, data-analysis Title: Is Python a viable language to do statistical analysis in? I originally came from R, but Python seems to be the more common language these days. Ideally, I would do all my coding in Python as the syntax is easier and I've had more real life experience using it - and switching back and forth is a pain. Out side of ML type stuff, all of the statistical analysis I've done have been in R - like regressions, time series, ANOVA, logistic regression etc. I have never really done that type of stuff in Python. However, I am trying to create a bunch of code templates for myself, and before I start, I would like to know if Python is deep enough to completely replace R as my language of choice. I eventually do plan on moving more towards ML, and I know Python can do that, and eventually I would imagine I have to go to a more base language like C++.
{ "domain": "datascience.stackexchange", "id": 7801, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, python, r, statistics, data-analysis", "url": null }
cc.complexity-theory, reference-request, complexity-classes, big-picture, parameterized-complexity Is there a reference for proof for these two $XP$ statements? On the first question: First off, I do not think the statement $\mathsf{XP} \subseteq \mathsf{NP}$ is meant to be implied at that point. To explain what is meant, let me ask a question: What is the parameterized counterpart to $\mathsf{NP}$?
{ "domain": "cstheory.stackexchange", "id": 4014, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cc.complexity-theory, reference-request, complexity-classes, big-picture, parameterized-complexity", "url": null }
radio-telescope, radio-astronomy Title: Recommend a radio calibration target for amateur radio telescope I have a small antenna and radio system that can receive frequencies between 1MHz and 1GHz. The system has a discone antenna. I plan to do some aperture synthesis based on the daily rotation of the Earth that will allow me to resolve a lune with a width of about one degree. What objects and specific frequencies should I observe to test to see if the system and algorithm is functioning properly? The following table is based on The measurement of large antennas with cosmic radio sources (sorry for the paywall), Table I "Radio Sources for Antenna Measurements", Panel A "Flux Density and Polarization Data". This table contains some of the brightest "point sources" at microwave frequencies. I have extracted only the flux densities at 1 GHz to match the requested frequency range in the question. Flux densities below 1 GHz will be different. Source Flux Density (fu) Cassiopeia A (Cas A, 3C461) 3185 $\pm$ 30
{ "domain": "astronomy.stackexchange", "id": 6096, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "radio-telescope, radio-astronomy", "url": null }
type-theory, type-checking any unknown object void undefined null never any ✓ ✓ ✓ ✓ ✓ ✗ unknown ✓ ✗ ✗ ✗ ✗ ✗ object ✓ ✓ ✗ ✗ ✗ ✗ void ✓ ✓ ✗ ✗ ✗ ✗ undefined ✓ ✓ ✓✗? ✓ ✓✗? ✗ null ✓ ✓ ✓✗? ✓✗? ✓✗? ✗ never ✓ ✓ ✓ ✓ ✓ ✓ [TypeScript Playground Example and with strictNullChecks = false for comparison]
{ "domain": "cs.stackexchange", "id": 20778, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "type-theory, type-checking", "url": null }
question to identify if it is a growth or decay. Honors Pre-Calculus 3. In an exponential growth (or decay) function, as x increases, the y-values grow (or decrease) by a constant percent. Algebra 1 - Exponential growth and decay word problems Exponential decay occurs in the same way when the growth rate is negative. 01)12ᵗ, y = (1. Linear Regression Exponential Equations Lessons Tes Teach. How much remains of 10 grams after one week? 4. Comments (-1) Compound Interest Worksheet. The equation for "continual" growth (or decay) is A = Pe rt, where "A", is the ending amount, "P" is the beginning amount (principal, in the case of money), "r" is the growth or decay rate (expressed as a decimal), and "t" is the time (in whatever unit was used on the growth/decay rate). The fu nction with the base of 4/3 will be exponential growth and the other function with a base of 6/5 will also be exponential growth. We tried to locate some good of Exponential Growth and Decay Word Problems Worksheet
{ "domain": "libreriaperlanima.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713852853137, "lm_q1q2_score": 0.8374522814371483, "lm_q2_score": 0.8499711794579723, "openwebmath_perplexity": 1193.5853796587046, "openwebmath_score": 0.3269873261451721, "tags": null, "url": "http://gjde.libreriaperlanima.it/continuous-exponential-growth-and-decay-word-problems-worksheet.html" }
$x+\frac{1}{x}=n$ then: $x^2-nx+1=0$ and $x$ is rational if and only if the discriminant of this quadraic is a perfect square, that is for some $k \in \mathbb{N}$ : $n^2-4=k^2$ As the gap between consecutive squares is greater than $4$ when the lesser is the square of any number of absolute value greater than or equal $2$, and the other cases are easily checked manualy the only solutions to this are $k=0,\ n=\pm 1$ Now for irrational $x$ 's. Any $n \in \mathbb{Z}$ such that: $n^2-4>0$ but not a perfect square then $x=\frac{n+\sqrt{n^2-4}}{2}$ is an irrational such that $x+1/x$ is an integer. In particular let $n=5$, then $x=\frac{5 + \sqrt{21}}{2}$ is irrational and a solution of: $x+\frac{1}{x}=5$ . 6. Originally Posted by Constatine11 There are a countable infinitude of such triangles, and so there is a countable infinity of rational $x$ 's such that $x+1/x$ is an integer. But in part (c) I prove that:
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9465966702001758, "lm_q1q2_score": 0.8119604251040048, "lm_q2_score": 0.8577680977182186, "openwebmath_perplexity": 281.0419556443812, "openwebmath_score": 0.9736921191215515, "tags": null, "url": "http://mathhelpforum.com/discrete-math/67999-denseness-addition-irrationals.html" }
c#, xml foreach (var secondOrder in _orders) { var orderMatches = (orderTemp.OrderDate == secondOrder.OrderDate && orderTemp.Id == secondOrder.Id && orderTemp.CategoryId == secondOrder.CategoryId); if (orderMatches) { orderTemp.ProductCount += secondOrder.ProductCount; _alreadyAddedOrders.Add(secondOrder.OrderDate.ToString() + secondOrder.Id.ToString() + secondOrder.CategoryId.ToString()); } } if(!_alreadyAddedOrders.Contains(orderTemp.OrderDate.ToString() + orderTemp.Id.ToString() + orderTemp.CategoryId.ToString())) _orders.Add(orderTemp); } return _orders.ToArray(); } public class Order { public int Id; public int CategoryId; public int OrderDate; public int ProductCount; }
{ "domain": "codereview.stackexchange", "id": 31705, "lm_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 }
java public void testForEachWithSearchFilter() { searchableSortable.addSearchCriteria(new OnlyEvenNumbersSearchFilter()); checkForEach(new SearchableSortable.OnEachHandler<Integer>() { @Override public void onEach(Integer each, boolean meetsCriteria) { assertEquals(array[index], each); assertEquals(evenNumber(each), meetsCriteria); } }); } private static class OnlyEvenNumbersSearchFilter implements SearchableSortable.SearchCriteria<Integer> { @Override public boolean meetCriteria(Integer number) { return evenNumber(number); } } private static boolean evenNumber(Integer number) { return number % 2 == 0; }
{ "domain": "codereview.stackexchange", "id": 5738, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java", "url": null }
ros, openi-tracker, archlinux, openni-camera from /usr/local/opt/ros/geometry/eigen/include/Eigen/StdVector:29, from /usr/local/opt/ros/perception_pcl/pcl/include/pcl/pcl_base.h:41, from /usr/local/opt/ros/perception_pcl/pcl/include/pcl/sample_consensus/sac_model.h:45, from /usr/local/opt/ros/perception_pcl/pcl/include/pcl/sample_consensus/sac_model_cylinder.h:41, from /usr/local/opt/ros/perception_pcl/pcl/src/pcl/sample_consensus/sac_model_cylinder.cpp:38: /usr/local/opt/ros/geometry/eigen/include/Eigen/src/Core/products/Parallelizer.h: In function ‘void Eigen::internal::manage_multi_threading(Eigen::Action, int*)’: /usr/local/opt/ros/geometry/eigen/include/Eigen/src/Core/products/Parallelizer.h:33:14: warning: variable ‘m_maxThreads’ set but not used [-Wunused-but-set-variable] In file included from /usr/local/opt/ros/geometry/eigen/include/Eigen/src/StlSupport/StdVector.h:29:0,
{ "domain": "robotics.stackexchange", "id": 6090, "lm_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, openi-tracker, archlinux, openni-camera", "url": null }
mathematics, template, generics, ada The codes comprise of three parts: the main file diff.adb, the Euler procedure specification euler.ads and its body euler.adb. Sample results are given afterwards. Ada is robust in defining data in that which data type is more appropriate and since it's my first time with the access type and generics, I would like to know how the codes can be made better for example with the naming conventions and the data types used. The main file diff.adb with Ada.Numerics.Generic_Elementary_Functions; use Ada.Numerics; with Ada.Text_IO; use Ada.Text_IO; with Euler;
{ "domain": "codereview.stackexchange", "id": 44534, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mathematics, template, generics, ada", "url": null }
javascript Either way is perfectly acceptable, so it's pretty much up to you. You've got two dependent conditionals, so returning early is a good way to avoid a ton of indentation and nesting. However, if the return value "changes" when the function returns early, and you don't otherwise declare variables at the top, I'd skip declaring customerIds there too. If the idea is to declare the thing you'll return, but then you don't return that specific object anyway, it's misdirection. Though again, this is really on the margins of "does it matter?" because you're always returning an array, so it's not like the var declaration is totally false.
{ "domain": "codereview.stackexchange", "id": 8344, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript", "url": null }
nomenclature, ions, hydrocarbons Bachrach uses the construction -enyl anion/cation to name these species, which seems sensible to me. However, I also vaguely recall seeing generalized use of the -ide and -ium suffixes for singly charged anions and cations. For example, I know that $\ce{NO+}$ is nitrosonium, but I seem to be recalling incorrectly that $\ce{NO-}$ is nitroxide. $($The NIST Webbook page only calls $\ce{NO-}$ the nitric oxide anion, and the Wikipedia article on nitroxide-mediated radical polymerization is discussing radical alkyl N-oxides $(\ce{R2NO^\bullet})$, not $\ce{NO-}$.$)$ On the other hand, $\ce{R3CO-}$ ions are unequivocally alkoxides. So: What are the systematic IUPAC names for these compounds? Anions
{ "domain": "chemistry.stackexchange", "id": 8495, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nomenclature, ions, hydrocarbons", "url": null }
python, parsing, csv, pandas, email 48,1,Do It To It,/track?id=57467910,https://open.spotify.com/track/20on25jryn53hWghthWWW3,"ACRAZE, Cherish",Do It To It,"Thrive Music, LLC","Aug 20, 2021",10747,11,"Dec 31, 2021",-0.43,157,QZFPL2100100 49,1,KELZ GARAGE (feat. Lomez Brown),/track?id=68066178,https://open.spotify.com/track/61Mo1EqfJ42Ww3BhO3nvCT,"SWIDT, Lomez Brown",312 DAY,Universal Music New Zealand & Australia (Distribution),"Dec 02, 2021",10705,49,"Apr 01, 2022",0.14,53,NZWD02100003 50,2,Levitating (feat. DaBaby),/track?id=31526926,https://open.spotify.com/track/5nujrmhLynf4yMoMtj8AQF,"Dua Lipa, DaBaby",Future Nostalgia,Warner Records,"Mar 27, 2020",10638,5,"Jan 02, 2021",-0.29,517,GBAHT2000942 51,0,Takeover,/track?id=26810154,https://open.spotify.com/track/7ArG7cEuyvTNXDwW7stm85,"Lee Mvtthews, NÜ",Bones,Lee Mvtthews,"Nov 01, 2019",10484,23,"Feb 25, 2022",-1.14,345,NZAM01902823
{ "domain": "codereview.stackexchange", "id": 43147, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, parsing, csv, pandas, email", "url": null }
rust What's happening here? In the first line, self.calculation is a function type that takes as input a ParamType (NOT a reference). So it needs to take ownership. So, we've already given away our value after the first line! We still need it around, so instead of giving it away, we should make a clone. Similarly, the second line needs ownership in order to insert the parameter arg into the cache self.values. So we need two .clone() calls to please the compiler: let result = (self.calculation)(arg.clone()); self.values.insert(arg.clone(), result); self.values.get(&arg).unwrap()
{ "domain": "codereview.stackexchange", "id": 42626, "lm_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", "url": null }
java, optimization, coordinate-system if((leftDown.getY() == rightDown.getY()) && probableRightUp.existsIn(points)) { rectangleCount++; } } } } } return rectangleCount; } I also have a custom Point class that implements Comparable<Point>. Point overrides compareTo() method like following @Override public int compareTo(Point p) { if(Integer.compare(this.getX(),p.getX()) == 0) { return Integer.compare(this.getY(), p.getY()); } return Integer.compare(this.getX(),p.getX()); }
{ "domain": "codereview.stackexchange", "id": 4593, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, optimization, coordinate-system", "url": null }
# Can a bounded function be written as the sum of a nondecreasing and non increasing function? Consider a bounded function $f:[0,1]\to\Bbb R$. 1. Can $f$ be written as the sum of a non-decreasing and non-increasing function? 2. What if $f \in C^1[0, 1]$? Can it be written as the sum of a non-decreasing and non-increasing function?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587229064297, "lm_q1q2_score": 0.8209687872423178, "lm_q2_score": 0.8311430394931456, "openwebmath_perplexity": 58.847212064034025, "openwebmath_score": 0.9847226142883301, "tags": null, "url": "https://math.stackexchange.com/questions/1554052/can-a-bounded-function-be-written-as-the-sum-of-a-nondecreasing-and-non-increasi" }
Problem: Let $\displaystyle x_n = 1 + \frac{1}{2} + \frac{1}{3} + ... + \frac{1}{n} - \ln(n)$ where $\displaystyle n = 1,2,3,...$ Prove that the sequence $\displaystyle {x_n}$ converges. Hint: Show, first, that $\displaystyle x > \ln(1+x)$ for any $\displaystyle x > 0$. Then show that the sequence $\displaystyle {x_n}$ decreases and $\displaystyle x_{n+1} - x_n < \frac{1}{2(n+1)^2}$. Use the theorem about the convergence and divergence of p-series to complete the proof. So here is what I have following the hint from above, but I have some blanks that I don't know how to fill in, and I am not sure if this is a good proof?
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9843363531263362, "lm_q1q2_score": 0.8159546014681165, "lm_q2_score": 0.828938806208442, "openwebmath_perplexity": 208.99076706309833, "openwebmath_score": 0.9970565438270569, "tags": null, "url": "http://mathhelpforum.com/calculus/222527-prove-x-ln-1-x-all-x-0-a.html" }
homework-and-exercises, newtonian-mechanics, newtonian-gravity, projectile, approximations Starting from $$F = \frac{GMm}{(R+h)^2}$$ for the projectile at height $h$, we can rearrange this as $$F = \frac{GMm}{R^2}\frac{1}{(1+\frac{h}{R})^2}$$ When $h\ll R$ we can use a first order Taylor expansion to write $$F = \frac{GMm}{R^2}\left(1-\frac{2h}{R}\right)$$ Finally, we can write $\frac{GM}{R^2}=g$ to obtain the desired result: $$F = mg\left(1 - \frac{2h}{R}\right)$$ The last term in that expression is the first order correction you were asking for.
{ "domain": "physics.stackexchange", "id": 21262, "lm_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, newtonian-gravity, projectile, approximations", "url": null }
I would appreciate it if people could please take the time to clarify this. • $\lvert \lvert \sin(x) \rvert \rvert = \sqrt{\langle \sin(x), \sin(x) \rangle} = \sqrt{\frac{\pi}{2}}$. So in order to make an orthonormal basis from this orthogonal basis, we devide by the length, – Tim Dikland Jul 3 '18 at 10:09 • @TimDikland You mean $||\sin(x) ||$? – The Pointer Jul 3 '18 at 10:11 • Exactly, editted. – Tim Dikland Jul 3 '18 at 10:11 • Whenever you require an orthogonal basis to be ortonormal, just divide each vecotr by its norm. It remains an orthogonal basis (because of the properties of the inner product), but the norm of each vector is 1. – LuxGiammi Jul 3 '18 at 10:15 • Is that a typo in your example where you are using the integral over $[0,1]$ to define the inner product? If not, that changes things. – Disintegrating By Parts Jul 5 '18 at 3:07
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9875683502444728, "lm_q1q2_score": 0.8851094851806627, "lm_q2_score": 0.8962513682840825, "openwebmath_perplexity": 350.798848385106, "openwebmath_score": 0.942592203617096, "tags": null, "url": "https://math.stackexchange.com/questions/2839456/finding-orthonormal-basis-from-orthogonal-basis" }
ros, gazebo, p2os NODES / gazebo (gazebo/gazebo) spawn_pioneer (gazebo/spawn_model) robot_state_publisher (robot_state_publisher/state_publisher) pr2_mechanism_diagnostics (pr2_mechanism_diagnostics/pr2_mechanism_diagnostics) diffdrive (gazebo_plugins/gazebo_ros_diffdrive) ROS_MASTER_URI=http://localhost:11311 core service [/rosout] found process[gazebo-1]: started with pid [10745] process[spawn_pioneer-2]: started with pid [10746] process[robot_state_publisher-3]: started with pid [10747] process[pr2_mechanism_diagnostics-4]: started with pid [10748] Gazebo multi-robot simulator, version 0.10.0 Part of the Player/Stage Project [http://playerstage.sourceforge.net]. Copyright (C) 2003 Nate Koenig, Andrew Howard, and contributors. Released under the GNU General Public License.
{ "domain": "robotics.stackexchange", "id": 8592, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, gazebo, p2os", "url": null }
navigation, ros-kinetic, machines, stack, multiple btw i does make no change where the master runs I think my time is completely messed up. anyone an idea how to fix that? thanks you so much! Originally posted by lorenznew on ROS Answers with karma: 123 on 2018-07-27 Post score: 1 Original comments Comment by gvdhoorn on 2018-07-27: First thing to check: are the clocks between all involved machines in-sync? If they are not, you'll run into the issues you describe. See #q11570. Comment by lorenznew on 2018-07-27: thanks for the hint! I try that: ros@ros-ThinkPad-T410:~$ ntpdate -q ros-robot and got: server 10.42.0.1, stratum 0, offset 0.000000, delay 0.00000 27 Jul 13:35:32 ntpdate[1719]: no server suitable for synchronization found so i think the machines are in sync, right? Comment by gvdhoorn on 2018-07-27:\ so i think the machines are in sync, right? No, I don't think so: ntpdate[1719]: no server suitable for synchronization found
{ "domain": "robotics.stackexchange", "id": 31382, "lm_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, ros-kinetic, machines, stack, multiple", "url": null }
php, mysqli Title: Entering users into a MySQLi database This is a form that I want to use to enter users into a database. I used MySQLi with prepared statements. I want to make sure that I sanitized my data well. <?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ require_once './db_con.php'; $id = ''; $firstname = trim(filter_input(INPUT_POST, 'firstname', FILTER_SANITIZE_FULL_SPECIAL_CHARS)); $lastname = trim(filter_input(INPUT_POST, 'lastname', FILTER_SANITIZE_FULL_SPECIAL_CHARS)); $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_EMAIL); //$val_email = trim(filter_var($email, FILTER_VALIDATE_EMAIL)); $password = trim(filter_input(INPUT_POST, 'password', FILTER_SANITIZE_FULL_SPECIAL_CHARS)); $password2 = trim(filter_input(INPUT_POST, 'password2', FILTER_SANITIZE_FULL_SPECIAL_CHARS)); $errs = array(); #firstname if ( empty($firstname) ) {
{ "domain": "codereview.stackexchange", "id": 31104, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, mysqli", "url": null }
ros, gazebo, collision Title: How to create soft objects (wheel tires) in gazebo? Hello, I am currently trying to model a wheeled robot (pioneer3at) in Gazebo. The problem I face is that it strangely bounces of its wheels whenever it gets an impulse. So I thought the problem might be that the wheels are too hard and do not absorb any energy. http://gazebosim.org/wiki/Tutorials/1.9/Using_A_URDF_In_Gazebo#The_.3Cgazebo.3E_Element Following the link above I added a kp-tag to the according gazebo-tag in my URDF, but whatever value I use, it just causes the wheel to be ignored completely for collisions. (It will just fall through the floor) What is the correct way to describe collision properties in Gazebo? Update: I now had a closer look at the Husky-Bot, which seems quite similar to the Pioneer. In Gazebo, it shows none of the mentioned problems. The definition of the Husky-Wheels seems pretty similar to what I did: <gazebo reference="${fb}_${lr}_wheel"> <mu1 value="1.0"/> <mu2 value="1.0"/>
{ "domain": "robotics.stackexchange", "id": 17594, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, gazebo, collision", "url": null }
I don't really have any others like this one. The reason is the only courses I have taught were Calculus, and this was intended as a review sheet for incoming freshman who were taking my class. I do have problem-solving stickies in the Other Topics and Advanced Applied Math forums. That's about it. Chris L T521 has a very good DE's tutorial, and there's already a LaTeX tutorial and a Calculus tutorial. There's even something in the pre-algebra and algebra forum as well as the linear and abstract algebra forum. So that's most of the forums that I pay the most attention to that even admit of such a document. • April 2nd 2012, 02:35 PM Ashz Re: Trigonometry to Memorize, and Trigonometry to Derive I had an identities quiz, and I used your sheet to help with memorizing the formulas. Thanks a ton! Any pointers on memorizing the unit circle :9 • June 30th 2012, 09:33 PM godfreysown Re: Trigonometry to Memorize, and Trigonometry to Derive
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9669140235181257, "lm_q1q2_score": 0.8365972972491947, "lm_q2_score": 0.8652240808393984, "openwebmath_perplexity": 1507.4322546210476, "openwebmath_score": 0.6083008050918579, "tags": null, "url": "http://mathhelpforum.com/trigonometry/185935-trigonometry-memorize-trigonometry-derive-print.html" }
function and let's start by looking at 3 examples of quadratic functions which are polynomials and my 3 examples, remember the graph of a quadratic is a parabola and these 3 examples show one of the things about polynomial functions the zeros you can have two real zeros for a quadratic function, one real zero or none. This is just one example problem to show solving quadratic equations by factoring. Calculate Sum of Natural Numbers. To do this, plug in the relevant values to find x, then substitute the values for a and b to get the x-value. These are all quadratic equations in disguise: A quadratic function can be graphed using a table of values. The zeros of the function y = f(x) are the solutions to the equation f(x) = 0.Because y = 0 at these solutions, these zeros (solutions) are really just the x-coordinates of the x-intercepts of the graph of y = f(x). The graph of a quadratic function is a parabola. The zeros hold meaning in real-world situations. So I know i have to have two
{ "domain": "snowfestival.se", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846710189288, "lm_q1q2_score": 0.8276571132270418, "lm_q2_score": 0.8459424373085146, "openwebmath_perplexity": 574.709837919424, "openwebmath_score": 0.4833552837371826, "tags": null, "url": "https://snowfestival.se/sa8m2bed/page.php?tag=how-to-find-the-zeros-of-a-quadratic-function-calculator" }
c, strings //just to test if it works int main(void) { char str[] = "Hello World!"; printf("How many words? = %i\n", word_counter(str)); return 0; } isspace There are other characters besides for spaces. What happens if I do: Hello<tab><tab>world! Your code will report that there is one word. I would rewrite these: if(*string==' '){ //get previous character string--; // If previous character is not a space we increase the count // Otherwise we dont since we already counted a word if(*string!=' '){ count++; }
{ "domain": "codereview.stackexchange", "id": 24980, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c, strings", "url": null }
infinite-impulse-response Title: What would be the right interpretation of this IIR block diagram? Will this block diagram always produce on the top-right arrow the following difference equation? $y[n]=x[n]+y[n-1]*(-2r)+y[n-2]*(-r^{2})$ Or by the contrary, it can produce also the following? $y[n]=(x[n]+y[n-1]*(-2r)+y[n-2]*(-r^{2})) + (y[n-3]*(-2*r)+y[n-4]*(-r^{2})) + (y[n-5]*(-2*r)+y[n-6]*(-r^{2})) + ...$ And so on and so on, up to predefined limit of recursion level. It's the upper equation. It is indeed a recursive filter but the recursion is already build into the difference equation through $y[n-1]$ and $y[n-2]$
{ "domain": "dsp.stackexchange", "id": 10914, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "infinite-impulse-response", "url": null }
algorithms Another way to look at it is to check if the decoding process bears similarity with a generative model of the signal. This is the case for some string compression algorithms, where the compression process recovers something akin to a generative grammar of the string (Sequitur, factor oracles...). This is the case for LPC-based speech codecs in which the LP coefficients embed knowledge about the articulation, and the residual knowledge about prosody and voicing/unvoicing - the compressed stream can be seen as data for a speech synthesizer. But this is not the case for general purpose audio codecs like the ones you mention - the decoder bears no similarities with the music production process.
{ "domain": "dsp.stackexchange", "id": 1710, "lm_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", "url": null }
quantum-mechanics, solid-state-physics As for absorption strength, the electrons and holes are more localized in the quantum well, thus there's much higher overlap between electron and hole wavefunctions. Since this means that there's higher probability of finding both the electron and hole near the quantum well, probability of recombination increases. Absorption is the reverse of recombination, so its probability is also increased.
{ "domain": "physics.stackexchange", "id": 38848, "lm_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, solid-state-physics", "url": null }
for {eq}f(x) = x^4 - 2x^2 + 3 {/eq}. The test for extrema uses critical numbers to state that:. Subsection 10. Find the second derivative of the function. First Derivative Test. These will come from the values that make our derivative zero or where the derivative does not exist. For a point moving in a straight line, the second derivative characterizes its acceleration. For more about how to use the Derivative Calculator, go to "Help" or take. and the partial derivative with respect to x then y is =0. Similarly for minimum. Learn how to find the extrema of a function using the second derivative test. Notes: In many books, the term “relative minimum” is used instead of “local minimum. (-/2 Points] DETAILS LARCALC9 3. Finding extrema Single-variable functions. Find the critical numbers of " " Page 16 of 24. The “trick” is to differentiate as normal and every time you differentiate a y you tack on a y ¢ (from the chain rule). Example 2: Find the relative extrema for 𝑓(𝑥)=−3𝑥5+5𝑥3using the
{ "domain": "brouwerverkeersopleidingen.nl", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9916842195563768, "lm_q1q2_score": 0.8198370424180074, "lm_q2_score": 0.8267117962054049, "openwebmath_perplexity": 259.82261796467463, "openwebmath_score": 0.7462790012359619, "tags": null, "url": "http://brouwerverkeersopleidingen.nl/how-to-find-relative-extrema-using-second-derivative-test.html" }
electromagnetism, magnetic-fields, measurements, electromagnetic-induction I am running the solenoid at much higher frequencies (up to 20 MHz) and with a lot more power. I would like to know if I can assume that a coil set up for measurement has a linear relationship with field strength. The Hall sensor has a defined range for linear operation. I do not think this is the case for a measurement coil but I am not sure and would like to confirm. And to ask whether the frequency of the magnetic field is something that needs to be factored in as well for my measurement? Also, when trying to measure lower strength fields with the loops my output signal is very noisy. Why is this, and would it be improved with increased number of turns? Any help, advice or tips would be appreciated. This is an electrical engineering question. I think there are forums for asking such questions. Anyway, I will try to answer as I happen to also be an electrical engineer.
{ "domain": "physics.stackexchange", "id": 51536, "lm_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, measurements, electromagnetic-induction", "url": null }
c++, networking, library Title: Networking library for c++ linux #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <string.h> #include <unistd.h>
{ "domain": "codereview.stackexchange", "id": 39538, "lm_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++, networking, library", "url": null }
2. Centrally project $$\mathbb{R}^d$$ onto a half $$S^d$$ (tangent to it). Complete the semisphere to a sphere by central symmetry. Then the hyperplanes become great circles, the $$B_{d,n}$$ bounded regions in $$\mathbb{R}^d$$ become $$2B_{d,n}$$ regions in $$S^d$$ and the $$U_{d,n}$$ unbounded ones become $$U_{d,n}$$ regions stretching across the suture line (equator) of the sphere. Again by unicity 2. follows.
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9919380082333994, "lm_q1q2_score": 0.875313727992389, "lm_q2_score": 0.8824278540866547, "openwebmath_perplexity": 183.98777061291324, "openwebmath_score": 0.7762052416801453, "tags": null, "url": "https://mathoverflow.net/questions/353042/number-of-regions-formed-by-n-points-in-general-position" }
quantum-mechanics, quantum-spin, lie-algebra, phase-space, wigner-transform Yes, indeed, absolutely, this G is symmetric w.r.t. the three elements in the exponent, and obeys the same combinatoric logic as Weyl ordering, for the same reasons. It is a function of x,y and z. For instance, look at the term cubic in such parameters, $$ \langle (x\hat L_x +y\hat L_y +z \hat L_z) ^3\rangle. $$ it is manifestly symmetric, and enforces/defines what you analogize to Weyl ordering. For example, isolate the term proportional to xyz. It is necessarily symmetric in the three $\hat L$s. So your "naive" expectation is correct and unique! This property holds for arbitrary operators in the exponent. For the Spin operators you considered, the trilinear happens to vanish in the spin 1/2 and 1 representation. It doesn't seem to do that in higher spin reps...
{ "domain": "physics.stackexchange", "id": 96327, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, quantum-spin, lie-algebra, phase-space, wigner-transform", "url": null }
urdf, xacro, ros-kinetic These errors get the launch of the launch file: [ERROR] [1585602978.236429024]: radius [] is not a valid float] [ERROR] [1585602978.237213943]: Could not parse visual element for Link [base_link] but RVIZ, it works and shows the model without errors this is my code : <?xml version="1.0"?> <robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="pan_tilt"> <xacro:property name="base_link_length" value="1" /> <xacro:property name="base_link_radius" value="2" /> <xacro:property name="pan_link_length" value="2" /> <xacro:property name="pan_link_radius" value="1"/> <xacro:property name="tilt_link_length" value="2"/> <xacro:property name="tilt_link_radius" value="1"/> <xacro:macro name="inertial_matrix" params="mass"> <inertial> <mass value="${mass}" /> <inertia ixx="0.5" ixy="0.0" ixz="0.0" iyy="0.5" iyz="0.0" izz="0.5" /> </inertial> </xacro:macro>
{ "domain": "robotics.stackexchange", "id": 34664, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "urdf, xacro, ros-kinetic", "url": null }
quantum-mechanics, quantum-interpretations So this is a straw-man, because nobody ever argued that hidden-variable ensembles of different states ought to overlap. But, it's not a manifestly ridiculous straw-man. At least, I can't think of any much simpler way to prove that claim. (Admittedly, I do not waste my time thinking about hidden-variables theories.) I can imagine that someone who was constructing a new nonlocal-hidden-variables quantum theory might like to know that the hidden-variable-ensembles should not overlap.
{ "domain": "physics.stackexchange", "id": 1926, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, quantum-interpretations", "url": null }
quantum-field-theory, string-theory, supersymmetry, renormalization, ads-cft It is believed that all conformal theories must have "some" Maldacena dual in the bulk although whether this dual obeys all the usual conditions of a "theory of quantum gravity" or even a "stringy vacuum" is unknown, especially because we can't even say what all these conditions are. The non-AdS/non-CFT correspondence would in principle work for all UV-complete theories but it's much less established and more phenomenological than the proper AdS/CFT correspondence that works with the exactly conformal theories only.
{ "domain": "physics.stackexchange", "id": 9550, "lm_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, string-theory, supersymmetry, renormalization, ads-cft", "url": null }
ecology, population-biology What does per lotus per year, and, per fruitfly per week imply? I will use an ever so slightly more specific scenario than what your book offers. At the beginning of 2017, there were twenty lotus plants in a pond. By the first day of 2018, eight of those twenty lotus plants reproduced. Using this information, we now want to describe the birth rate of lotus plant population. To do this, we need the number of plants that produced offspring, and, the population size at the beginning of 2017. $$\frac{no. \ of \ parent \ lotus \ plants}{initial \ population \ size} = \frac{8}{20} = .4$$ This means that, when considering the twenty lotus plants that first existed at the beginning of 2017, each of those twenty plants contributed an average of 4/10s of a lotus plant offspring for that year. To generalize this, we say, "a birth rate of .4 offspring per lotus plant per year." The same method and persective can also be applied to the fruitflies, however, they're considering death rate.
{ "domain": "biology.stackexchange", "id": 8152, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ecology, population-biology", "url": null }
determinism, biology Ultimately, to be more specific, I think this depends on your interpretation of quantum mechanics, and how reductionist you are. The best you can do with reconciling quantum mechanics with determinism is taking a particular (admittedly relatively popular) interpretation of quantum mechanics (the many-worlds interpretation) which is "deterministic" but not in the sense you were probably thinking of, or in a sense which is very useful.
{ "domain": "physics.stackexchange", "id": 33736, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "determinism, biology", "url": null }
navigation Yes, that will work. It just seems a little unesthetic from an efficiency point of view. My base controller node would have to subscribe to all possible sources of cmd_vel. Choosing between them would be easy, but it just seems messy to have all the unused messages running around. Maybe the inefficiency is negligible though. I haven't tried to measure it. Ultimately, I would like to be able to control the "unused" node sources so that they don't eat up throughput when I'm not using them. Perhaps it is possible to launch and close nodes programatically, but I haven't seen this anywhere. If it's not possible, it would be nice to have a control signal to each node that has been launched so that you could put it in a standby mode when it's cmd_vel output is not needed. Whoops, I missed Lorenz's comment just off my screen. That is what I could include in my "executive" node that I refer to. It does add more latency to the signal though. I'll probably do something like this though.
{ "domain": "robotics.stackexchange", "id": 9769, "lm_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", "url": null }
c#, beginner, sorting, playing-cards, shuffle Title: Deck of cards with shuffle and sort functionality Going through Head First C#'s Chapter 8: Enums and Collections, I learned about List<T>, as well as IComparable<T> and IComparer<T>. One exercise near the end asked to make a program to draw cards at random, then sort them. I wanted to go the extra mile and make a fully usable, realistic card deck (their solution just picked 5 values at random from 2 enums, which could result in drawing the same card twice). Any and all advice is welcome, albeit please understand that I have yet to learn LINQ in a coming chapter, so if you suggest to use it for something please at least explain why/advantages over vanilla C#. I'm not including the using statement, they are the default ones that Visual Studio adds when creating a C# console project. Kind enum Kind { Ace, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten, Jack, Queen, King, }
{ "domain": "codereview.stackexchange", "id": 44724, "lm_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, sorting, playing-cards, shuffle", "url": null }
homework-and-exercises, integration, differential-equations, radioactivity, calculus Your third equation: $$\frac{dy}{dt} + cx = kxe^{-kt}$$ makes little sense. It's a differential equation in three variables: $x$, $y$ and $t$.
{ "domain": "physics.stackexchange", "id": 67190, "lm_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, integration, differential-equations, radioactivity, calculus", "url": null }
homework-and-exercises, newtonian-mechanics, momentum, conservation-laws It's easy enough to solve with the law of conservation of linear momentum. But my question is why? How? Because as you move forward in the plane, there is no external force on the system. So it shouldn't effect the plane. p.s- I'm new to this concept and would be grateful for an in depth walkthrough. Edit:- The answer in the book says that it's supposed to be 4mm/s difference in velocity. No direction stated. Also, by looking at all of the answers you have given me, I think it's safe to say that there is no 'true' answer. Both interpretations are equally correct Approach 1: Consider the plane and the man as a single system. Since there are no external forces acting on them, the center of mass shouldn't accelerate. But if the man starts running to the right and the plane doesn't react to this, the center of mass would go to the right as well. So in order for the center of mass to stay where it is the plane that should accelerate in the opposite direction. Approach 2:
{ "domain": "physics.stackexchange", "id": 77798, "lm_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, momentum, conservation-laws", "url": null }
electrostatics, electric-fields Now, the Gaussian surface must take advantage of this symmetry we've identified. The choice of a horizontal cylinder does this as follows. The cylinder is constructed such that the rounded sides are parallel to $\mathbf{E}$, while the caps are perpendicular to $\mathbf{E}$. This heavily simplifies the flux through the whole cylindrical surface, which can just be written as the magnitude of $\mathbf{E}$ multiplied by the areas of the caps. $$\oint\mathbf{E}\cdot\mathbf{ds}=2EA$$ In fact, the surface does not need to be a cylinder. It could simply be a surface that has parallel sides and perpendicular caps. A vertical cylinder, on the other hand, would not take advantage of this symmetry. This is because $\mathbf{E}\cdot\mathbf{ds}$ would be different along the surface, and you would need to compute the surface integral without any simplifications. P.S. I have not indicated the $\mathbf{E}$ fields on the left side of the sheets out of convenience. They still exist.
{ "domain": "physics.stackexchange", "id": 78823, "lm_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", "url": null }
json, formatting, brainfuck This line confused me since it embeds code into a string that otherwise looks like a comment. You didn't state in your description that you intended to participate in the Underhanded Brainfuck Contest, and the rest of your code doesn't look that way. Or does it? That's hard to tell. Newline >>>>>>[>]>. Back to cell 2 [<]<[<]<<<<< I would have combined these two lines into a single line to keep the data pointer on cell 2 consistently, thereby making the comment in the second line redundant. As I already mentioned above, I would replace the first [<] with a simple <, to make it symmetric with the single > in the line above. I like the shortcut you took for skipping the string escapes, even if that means that the code does not mirror each syntactical rules of the JSON format on its own. The gain in code simplicity is worth more in this case. Overall, it's a really good example of careful program design, memory management, algorithms, design patterns and efficiency.
{ "domain": "codereview.stackexchange", "id": 37002, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "json, formatting, brainfuck", "url": null }
reference-request, approximation-algorithms, computational-geometry, clustering So we have \begin{align*} cost_2(\mathcal{P},c) = \sum_{i=1}^n \Vert p_i^{(c)} -c\Vert^2 \end{align*} For ease of notation, let $p_i^\star = p_i^{(c^\star)}$ and $\mu^\star = \mu^{(c^\star)}$. So \begin{align*} opt_2(\mathcal{P}) = \sum_{i=1}^n \Vert p_i^\star - c^\star\Vert^2 \end{align*} Note that if every set in $\mathcal{P}$ is singleton, then this is the well-known $k$-means objective and $c^\star = \mu^\star$. It is easy to show the following, for any $c\in \mathbb{R}^d$ \begin{align} cost(\mathcal{P},c) \leq opt(\mathcal{P}) + n\Vert c - \mu^{(c)}\Vert^2 \end{align}
{ "domain": "cstheory.stackexchange", "id": 5336, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reference-request, approximation-algorithms, computational-geometry, clustering", "url": null }
rviz, pointcloud, tf "map" to "odom" (static tf) "odom" to "drone" (dynamic tf) "drone" to "camera_link" (static tf) All of them were being published simultaneously at the same timestamps. I was able to see all the transformations correctly published on the topics /tf_static and /tf through the command ros2 topic echo <topic_name>
{ "domain": "robotics.stackexchange", "id": 38522, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rviz, pointcloud, tf", "url": null }
java, algorithm private boolean matchStrCheckBound() { //string bound check return strPosition <= strOutBound; } /** * Match and return result * * @return true if match */ public boolean match() { if (ptnOutBound > strOutBound) { return false; } while (state != State.END) { calcState(); eat(); } return matchFound; } /** * Match and return result * * @param pattern pattern * @param matchStr string to match * @return true if match * @throws IllegalArgumentException */ public static boolean match(String pattern, String matchStr) throws IllegalArgumentException { return new SimpleMatch(pattern, matchStr).match(); } } Unit Test: This code currently passes following jUnit Test Cases import org.junit.Assert; import org.junit.Test; /** * Unit Test for SimpleMatch * * @author Bhathiya */ public class SimpleMatchTest {
{ "domain": "codereview.stackexchange", "id": 8884, "lm_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, algorithm", "url": null }
noise, power-spectral-density, snr You are likely doing an experiment where you are trying to estimate the presence of a specific signal, in the presence of noise, and ultimately will need to determine the best observation time in which to maximize your SNR (and therefore the accuracy of your estimate). Phase noise as your first measurement gave is a great indication of this as it is typically (if not always) NOT stationary over long durations, (and therefore for very long duration the typical power spectral density measurement is not valid). A much better measurement you can make that will allow you to optimize your estimation duration is the Allan Variance (also known as a two-sample Variance) since that will indicate the duration of time in which you can use an assumption of stationarity, and will then give you the averaging time that will maximize your SNR.
{ "domain": "dsp.stackexchange", "id": 9337, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "noise, power-spectral-density, snr", "url": null }
ros, points, array, pointcloud Title: Push_back doesn't work hi everyone, i'm writing a node that could save 3 coordinate and then add a point to a pointcloud. i'm trying to use pushback for the array of points in the cloud, this is the code: struct stru { float x,y,z; }; sensor_msgs::PointCloud output; mypoints.x = input->pose.position.x; mypoints.y = input->pose.position.y; mypoints.z = input->pose.position.z; output.points.push_back(mypoints);
{ "domain": "robotics.stackexchange", "id": 20614, "lm_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, points, array, pointcloud", "url": null }
diffusion, gas Title: Colour composition of Bromine during diffusion? Consider the diffusion of Bromine Gas within a tube filled with air. After a prolonged period of time, is the colour composition uniform? From my understanding, Bromine is a denser gas. Hence, on average, the Bromine gas is more concentrated at the bottom of the flask. There is always diffusion, even against gravity, so I think the colour would be relatively uniform. However, the bottom of the tube would still be slightly darker. ( May not be noticeable ). I've read that the colour composition is entirely uniform. I can see where this comes from. I suspect we consider the particles to be too small to have any gravitational influence. However, if we were to have a longer tube would there be a slightly darker portion at the bottom of the tube? Do we consider the colour composition to be exactly uniform because the tube is too small to have any noticeable seperation of colour?
{ "domain": "chemistry.stackexchange", "id": 17451, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "diffusion, gas", "url": null }
cosmology, speed-of-light, space-expansion, physical-constants Title: Does the speed of light change? I know that there is a similar questions, but I think mine is a bit different. I wonder if with the expansion of the universe the speed of light changes. It seems that the speed of light is very connected to the space-time continuum, e.g. it follows all it's deformations etc. So if the space-time continuum expands, does the speed of light change? In general relativity we describe the geometry of spacetime using a function called the metric. This metric is derived from the distribution of matter - indeed solving Einstein's equations normally involves starting with some distribution of matter and solving the equations to calculate the metric.
{ "domain": "physics.stackexchange", "id": 28392, "lm_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, speed-of-light, space-expansion, physical-constants", "url": null }
quantum-computing, quantum-information, gr.group-theory, fourier-analysis, measure-theory I assume $f$ maps $g$ to it's irrep. So, if we take the case of $S_5$, assuming an automorphism group of a $5$-node graph is hidden inside $S_5$, $|G| = |S_5| = 120$. Both $|g\rangle$ and $|f(g)\rangle$ are $120$ element column vectors. So, when it is said that the second register is discarded what it actually means? Let's take the case of trapped ion qubits. When we say we discard the second register, does it mean that we will not do any unitary transformation or measurement on them anymore but they will always be there? In the Wikipedia page of Simon's problem the second register is measured.
{ "domain": "cstheory.stackexchange", "id": 3490, "lm_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-computing, quantum-information, gr.group-theory, fourier-analysis, measure-theory", "url": null }
nomenclature, stereochemistry, organosulfur-compounds P-93.3.4.1 The chirality symbols ‘R/S’. The stereodescriptors ‘R’ and ‘S’ (as defined in P-92.2) are used to indicate the absolute configuration of a trigonal pyramidal system discussed in P-93.3.3.2 (see Rule IR-9.3.4.3, ref. 12). A phantom atom of low priority, and not a pair of electrons, is used to create the tetrahedral configuration permitting the use of ‘R/S’ stereodescriptors in the manner described for tetrahedral stereogenic centers. As no locants are present, the name following the stereodescriptor is placed in parentheses, or bracket, according to the required nesting order. The examples given for this rule in the Blue Book include ethyl (R)-(4-nitrobenzene-1-sulfinate), which confirms that this rule is applicable to the similar compound methyl (S)-methanesulfinate, which is given in the question. Notably, an equivalent rule also exists in the current version of the current version of Nomenclature of Inorganic Chemistry – IUPAC Recommendations 2005 (Red Book).
{ "domain": "chemistry.stackexchange", "id": 6726, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nomenclature, stereochemistry, organosulfur-compounds", "url": null }
• BTW you use \pmod to write things like $x\equiv2\pmod3$ $x\equiv2\pmod3$ or $a^2\equiv b^2\pmod{11}$ $a^2\equiv b^2\pmod{11}$. I am not sure whether it was your intention to have all four congruences in the same row. You can make linebreaks using <br> or two spaces, see Markdown help. Feb 24, 2016 at 18:57 • Thank you - and no I didn't - thanks! Feb 24, 2016 at 18:59 • Kinda confused why you say the solution is $x \pmod{\operatorname{lcm}(3, 4, 5, 7)}$ since I just read that as $x \pmod{420}$... shouldn't there be a $394$ in there somewhere? – Ky - Feb 25, 2016 at 14:54
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9898303419461302, "lm_q1q2_score": 0.824849962983887, "lm_q2_score": 0.8333245891029456, "openwebmath_perplexity": 381.9215353169542, "openwebmath_score": 0.8697383403778076, "tags": null, "url": "https://math.stackexchange.com/questions/1670440/how-do-i-solve-the-system-of-congruences-x-equiv-1-pmod3-x-equiv-2-pmo/1670445" }
to estimate the value of a definite integral or the area under a curve. CiteSeerX - Document Details (Isaac Councill, Lee Giles, Pradeep Teregowda): Abstract. "The Trapezoidal and Parabolic Rules. trapezoid rule synonyms, trapezoid rule pronunciation, trapezoid rule translation, English dictionary definition of trapezoid rule. For example, the area of an irregular piece of land obtained by trapezoidal rule is just an approximate value and not the accurate value. I found a formula for it but don't know the proper syntax to enter it in. We look at a single interval and integrate by. Corrected. Where: a is the beggining of the interval, b is the end of the interval, n is the number of steps (number of trapezoids to use), f(x) is the function to integrate, m is the height of i-th trapezoid. ∠p + ∠s = 180°. We assume that the length of each subinterval is given by \ (Δx$$. Trapezium rule The trapezium rule is used to find the approximate area under a graph. Trapezoidal Rule is a rule that
{ "domain": "danieledivittorio.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232914907945, "lm_q1q2_score": 0.8035312333629373, "lm_q2_score": 0.817574471748733, "openwebmath_perplexity": 660.4936385685219, "openwebmath_score": 0.8180414438247681, "tags": null, "url": "http://danieledivittorio.it/jobz/trapezium-rule.html" }
ros ###Component Header #ifndef COMPOSITION__TEST_COMPONENT_HPP_ #define COMPOSITION__TEST_COMPONENT_HPP_ #include &lttest_pkg/visibility_control.h> #include &ltrclcpp/rclcpp.hpp> #include &ltstd_msgs/msg/float32.hpp> #include &ltstd_srvs/srv/set_bool.hpp> namespace test_composition { class Test : public rclcpp::Node { public: COMPOSITION_PUBLIC explicit Test(const std::string &test_ID, const rclcpp::NodeOptions &options); protected: void timer_callback(); void client_output(); private: rclcpp::Publisher::SharedPtr test_publisher; rclcpp::TimerBase::SharedPtr test_publisher_timer; size_t count_; std::string test_name; }; } #endif ###Component Code #include "test_pkg/test_component.hpp" #include &ltchrono> #include &ltmemory> #include &ltiostream> #include &ltutility>
{ "domain": "robotics.stackexchange", "id": 37577, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
rocks, remote-sensing, archaeology, ground-truth Together, #1, #2, and #3 tell us that it's probably early summer just after the river ice has broken up. The tooth-like features in the left image are simply erosional remnants sticking out of the riverbank. They could be bedrock (not likely), ice wedges, unmelted permafrost, or simply dirt. They are on the outside of a meander, so the river is actively cutting into them, and so the river-facing faces are quite sheer and high compared to the slopes in between. The right side might be white because the conditions there had left the snow unmelted when the image was taken. And of course their shadows are longer because the river channel is at the bottom of the bluff. If you use Google Maps or Earth to go downriver a bit (up and to the left), you will see similar features sticking out of the riverbank, but because they're at a different angle from the features in your image, the fact that they're natural is more readily apparent.
{ "domain": "earthscience.stackexchange", "id": 1128, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rocks, remote-sensing, archaeology, ground-truth", "url": null }
insert this line of code into our preamble. R and knitr do the rest. Using r makes it easy to update the report to refer to another function.. R Markdown will always However, there is some amount of learning required up front. The echo chunk option tells knitr whether you would like the code displayed above the output. keep_tex Save a copy of .tex file that contains knitr output X X latex_engine Engine to render latex, "pdflatex", "xelatex", ... embeds results and text into .md file with knitr 2. then converts the .md file into the finished format with pandoc Set a document’s default output format in the YAML header:--- To extract the R code from the original document I use the knitr::purl function. However, the figure position is not hold when fig_caption: yes is set in the yaml header.. How should I fix this problem? Sweave/TeX template for poster presentations. this book, \Sexpr{} told me.11. LaTeX + R, the researchers' saviours. knitr Reference Card Yihui Xie September 22, 2020 1
{ "domain": "hertzsystems.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9324533051062238, "lm_q1q2_score": 0.8315721595300574, "lm_q2_score": 0.89181104831338, "openwebmath_perplexity": 3572.2158645082404, "openwebmath_score": 0.7495449781417847, "tags": null, "url": "https://sklep.hertzsystems.com/11n93/tlrb4/viewtopic.php?id=033317-knitr-results-tex" }
pitch, zero-padding Title: recognizing frames as voiced/unvoiced/silence i have to implement a function in matlab,for labeling silenced,voiced and unvoiced frames in signal. I mean i want to specify each frame as a voiced or unvoiced or silenced frame by using pitch frequency and zero processing rate and energy. how can i calculate pitch frequency? where should i start from? Thanks I think that when you said "zero processing rate" you meant "zero crossing rate", are a lot of way to find the pitch frequency, autocorrelation based methods is one choice, if your signal is always monophonic you can try AMDF (Average Magnitude Difference Function), AMDF is calculated by the difference between the waveform summing a lagged version of itself, I like to use AMDF, work fine in monophonic signals, this can be defined as: $$AMDF(m)=\sum_{i=0}^{n-1-m}|x(i) - x(i+m)|$$ Where: x=your signal n=length(x)-1 i = 0 ... n m = time lag block size
{ "domain": "dsp.stackexchange", "id": 1359, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pitch, zero-padding", "url": null }
How can I proceed? • I think you have made a typo in your question - let $Q$ approach $B$ and $P$ approach $C$. Then the limit of $BQ$ and $CP$ is 0, and the limit of $PQ$ is $l$ (draw it out!). Therefore I think the inequality should be $|BQ| + |PQ| + |CP| > l$. – Toby Mak Jun 24 '17 at 23:56 • That's true, but if you let $Q$ and $P$ approach $A$, the sum approaches $|AB|+|AC|$. – J. C. Jun 25 '17 at 0:08 • But that is the more inefficient case - the case should hold for any $P$ and $Q$, not just one example that you have described. – Toby Mak Jun 25 '17 at 0:23 • Now I realized you might have mislabeled your sketch; actually $Q$ approaches $C$, not $B$, and the inverse for $P$. – J. C. Jun 25 '17 at 0:38 • If $P$ and $Q$ are the midpoints then the statement is trivial. If either $P$ or $Q$ are far from $A$ (by far I mean farther than midway) the result follows by the first case. So you are left only with the case when both $P$ and $Q$ are close to $A$. – user 1987 Jun 25 '17 at 0:43
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307653134903, "lm_q1q2_score": 0.8469437987399386, "lm_q2_score": 0.8705972600147106, "openwebmath_perplexity": 166.31367642766904, "openwebmath_score": 0.8715707063674927, "tags": null, "url": "https://math.stackexchange.com/questions/2335223/in-an-equilateral-triangle-prove-that-bq-pq-cp-2l" }
special-relativity, spacetime, inertial-frames, coordinate-systems, lorentz-symmetry 0 & 0 & \hphantom{-} 1 \vphantom{\dfrac{\dfrac{}{}}{\tfrac{}{}}} \end{bmatrix} \tag{18} \end{equation} But \begin{equation} \left(\dfrac{\cosh\!\zeta\!+\!\cosh\!\xi}{1\!+\!\cosh\!\zeta\cosh\!\xi}\right)^{2}+\left(\dfrac{\sinh\!\zeta\sinh\!\xi}{1\!+\!\cosh\!\zeta\cosh\!\xi}\right)^{2}=1 \tag{19} \end{equation} so we can define \begin{equation} \cos\phi \stackrel{def}{\equiv}\dfrac{\cosh\!\zeta\!+\!\cosh\!\xi}{1\!+\!\cosh\!\zeta\cosh\!\xi}\,, \qquad \sin\phi =\dfrac{\sinh\!\zeta\sinh\!\xi}{1\!+\!\cosh\!\zeta\cosh\!\xi}\,, \qquad \phi \in \left(-\tfrac{\pi}{2},+\tfrac{\pi}{2}\right) \tag{20} \end{equation} and finally \begin{equation} \mathrm{R}= \begin{bmatrix} \cos\phi & -\sin\phi & 0 \\ \sin\phi &\hphantom{-}\cos\phi & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} \tag{21} \end{equation} proving that $\:\mathrm{R}\:$ is a rotation, see Figure 03.
{ "domain": "physics.stackexchange", "id": 43606, "lm_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, inertial-frames, coordinate-systems, lorentz-symmetry", "url": null }
algorithms, sorting Why $O$-Notation? Discarding constants in analysis of algorithms is done for one main reason: If I am interested in exact running times, I need (relative) costs of all involved basic operations (even still ignoring caching issues, pipelining in modern processors ...). Mathematical analysis can count how often each instruction is executed, but running times of single instructions depend on processor details, e.g. whether a 32-bit integer multiplication takes as much time as addition. There are two ways out:
{ "domain": "cs.stackexchange", "id": 16671, "lm_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, sorting", "url": null }