text
stringlengths
49
10.4k
source
dict
Hence, if we eliminate at most $13$ sets of $2$ numbers, then each difference of the $2$ numbers from the remaining $105-13=92$ is distinct. However, the difference of $2$ numbers is either $1,2,\cdots, 88,89(=99-10)$, which is a contradiction. QED Added : Byron Schmuland and Ross Millikan independently show eleven 2-digit numbers so that every pair has a different sum. So, we now know that the minimum $n_{\text{min}}$ of $n$ has to satisfy $\color{red}{12\le n_{\text{min}}\le 15}$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9888419674366167, "lm_q1q2_score": 0.8303641946654761, "lm_q2_score": 0.8397339736884712, "openwebmath_perplexity": 147.35658847573524, "openwebmath_score": 0.8501081466674805, "tags": null, "url": "https://math.stackexchange.com/questions/1480164/for-any-18-distinct-two-digit-numbers-are-there-four-distinct-numbers-a-b-c" }
meteorology, atmosphere-modelling, weather-forecasting, climate-models Title: Interpolate Gaussian grids to regular fixed grids using bilinear interpolation? I want to regrid GCM data available on Gaussian grids to regular grids, say at 1 deg X 1 deg. How to do this using CDO or Python or MATLAB. Edit 1: Data format is netcdf. climate data operators (CDO) define grid We define a lat-lon target grid with 1°x1° grid cell size 30x30 grid cells starting at 40°N and -10°E (=10°W): gridtype = lonlat xsize = 30 ysize = 30 xfirst = -10 xinc = 1 yfirst = 40 yinc = 1 This text is written into a text file. See section 1.3.2 CDO Manual for details and further examples. If you already have a netCDF file which has data on your target grid, you can also extract the grid definition from that file: cdo griddes FILE_WITH_TARGET_GRID.nc > myGridDef myGridDef is a text file. interpolate data I assume that we do a bilinear interpolation. This is done with the remapbil operator via: cdo remapbil,myGridDef INPUT_FILE.nc OUTPUT_FILE.nc
{ "domain": "earthscience.stackexchange", "id": 1522, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "meteorology, atmosphere-modelling, weather-forecasting, climate-models", "url": null }
licensure Title: Do references for the California PE application have to be California PE's? Here is the link to the current CA PE Exam application: http://www.bpelsg.ca.gov/pubs/forms/ceapp.pdf Page 2, which is the list of engagements/references, states: For each engagement claimed as qualifying experience, list the name of the person who will serve as your reference. Individuals serving as references must be licensed as Professional Engineers in California in the discipline of licensure for which you are applying or legally exempt from licensure. Individuals serving as references must have been appropriately licensed, or exempt from licensure, during the period of the engagement. YOU MUST LIST A MINIMUM OF FOUR REFERENCES. At least one of the applicants licensed references must be from someone who is or was in a supervisory capacity over the applicant, for each engagement for which the applicant desires credit. References must be from individual legally authorized to practice civil engineering in the state or country where the projects are located. This statement is very confusing. First it says: Individuals serving as references must be licensed as Professional Engineers in California in the discipline of licensure for which you are applying or legally exempt from licensure. Then later on it says: References must be from individual legally authorized to practice civil engineering in the state or country where the projects are located. So, which is it: do the references have to be CA PE's, or not? Can someone tell me for sure? The California FAQ (see page 41 of the PDF) does a better job of explaining this. In general, civil engineer applicants are required to provide references from licensed civil engineers or from persons otherwise authorized to practice civil engineering. ... [A]ll civil engineer applicants verifying California work experience must provide references from persons who are licensed as civil engineers in California. ... If a civil engineer applicant has had qualifying work experience outside of the United States, the references for that experience must be from persons authorized to practice civil engineering in accordance with the laws of the country in which the experience took place. ... For civil engineering work experience which was gained in California or any other place where such work is required to be under the jurisdiction of a licensed civil engineer, at least one of the applicants licensed references must be from someone who is or was in a supervisory capacity over the applicant, for each engagement for which the applicant desires credit.
{ "domain": "engineering.stackexchange", "id": 282, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "licensure", "url": null }
cosmology Title: What is the difference between horizon distance and proper distance in cosmology Horizon distance, as i understand is the distance the photon has traveled from its point of emission. But what is the proper distance, as a terminology used in cosmology? The proper distance between two nearby observers is the distance (at the time it is being observed) that is measured with rulers. If you're familiar with relativity, the proper distance between two nearby events is the distance between them on a frame in which they happen at the same time. This is related with another useful definition of distance in cosmology: comoving distance. Which for two nearby observers is the proper distance measured at a given time multiplied by the ratio of the scale factor $a$ then to now. If the observers are separated by an arbitrary distance, then $$ {d}_{\rm comoving} = \frac{c}{H_0}\int_0^z\frac{{\rm d}z'}{E(z')} $$ with $$ E^2(z) = \Omega_{m,0}(1 + z)^3 + \Omega_{\gamma,0}(1 +z)^4 + \Omega_{\Lambda} $$
{ "domain": "physics.stackexchange", "id": 40939, "lm_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", "url": null }
quantum-field-theory, particle-physics, mass, dirac-equation, majorana-fermions There may be other ways to generate the Majorana mass terms for the left-handed neutrinos, too, including effects of sterile neutrinos and other fields. In some cases, one may be forced to go to loops. However, in all cases, it's important to realize that the Majorana mass term ultimately doesn't violate any symmetry or principle. At low energies, only the electromagnetic $U(1)$ is conserved, along with the QCD $SU(3)$, and the neutrino mass term doesn't violate either because the left-handed neutrino is electrically and color-neutral.
{ "domain": "physics.stackexchange", "id": 12173, "lm_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, particle-physics, mass, dirac-equation, majorana-fermions", "url": null }
homework-and-exercises, string-theory, conformal-field-theory, commutator, lie-algebra Title: Virasoro modes commutation calculation Given the commutation relations: $$ [\alpha_m,\alpha_n]=m\delta_{m+n,0} $$ and $$ L_m=\frac{1}{2}\sum_\rho\alpha_{m+\rho}\alpha_{-\rho} $$ I am trying to calculate the commutator between $L_m$ and $L_n$ (the Witt algebra and the central extension) $$ [L_m,L_n] = (m-n)L_{m+n}+\frac{1}{12}m(m^2-1)\delta_{m+n,0} $$ Now when I substitute the relations I get the following $$ [L_m,L_n] = \frac{1}{4}\sum_\rho\sum_\lambda[\alpha_{m+\rho}\alpha_{-\rho},\alpha_{n+\lambda}\alpha_{-\lambda}]=\\ =\frac{1}{4}\sum_\rho\sum_\lambda\left(\alpha_{m+\rho}[\alpha_{-\rho},\alpha_{n+\lambda}]\alpha_{-\lambda}+[\alpha_{m+\rho},\alpha_{n+\lambda}]\alpha_{-\rho}\alpha_{-\lambda}+\alpha_{n+\lambda}\alpha_{m+\rho}[\alpha_{-\rho},\alpha_{-\lambda}]+\alpha_{n+\lambda}[\alpha_{m+\rho},\alpha_{-\lambda}]\alpha_{-\rho}\right)\\
{ "domain": "physics.stackexchange", "id": 66671, "lm_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, string-theory, conformal-field-theory, commutator, lie-algebra", "url": null }
python, performance, array, numpy, hash-map return np.array(python_matrix) Conceptually it is very similar to RomanPerekhrest's version, but slightly easier to see what's going on I would say. The list comprehension reduces the runtime of your example by about 30% here on my machine, with on-par performance to the one from Roman. %timeit affinity_matrix_op(protein_sequence, rna_sequence) # your original code 409 ms ± 3.79 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) %timeit affinity_matrix_rp(protein_sequence, rna_sequence) # RomanPerekhrest's version 277 ms ± 5.63 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) %timeit affinity_matrix_lc(protein_sequence, rna_sequence) 275 ms ± 2.06 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
{ "domain": "codereview.stackexchange", "id": 36645, "lm_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, array, numpy, hash-map", "url": null }
visible-light, waves, electromagnetic-radiation Title: How colored light can be explained if light is considered as emission of photon? If light is considered as wave, then different colored light can be explained as waves of different wavelength/frequency. How colored light can be explained if light is considered as emission of photon? The Energy of the Photon defines its frequency. It is the equation $$E=h\nu$$ which puts this in mathematical terms. Where $h$ is Planck's constant, $E$ the Energy and $\nu$ the frequency. This can also be written in terms of wavelength of the photon as $$E=\frac{hc}{\lambda}$$ So blue (high frequency, short wavelength) light has high energy, red (low frequency, large wavelength) has lower energy
{ "domain": "physics.stackexchange", "id": 1493, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "visible-light, waves, electromagnetic-radiation", "url": null }
Therefore $\sin t=\frac {2}{\sqrt 5\;}.$ • Given any one of $\sin t. \cos t , \tan t,$ you can determine the absolute values of the other two by the formulas $\sin^2 t+\cos^2 t=1$ and $\tan t=\sin t/\cos t.$ Mar 27, 2018 at 5:55
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9904405989598949, "lm_q1q2_score": 0.8253585072090373, "lm_q2_score": 0.8333245911726381, "openwebmath_perplexity": 140.1454132098574, "openwebmath_score": 0.8328643441200256, "tags": null, "url": "https://math.stackexchange.com/questions/2709891/inverse-tangent-function/2709909" }
javascript, jquery, email Title: jQuery form builder for parsing email array into single input I have the following in script in my web app which contains a lot of duplication. How can I cut down on this duplication and generally improve my code? $('a#newAuthority').on("click", function() { var $newAuthorityContainer = $(".new-authority-container"); var $row = $('<div />', { class: 'row' }).appendTo($newAuthorityContainer); var $large11 = $('<div />', { class: 'large-11 columns' }).appendTo($row); var $input = $('<input>', { type: 'text', placeholder: 'email@domain.com', class: 'authority-email' }).appendTo($large11); var $large1 = $('<div />', { class: 'large-1 columns' }).appendTo($row); var $removeContainer = $('<div />', { class: 'remove-container' }).appendTo($large1); var $remove = $('<a>', { href: '#', class: 'remove' }).html('<i class="fa fa-fa fa-remove"></i>').appendTo( $removeContainer); return false; }); $('a#newMember').on("click", function() { var $newMemberContainer = $(".new-member-container"); var $row = $('<div />', { class: 'row' }).appendTo($newMemberContainer); var $large11 = $('<div />', { class: 'large-11 columns' }).appendTo($row);
{ "domain": "codereview.stackexchange", "id": 14144, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, email", "url": null }
(a) ∀ x, friend(x) ⇒ wealthy(x) The symbol ∃ (called the existential quantifier) stands for the phrase "For some …" So we can write (b) above as: (b) ∃ x, friend(x) ${\displaystyle \scriptstyle \wedge }$ boring(x) #### Plural or singular? Note that, although statements (a) and (b) above use plural words – all, are, some, friends – when we symbolise them, the predicates and the variables are singular: x is wealthy, x is boring, etc. It is important to realise, then, that x can stand for just one value at a time. So the symbolic statement: x, friend(x) ⇒ wealthy(x) would be literally translated using singular words as: "For each value of x, if x is a friend of mine, then x is wealthy". and x, friend(x) ${\displaystyle \scriptstyle \wedge }$ boring(x) is more literally translated: "For at least one value of x, x is a friend of mine and x is boring". To emphasise this, you might find it helpful to use the following as translations of the symbols: ∀ means "For each (value of) ..." and ∃ means "For at least one (value of) ..." We can now make our earlier statement that "All people with red hair have fiery tempers" using Propositional Function notation as follows: redHair(x) is: "x has red hair" fieryTemper(x) is: "x has a fiery temper" Now "All people with red hair have fiery tempers" is re-written in the singular as: For each value of x, if x has red hair, then x has a fiery temper. In symbols, then: x, redHair(x) ⇒ fieryTemper(x) Example 12 Define suitable propositional functions and then express in symbols: (a) Some cats understand French. (b) No footballers can sing. (c) At least one lecturer is not boring. (d) I go swimming every sunny day. Solutions (a) Re-write in the singular: "At least one cat understands French". So we shall need to define propositional functions as:
{ "domain": "wikibooks.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9802808718926533, "lm_q1q2_score": 0.8147536295720138, "lm_q2_score": 0.831143045767024, "openwebmath_perplexity": 2033.1457307299813, "openwebmath_score": 0.697921633720398, "tags": null, "url": "https://en.wikibooks.org/wiki/Discrete_Mathematics/Logic/Page_2" }
from the sample that has a certain probability of including the population parameter over the long run. This chapter. Given below is a set of Probability MCQ questions based on the topic. This Quiz contains Multiple Choice Questions about Probability and probability distribution, event, experiment, mutually exclusive events, collectively exhaustive events, sure event, impossible events, addition and multiplication laws of probability, discrete probability distribution, and continuous probability distributions, etc. Non Probability methods of sampling has been discussed in this lesson. Suppose that the probability that the student knows the answer is 0. CHAPTER 6 PROBABILITY MULTIPLE CHOICE QUESTIONS In the following multiple­ choice questions, please circle the correct answer. Tags: class 10 math, important questions, MCQ QUIZ, ONLINE QUIZ, Probability Post navigation. 00 B] Binomial Probability Worksheet : Questions like Given the number of trials and the probability of. Download STA301 Mid term Solved MCQs and Subjective With References by Moaaz By Rana Abubakar Khan. If events A and B are mutually exclusive, then the probability of both events occurring simultaneously is equal to 3. Multiple Choice Questions on Genetics. I am about to take a 50 question multiple choice test with four possible answers a,b,c,d. Ilmkidunya comes with the new method to facilitate the students for good practice of annual examination. 15 lessons • 2 h 40 m. Download MCQs for Class 9 Probability, for important topics for all chapters in Class 9 Probability based on CBSE and NCERT pattern. Probability of getting even number in a single throw of dice is. If you have any query regarding CBSE Class 12 Maths Multiple Choice Questions with Answers, drop a comment below and we will get back to you at the earliest. The denominators of fractions are multiples of 10s. A student is certain of the answers to 4 questions but is totally baffled by 6 questions. IXL is the world's most popular subscription-based learning site for K–12. Objective In this challenge, we practice calculating the probability of a compound event. Free Accounting MCQS Tests. Given below is a set of questions based on the topic probability. knowledge just 4u. A graph drawn in a plane in such a way that any pair of edges meet only at their end vertices; A graph drawn in a plane in such a way that if the vertex set of graph can be partitioned into two non - empty disjoint subset X and Y
{ "domain": "kangalmalakli.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9755769120761569, "lm_q1q2_score": 0.8386681053924722, "lm_q2_score": 0.8596637487122111, "openwebmath_perplexity": 1014.5989958402449, "openwebmath_score": 0.578876256942749, "tags": null, "url": "http://mkzs.kangalmalakli.it/mcq-probability.html" }
classical-mechanics, time, terminology, coordinate-systems Title: What is the $\{q_i\}$-$t$ space called? In classical mechanics, the configuration space of a system of $f$ degrees of freedom is the $f$-dimensional space of the set of generalized coordinates $\{q_i\}=(q_1,q_2...q_f)$ of a system. While talking about the principle of extremum action, one draws a path in the $\{q_i\}$-$t$ "plane" where $t$ represents time. Does this space which contains both the set of generalized coordinate and time has any name? The name could vary from author to author. In a non-technical setting I think you would find it under the name "extended configuration space". In more specialized contexts (e.g. Hamiltonian mechanics on symplectic spaces, field theory on fiber bundles, etc.) they are called contact manifolds or even just configuration spaces.
{ "domain": "physics.stackexchange", "id": 43143, "lm_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, time, terminology, coordinate-systems", "url": null }
ros, forward-kinematics phantom_omni::OmniFeedback pof; // ROS_INFO_STREAM(" waist: " << kinematic_state->getVariablePosition("waist")); // ROS_INFO_STREAM("shoulder: " << kinematic_state->getVariablePosition("shoulder")); // ROS_INFO_STREAM(" elbow: " << kinematic_state->getVariablePosition("elbow")); // ROS_INFO_STREAM(""); // // ROS_INFO_STREAM(" waist: " << kinematic_state->getVariablePosition("waist")); // ROS_INFO_STREAM("shoulder: " << kinematic_state->getVariablePosition("shoulder")); // ROS_INFO_STREAM(" elbow: " << kinematic_state->getVariablePosition("elbow")); // ROS_INFO_STREAM(""); pof.position.x = end_effector_state.data()[0]; pof.position.y = end_effector_state.data()[1]; pof.position.z = end_effector_state.data()[2]; phantom_pub_.publish(pof); } private: ros::NodeHandle nh_; ros::Subscriber joint_states_sub_; ros::Publisher phantom_pub_; sensor_msgs::JointState js_; moveit::core::RobotStatePtr kinematic_state; robot_model_loader::RobotModelLoader robot_model_loader; moveit::core::RobotModelPtr kinematic_model; const moveit::core::JointModelGroup *joint_model_group; }; int main(int argc, char *argv[]) { ros::init(argc, argv, "phantom_forward_kinematics"); PhantomFK pfk; pfk.init();
{ "domain": "robotics.stackexchange", "id": 19585, "lm_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, forward-kinematics", "url": null }
java, security, cryptography Title: Cipher and passphrase classes using Java cryptography I use some basic cryptography in a project of mine. Because I want my application to run cross-platform and because it seems pretty sophisticated I decided to go with the Java Cryptography Architecture. I'm pretty fresh with crypto in general, so I'd like to hear someone's opinion who has some experience with that. First, I have some convenience wrapper classes for the different symmetric ciphers I support: public abstract class PwsCipher { //=== methods ================================================================ /** * Gets the cipher's block length. * @return Block length in bytes. */ int getBlockLength() throws NoSuchAlgorithmException, NoSuchPaddingException, NoSuchAlgorithmException, NoSuchProviderException { return createCipher().getBlockSize(); } /** * Creates a new {@link javax.crypto.cipher} instance of this * cipher. * @return Instance of {@link Cipher}. */ Cipher createCipher() throws NoSuchAlgorithmException, NoSuchPaddingException, NoSuchProviderException { String provider = "SC"; // Spongy Castle for android if ( !System.getProperty("java.vm.name").equals("Dalvik") ) { provider = "BC"; // Bouncy Castle for everything else } return Cipher.getInstance(getName() + "/CBC/PKCS7Padding", provider); } //=== getter & setter ========================================================
{ "domain": "codereview.stackexchange", "id": 2702, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, security, cryptography", "url": null }
javascript, jquery, plugin var modal = $(id); var overlay = $("#lean_overlay"); /* Overlay */ olay(id, removeModal, closeButton); /* Options */ if (closeButton) { $(closeButton).css("z-index", "10300"); $(closeButton).on("click", function (e) { e.preventDefault(); close(id, removeModal, $(closeButton)); return false; }); } /* Loading */ if (ajax) { modal.load(function() { Loader() }); } /* Styling */ overlay.css({ "display": "block", opacity: 0 }); modal.css({ "display": "block", "position": "fixed", "opacity": 0, "z-index": 10200, "left": 0, "right": 0, "top": 0, "bottom": 0, "margin": "auto" }); /* Init */ overlay.fadeTo(150, options.overlay); modal.fadeTo(200, 1); if(drag.length > 0) { modal.draggable({ handle: drag }); } } //Close var close = function(modal, removeModal, closeButton, ajax) { if(ajax){ xhr.abort(); } $("#lean_overlay").fadeOut(150, function(){ $(this).remove(); if(closeButton) { closeButton.off("click"); closeButton.removeAttr('style'); } }); $(modal).fadeOut(150, function(){ if (removeModal) { $(this).remove(); } }); } //Go plugin.init(); };
{ "domain": "codereview.stackexchange", "id": 6348, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, plugin", "url": null }
quantum-mechanics, scattering, scattering-cross-section Title: Scattering Theory In non-relativistic quantum mechanical scattering theory you can derive an expression for the differential scattering cross section under the first order Born approximation as $$\frac{d\sigma}{d\Omega}=|f(\theta)|^2$$ where $$f(\theta)=-\frac{m}{2 \pi {\hbar}^2}\int_{all space}e^{i \mathbf{q} \cdot \mathbf{r}}V(\mathbf{r})d^3\mathbf{r}$$ where $\mathbf{q}=\mathbf{k}-\mathbf{k}'$ is the difference between the incoming and detected wavevector and $V(\mathbf{r})$ is the potential under consideration. This expression is simply the fourier transform of the potential with respect to the variable $\mathbf{q}$. My notes then state that this implies that in order to probe a small object you need a high $\mathbf{p}=\hbar\mathbf{k}$. Does anybody see how this follows from the above results? Thankyou. As what enters into the formula is $\boldsymbol q$ instead of $\boldsymbol k$, I'd say we need a high $\boldsymbol q$ (which, of course, implies a high $\boldsymbol k$, because of conservation of energy/momentum). For example, if $\boldsymbol k$ is very high, but $\boldsymbol q$ is not, this means that there was barely no scattering, which means you didn't actually measure anything. This means that what you actually need is a high $\boldsymbol q$. Now, why would we need a high $\boldsymbol q$ in order to measure small objects? well, the answer is fairly simple: because of the properties of the Fourier Transform. It is well known that the low frequencies (read, low $\boldsymbol q$) of the Fourier Transform encode the coarse properties of an image, and the high frequencies encode the details$^1$:
{ "domain": "physics.stackexchange", "id": 27935, "lm_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, scattering, scattering-cross-section", "url": null }
javascript, beginner, jquery, ebay Title: eBay listing generator Here's my attempt at a script that will take user input and produce a custom interactive eBay listing. This is definitely still in progress, but I wanted to post the code I have since I'm sure there will be awesome suggestions on how I can improve functionality and write less. Here's a Fiddle. The default window size triggers the mobile styles, so just view full screen to see the desktop version. $(document).ready(function(){ localStorage.clear(); //*********************************************************** // PUBLIC VARIABLES //*************************************************************** // Local Storage var storage = localStorage; // Opening tags var templateOpen = '<tableid="mblParentContainer"><tbody><tr><td><divclass="mblWrpr">'; // Closing tags var templateClose = '</div></td></tr></tbody></table>'; // Get rid of commas in our opening tags and add whitespace to classnames and ids var x = templateOpen.split(' ').toString() .replace(/\,/g, '') .replace(/class/g, ' class') .replace(/id/g, ' id'); // Get rid of commas in our closing tags var y = templateClose.split(' ').toString().replace(/\,/g, '');
{ "domain": "codereview.stackexchange", "id": 8243, "lm_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, beginner, jquery, ebay", "url": null }
organic-chemistry, molecular-structure, carbocation Crofton, M. W.; Jagod, M.; Rehfuss, B. D.; Oka, T. Infrared spectroscopy of carbo‐ions. v. classical vs nonclassical structure of protonated acetylene c 2 h + 3. J. Chem. Phys. 1989, 91 (9), 5139–5153. DOI: 10.1063/1.457612.
{ "domain": "chemistry.stackexchange", "id": 4675, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, molecular-structure, carbocation", "url": null }
amateur-observing Title: Any tip on maintaining a log of celestial objects? I am an amateur observer and Olympus 10x50 binocular is my tool. As I keep locating celestial objects (Planets, Stars etc), I would like to maintain a log of the observed objects. The purpose of the log is to list down the number of celestial objects I have observed/located. I need suggestion on what data points should I capture which helps in making some sense out of it and also encourage my friends to get into star gazing. I suggest you to take a look at the Amateur Astronomy Observers Log Web Site, where everybody can share their astronomical logs. The logs contain: Instrumentation used Sky condition (seeing, light pollution, ...) Accurate date and time of the observation Specific informations that you could add depend by the kind of object that you are watching. For example you could try to estimate the magnitude of a variable star, or you could describe colour variation of Jupiter bands. Some software can give you more support. There are specific astronomical log software for smartphone (for example Stargazing Log for Android). Morover in the Linux planetarium software KStars when you open the detail of an object you have a specific tab where you can register logs in form of simple text.
{ "domain": "astronomy.stackexchange", "id": 3024, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "amateur-observing", "url": null }
molecular-structure, halides, covalent-compounds Title: Does SiCl2 exist and its possible structure It's known that the elements in IVA all have valence +2 and +4. I also know there exists $\ce{GeCl2}$ and $\ce{SnCl2}$. So my question is does $\ce{SiCl2}$, or even $\ce{CCl2}$ exist? If yes, what about their molecular structure? In addition, what makes +2 valence in $\ce{Ge}, \ce{Sn}$ more stable? Via Wikipedia, $\ce{CCl2}$, where carbon is in the +2 oxidation state, does exist but it is fleeting due to its high reactivity. I was able to find a reference on the analogous dichlorosilylene, and I also found some information on difluorosilylene, also known as silicon difluoride, both of which have silicon in the +2 state and react similarly to a carbene. So yes, both $\ce{CCl2}$ and $\ce{SiCl2}$ exist where the central atom in the +2 oxidation state. Tin(II) chloride fill its octet by way of either bridging chloride bonds in the crystal structure or hydration bonds in water (see Wikipedia images). The structure of solid $\ce{GeCl2}$ isn't given, but I would expect something similar. I'll update if I find anything.
{ "domain": "chemistry.stackexchange", "id": 5312, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "molecular-structure, halides, covalent-compounds", "url": null }
thermodynamics Title: Thermodynamics: What is $dE/(dV)|_T$? Does $$ \left.\frac{\partial {\cal E}}{\partial\rho}\right|_T=?\;\; {\rm or} \;\; \left.\frac{\partial E}{\partial V}\right|_T=? $$ where $E$ is energy, ${\cal E}$ is energy density, $V$ is volume, $\rho$ is (mass) density have a name? Is there a simple relation ship to "standard" quantities, like the speed of sound, volume expansion coefficients, or specific heats? $$dE = T\,dS-P\,dV$$ $$\begin{align*}\left(\frac{\partial E}{\partial V}\right)_T&=T\left(\frac{\partial S}{\partial V}\right)_T-P \\ &=T\left(\frac{\partial P}{\partial T}\right)_V-P \\ &=-T\left(\frac{\partial P}{\partial V}\right)_T\left(\frac{\partial V}{\partial T}\right)_P-P \\ &=T\alpha_V\kappa-P \end{align*}$$ where $\alpha_V$ is the volumetric coefficient of linear expansion and $\kappa$ is the bulk modulus. To convert the partial derivatives, I used a Maxwell relation and then the triple product rule.
{ "domain": "physics.stackexchange", "id": 40670, "lm_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", "url": null }
Plot four histograms on the same figure for a visual comparison of the pdf of each distribution. figure subplot(2,2,1) histogram(x1,10) title('Normal') axis([-4,4,0,15]) subplot(2,2,2) histogram(x2,10) title('Fat Tails') axis([-4,4,0,15]) subplot(2,2,3) histogram(x3,10) title('Right-Skewed') axis([-4,4,0,15]) subplot(2,2,4) histogram(x4,10) title('Left-Skewed') axis([-4,4,0,15]) The histograms show how each sample differs from the normal distribution. Create a normal probability plot for each sample. figure subplot(2,2,1) normplot(x1) title('Normal') subplot(2,2,2) normplot(x2) title('Fat Tails') subplot(2,2,3) normplot(x3) title('Right-Skewed') subplot(2,2,4) normplot(x4) title('Left-Skewed') Create a 50-by-2 matrix containing 50 random numbers from each of two different distributions: A standard normal distribution in column 1, and a set of Pearson random numbers with mu equal to 0, sigma equal to 1, skewness equal to 0.5, and kurtosis equal to 3 (a "right-skewed" distribution) in column 2. rng default % For reproducibility x = [normrnd(0,1,[50,1]) pearsrnd(0,1,0.5,3,[50,1])]; Create a normal probability plot for both samples on the same figure. Return the plot line graphic handles. figure h = normplot(x) h = 6x1 Line array: Line Line Line Line Line Line legend({'Normal','Right-Skewed'},'Location','southeast')
{ "domain": "mathworks.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9591542817548989, "lm_q1q2_score": 0.8013576080194548, "lm_q2_score": 0.8354835330070838, "openwebmath_perplexity": 1418.4670603505758, "openwebmath_score": 0.5831632614135742, "tags": null, "url": "https://fr.mathworks.com/help/stats/normplot.html" }
c++, game, c++17 std::vector<Brick> makeBricksLevel2() { constexpr auto brickLength = 3.0; constexpr auto brickHeight = 1.0; return std::vector<Brick> { // draw a C Brick{ Point{4,2},brickLength,brickHeight,1 }, Brick{ Point{7,2},brickLength,brickHeight,1 }, Brick{ Point{10,2},brickLength,brickHeight,1 }, Brick{ Point{13,2},brickLength,brickHeight,1 }, Brick{ Point{4,3},brickLength,brickHeight,1 }, Brick{ Point{4,4},brickLength,brickHeight,1 }, Brick{ Point{4,5},brickLength,brickHeight,1 }, Brick{ Point{4,6},brickLength,brickHeight,1 }, Brick{ Point{4,7},brickLength,brickHeight,1 }, Brick{ Point{4,8},brickLength,brickHeight,1 }, Brick{ Point{4,9},brickLength,brickHeight,1 }, Brick{ Point{4,10},brickLength,brickHeight,1 }, Brick{ Point{7,10},brickLength,brickHeight,1 }, Brick{ Point{10,10},brickLength,brickHeight,1 }, Brick{ Point{13,10},brickLength,brickHeight,1 },
{ "domain": "codereview.stackexchange", "id": 34713, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, game, c++17", "url": null }
kalman-filters in matlab, I think. And R is R <- matrix(c(0.001,0,0,20),2,2) which is R = [0.001 0; 0 20]; in matlab. I've generated my acceleration as a vector that is T long with a variance of 1; you seem to have generated just one value for it with a variance of 100. As for the second part of your question: Does it depend of what I want to do? Generally, the better the values the Kalman filter use match the "true" values, the better the Kalman filter estimates the state. I say "true" instead of true because sometimes we can't know what the truth is, so we have to guess it. The only leeway I see in what you've presented is what the value if Q is. It's not clear to me what variance you assumed the acceleration to have. If it is a constant, then the variance will be zero; if it's a Gaussian random variable, then you'll need to set the Q matrix using the variance of that random variable. Also, this all assumes that the process noise and the measurement noise are uncorrelated (or independent). If there is correlation, then you'll somehow need to take that into account. R Code # 26818 T <- 128; dt <- 0.01 t <- seq(0,T-1)*dt xkm1km1 <- matrix(c(0, 0, 0),3,1) Pkm1km1 <- matrix(c(1000,0,0 ,0,1000,0, 0,0,1000),3,3) #H = [1 0 0 # 0 1 0]; H <- matrix(c(1,0,0,1,0,0),c(2,3)) #F = [ 1 dt dt^2/2 # 0 1 dt # 0 0 1]; A <- t(matrix(c(1,dt,dt^2/2,0,1,dt,0,0,0),3,3)) B <- matrix(c(0,0,1),c(3,1))
{ "domain": "dsp.stackexchange", "id": 3258, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "kalman-filters", "url": null }
java, performance, logging, statistics public TreeMap<String, Integer> process(File fFile) throws FileNotFoundException { Scanner scanner = new Scanner(new FileReader(fFile)); while (scanner.hasNextLine()) { String wordp = scanner.nextLine(); int j = wordp.indexOf("query=") + 6; int k = wordp.length() - 1; String fut = wordp.substring(j, k).trim(); this.putWord(fut); } scanner.close(); ValueComparator bvc = new ValueComparator(getHashmap()); TreeMap<String, Integer> sorted_map = new TreeMap<String, Integer>(bvc); sorted_map.putAll(getHashmap()); return sorted_map; } public static void main(String[] args) { if (args.length > 0) { File fFile = new File(args[0]); Topfive topfive = new Topfive(); try { TreeMap<String, Integer> sorted_map = topfive.process(fFile); int count = 0; for (String key : sorted_map.keySet()) { System.out.println(key); count++; if (count >= 5) { break; } } } catch (FileNotFoundException e) { e.printStackTrace(); } } } } class ValueComparator implements Comparator<Object> { private Map<String, Integer> base; public ValueComparator(Map<String, Integer> base) { this.base = base; } @Override public int compare(Object first_obj, Object second_obj) { int ret = -1; if (base.get(first_obj) < base.get(second_obj)) { ret = 1; } return ret; } } Sample text in text file which is given as command line argument:
{ "domain": "codereview.stackexchange", "id": 1039, "lm_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, logging, statistics", "url": null }
c++, object-oriented, classes, polymorphism switch (optionB) { case '1': { cout << "\nThe number of accounts of Saving account type are: \t" << b1.Get_Saving_NoOfAccounts() << endl; break; } case'2': { cout << "\nThe number of accounts of Current account type are: \t" << b1.Get_Current_NoOfAccounts() << endl; break; } default: cout << "\nSorry Try Again!\nEnter right value only one or two\n"; break; } break; } case '9': { char optionB; cout << "There are two options available for getting the balance in the bank.\nOne is saving account(INTEREST)\t" << "Press '1' for it and \nSecond one is Current Account(NO INTEREST)\tPress '2' for it\n"; cin >> optionB; switch (optionB) { case '1': { cout << "\nThe Balance of Saving account type is: \t" << endl; b1.getAll_saving_Balance(); break; } case'2': { cout << "\nThe Balance of Current account type is: \t" << endl; b1.getAll_current_Balance(); break; } default: cout << "\nSorry Try Again!\nEnter right value only one or two\n"; break; } break; } case 'e': { cout << "The program is ending now: "; break; } default: { cout << "\n\nEnter right value please: \n"; } } /// </summary> /// <returns></returns> char option;
{ "domain": "codereview.stackexchange", "id": 39065, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented, classes, polymorphism", "url": null }
Solution We find the transpose of a matrix by interchanging the rows and columns as follows: a) $A^T = \begin{bmatrix} 0 & 1\\ 0 & 0 \\ 1 & 0 \end{bmatrix}$      b) $B^T = \begin{bmatrix} -2 \\ 0 \\ 1 \end{bmatrix}$      c) $C^T = \begin{bmatrix} 5 & 1 & 0 & 7 \\ -7 & -4 & -1 & -4 \end{bmatrix}$ Example 2 Matrices $A$ and $B$ are given by $A = \begin{bmatrix} -1 & 0 & 1 \\ 1 & 2 & 0 \end{bmatrix}$ , $B = \begin{bmatrix} -1 \\ 1 \\ 2 \end{bmatrix}$. Show that $(AB)^T = B^T A^T$ (verify property 2 above). Solution Calculate $AB$ $AB = \begin{bmatrix} -1 & 0 & 1 \\ 1 & 2 & 0 \end{bmatrix} \begin{bmatrix} -1 \\ 1 \\ 2 \end{bmatrix} = \begin{bmatrix} 3 \\ 1 \end{bmatrix}$ Determine $(AB)^T$ $(AB)^T = \begin{bmatrix} 3 & 1 \end{bmatrix}$
{ "domain": "analyzemath.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9950177292353747, "lm_q1q2_score": 0.8064408878532229, "lm_q2_score": 0.8104789132480439, "openwebmath_perplexity": 328.00342680087823, "openwebmath_score": 0.7763438820838928, "tags": null, "url": "https://www.analyzemath.com/linear-algebra/matrices/transpose.html" }
temperature, sun, light, equator, insolation Title: Why does the intensity of sunlight depend on your latitude? People at the equator get to bask in more sunlight than Santa Clause and other inhabitants of the arctic regions. Not quite as pronounced, but they get more than me too. Why is the sunlight more intense closer to the equator and less intense farther away from it? When I posted this question, I was not thinking about the possible ambiguities, such as "Are you talking about the exposure across a surface area with some non-perpendicular angle to the sun," or "Are you talking about the light gathered by an optic facing the sun?" There is a difference. Since "basking in sunlight" was the example use case, let us assume exposure across a surface area which is lying on the ground. As noted in the comments, this answer applies to things like sun-bathing and solar panels, but it does not apply so much to a specific point-receptor like an eyeball. If all objects in question are pointing directly at the sun, then the angle of incidence is equal for all of them and this answer does not apply. For an optic facing its target, the amount of atmosphere that the light passes through is a very large influencer. At higher latitudes, the sun is not directly overhead, and so the light is not coming straight down through the path of least atmosphere. Instead, it comes in at an angle, passing through more of the atmosphere before it gets to you. For sun-bathers, solar panels, and the ground in general, the sunlight absorbed and reflected does depend very much on what is described in this answer. For that reason, more expensive solar panels are mounted on devices which alter their angle to face the sun for increased light exposure. And a sun-bather could likewise increase their exposure by mounting their platform at an angle. This is the direction the rest of the answer will take. The answer is similar to the answer to some other questions, such as "Why does the solar power intensity change with the season?" and "Why does the solar intensity change with the height of the sun in the sky (ie: with the time of day)?" The very short, non-technical version (tl;dr) Each unit (think "beam of sunlight") is spread over a larger area. That might not seem intuitive at first, but that is the answer in a nutshell. To see why, continue to the long version.
{ "domain": "earthscience.stackexchange", "id": 1214, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "temperature, sun, light, equator, insolation", "url": null }
the-moon But, arguably, it's still less red than a sunset. Why is the moon's reddening less obvious than the sun's? The moon is already a little reddish I think it's important to think about what 'reddening' means. You said "the spectrum of moonlight is more redshifted than that of the sun, which should contribute to an even more intense reddening" -- but that's actually the opposite of the case. (I would not use the term "red shift" in this context; that term has a specific astronomical meaning related to relativistic speeds.) The sun at the horizon turns red because the blue light is being scattered by the atmosphere (contributing to blue skies for the day side of the world), and the red passes straight through. Consider if the sun produced only red light -- then you would see no additional reddening near the horizon because there's no blue light to remove from it. So if the moon's spectrum is already redder than the sun's, then we would expect its reddening to be less intense than the sun's, not more -- there's not as much blue light to remove, so the change is smaller. The moon may be as red or redder than the sun from an objective "I am measuring light frequencies" perspective, but if you take two moon photos, one at the horizon and one high in the sky, and lay them side by side, the difference will be less impressive. How red is the sun, really? In your question you state that the sun "turn[s] bright red when it's close to the horizon", but I don't think that's true. Not every sunset features a really red sun; a middling orange is far more common. The deep crimson is usually something you usually only see when there's a lot of particulate in the atmosphere, such as from a volcanic eruption or large fire. So I don't think the sun's color shift is as dramatic as you think, and thus the moon's less dramatic color shift matches it more closely than you're expecting. The moon does indeed turn a deep blood red when the atmospheric conditions are right for it.
{ "domain": "astronomy.stackexchange", "id": 7000, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "the-moon", "url": null }
homework-and-exercises, classical-mechanics, lagrangian-formalism, differentiation Now consider a function $\gamma:\mathbb R\rightarrow \mathbb R\times \mathbb R$ which eats some number $t$ and spits out the pair $\big(a(t),b(t)\big)$, where $a$ and $b$ are functions from $\mathbb R$ to $\mathbb R$. We can compose $f$ with $\gamma$ to obtain a single function from $\mathbb R$ to $\mathbb R$ as follows: $$(f\circ \gamma) : \mathbb R\rightarrow \mathbb R$$ $$ t\mapsto f\bigg(a(t),b(t)\bigg)$$ Being a function from $\mathbb R$ to $\mathbb R$, we can take its regular, calculus 101 derivative: $$(f\circ \gamma)'(t) = (\partial_1f)\bigg(a(t),b(t)\bigg) \cdot a'(t) + (\partial_2 f)\bigg(a(t),b(t)\bigg)\cdot b'(t)$$ which is usually written (in another abuse of notation) as $$(f\circ \gamma)'(t) = \frac{\partial f}{\partial a} a'(t) + \frac{\partial f}{\partial b}b'(t) \equiv \frac{df}{dt}$$ It is this object which is called the "total derivative" of $f$, but that is a questionable description of it because it drops $\gamma$ completely out of the notation/phrasing. I would accept "the total derivative of $f$ along the path $\gamma$," but the president of calculus has stopped taking my calls on this matter.
{ "domain": "physics.stackexchange", "id": 71591, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, classical-mechanics, lagrangian-formalism, differentiation", "url": null }
ros, rostest, unit-testing, gtest Title: rosmake + make test? Automated testing? I am wondering how I could automate the build of my unit tests. Because right now I have to call make test in every package. But I would like to automate this, to build for every package that has a test in it. Something like a rosmake command for testing would be ideal. Or can I add something to the makefile, so rosmake will also build the test? Originally posted by madmax on ROS Answers with karma: 496 on 2013-06-05 Post score: 1 Ok, I should have searched for rosmake options. ;-) There is a command rosmake [PACKAGE] -t that builds and tests the package. But it calls make test only for the package specified and not for the packages it depends on... Originally posted by madmax with karma: 496 on 2013-06-05 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 14433, "lm_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, rostest, unit-testing, gtest", "url": null }
$$= |V_n((1+t)x_1 ,x_2, \ldots , x_n)|+|V_n(x_1 ,(1+t)x_2, \ldots , x_n)|+ \ldots+|V_n(x_1 ,x_2,\ldots,(1+t) x_n)|$$ $$= [1+(1+t)+(1+t)^2+\;...+(1+t)^{n-1}]\; |V_n(x_1 , \ldots , x_n)|$$ $$= \frac{(1+t)^n-1}{t}\; |V_n(x_1 , \ldots , x_n)|.$$ Therefore, $$G_n(t)=\frac{W_n(x_1 , \ldots , x_n;t)}{|V_n(x_1 , \ldots , x_n)|}=\frac{(1+t)^n-1}{t},$$ which gives an exponential generating function for the rows of the matrix $T$ (OEIS A111492, A238363) in Bauer's guess that is in agreement with Serre's answer, and an ordinary generating function for the f-polynomials (f-vectors) of the number of k-faces of the $(n-1)$-simplex (OEIS A135278). For example, $$G_4(t)=\frac{(1+t)^4-1}{t}=4+6t+8 \frac{t^2}{2!}+6 \frac{t^3}{3!}=4+6t+4t^2+t^3.$$
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924777713886, "lm_q1q2_score": 0.8162150999065391, "lm_q2_score": 0.8397339676722393, "openwebmath_perplexity": 357.06024019774816, "openwebmath_score": 0.8864367604255676, "tags": null, "url": "http://mathoverflow.net/questions/78540/a-sum-involving-derivatives-of-vandermonde?sort=oldest" }
organic-chemistry, nmr-spectroscopy You can see that for a typical aliphatic CH2, a bond angle of ~109° would predict a 2J ~ 14 Hz. Whereas, a terminal alkene with a bond angle of ~120° would predict a 2J ~ 3 Hz. Comparing this with the 3-bond Karplus relationship, the vicinal coupling for alkenes should be 8 Hz or 10 Hz depending on the cis/trans relationship. For an aliphatic system with free rotation about a C-C bond, you have to average the Karplus relationship over all angles and you end up predicting ~ 7 Hz. For a cyclohexane derivative in a chair conformation, you can see that an axial-axial coupling (180°) is predicted to be ~10 Hz, while an axial-equatorial coupling (~60°) is predicted to be < 2 Hz! Qualitatively, this matches what we observe quite well. Quantitatively, we quickly run into a lot of problems. Many axial-axial couplings are 12-15 Hz and the J coupling observed in alkenes typically deviates quite a bit from the predictions given by these graphs. Again, these graphs are grossly oversimplified - the real theory would fold in information about nearby substituants and steric effects, etc. However, you'd then need run a bunch electron structure calculations and average these over many different conformations, etc. So most people just live with the qualitative nature of these graphs to rationalize the patterns that they see.
{ "domain": "chemistry.stackexchange", "id": 5511, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, nmr-spectroscopy", "url": null }
vectors Title: Components of a Vector Perpendicular to Itself I have multiple doubts in vectors. They are as follows. Can a vector have components perpendicular to itself? Is the sum of the components (rectangular or non-rectangular) of a vector a always equal to it? Can the magnitude of a component of a vector a be greater its magnitude? Doubt no. 3 arose after solving the following problem. A vector a of magnitude 8 units has two components. One is perpendicular to a and is of magnitude 6 units. What is the magnitude of the other component? (Mathematics: Mechanics and Probability, by L. Bostock, Suzanne Chandler, Examples 2a, 2 see here) The author gives 10 units as it's answers. 1) If by perpendicularity of the component you mean that the dot product between the whole vector, and the vector, formed with only one non-zero component - $a_i$, it can be orthogonal if the dot product is degenerate, i.e for some non-zero vectors holds $(e_i, e_i) = 0$. The answer for the second question is yes, by definition of vector, it is linear in components. If the metric (the scalar product) is not positive definite (3) is possible. For example, assume the dot product is $$(a, b) = a_1 b_1 - a_2 b_2$$ In that case the magnitude of the first component $a_1^2$ is less or equal than the whole magnitude $a_1^2 - a_2^2$.
{ "domain": "physics.stackexchange", "id": 66714, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vectors", "url": null }
We claim that the countably many $F_{n,j}$ have the property indicated in Lemma 3. To this end, let $f \in X=\prod_{i=1}^\infty C_i$ and $g \in Z-X$. There exists an integer $n \ge 1$ such that $g(n) \notin C_{n}$. This means that $g(n) \notin C_{n,j}$ for all $j$, i.e. $g(n)=p_n$ (so $g(n)$ must be the point at infinity). Choose $j \ge 1$ large enough such that $f(i) \in K_{i,j}=C_{i,1} \oplus C_{i,2} \oplus \cdots \oplus C_{i,j}$ for all $i \le n$. It follows that $f \in F_{n,j}$ and $g \notin F_{n,j}$. Thus the sequence of closed sets $F_{n,j}$ satisfies Lemma 3. By Lemma 3, $X=\prod_{i=1}^\infty C_i$ is Lindelof. Reference 1. Engelking R., General Topology, Revised and Completed edition, Elsevier Science Publishers B. V., Heldermann Verlag, Berlin, 1989. 2. Hager A. W., Approximation of real continuous functions on Lindelof spaces, Proc. Amer. Math. Soc., 22, 156-163, 1969. $\text{ }$ $\text{ }$ $\text{ }$ Dan Ma topology Daniel Ma topology Dan Ma math Daniel Ma mathematics $\copyright$ 2019 – Dan Ma
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.984575447918159, "lm_q1q2_score": 0.8204709366905539, "lm_q2_score": 0.8333245953120233, "openwebmath_perplexity": 76.53685350080785, "openwebmath_score": 0.970346212387085, "tags": null, "url": "https://dantopology.wordpress.com/2019/06/23/lindelof-exercise-1/" }
fourier-transform, cepstral-analysis When the parameter $\alpha=\pi/2$, the FrFT simplifies to the Fourier transform (bottom right picture), demonstrating the transformation from a purely time-domain to a purely frequency-domain. If $\alpha=-\pi/2$, this is equivalent to the inverse Fourier transform. Taking either of these operations twice results in a rotation of $\alpha=\pi$ which would correspond to a time-reversed time-domain signal. The reason they say "quefrency is a measure of time" is because the resulting rotation of the Fourier transforms (and inverses) of both equations end up with $\alpha=0$ or $\alpha=\pi$. From the images above, its clear that the Fourier transform and its inverse are simply 180 degree rotations of each other and would simply have mirrored symmetry about the origin. The outer squared absolute value of both formulas would find the magnitude of these spectra (cepstra?) to be equivalent for real-valued inputs, which $\log(|F(f(t))|^2)$ always is real. The difference in scale factor only exists if the Fourier transform is not a unitary transform.
{ "domain": "dsp.stackexchange", "id": 10927, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fourier-transform, cepstral-analysis", "url": null }
a. Ordinary sorting b. $2, 1, 4, 3, 6, 5, 8, 7, 10, 9$. c. \begin{aligned} \frac{\sum_{j = i}^{i + k - 1} A[j]}{k} & \le \frac{\sum_{j = i + 1}^{i + k}A[j]}{k} \\ \sum_{j = i}^{i + k- 1 } A[j] & \le \sum_{j = i + 1}^{i + k} A[j] \\ A[i] & \le A[i + k]. \end{aligned} d. Shell-Sort, i.e., We split the $n$-element array into $k$ part. For each part, we use Insertion-Sort (or Quicksort) to sort in $O(n / k \lg(n / k))$ time. Therefore, the total running time is $k \cdot O(n / k \lg(n / k)) = O(n\lg(n / k))$. e. Using a heap, we can sort a $k$-sorted array of length $n$ in $O(n\lg k)$ time. (The height of the heap is $\lg k$, the solution to Exercise 6.5-9.) f. The lower bound of sorting each part is $\Omega(n / k\lg(n / k))$, so the total lower bound is $\Theta(n\lg n(/k))$. Since $k$ is a constant, therefore $\Theta(n\lg(n / k)) = \Omega(n\lg n)$.
{ "domain": "github.io", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.990440598959895, "lm_q1q2_score": 0.8097589604991847, "lm_q2_score": 0.8175744828610095, "openwebmath_perplexity": 686.9366349217207, "openwebmath_score": 0.975989580154419, "tags": null, "url": "https://walkccc.github.io/CLRS/Chap08/Problems/8-5/" }
performance, coldfusion, cfml startIndex=pos+1; curArg++; </cfscript></cfif></cfloop><cfscript> if(paramCount GT curArg-1){ this.throwError("db.execute failed: There were more parameters then question marks in the current sql statement. You must run db.execute() before building any additional sql statements with the same db object. If you need to build multiple queries before running execute, you must use a copy of db, such as db2=duplicate(db);<br /><br />SQL Statement:<br />"&processedSQL); } s=mid(processedSQL, startIndex, len(processedSQL)-(startIndex-1)); </cfscript>#preserveSingleQuotes(s)#</cfquery> <cfelse> <cfquery attributeCollection="#queryStruct#">#preserveSingleQuotes(processedSQL)#</cfquery> </cfif> <cfcatch type="database"> <cfscript> if(this.autoReset){ structappend(this, this.config, true); } variables.arrParam=[]; // has to be created separately to ensure it is a separate object </cfscript> <cfif left(trim(processedSQL), 7) NEQ "INSERT "><cfrethrow></cfif> <cfscript> if(this.disableQueryLog EQ false){ ArrayAppend(this.arrQueryLog, "Query ##"& ArrayLen(this.arrQueryLog)&" failed to execute for datasource, "&this.datasource&".<br />CFcatch.message: "&CFcatch.message&"<br />cfcatch.detail: "&cfcatch.detail); } </cfscript> <!--- return false when INSERT fails, because we assume this is a duplicate key error. ---> <cfreturn false> </cfcatch>
{ "domain": "codereview.stackexchange", "id": 4040, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, coldfusion, cfml", "url": null }
answers on nth roots and rational exponents calculator, precalculus i and notation and other algebra subject areas. This nth Roots and Rational Exponents Worksheet is suitable for 11th - 12th Grade. You have the same base, you would add the exponents. com includes usable strategies on rational exponents, rational and radical and other algebra subject areas. 1 Evaluate nth Roots and Simplify Radical Expressions. How to evaluate nth roots of real numbers using both radical and rational notation? How are radicals and exponents related? 7. For a good time, use the theorem to prove that the square root of 2 is not rational. W A 4Akl 2l l 0r wiVgChPtls o hr SemsTeurOvZeqdp. com offers both interesting and useful strategies on mantissa exponent calculator, adding and subtracting polynomials and square roots and other math subjects. The root can also be called the index. nth Roots: The cube root of b is the number whose cube is b. If an input is given then it can easily show the result for the given number. We find the nth roots of the numerator and denominator for finding the nth roots of fractions. REAL nth ROOTS OF a Let n be an integer (n > 1) and let a be a real number. Welcome to The Cubes and Cube Roots (A) Math Worksheet from the Number Sense Worksheets Page at Math-Drills. On your TI 83/84 calculator, you can use the symbol to compute square roots. In general, for an integer n greater than 1 if b" = a then b is an nth root of a. 2 - Rational Exponents * NTH ROOT RULE M is the power (exponent) N is the root A is the base * 10. Definition of a1/n. • If n is even and b0, then 1/n is the nonnegative number whose nth power is b, and we call 1/n the principal nth root of b. Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Another way of. To start practising, just click on any link. We can write square root of a
{ "domain": "shkundendienst.de", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936096877063, "lm_q1q2_score": 0.8135617872960819, "lm_q2_score": 0.8267117876664789, "openwebmath_perplexity": 857.9440835516514, "openwebmath_score": 0.6546542644500732, "tags": null, "url": "http://xkvn.shkundendienst.de/nth-roots-and-rational-exponents-calculator.html" }
c++, algorithm, graph Stop passing pointers around. node* add_node(int id,std::queue<int> q , node* root) Pointers have no associated ownership semantics. This is normal in C. But if you are writing C++ you should never do this. Ownership symantis defines who owns and thus who is responsible for calling delete on dynamically allocated objects. If it is an automatic variable you should probably be passing a reference (or in the case more likely making add_node() a member of the graph object. Also you manipulate node and adj_list directly from add_node. Again fine from a C perspective but not from a C++ one. You should ask the object to manipulate itself by asking it to perform some operation (ie method). Since your code is so intertwined without methods it makes it real hard to read and understand. So that's about all I have. Update: Comment on update section For every call to new there MUST be a call to delete. Without this the code will leak memory. In your case here we don't actually need any calls to new so we can remove all the leaks by just using normal automatic variables. // might be a bit overkill // For just holding a destination vertex. struct edge { // This should really be private // Once created you don't really want it changing. // So make it hard to change accidentally by making it private. // Alternatively you can make it const (but this makes copying hard // so I would make it private and private an accessor) private: int destination_vertex; public: int getDest() const {return destination_vertex;} // Prefer to use initializer lists. edge(int ver){ destination_vertex = ver; } // i.e. Prefer to write like this edge(int ver) : destination_vertex(ver) {} // A friend for printing. friend std::ostream& operator<<(std::ostream& s, edge const& e) { return s << e.destination_vertex; } };
{ "domain": "codereview.stackexchange", "id": 3930, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, algorithm, graph", "url": null }
• Because the interval $[-\pi/2, -\pi/3]$ gives you the same result as $[\pi/2, 2\pi/3]$ (the function under the integral is periodic with period $\pi$), so instead of joining intervals $[-\pi/2,-\pi/3]$ and $[\pi/3, \pi/2]$ you can join $[\pi/3, \pi/2]$ and $[\pi/2, 2\pi/3]$ and integrate on $[\pi/3,2\pi/3]$. – user491874 Feb 13 '18 at 13:33
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.982287698703999, "lm_q1q2_score": 0.8120688193983746, "lm_q2_score": 0.8267117876664789, "openwebmath_perplexity": 152.20669644063616, "openwebmath_score": 0.9180081486701965, "tags": null, "url": "https://math.stackexchange.com/questions/2648854/why-does-the-integral-for-the-arc-length-of-a-polar-curve-have-the-boundaries-it" }
filters Title: FIR filters always linear? Are Finite Impulse Response filters always linear? I looked at https://en.wikipedia.org/wiki/Nonlinear_filter and its says that if a filter does not obey linearity, it is non-linear filter. Thats understood? But does does linearity has to do with the length of impulse response? What am I missing here? Yes, FIR filters are linear. No, the length of the impulse response does not have anything to do with whether it is linear or not. For instance, IIR filters are also linear. Linearity is determined by whether the filter obeys the superposition principle, nothing else. So, FIR and IIR filters are linear, median filters are not. EDIT: Technically Dilip is correct. Finite and infinite impulse response filters can be non-linear if their impulse responses incorporate non-linear operations, such as squaring. I was going by the "industry" meaning of FIR and IIR, which are linear because they only use multiplication and adding, but in the mathematical sense FIR and IIR filters can be non-linear.
{ "domain": "dsp.stackexchange", "id": 2964, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filters", "url": null }
20. zepdrix Yes, x-2 is the first factor of the polynomial. 21. anonymous Ah so X has to be greater than or equal to 2 22. anonymous Ok that makes sense now 23. zepdrix |dw:1441678495872:dw|So our first factor is negative when we're less than 2, and positive when we're larger than 2. 24. zepdrix |dw:1441678581150:dw|You can do similar with the second factor (which corresponds to 2-sqrt7). It will be negative when we're smaller than 2-sqrt7, and positive everywhere else. 25. anonymous So we have to see where all these + and - align? 26. zepdrix |dw:1441678686230:dw|Here is our last one, ya? Negative when smaller than 2+sqrt7, positive when larger than 2+sqrt7. 27. zepdrix We're negative when we're multiplying 1 or 3 negatives together. But positive if we're multiplying 2 or 0 negatives together. 28. zepdrix |dw:1441678807351:dw|Something like this, ya? :o 29. zepdrix I'm not sure if this is how they wanted you to do it, maybe there is a more organized like.. chart method that I'm forgetting about :) lol 30. anonymous I see... thank you. So the inequality would thus state what? How would I express it as an inequality? 31. zepdrix |dw:1441678919118:dw|These are the intervals that satisfy the inequality. So our inequality is true when: $$\large\rm x\le 2-\sqrt7$$ and 32. zepdrix when $$\large\rm 2\le x\le 2+\sqrt7$$ 33. anonymous thank you! 34. zepdrix np! :) inequalities can be really tricky! :O 35. anonymous They suck!
{ "domain": "openstudy.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9796676496254958, "lm_q1q2_score": 0.800951263309155, "lm_q2_score": 0.8175744739711882, "openwebmath_perplexity": 1409.3765143657297, "openwebmath_score": 0.6665023565292358, "tags": null, "url": "http://openstudy.com/updates/55ee3f1de4b022720613e90f" }
python, beginner, pandas def scorefm(x): """Function for separating data into 5 bins for Frequency & Monetary df """ if x <= 0.20: return 5 elif x <= 0.40: return 4 elif x <= 0.60: return 3 elif x <= 0.80: return 2 else: return 1 # Divide the Recency df into equal quantiles rfm_recency['r_score'] = 5 - pd.qcut(rfm_recency['Recency'], q=5, labels=False) # Create scores from cum_sum_perc for Frequency and Monetary rfm_frequency['f_score'] = rfm_frequency['cum_sum_perc'].apply(scorefm) rfm_monetary['m_score'] = rfm_monetary['cum_sum_perc'].apply(scorefm) # Resorting data frames by ID to merge rfm_recency = rfm_recency.sort_values('Id') rfm_frequency = rfm_frequency.sort_values('Id') rfm_monetary = rfm_monetary.sort_values('Id') # Merging data frames together result = rfm_recency.copy(['Recency', 'r_score']) result = result.join(rfm_frequency[['Frequency', 'f_score']]) result = result.join(rfm_monetary[['Monetary', 'm_score']]) # Create an FM and RFM score based on the individual R, F, M scores. result['FM'] = (result['f_score'] + result['m_score']) / 2 result['RFM_Score'] = result['r_score'] * 10 + result['FM'] Fiddle Data: import pandas as pd
{ "domain": "codereview.stackexchange", "id": 33514, "lm_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, pandas", "url": null }
Exercise 1 Develop similar sifting formulations of the other three Landau problems. In view of these sieving interpretations of number-theoretic problems, it becomes natural to try to estimate the size of sifted sets ${A \backslash \bigcup_{p | P} E_p}$ for various finite sets ${A}$ of integers, and subsets ${E_p}$ of integers indexed by primes ${p}$ dividing some squarefree natural number ${P}$ (which, in the above examples, would be the product of all primes up to ${\sqrt{x}}$). As we see in the above examples, the sets ${E_p}$ in applications are typically the union of one or more residue classes modulo ${p}$, but we will work at a more abstract level of generality here by treating ${E_p}$ as more or less arbitrary sets of integers, without caring too much about the arithmetic structure of such sets. It turns out to be conceptually more natural to replace sets by functions, and to consider the more general the task of estimating sifted sums $\displaystyle \sum_{n \in {\bf Z}} a_n 1_{n \not \in \bigcup_{p | P} E_p} \ \ \ \ \ (1)$ for some finitely supported sequence ${(a_n)_{n \in {\bf Z}}}$ of non-negative numbers; the previous combinatorial sifting problem then corresponds to the indicator function case ${a_n=1_{n \in A}}$. (One could also use other index sets here than the integers ${{\bf Z}}$ if desired; for much of sieve theory the index set and its subsets ${E_p}$ are treated as abstract sets, so the exact arithmetic structure of these sets is not of primary importance.) Continuing with twin primes as a running example, we thus have the following sample sieving problem:
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9886682444653242, "lm_q1q2_score": 0.8012947666000314, "lm_q2_score": 0.8104789155369048, "openwebmath_perplexity": 248.19796379327, "openwebmath_score": 0.9931489825248718, "tags": null, "url": "https://terrytao.wordpress.com/2015/01/21/254a-notes-4-some-sieve-theory/" }
There are many way to find the foot of the perpendicular.The bookish formulae is the same as yours! Just a little bit of reordering; I pick up from where you stopped. $x=x_1-\frac{ax_1+by_1+c}{\sqrt{a^2+b^2}}\cdot\frac{a}{\sqrt{a^2+b^2}}$ $y=y_1-\frac{ax_1+by_1+c}{\sqrt{a^2+b^2}}\cdot\frac{b}{\sqrt{a^2+b^2}}$ I dont see a reason why you can't mix the denominators. $x=x_1-\{ax_1+by_1+c\}\cdot\frac{a}{{a^2+b^2}}$ $y=y_1-\{ax_1+by_1+c\}\cdot\frac{b}{{a^2+b^2}}$ $\frac{x-x_1}a=-\frac{ax_1+by_1+c}{a^2+b^2}$ Similiarly; $\frac{y-y_1}b=-\frac{ax_1+by_1+c}{a^2+b^2}$ Or $$\frac{x-x_1}a=\frac{y-y_1}b=-\frac{ax_1+by_1+c}{a^2+b^2}$$ Note: The negative sign is due to our assumption that the foot of the perpendicular is below the given point.You probably may have assumed the foot of perpendicular is above the point Excuse me if i am wrong somewhere;
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232940063591, "lm_q1q2_score": 0.8253100982837668, "lm_q2_score": 0.8397339616560073, "openwebmath_perplexity": 441.62672081791004, "openwebmath_score": 0.9168655276298523, "tags": null, "url": "https://math.stackexchange.com/questions/2475058/foot-of-perpendicular-proof" }
#### Adam Topaz (Jul 24 2020 at 22:04): You can still do it inductively with fin. #### Adam Topaz (Jul 24 2020 at 22:04): Since fin.tail is a thing. #### Adam Topaz (Jul 24 2020 at 22:05): You can define a partition of $[a,b]$ of length n as the data of a partition of length $n-1$ of $[a_1,b]$ for some $a_1 \in (a,b)$. #### Adam Topaz (Jul 24 2020 at 22:06): And defining the empty partition is easy :) #### Dan Stanescu (Jul 24 2020 at 22:06): That's what I thought. I had actually started doing that myself some time ago. At that time I didn't know about fin.tail. #### Adam Topaz (Jul 24 2020 at 22:07): To do this inductive definition, you just need to get the element in fin (n+1) corresponding to the value $1$, which is (0 : fin n).succ, I guess. #### Kevin Buzzard (Jul 24 2020 at 22:08): @Dan Stanescu yeah you have to add a proof that x_i < x_{i+1}. Reid wrote ..., he didn't finish the definition. He did the data part and left the other mathematicians to do the proof part. #### Reid Barton (Jul 24 2020 at 22:09): The rest is just the same, translate "for all $i$, $x_i < x_{i+1}$" as something involving ∀ i : fin n, ... or whatever. #### Reid Barton (Jul 24 2020 at 22:10): Maybe it would be convenient to extend x to all of nat or even int by setting it to a/b outside the range fin n #### Adam Topaz (Jul 24 2020 at 22:10): Unfortunately, (i : fin n).succ has type fin (n+1). #### Kevin Buzzard (Jul 24 2020 at 22:10):
{ "domain": "github.io", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9683812345563902, "lm_q1q2_score": 0.8306465399943904, "lm_q2_score": 0.8577681086260461, "openwebmath_perplexity": 3348.954673009072, "openwebmath_score": 0.3846169710159302, "tags": null, "url": "https://leanprover-community.github.io/archive/stream/113489-new-members/topic/formalizing.20definitions.20for.20real.20analysis.html" }
- Very helpful, thanks! My question now (last question?) is how "strong" is the axiom that such solutions exist, or the axiom that they don't? –  usul Feb 13 '13 at 21:08 @usul: I'm sorry, I'm not enough of a set theorist to give a good answer to that question. (Though many people here are; you'd probably get good answers if you asked it as a separate question!) –  Micah Feb 13 '13 at 21:15 no problem, a search turned up several relevant threads and I have linked to them in my edited question! –  usul Feb 13 '13 at 21:20 Once you have an isomorphism, there are plenty. Take two Hamel bases of $\mathbf{R}$, say $(b_i)$ and $(c_i)$, and define $f$ by $$f(b_i) = e^{c_i},$$ extending it by $\mathbf{Q}$-linearity to all of $\mathbf{R}$. PS Of course I am implicitly using here the argument of @Micah and @spin. - And this is where the axiom of choice comes in. –  Asaf Karagila Feb 13 '13 at 16:50 @AsafKaragila, precisely! –  Andreas Caranti Feb 13 '13 at 16:53 Thanks for the response! –  usul Feb 13 '13 at 21:24 $f:\mathbb{R}\rightarrow\mathbb{R}^{+} \text{ satisfying } f(x+y)=f(x)f(y)$, $f$ continuous, then $f(x)=e^{cx}$ Try to solve this problem Any Lie Group Homomorphism from $\mathbb{R}\rightarrow S^1$ is of the form $e^{iax}$ for some $a\in\mathbb{R}$ and every such homomorphism is smooth.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226280828407, "lm_q1q2_score": 0.8342920856746178, "lm_q2_score": 0.8539127566694178, "openwebmath_perplexity": 358.3871202190427, "openwebmath_score": 0.9697872400283813, "tags": null, "url": "http://math.stackexchange.com/questions/302257/is-ex-the-only-isomorphism-between-the-groups-mathbbr-and-mathbb/302267" }
ros, household-objects-database, grasp, manipulation Title: Problem with the reference frame of grasps in the household_objects_database I'm using the manipulation stack in ROS electric, in a simulated environment in Gazebo. I have a simulated robot arm and hand, a simulated table and a coke can, and a simulated kinect. Object recognition is working well with the coke can, from the model in the household_objects_database (using the image from the simulated kinect). But the problem is that when I want to use the object_manipulator, the grasps for that object are read from the database and represented in a weird and unexpected way. The grasps (and pregrasps) for the coke can are in the grasp table of the DB with different positions but all of them have the identity quaternion (0,0,0,1) for orientation, so no rotation should be applied. But when trying to pickup the object with object_manipulator, the grasps are read from the database and the markers representing the grasps are more or less (but not exactly) in the expected position, but they have a completely unexpected orientation, as it can be seen in the following two images. I thought that the parent frame of the grasps would be the frame of the recognised object (/object_frame in this case), but the orientation of the represented grasps is different from that. Can anyone tell me what's the reference frame of the grasps, or what can I be doing wrong?
{ "domain": "robotics.stackexchange", "id": 8444, "lm_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, household-objects-database, grasp, manipulation", "url": null }
Find the moment of inertia for the following about the y axis and x axis of a right triangle whose base is on the +x axis and whose height is on the +yaxis Source(s): moment inertia triangle: https://shortly. The moment of inertia of the triangle about the point O is I = M*r^2 , where r is the distance of the center of mass from O. 2nd moment of an area or moment of inertia is the moment of all small areas dA about any axis. Area Moment of inertia. An isosceles triangle is a triangle with two equal sides. A higher moment of inertia is an indication that you need to apply more force if you want to cause the object to rotate. 5 • The moment of inertia of the shaded area is obtained by subtracting the moment of inertia of the half-circle from the moment of inertia of the rectangle. 2 Second Moment of Area11. Kinetic Energy is the energy possessed by an object because it is in motion. I Average value of a function. Therefore Moment of Inertia of Rectangle about its center = m 1 2 a 2 + b 2 Distance of P point from center of rectangle is 2 a 2 + b 2 Therefore Moment of Inertia of Rectangle about P, I= m 1 2 a 2 + b 2 + m 4 a 2 + b 2 = m 3 a 2 + b 2 Mass of triangle PQR = 2 m = 2 ρ a b Moment of Inertia of Triangle PQR about its centroid = ρ 1 2 a b 3 + b. Moment of Inertia is strictly the second moment of mass, just like torque is the first moment of force. How to calculate the moment of inertia of a triangular plate rotating about the apex. T 1 – the instantaneous value of load torque, referred to a motor shaft, N-m. The moment of inertia of the shaded area is obtained by subtracting the moment of inertia of the half-circle from the moment of inertia of the rectangle. A 100-gram ball connected to one end of a cord with a length of 30 cm. 4)and the second moment of the area about the y. The area moment of inertia about the X and the Y axis are calculated by subtracting the second moment
{ "domain": "cloudtools.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9911526441330527, "lm_q1q2_score": 0.8628947828940822, "lm_q2_score": 0.8705972667296309, "openwebmath_perplexity": 368.8009363110306, "openwebmath_score": 0.6580184102058411, "tags": null, "url": "http://cloudtools.it/jkuq/moment-of-inertia-of-triangle.html" }
= 0 \\ a^7+ b^7 + c^7 = -7mk^2$$ Then your identity reads $$\left( -\frac{3m}{3} \right) \left( -\frac{7mk^2}{7} \right) = \left( -\frac{5mk}{5} \right)^2 \\ \left( -m \right) \left( -mk^2 \right) = (mk)^2$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9817357237856481, "lm_q1q2_score": 0.8094037323765355, "lm_q2_score": 0.824461932846258, "openwebmath_perplexity": 359.412668721326, "openwebmath_score": 0.9335536956787109, "tags": null, "url": "https://math.stackexchange.com/questions/1661035/prove-fraca3b3c33-fraca7b7c77-left-fraca5b5c55/1661255" }
filters, discrete-signals, bandpass, decomposition Option 2: Decimate then filter One way to increase our $\texttt{BW}/f_s$ ratio is to decrease $f_s$ (and/or increase $\texttt{BW}$ of course), which in our case we can do since our signal's frequency component of interest sits at $5 \texttt{Hz}$ (remember the Nyquist rule $f_s \geq 2f_{\texttt{max}}$). Choose $f_s = 100 \texttt{Hz}$ and $\texttt{BW} = 0.1\texttt{Hz}$ for example, increasing $\texttt{BW}/f_s$ to $0.001$. We can then easily use either a lower-order FIR (see option 1 link for design) or IIR filter (I suggest you take a look at Robert Bristow-Johnson's Audio EQ Cookbook if you go the IIR route, look for the BPF section). If you go with this option, do not forget to low-pass your signal before down-sampling, otherwise you'll get aliasing. Follow the link provided above for a decimation function that takes care of that for you. (for your specific use-case, since your signal's highest component is at $10\texttt{Hz}$, you don't need to low-pass filter, you can simply set $f_s$ somewhere above $20\texttt{Hz}$). Remarks A second order IIR such as one designed using the cookbook can work with your $f_s$ as is, I’d reduce the passband bandwidth $\texttt{BW}$ though. For IIR filtering, I would use filtfilt
{ "domain": "dsp.stackexchange", "id": 11946, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filters, discrete-signals, bandpass, decomposition", "url": null }
operating-systems Then once you've got all that written, you'll have to figure out how to load the program into memory and start execution... That said, there definitely IS overhead involved in using an operating system. Most OS's are built for a general use case and will have many features and functions that you don't need for your specific program. But most of us are willing to give up a few % of CPU and memory in order to get the convenience that an OS will bring. As for which OS will make it go faster... again it depends on your application and needs. Some OS's will definitely run some applications faster than others, but which OS runs faster depends on the features being used. And there are reasons other than speed to choose one over another. Application availability, security, interoperability, device compatibility, availability of programming tools, etc. are all factors to consider.
{ "domain": "cs.stackexchange", "id": 5403, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "operating-systems", "url": null }
# Comparing $\pi^e$ and $e^\pi$ without calculating them How can I compare (without calculator or similar device) the values of $$\pi^e$$ and $$e^\pi$$ ? Another proof uses the fact that $$\displaystyle \pi \ne e$$ and that $$e^x > 1 + x$$ for $$x \ne 0$$. We have $$e^{\pi/e -1} > \pi/e,$$ and so $$e^{\pi/e} > \pi.$$ Thus, $$e^{\pi} > \pi^e.$$ Note: This proof is not specific to $$\pi$$. • This is from The Book! Impeccable proof. Sep 14 '13 at 22:20 • if x is negative than would your first equation which is e^x > 1 + x be true ? Jan 15 '15 at 17:36 • @MurtuzaVadharia: Yes, it is true. Consider $f(x) = e^x -1 -x$. It's derivative is $e^x -1$ which is $\lt 0$ for $x \lt 0$ and $\gt 0$ for $x \gt 0$, so $f$ decreases from $-\infty$ to $0$, and increases from $0$ to $\infty$. Since $f(0) = 0$... Jan 21 '15 at 8:11 • I think it's worth mentioning that this works for all positive numbers which aren't $e$. The proof has nothing to do with $\pi$. Feb 7 '15 at 20:48 • @David: Sorry to be of no help :(. No idea what the thought process was, it has been quite a while. Aug 3 '20 at 20:06 This is an old chestnut. As a hint, it's easier to consider the more general problem: for which positive $x$ is $e^x>x^e$? • one more step, why not considering y^x and x^y Nov 24 '20 at 17:01 From Proofs without Words.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9683812318188366, "lm_q1q2_score": 0.8172121789376514, "lm_q2_score": 0.8438951025545426, "openwebmath_perplexity": 323.2235854854502, "openwebmath_score": 0.9777542948722839, "tags": null, "url": "https://math.stackexchange.com/questions/7892/comparing-pie-and-e-pi-without-calculating-them/421469" }
java, concurrency // we are still recording... // optimistically create a new Holder. // we will have to discard this if another thread has already done one. Holder<V> nref = new Holder<>(); nref.value = store.get(key); // yes, put it on the queue even if the recording may have stopped. Holder<V> race = diff.putIfAbsent(key, nref); // holder becomes whatever instance was first registered for this key. Holder<V> holder = race == null ? nref : race; synchronized(holder) { if (holder.live) { V prev = holder.value; holder.value = val; if (!record.get()) { // we thought we were recording, but that // changed in a race condition. We push our value // back through to the source. holder.live = false; holder.value = null; diff.remove(key); if (remove) { store.remove(key); } else { store.put(key, val); } } return prev; } } if (remove) { return store.remove(key); } return store.put(key, val); } @Override public V put(K key, V val) { return undercover(key, val, false); } @Override public V remove(K key) { return undercover(key, null, true); }
{ "domain": "codereview.stackexchange", "id": 9919, "lm_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, concurrency", "url": null }
javascript, object-oriented, node.js, ecmascript-6, promise Title: ES6 cron module I just created my first ES6 module in Node, and first time using promises and I was hoping to get some feedback on it. I am the only developer at my current company, so I cannot get feedback here. I just want to make sure whoever comes behind me in the future can have a clean code base to work in. 'use strict'; var fs = require('fs'); var nodeSchedule = require('node-schedule'); class CronJob { constructor(filePath, time, rule) { this.filePath = filePath; this.maxPdfAge = time || 86400000; this.currentDate = Date.parse(new Date()); this.scheduleRule = rule || this.getDefaultRule(); } schedule(callback) { nodeSchedule.scheduleJob(this.scheduleRule, err => { if (err) return callback(err); this.scanFolder((err, info) => { if (err) return callback(err, null); return callback(null, info); }); });
{ "domain": "codereview.stackexchange", "id": 25122, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, object-oriented, node.js, ecmascript-6, promise", "url": null }
# Difference between revisions of "2011 AMC 12A Problems/Problem 16" ## Problem Each vertex of convex pentagon $ABCDE$ is to be assigned a color. There are $6$ colors to choose from, and the ends of each diagonal must have different colors. How many different colorings are possible? $\textbf{(A)}\ 2520 \qquad \textbf{(B)}\ 2880 \qquad \textbf{(C)}\ 3120 \qquad \textbf{(D)}\ 3250 \qquad \textbf{(E)}\ 3750$ ## Solution We can do some casework when working our way around the pentagon from $A$ to $E$. At each stage, there will be a makeshift diagram. 1.) For $A$, we can choose any of the 6 colors. A : 6 2.) For $B$, we can either have the same color as $A$, or any of the other 5 colors. We do this because each vertex of the pentagon is affected by the 2 opposite vertices, and $D$ will be affected by both $A$ and $B$. A : 6 B:1 B:5 3.) For $C$, we cannot have the same color as $A$. Also, we can have the same color as $B$ ($E$ will be affected), or any of the other 4 colors. Because $C$ can't be the same as $A$, it can't be the same as $B$ if $B$ is the same as $A$, so it can be any of the 5 other colors. A : 6 B:1 B:5 C:5 C:4 C:1 4.) $D$ is affected by $A$ and $B$. If they are the same, then $D$ can be any of the other 5 colors. If they are different, then $D$ can be any of the (6-2)=4 colors. A : 6 B:1 B:5 C:5 C:4 C:1 D:5 D:4 D:4
{ "domain": "artofproblemsolving.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9814534344029239, "lm_q1q2_score": 0.8069403437414623, "lm_q2_score": 0.8221891283434876, "openwebmath_perplexity": 321.0332043192323, "openwebmath_score": 0.661948025226593, "tags": null, "url": "https://artofproblemsolving.com/wiki/index.php?title=2011_AMC_12A_Problems/Problem_16&diff=cur&oldid=90083" }
large-hadron-collider, higgs Title: How many $fb^{-1}$ for the most likely $5\sigma$ 115 Gev Higgs at the 7 Tev LHC? How many $fb^{-1}$ of integrated luminosity at the 7 Tev LHC do physicists expect are needed, to make a $5\sigma$ discovery of the most likey 115 Gev Higgs, if it exists? your question is answered by this graph:
{ "domain": "physics.stackexchange", "id": 921, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "large-hadron-collider, higgs", "url": null }
c++, template, template-meta-programming, c++14, rags-to-riches //////////////////////////////////////////////////////////// // integer_range template<typename Int, Int Begin, Int End, bool Increasing=(Begin<End)> struct integer_range; template<typename Int, Int Begin, Int End> struct integer_range<Int, Begin, End, true>: details::increasing_integer_range< Int, std::make_integer_sequence<Int, End-Begin>, Begin> {}; template<typename Int, Int Begin, Int End> struct integer_range<Int, Begin, End, false>: details::decreasing_integer_range< Int, std::make_integer_sequence<Int, Begin-End>, Begin> {}; template<std::size_t Begin, std::size_t End> using index_range = integer_range<std::size_t, Begin, End>; I don't ask for a specific kind of review. If you see anything that can be improved, do not hesitate. And as a bonus, take this test cases. Since integer_range uses some heavy template wizardry, I had troubles coming with decent test cases that are easy enough to read, write and understand. They are not really beautiful, but they work as expected; that may help you if you want to try modifications: template<std::size_t N> void test(std::integer_sequence<int>) { static_assert(N == 0, ""); } template<std::size_t N> void test(std::integer_sequence<int, 0, 1, 2, 3, 4>) { static_assert(N == 1, ""); } template<std::size_t N> void test(std::integer_sequence<int, 5, 4, 3, 2, 1>) { static_assert(N == 2, ""); }
{ "domain": "codereview.stackexchange", "id": 9880, "lm_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++, template, template-meta-programming, c++14, rags-to-riches", "url": null }
We are told that the volume is 765 cm³. So we have: . $(W-4)(W-6)3 \:=\:765$ Now solve for $W.$ • November 25th 2008, 11:11 PM magentarita great............ Quote: Originally Posted by Soroban Hello, magentarita! This one takes a few diagrams ... or a good imagination. Let $W$ = width of cardboard. Then $W+2$ = length of cardboard. 3-cm squares are removed from each corner. Code: ```      : - - -  W+2  - - - :     - *-------------------* -     : |///:          :///| 3     : | - * - - - - - * - | -     : |  |          |  | :     : |  |          |  | :     W |  |          |  | W-6     : |  |          |  | :     : |  |          |  | :     : | - * - - - - - * - | -     : |///:          :///| 3     - *-------------------* -       : 3 :    W-4    : 3 :``` The sides are turned up to form an open-top box. Code: ```        *-----------*         /|          /|       / |        / |3       *-----------*  |       |          |  *     3|          | /       |          |/ W-6       *-----------*           W-4``` We are told that the volume is 765 cm³. So we have: . $(W-4)(W-6)3 \:=\:765$ Now solve for $W.$ Great pictures and set up. Tell me, how do you make those diagrams using a regular keyboard? Yes, I can now find w. • November 27th 2008, 07:11 PM Soroban Hello, magentarita! Quote: Tell me, how do you make those diagrams using a regular keyboard? I invented my own system a few years ago.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9848109543125689, "lm_q1q2_score": 0.8290391151265531, "lm_q2_score": 0.8418256432832333, "openwebmath_perplexity": 1027.3200126082777, "openwebmath_score": 0.6010138988494873, "tags": null, "url": "http://mathhelpforum.com/pre-calculus/61520-dimensions-original-cardboard-print.html" }
javascript, node.js, promise Title: Promises turning into pyramids I'm using node-ftp to download some files from an FTP server; due to nodeback difficulty and nested calls I'm promisified some of the calls, hoping that this will help get me out of pyramid code hell, but I think I'm still mis-applying something. Before I get to my code pasted below, conceptually the pseudo-code of what I'm trying to do is: foreach directory in a list: list files in directory filter to only files of interest download those files, save them to /tmp/whatever. The objective is to end with a list of files downloaded and local paths. I have code that works, but it's god-awful ugly and is not living up to the "promise of promises". How can I re-arrange this to be more like the pseudo code above, and aggregate the results? Part of the trouble is that the "list files in directory" is a promise, and each download returns a promise of a data stream. So unless I do this smartly, it's a 3-level nested array of promises that all have to be resolved, with the very bottom level promise results the intended return value. //Main handler: when the connection is ready, start doing stuff. c.on('ready', function() { config.clientCheckPaths .map(function (lookInPath) { console.log('Examining ' + lookInPath); // Go get directory contents. listAsync(lookInPath) .then(function (files) { console.log('Files: ' + files.map(function (i) { return i.name; })); var wantedFiles = files.filter(function (item) { return config.isFileWanted(item.name); }); // Filter it down to only the files we want. var arrayOfDownloadPromises = wantedFiles.map(function (x) { // For each file, go download it. return new Promise(function (resolve, reject) { var fullPath = lookInPath + '/' + x.name;
{ "domain": "codereview.stackexchange", "id": 18184, "lm_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, node.js, promise", "url": null }
c++, c++11, tree cout << "Split val is " << iNode->splitVal() << " for axis #" << depth%K + 1 << endl; PrintTree(iNode->m_Left, depth + 1); PrintTree(iNode->m_Right, depth + 1); } else { shared_ptr<kd_leaf_node> lNode = static_pointer_cast<kd_leaf_node>(node); cout << "Point is ("; for (unsigned i = 0; i < K; i++) cout << lNode->m_Vals[i] << " "; cout << ")" << endl; } } } public: kd_tree() { } kd_tree(const kd_tree &obj) = delete; kd_tree(vector<kd_point> &Points) { insert(Points); } bool operator==(const kd_tree<K> rhs) = delete; bool operator=(const kd_tree<K> rhs) = delete; void clear() { m_Root.reset(); m_firstLeaf.reset(); } friend class kd_tree_iterator<K>; typedef typename kd_tree_iterator<K> iterator; kd_tree_iterator<K> end(); kd_tree_iterator<K> begin(); static bool pointIsInRegion(const kd_point &Point, const pair<kd_point, kd_point> &Region); static bool regionCrossesRegion(const pair<kd_point, kd_point> &Region1, const pair<kd_point, kd_point> &Region2); static float Distance(const kd_point &P, const kd_point &Q); // ----------------------------------
{ "domain": "codereview.stackexchange", "id": 16658, "lm_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++, c++11, tree", "url": null }
$$=\int_0^{\sqrt[3]{1/2}}\int_0^\pi\:2*\rho^2\: d\phi\: d\rho$$ $$=2*\int_0^{\sqrt[3]{1/2}}\int_0^\pi\:\rho^2\: d\phi\: d\rho=2*\int_0^{\sqrt[3]{1/2}}\:[\phi*\rho^2]^\pi_0\: d\rho=2\pi*\int_0^{\sqrt[3]{1/2}}\:\rho^2\:d\rho$$ $$=2\pi*[\phi^3/3]^{\sqrt[3]{1/2}}_0\\=2\pi*\frac{1/2}{3}=\pi/3$$ Thus the volume bound by the surface is $\pi/3$ If anyone would care to check my evaluation that would be greatly appreciated! • Anyone care to submit some input? – helpmeh Nov 25 '16 at 14:56 • A couple comments/questions: the equation you give is not a "function", since $y$ appears on both sides. Also, what do you mean by "volume of the function"? Do you mean the equation describes a closed surface, and you want the volume of the interior? – Nick Dec 1 '16 at 17:19 • Yes! thank you for clearing that up, the equation describes a roughly blob like shape, i guess it really is a implicit function. I'll graph it in maple, and post a screenshot here – helpmeh Dec 1 '16 at 17:21 • And we definitely want to find the volume of the interior, would i be aple to just solve the spherical equation for Rho, and triple integrate? – helpmeh Dec 1 '16 at 17:30 • I think so, but I do notice a mistake you made in converting. I will post below. – Nick Dec 1 '16 at 17:32
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9683812354689082, "lm_q1q2_score": 0.8111354549461122, "lm_q2_score": 0.8376199633332891, "openwebmath_perplexity": 433.05045057324105, "openwebmath_score": 0.9855359792709351, "tags": null, "url": "https://math.stackexchange.com/questions/2029485/conversion-from-cartesian-to-spherical-coordinates-calculation-of-volume-by-tri" }
neural-networks, feedforward-neural-networks, time-complexity, complexity-theory, forward-pass \end{align} where $\Theta(\cdot)$ is used (as opposed to $\mathcal{O}(\cdot)$) because this is a strict bound. If you have just one hidden layer, the number of multiplications becomes \begin{align} \Theta\left(nm_{1} + m_{1}k \right) \end{align} Of course, at each layer, the number of multiplications can be computed independently of the multiplications of the other layers (you can think of each layer as a perceptron), hence we sum (and not e.g. multiply) the multiplications of each layer when computing the total number of multiplications of the whole MLP. In general, when analyzing the time complexity of an algorithm, we do it with respect to the size of the input. However, in this case, the time complexity (more precisely, the number of multiplications involved in the linear combinations) also depends on the number of layers and the size of each layer. The time complexity of a forward pass of a trained MLP thus is architecture-dependent (which is a similar concept to an output-sensitive algorithm). You can easily include other operations (sums, etc.) in this reasoning to calculate the actual time complexity of a trained MLP.
{ "domain": "ai.stackexchange", "id": 1277, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-networks, feedforward-neural-networks, time-complexity, complexity-theory, forward-pass", "url": null }
Thus, 4 − 8=4+(−8) = −4. b) First change the subtraction into addition by “adding the opposite.” That is, −15 − 13 = −15 + (−13). We can now use physical intuition to perform the addition. Start at the origin (zero), walk 15 units to the left, then an additional 13 units to the left, arriving at the answer −28. That is, \begin{aligned} −15 − 13 & = −15 + (−13) \\ ~ & = −28. \end{aligned}\nonumber c) First change the subtraction into addition by “adding the opposite.” That is, −117 − (−115) = −117 + 115. Using “Adding Two Integers with Unlike Signs” from Section 2.2, first subtract the smaller magnitude from the larger magnitude; that is, 117 − 115 = 2. Because −117 has the larger magnitude and its sign is negative, prefix a negative sign to the difference in magnitudes. Thus, \begin{aligned} −117 − (−115) & = −117 + 115 \\ & = −2. \end{aligned}\nonumber Exercise Use each of the techniques in parts (a), (b), and (c) of Example 1 to evaluate the difference −11 − (−9). −2 ## Order of Operations We will now apply the “Rules Guiding Order of Operations” from Section 1.5 to a number of example exercises. Example 2 Simplify −5 − (−8) − 7. Solution We work from left to right, changing each subtraction by “adding the opposite.”
{ "domain": "libretexts.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9912886152849367, "lm_q1q2_score": 0.8445311170774867, "lm_q2_score": 0.8519528057272544, "openwebmath_perplexity": 3179.0888159169285, "openwebmath_score": 0.9624632000923157, "tags": null, "url": "https://math.libretexts.org/Courses/Honolulu_Community_College/Math_75X%3A_Introduction_to_Mathematical_Reasoning_(Kearns)/01%3A_Whole_Numbers_and_Integers/1.04%3A_Combining_Integers-_Addition_and_Subtraction_with_Integers/1.4.02%3A_Subtracting_Integers" }
ros2 Title: How to install ament_cmake_python? From this tutorial I discovered that the following package is available: ament_cmake_python but doing: ros2 pkg create --build-type ament_cmake_python test_interfaces I get the following error: ros2 pkg create: error: argument --build-type: invalid choice: 'ament_cmake_python' (choose from 'cmake', 'ament_cmake', 'ament_python') How do I get the ament_cmake_python package working? The link to github doesn't contain any installation instruction. Thanks Originally posted by Andromeda on ROS Answers with karma: 893 on 2021-07-10 Post score: 0 The answer is: there is no possibility to create a package with that option ros2 pkg create --build-type ament_cmake_python test_interfaces You can add ament_cmake_python in the package.xml file and nothing else... Originally posted by Andromeda with karma: 893 on 2021-07-27 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 36684, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros2", "url": null }
ros, ros-melodic, bloom-release Originally posted by nuclearsandwich with karma: 906 on 2021-04-06 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by gvdhoorn on 2021-04-07:\ I also can't think of a way to make it detectable that is completely robust what about using the default branch? I asked this question in the context of "rename master to main), and then running into the problem of Bloom not really working any more when you'd want to ignore certain packages. I don't believe that'd need something which always works, as the context is pretty narrow: first time release 'empty' release repository *.ignored file in the repository re: where to store configuration: git notes comes to mind, but I guess it's actually pretty convenient to track Bloom's configuration as a versionable artefact, and that's not what notes are for afaik.
{ "domain": "robotics.stackexchange", "id": 35934, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-melodic, bloom-release", "url": null }
java, beginner, simulation return keypadEntry; } /*************************************************************************** *! Checks user input to make sure it's valid **************************************************************************/ private boolean validateKeypadEntry(char keypadInput) { if ((keypadInput >= minNumberInput) && (keypadInput <= maxNumberInput)) return true; else return (keypadInput == SUBMIT_BUTTON) || (keypadInput == DELETE_BUTTON); } /* Checks to see if the '#' button was pressed */ public boolean orderCompleteBtnPressed(int input) { return input == SUBMIT_BUTTON; } /* Checks to see if the '-' button was pressed */ public boolean deleteBtnPressed(int input) { return input == DELETE_BUTTON; } }
{ "domain": "codereview.stackexchange", "id": 35636, "lm_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, beginner, simulation", "url": null }
javascript, html, css, angular.js, controller Title: Angular Box Color Exercise I have completed an exercise where there are 4 different color boxes and 1 main box below them that is blank, when you click on one of the colored boxes, the main box changes to the color of the box you just clicked on. Also there should be working undo and redo buttons. Am I doing this the "Angular" way by using $event or no? (function() { 'use strict'; function angularBoxesCtrl() { var vm = this; vm.mainBoxColor; var colorHistory = []; var undoRedo = []; var changeColor = function() { vm.mainBoxColor = colorHistory[colorHistory.length - 1]; } vm.logClass = function(e) { var boxColor = e.target.classList[1]; //mainBox is already same color as clicked box if (boxColor === vm.mainBoxColor) { return; } colorHistory.push(boxColor) changeColor(); } vm.undo = function() { if (!colorHistory.length) { return; } var undoColor = colorHistory.pop(); undoRedo.unshift(undoColor); changeColor(); } vm.redo = function() { if (!undoRedo.length) { return; } var redoColor = undoRedo.shift(); colorHistory.push(redoColor); changeColor(); } } angular.module('angularBoxes', []) .controller('angularBoxesCtrl', [ angularBoxesCtrl ]); })(); div { box-sizing: border-box; } .boxHolder { border: 1px solid black; text-align: center; font-size: 0; } .buttonHolder { text-align: center; position: relative; top: 40px; } .box { width: 180px; height: 180px; display: inline-block; border: 1px solid black; margin: 4px; } .green { background-color: green; } .blue { background-color: blue; } .red { background-color: red; }
{ "domain": "codereview.stackexchange", "id": 17878, "lm_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, html, css, angular.js, controller", "url": null }
php, object-oriented, database, file-system * @return percentage or NaN * */ public function findBackupPercentage($precision = 2) { if (!Localization::isLocal()) { $total_backup_folder = folderSize($this->dir_backup); $percentage = ($total_backup_folder / $this->total_site_size) * 100; return round($percentage, $precision) . '%'; } else { return 'NaN'; } } /** * Find Backup File Percentage * * Determines the percentage of a backup file * relative to the entire site size * * @param int $precision (default 2 decimal points) * @return percentage or NaN * */ public function findBackupFilePercentage($filename, $precision = 2) { if (!Localization::isLocal()) { $size_files = filesize($this->dir_files . $filename . '.zip'); $size_sql = filesize($this->dir_sql . $filename . '.sql'); $total_file = $size_files + $size_sql; $percentage = ($total_file / $this->total_site_size) * 100; return round($percentage, $precision) . '%'; } else { return 'NaN'; } } } ?>
{ "domain": "codereview.stackexchange", "id": 9351, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, object-oriented, database, file-system", "url": null }
Topological Sort Algorithm. Topological Sort by BFS: Topological Sort can also be implemented by Breadth First Search as well. Example: building a house with a Topological Sorting; graphs If is a DAG then a topological sorting of is a linear ordering of such that for each edge in the DAG, appears before in the linear ordering. Example (Topological sort showing the linear arrangement) The topologically sorted order is not necessarily unique. Topological Sort: A topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering.A topological ordering is possible if and only if the graph has no directed cycles, that is, if it is a directed acyclic graph (DAG). Topological Sort Algorithms. Topological sort Topological-Sort Ordering of vertices in a directed acyclic graph (DAG) G=(V,E) such that if there is a path from v to u in G, then v appears before u in the ordering. Such an ordering cannot exist if the graph contains a directed cycle because there is no way that you can keep going right on a line and still return back to where you started from. 50 Topological Sort Algorithm: Runtime For graph with V vertexes and E edges: ordering:= { }. In other words, a topological sort places the vertices of a directed acyclic graph on a line so that all directed edges go from left to right.. 3. 3/11 Topological Order Let G = (V;E)be a directed acyclic graph (DAG). R. Rao, CSE 326 9 A B C F D E Topological Sort Algorithm Step 2: Delete this vertexof in-degree 0 and all its ��� There are severaltopologicalsortingsof (howmany? Definition of Topological Sort. For example, we can put on garments in the following order: A topological sort of a DAG is a linear ordering of all its vertices such that if contains an edge , then appears before in the ordering. Topological Sort is Not Unique. Yufei Tao Topological Sort on a DAG Introduction There are many problems involving a set of tasks in which some of the tasks must be done before others. Topological Sort Algorithm. An Example. Definition of Topological Sort. Example 1 7 2 9 4 10 6 3 5 8 Given n objects and m relations, a topological
{ "domain": "workshop19.info", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126494483641, "lm_q1q2_score": 0.8620472464077757, "lm_q2_score": 0.8807970826714614, "openwebmath_perplexity": 629.6850657722558, "openwebmath_score": 0.3495599031448364, "tags": null, "url": "http://workshop19.info/lhrzk/b73d15-topological-sort-example" }
ros, ros-control, gazebo-ros-control never ever use a mesh for collision geometry. This causes massive slowdown because each face has to be checked for collision. For a robot arm, you typically want to use a cylinder primitive for a link's collision geometry. reduce the number of "objects" in your world. They may look nice, but each one slows down the simulation. use top to make sure nothing else is using a significant amount of cpu on the host (the gazebo physics engine does not use multiple cpu cores, but you want to try to avoid pushing the cpu into thermal throttling.) run only the gazebo server, not the gazebo client (the GUI). If your host does not have a GPU with hardware OpenGL support, definitely do not run the GUI on the same machine. Originally posted by Mike Scheutzow with karma: 4903 on 2022-10-02 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 38008, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-control, gazebo-ros-control", "url": null }
c#, object-oriented, .net, enum, reflection public static IEnumerable<TestEnumeration> Values() { foreach (var entry in _test) { yield return entry; } } } Notice the usage of the static constructor. It allows the Enumeration class to cache the values as soon as possible, resulting in slightly better performance. A method template would be extremely useful in this situation, as we can get rid of most of the reflection if we can guide the derived classes' usage, but since some of the logic is in static context this doesn't seem to be possible to me. ANY feedback is welcome! :) Review IEquatable<T> protected bool Equals(Enumeration other) { return string.Equals(Name, other.Name) && Value == other.Value; } Two things about this method... If you implemented it, don't downgrade it to a simple protected helper method. It belongs to the IEquatable<T> interface so implement this one too. I find it's easier to implement the Equals pair by forwarting the call from Equals(object other) to Equals(T other) becasue the latter is strongly typed. Bang! NullReferenceException! This other.Name will blow if other is null so make sure to check all parts of the expression. bool throwEx You shouldn't use parameters that switch exeception throwing on/off. Instead remove the ParseImpl and implement the parsing by one of the TryParse methods then reuse it elsewhere and throw exception by Parse methods if necessasry. readonly Remember to make your public fields of the derived class readonly. Readability partial class Partial classes are a great way for organizing code and I find there should be more of them. In fact each interface should be implemented by its own partial class to avoid using so many regions. Parameter lists private static IEnumerable<TEnumeration> AddValueToCache<TEnumeration>(Type key, IEnumerable<TEnumeration> value) where TEnumeration : Enumeration
{ "domain": "codereview.stackexchange", "id": 29996, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, object-oriented, .net, enum, reflection", "url": null }
what is the definition of continuity on metric spaces. In other words: what I need to conclude $$\lim f(x_n)=f(\lim x_n)$$ in this context? • You haven't made use of the fact that the subset condition holds for all $A \subset dom(f)$. There may be some mileage in considering a subset consisting just of the points$(x)_n$. – Tom Collinge Nov 21 '16 at 13:58 The proof in topological spaces: Assume that $f$ is not continuous, that is there exists some open set $V\subset Y$ with $U:=f^{-1}(V)$ is not open. Let $A = X\setminus U$. Notice that for every $x\in X$ we have $$x \in A = X\setminus f^{-1}(V) \iff x\notin f^{-1}(V) \iff f(x) \notin V,$$ that is $f(A) \subseteq Y\setminus V$. Now, as $U$ is not open, there exists a $x\in U \cap \bar A$ and we have 1. $x\in U = f^{-1}(V) \iff f(x) \in V$ and 2. $x\in \bar A \implies f(x) \in f(\bar A) \subseteq \overline{f(A)} \subseteq Y \setminus V$, Proof only for metric spaces:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.97112909472487, "lm_q1q2_score": 0.8366648179431639, "lm_q2_score": 0.8615382058759129, "openwebmath_perplexity": 122.2297300931363, "openwebmath_score": 0.9328954219818115, "tags": null, "url": "https://math.stackexchange.com/questions/2024173/question-about-a-proof-of-f-overline-a-subseteq-overlinefa-for-all-a-su/2025153" }
ros, ros2, diff-drive-controller [INFO] [spawner.py-3]: process has finished cleanly [pid 5071] [spawner.py-5] [INFO] [1670244708.351449614] [spawner_joint_s_b]: Configured and started joint_s_b [INFO] [spawner.py-5]: process has finished cleanly [pid 5075] [INFO] [spawner.py-9]: process started with pid [5305] [gzclient-7] context mismatch in svga_surface_destroy [gzclient-7] context mismatch in svga_surface_destroy [spawner.py-9] [INFO] [1670244708.899426522] [spawner_minicar_cll]: Controller already loaded, skipping load_controller [gzserver-6] [INFO] [1670244708.902372504] [controller_manager]: Configuring controller 'minicar_cll' [gzserver-6] [ERROR] [1670244708.998457025] [controller_manager]: Can't activate controller 'minicar_cll': Command interface with 'front_left_steering_joint/velocity' does not exist [spawner.py-9] [INFO] [1670244709.020476614] [spawner_minicar_cll]: Configured and started minicar_cll
{ "domain": "robotics.stackexchange", "id": 38164, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros2, diff-drive-controller", "url": null }
algorithms, sets Title: How to find number of combinations of choosing one from k subsets Consider we have set S: S = {1,2,3,4,5,6} and 3 (say k) subsets of S: S_1 = {1,2,3} S_2 = {2,3,4,5} S_3 = {1,3,6} What is the total number of cases choosing one element from each subsets? Same element cannot picked from different subset, and the order is not considered. For example, S_1 = {2}, S_2 = {3}, S_3 = {6} and S_1 = {3}, S_2 = {2}, S_3 = {6} considered as same. And S_1 = {3}, S_2 = {3}, S_3 = {1} is invalid since S_1 and S_2 choose the same element. How can I formulate this? You can solve this problem with the inclusion exclusion principle. Assume you have two subsets $S_1, S_2$, then the number of ways to choose two elements is the number of ways to choose a number from $S_1$ multiplied by the number of ways of choosing an element from $S_2$ minus the number of ways of choosing the same number from $S_1$ and $S_2$. Now given three sets $S_1, S_2, S_3$, the number of ways of choosing one element from each such that all elements are different is $$|S_1||S_2||S_3| - |S_1 \cap S_2| |S_3| - |S_1 \cap S_3||S-2| - |S_2 \cap S_3| |S_1| + |S_1 \cap S_2 \cap S_3|.$$ Now given a family of $k$ subsets, you can use the inclusion-exclusion principle to prove that the count can be given by the formula $$
{ "domain": "cs.stackexchange", "id": 14981, "lm_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, sets", "url": null }
thermodynamics, energy-conservation, conventions $$T_C = \frac{\mathrm{COP}_\mathrm{given}}{1 + \mathrm{COP}_\mathrm{given}} T_H$$ The absolute minimum temperature achievable with a COP of 3.28 and outdoor temperature of, say, $300\ \mathrm{K}$ is thus $230\ \mathrm{K}$, well below freezing. However, in practice, it will not be possible to reach this temperature because the ideal COP assumes the only point of heat flow is the machine itself, and perfect utilization of the energy input - at the calculated point, the heat going out from the machine will equal that coming back in through it due to the temperature gradient, a dynamic equilibrium. In reality, heat flow from the outdoors and the rest of the building through imperfectly-insulating walls, doors, and other portals will be adding additional heat back into the room. Moreover, a realistic machine will also waste input energy (e.g. electrical resistance in the wires, friction in the machine components, etc.), converting it into heat (not pumping heat) and hence acting to an extent as a heater for the room. But the point is that, as long as the room temperature desired is above this temperature, then it is not a violation of the second law to cool to that desired temperature.
{ "domain": "physics.stackexchange", "id": 59769, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, energy-conservation, conventions", "url": null }
c# You managed to find the issue yourself. Your RuleSet class shouldn't be implemented in such way that the rules are always the same (I believe?). What this mean is that when you create a new RuleSet any rules should be able to go into that set. I don't know what is the purpose of it but it seems your kind of associating custom data to your rules (in this case integers). So one approach to consider is to include that data in the rules themselves, per instance: public interface IRule{ bool IsApplicable(Command command); int Data{get;} } Another approach to consider is to provide a method on RuleSet that allows you to add a rule to the set, after this have been created: public class RuleSet : IRuleSet { private readonly Dictionary<IRule, int> _rules = new Dictionary<IRule, int>(); public RuleSet() { } public Dictionary<IRule, int> GetRules() { return _rules; } public void AddRule(IRule rule, int data){ _rules.Add(rule, data); } } I don't know what your implementation of IRule here is but you better make sure that it implements GetHashCode and Equals properly because you are using them as a dictionary key. This is true not only the existing IRule classes but all future possible implementations of IRule that can possibly lie on this dictionary. Another approach as @Adriano suggested, would be to rely on insertion order, or using a ordered collection such as a SortedSet (presuming the rules will not repeat this will do)
{ "domain": "codereview.stackexchange", "id": 25846, "lm_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 }
### Show Tags 21 Jul 2010, 07:18 4 for venn diagrams in case of 3 cases: Total = m(a) + m(b) + m(c) + m(a&b) + m(b&c) + m(c&a) - 2*m(a&b&c) So, 70 = 40 + 30 + 35 - m(a&b) - m(b&c) - m(c&a) - 2*15 => -35 = - [ m(a&b) + m(b&c) + m(c&a) ] - 30 Therefore, m(a&b) + m(b&c) + m(c&a) = 5 Target Test Prep Representative Status: Founder & CEO Affiliations: Target Test Prep Joined: 14 Oct 2015 Posts: 11006 Location: United States (CA) Re: There are 70 students in Math or English or German. Exactly 40 are in  [#permalink] ### Show Tags 05 Feb 2020, 04:51 2 ramana wrote: There are 70 students in Math or English or German. Exactly 40 are in Math, 30 in German, 35 in English and 15 in all three courses. How many students are enrolled in exactly two of the courses? Math, English and German. OA given is 5 please explain your answers. what is the significance of 'exactly' (Exactly 40 are in Math, 30 in German, 35 in English ) in the stem? Letting M = math, E = English, and G = German, we can use the formula for a 3-category scenario: Total = n(M) + n(E) + n(G) - n(M and E) - n(M and G) - n(E and G) + n(all 3) - n(none) 70 = 40 + 35 + 30 - n(M and E) - n(M and G) - n(E and G) + 15 - 0 70 = 120 - n(M and E) - n(M and G) - n(E and G) 50 = n(M and E) + n(M and G) + n(E and G)
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9473810466522862, "lm_q1q2_score": 0.8196969051716618, "lm_q2_score": 0.865224091265267, "openwebmath_perplexity": 2632.3608369643703, "openwebmath_score": 0.6130807995796204, "tags": null, "url": "https://gmatclub.com/forum/there-are-70-students-in-math-or-english-or-german-exactly-40-are-in-97623.html?kudos=1" }
php, template // The page gets displayed at the bottom. // =================== Templates ======================================== // Todo: Potentially namespace the stuff here. // Define the anonymous template function here, has html and such in native php here. $contact_us = function ($template_output_variables=null){ extract($template_output_variables); // Pull the variables. // Leave php in the template function. ?> <body> Hello World Body Text, Hello <?php h($name);?>. </body> <?php }; // End of template function declaration. $killer_section = function ($data=null){ extract($data); // Pull the variables. ?> Breaking news, There is a killer among us. <?php }; // End of killer section anon. function. // Display the page. // call & display the template via delayed execution, display it within a pre-set head and footer. display_page_inline($templates=array($contact_us, $killer_section), $options=array('title'=>$title), $template_output_variables); ?> It's very strange, I know, but I'm trying to do a whole new approach to refactoring, and make use of some new PHP 5.3 features while doing it. The goal is to have inline templates that I can put in any script, as many as I want, and move anywhere I want later, or merge the templates, etc. Something like this would get you most of the way there: <?php function h($val) { echo $val; }
{ "domain": "codereview.stackexchange", "id": 1494, "lm_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, template", "url": null }
\cdot r^{m_2-j} \left[\frac{1}{m_1 + j} \cdot t_1^{m_1 + j}\right]_{t_1=0}^{t_1=r}\right)\\ &=(m_2-1)! \cdot \sum_{j=0}^{m_2} (-1)^j \cdot\frac{1}{j!(m_2-j)!} \cdot r^{m_2-j} \cdot \frac{1}{m_1 + j} \cdot r^{m_1 + j}\\ &=(m_2-1)! \cdot \sum_{j=0}^{m_2} (-1)^j \cdot\frac{1}{j!(m_2-j)!} \cdot r^{m_2+m_1} \cdot \frac{1}{m_1 + j}\\ &=r^{m_1 + m_2}(m_2-1)! \cdot \sum_{j=0}^{m_2} (-1)^j \cdot\frac{1}{j!(m_2-j)!}\cdot\frac{1}{(m_1 + j)} \end{align*} Now the only thing left to show is that the sum is equal to $\frac{(m_1-1)!}{(m_1+m_2)!}$. I tried the following: \begin{align*} &\sum_{j=0}^{m_2} (-1)^j \cdot\frac{1}{j!(m_2-j)!}\cdot\frac{1}{(m_1 + j)}\\ &= \sum_{j=0}^{m_2} (-1)^j
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9835969713304755, "lm_q1q2_score": 0.8597397228302913, "lm_q2_score": 0.8740772368049822, "openwebmath_perplexity": 407.0622601053034, "openwebmath_score": 0.9997897744178772, "tags": null, "url": "https://math.stackexchange.com/questions/2222064/proof-of-equation-with-nested-dependent-integrals" }
telescope, collimation Title: Laser Colimator vs Cheshire eyepiece Both the laser collimator and cheshire eyepiece are tools used in astronomical telescope collimation. What are the main advantages/disadvantages of each? Which one might be best suited to start with for telescope newbies? Why not both? (if you can afford them) Both will do the job, but each has its strengths. Cheshire eyepiece (or, more properly, Cheshire/sight tube combo, which is the popular combination nowadays): It's easier to use when the scope is grossly out of alignment. Like, when you put it together for the first time, or after it dropped on the ground and rolled downhill for a minute. But can you do that with a laser? Yes. It's easier to align the secondary mirror, and it tends to produce dead-on results for this purpose. But can you do that with a laser? Yes. It is not immune from precision issues. Most parts of the Cheshire are usually well aligned (because they are machined on a lathe), but the crosshairs on the sight tube may or may not be perfectly centered. But can lasers also suffer from alignment problems? Yes. Recommended Cheshire / sight tubes: the ones made by Catseye. http://www.catseyecollimation.com/ They make much more than just Cheshire eyepieces, and all their tools are very high quality. Laser collimator: It's faster and arguably easier to use for normal daily collimation before you begin your normal observing sessions. But could you use a Cheshire instead? Yes. A laser is only as good as its own alignment precision. A misaligned laser will not collimate your scope properly. But do Cheshire sight tube combos suffer from precision issues with their crosshairs? Yes. Recommended laser collimators: the laser collimator and the tuBlug combo made by Howie Glatter. Unfortunately Howie has passed away recently, so either wait until someone picks up where he left off, or find a used laser/tuBlug combo somewhere on eBay or classified ads. http://www.collimator.com/ Howie's lasers are essentially guaranteed to have zero collimation errors from factory. From anecdotes told by users, these devices tend to keep their perfect collimation even after being dropped to the ground repeatedly.
{ "domain": "astronomy.stackexchange", "id": 2434, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "telescope, collimation", "url": null }
javascript, performance function make_re_fn(re) { return function test_re(string) { var m = string.match(re); if (starts_with(m)) { return m[1]; } }; } function make_next_char_fun(string) { var tests = []; [ entity_re, emoji_re, combine_chr_re ].forEach(function(re) { if (re.test(string)) { tests.push(make_re_fn(re)); } }); if (astral_symbols_re.test(string)) { tests.push(function test_astral(string) { var m1 = string.match(astral_symbols_re); if (starts_with(m1)) { var m2 = string.match(combine_chr_re); if (m2 && m2.index === 1) { return string.slice(0, 3); } return m1[1]; } }); } return function next_char(string) { for (var i = 0; i < tests.length; ++i) { var test = tests[i]; var ret = test(string); if (ret) { return ret; } } return string[0]; }; } It does seem that test_re is getting longer and longer strings with more iterations, which is possibly the most important thing to fix (do you really need to process thousands of characters each char you print?). But I'll note what you're doing with the regex and these big input strings is: Match the entire string against a regex Check if the match is at the start of the string If so, return the first match group Performance-wise you'll probably be better served using a regex starting with ^, which might not be correct in all usages here, but I copied emoji_re and a thousand characters of text into a benchmarking tool and it became an order of magnitude faster when I added the caret.
{ "domain": "codereview.stackexchange", "id": 44719, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, performance", "url": null }
thermodynamics, error-analysis, data-analysis ## plot: plot(x,y) lines(x, yHat, col='red') ## calc chi^2 chi2 = sum( (y-yHat)^2/yHat ) print( paste0('chi^2: ', chi2) ) Which generates this plot: and the value chi^2: 8.852e-5 Now suppose we are not evaluating the mass in gram, but instead in kg. This changes the code to ## Scaling: unit = 1e-3 and yields the result chi^2: 8.852e-8 This is not meaningful. In addition, I recommend you are clearly stating to what your $p$-value is referring to. There is a $p$-value for a non-zero intercept and a $p$-value for a non-zero slope.
{ "domain": "physics.stackexchange", "id": 94823, "lm_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, error-analysis, data-analysis", "url": null }
calculator. Transitivity: Vertex-transitive and/or edge-transitive graphs. By HS Math Resources Part 2 of a 3 part series of graphing cardioids!This is a worksheet that will guide students through understanding how to graph limacons with loops and no loops and how to write the equations when given a graph. 16 min 12 Examples. For each of the following, sketch a graph, shade the region, and find the area. Cardioids & Limacons _____ We're going to look at a variety of cardioids, which are graph of the form The graph with the sine appears tangent to the positive x axis, while the cosine version has a petal centered at the positive x axis. 2B Graphs of Polar Equations— Graph r = 1 + 2 sin Cardioids, Limaçons, and Lemniscates CLrd(01ds C fonS. Free essays, homework help, flashcards, research papers, book reports, term papers, history, science, politics. : You are free: to share - to copy, distribute and transmit the work; to remix - to adapt the work; Under the following conditions: attribution - You must give appropriate credit, provide a link to the license, and indicate if changes were made. (Click to enlarge. This lesson explores how to plot three of the more spectacular polar equations: rose curves, limacons and lemniscates. 7 Kubus dan Jaring Kubus_Ike Fitri Wardani_SMA N 1 Timpeh. the graph is a convex limacon. 1 Answer Gió Dec 28, 2014 I used Excel to plot the graphs and in both cases to obtain the values in the #x# and #y# columns you must remember the relationship between polar. 2 Page | 5 LEMNISCATES Lemniscates are propeller-shaped graphs, as shown in the figures on the right. pdf] - Read File Online - Report Abuse. it was spitting out something between cardiod and a circle. r = 4 – 6 cos θ 2. If the equation is written as "r =" you do not need to type "r =" again. Can plot many sets of data together. Ambiguous Case, 501. A graphing calculator will immediately illustrate the graph’s reflective quality. POLAR CURVES The graph of a polar
{ "domain": "primaopoiarrivo.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787857334058, "lm_q1q2_score": 0.8204867909489747, "lm_q2_score": 0.8311430541321951, "openwebmath_perplexity": 1507.055918034725, "openwebmath_score": 0.7386087775230408, "tags": null, "url": "http://gjpy.primaopoiarrivo.it/how-to-graph-limacons.html" }
complexity-theory Title: Enumerate probabilistic and other kinds of Turing machines together When we talk about the enumeration of TM's, do we mean the "regular" deterministic ones? So if we want to enumerate nondeterministic or probabilistic TM's, do we need a separate enumeration? I can see how we could describe probabilistic TM's as strings, just as we describe the deterministic TM's only now we have two transition functions. Then it also follows that checking whether some string enumerates a probabilistic TM is decidable. Perhaps one could think of a way to create some universal coding of TM's to strings that works for all different kinds of TM's? Perhaps the first ... digits of the enumeration describe what kind of TM (probabilistic, determinstic etc) it is and then follows the description of the TM in the standard fashion. So then we can enumerate all the TM's? A related question, does a TM know it's own description? Or can we give it that information without loss of generality? When we talk about the enumeration of TM's, do we mean the "regular" deterministic ones? We mean an enumeration of whatever kind of Turing machines we're talking about at the moment. Unless stated otherwise, "Turing machine" is normally taken to mean deterministic Turing machine. Perhaps one could think of a way to create some universal coding of TM's to strings that works for all different kinds of TM's? There's no fixed list of "all different kinds of TM's", so I don't see how this would be possible. A related question, does a TM know it's own description? It's not clear to me what it means for a TM to "know" anything. A Turing machine is just its state set, transition function and so on.
{ "domain": "cs.stackexchange", "id": 10083, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory", "url": null }
# Can a telescopic series with $a_n$ not tending to zero converge? Let $\{a_n\}$ be a sequence with $a_n\to l\ne0$ as $n\to\infty$. Then, does the series $$\sum^\infty_{n=1}(a_n-a_{n+1})$$ necessarily converge? I don’t know which of the following arguments is correct: The series converges: Because $$\sum^N_{n=1}(a_n-a_{n+1})=a_1-a_N$$ Taking limit $N\to\infty$ on both sides, the series converges to $a_1-l$. The series diverges: Set $a_n=1$ for all $n$. Then the series is equivalent to $$1-1+1-1+1-1\cdots$$ which does not converge. Furthermore, if the series does not always converge, under what conditions would the series converge?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846634557752, "lm_q1q2_score": 0.8174242812756912, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 271.8326697110257, "openwebmath_score": 0.9869915843009949, "tags": null, "url": "https://math.stackexchange.com/questions/2882027/can-a-telescopic-series-with-a-n-not-tending-to-zero-converge" }
A) $$\Large \frac{3}{7}$$. Examples for Chapter 3{ Probability Math 1040-1 Section 3. The problem of finding the probability of such a picking problem is sometimes called the "urn problem," since it asks for the probability that out of balls drawn are "good" from an urn that contains "good" balls and "bad" balls. Then another ball is drawn at random from the urn. (This is a consequence of the Multiplicative Law of Probability. With probability 1/2. Note that x! = x(x 1)(x 2) 3 2 1 and n k = n!=[k!(n k)!]. (c) Now suppose there are n identical urns containing white balls and black balls, and again you do not know which urn is which. An experiment consists of tossing a biased coin (P(H)=0. 1 Laplace's model: Uniform probability on finite sets Recall (Section 1. Urns I &II &III 1W, 2 B &2W, 1B &2W, 2B There are four possibilities in transference. We introduce a variant of Shepp's classical urn problem in which the optimal stopper does not know whether sampling from the urn is done with or without replacement. Show that: Qn = ½ Qn-1 + ¼Qn-2 + ⅛Qn-3 Q0 = Q1 = Q2 = 1 Find Q8. #"total" = 5+ 3 +2+1=11#. We first calculate the probability of getting an even number on one and a multiple of 3 on other,Here, n(s) = 6x6 = 36 and. Three balls are drawn at random. E = (2,3) (2,6) (4,3) (4,6) (6,3) (6,6) (3,2) (3,4)(3,6) (6,2)(6,4) n(E) = 11P(E) = 11/36Required probability = 1-11/36 = 25/36. An urn contains 10 marbles, R are red, R was decided by throwing a 10-sides die, the result is unknown to us. A sample of size 4 is to be drawn with replacement.
{ "domain": "istitutocomprensivoascea.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9780517418068649, "lm_q1q2_score": 0.8370666978267032, "lm_q2_score": 0.8558511396138365, "openwebmath_perplexity": 264.5772213848859, "openwebmath_score": 0.7951757311820984, "tags": null, "url": "http://ajyf.istitutocomprensivoascea.it/3-urns-probability.html" }
python, algorithm, array, hash-map This works great -- except I realized later that it doesn't account for ties. Since this script is for election night when the results are unofficial, I only want to mark as winners the candidates I am sure are winners. In the data above, the clear winners would be: Christine Matthews, Dexter Holmes, Gerald Wheeler, Timothy Hunter, and Sheila Murray. There is a tie for the sixth spot. Depending on the type of race, etc, it might be settled later by a runoff or some other mechanism. So, on election night, I simply wouldn't mark anyone else after those 5 as being a winner. Here's the new code I've written, which accounts for tie situations: # Make list of unique vote totals, with number of candidates who had those vote totals # This code uses collections.Counter to make the list of uniques. # http://stackoverflow.com/a/15816111/566307 uniques = Counter(cnd['votes'] for cnd in cnds).iteritems() # Now convert the Counter() output into a sorted list of tuples. uniquesCount = sorted( uniques, reverse=True )[0:num_win] # How many candidates are there in this list? # http://stackoverflow.com/a/14180875/566307 cndsInUniques = map(sum,zip(*uniquesCount))[1] # There's too many candidates. Must be one or more ties if cndsInUniques > num_win: adjusted_num_win = num_win # We need to remove items from the uniques list until we get the # num of candidates below or equal to the num_win threshold. while len(uniquesCount) > 0: # delete last item del uniquesCount[-1] cndsInUniques = map(sum,zip(*uniquesCount))[1] if cndsInUniques <= num_win: adjusted_num_win = cndsInUniques break winners = sorted(cnds, key=lambda k: int(k['votes']), reverse=True)[0:adjusted_num_win]
{ "domain": "codereview.stackexchange", "id": 7523, "lm_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, array, hash-map", "url": null }
c#, iterator, generator So we could just call: public class ProcessingTask : IProcessor { public void Execute( FileContent fileContent ) { GapHelper.GetNextName(5, fileContent.Components .Select(c => c.Name)).Take(20).Select(x => new Component { Name = x, Content = "Foo" }) .ToList().ForEach(fileContent.Components.Add); } } Which yields better readability. Also a fun fact about disposing an enumerator from the initial code: using (var nameGenerator = // ..
{ "domain": "codereview.stackexchange", "id": 36100, "lm_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#, iterator, generator", "url": null }
java, api, rest, spring } if (customerData.get("mAdmin") != null) { dto.setAdmin((Boolean) customerData.get("mAdmin")); } return dto; } ``` While you check out the ResponseEntityExceptionHandler I'll take a look at the logical handling of exceptions. Using classes for what they were not intended for } catch (SQLException | ConnectionFailedException e) { return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); } catch (ClassCastException e) { return new ResponseEntity<>(HttpStatus.FORBIDDEN);
{ "domain": "codereview.stackexchange", "id": 35580, "lm_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, api, rest, spring", "url": null }
ros // Use all neighbors in a sphere of radius 3cm ne.setRadiusSearch (0.03); // Compute the features ne.compute (*normals); // Create the VFH estimation class, and pass the input dataset+normals to it pcl::VFHEstimation<pcl::PointXYZ, pcl::Normal, pcl::VFHSignature308> vfh; vfh.setInputCloud (cloud.makeShared ()); vfh.setInputNormals (normals); // alternatively, if cloud is of type PointNormal, do vfh.setInputNormals (cloud); // Create an empty kdtree representation, and pass it to the FPFH estimation object. // Its content will be filled inside the object, based on the given input dataset (as no other search surface is given). pcl::search::KdTree<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ> ()); vfh.setSearchMethod (tree); // Output datasets pcl::PointCloud<pcl::VFHSignature308>::Ptr vfhs (new pcl::PointCloud<pcl::VFHSignature308> ()); // Compute the features vfh.compute (*vfhs); } Originally posted by Nihad on ROS Answers with karma: 22 on 2013-04-08 Post score: 0 Modified from another question: pcl::PointCloud<pcl::PointXYZ>::iterator b1; for (b1 = cloudPCL.points.begin(); b1 < cloudPCL.points.end(); b1++, b2++) { ROS_INFO_STREAM("x: " << b1->x << ", y: " << b1->y << ", z: " << b1->z); }
{ "domain": "robotics.stackexchange", "id": 13716, "lm_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 }
ros, tutorial, beginner-tutorials, server Comment by End-Effector on 2015-02-28: #include "beginner_tutorials/AddTwoInts.h" ^ /home/paulo/catkin_ws/src/beginner_tutorials/src/add_two_ints_server.cpp:2:43: fatal error: beginner_tutorials/AddTwoInts.h: No such file or directory #include "beginner_tutorials/AddTwoInts.h"
{ "domain": "robotics.stackexchange", "id": 21013, "lm_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, tutorial, beginner-tutorials, server", "url": null }
quantum-mechanics, angular-momentum, wavefunction, eigenvalue I see why $\hat{n}$ has integer-valued eigenvalues. However, the above text appears to suggest that if the wavefunction of quantum rotor is $2\pi$ periodic then the eigenvalues of the angular momentum must have integer eigenvalues. Why is this true? How does one prove/show this? For a single-particle quantum system defined on a circle, the angular momentum operator is given by $$ \hat{L} = -i \hbar \frac{\partial}{\partial \phi} $$ An eigenstate of $\hat{L}$ must satisfy $\hat{L} \psi_m(\phi) = \hbar m \psi_m(\phi)$. By inspection, the eigenstates of $\hat{L}$ are $$ \psi_m(\phi) = \frac{1}{\sqrt{2\pi}} e^{i m \phi} $$ By demanding $\psi_m(\phi + 2\pi) = \psi_m(\phi)$, it is immediately seen that $m$ must be an integer. Another related comment: given an arbitrary wavefunction $\psi(\phi)$ satisfying the appropriate periodic boundary conditions, we can expand $\psi$ in Fourier series as follows: $$ \psi(\phi) = \frac{1}{\sqrt{2\pi}} \sum_{m \in \mathbb{Z}} c_m e^{i m \phi} $$ where $c_m$ are the Fourier coefficients for $\psi$. Immediately, you can see that this Fourier series is nothing more than an eigenmode decomposition in terms of the $\hat{L}$ eigenstates.
{ "domain": "physics.stackexchange", "id": 87268, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, angular-momentum, wavefunction, eigenvalue", "url": null }
Just to answer you, that is the third time someone told me that joke is supposed to be ten, yes, I know. But the joke it that it is not. Page 1 of 2 12 Last
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9796676508127573, "lm_q1q2_score": 0.8099028074703987, "lm_q2_score": 0.8267118004748678, "openwebmath_perplexity": 972.7390572843666, "openwebmath_score": 0.8068263530731201, "tags": null, "url": "http://mathhelpforum.com/algebra/5384-kindly-help-me-plss-matrices.html" }
quantum-mechanics, quantum-field-theory, operators, vacuum, second-quantization There are initially many ways to choose an operator ordering and to choose a representation (ket-space), which the quantum operators act on. Say that we have chosen a specific notion of ordering that we call normal ordering $:\hat{A}\hat{B}:$, and say that we have chosen a notion of Fock space vacuum. To parametrize our ignorance we now introduce a c-number parameter $c$, and define the quantum Hamiltonian as $$\hat{H}~=~:\hat{A}\hat{B}:~+~\hbar c{\bf 1}.$$ In this way, if we have made a wrong choice by normal ordering the operators, we can always absorb the error into the definition of the c-number parameter $c$. One can often limit the possible choices of $c$ further by demanding Hermiticity of $\hat{H}$ and imposing other physical requirements. For instance, in (Bosonic) string theory, a similar so-called intercept parameter $a$ is completely fixed by consistency requirements (Lorentz symmetry in the light-cone formulation; nilpotency of the BRST charge in the covariant formulation), see chapter 2 and 3 in Green, Schwarz and Witten, "Superstring theory", vol. 1. A similar story holds for Fermionic operators.
{ "domain": "physics.stackexchange", "id": 1349, "lm_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-field-theory, operators, vacuum, second-quantization", "url": null }
homework-and-exercises, newtonian-mechanics, angular-momentum, reference-frames, rotational-dynamics Title: Where exactly is the sweet spot of a bat located? I was thinking about this when playing baseball yesterday. Where is the sweet spot of a bat located from the center of rotation? I tried doing the physics but I wasn't able to come to a conclusion of where it is. We use the idea that if a body collides with something, then its angular momentum is conserved with respect to the point of impact. Upon impact with the ball, the rotation of the bat is reversed. When the ball hits the sweet spot of the bat, the hand-held end of the bat should come to halt without receiving any impulse from the hand. Let us use this information to try to solve this problem. Let $x$ be the distance from the center of rotation to the center of percussion. The angular momentum with respect to the impact point before collision will then be $$L_i=mv\left(x-\frac{\ell}{2}\right)-I_0\omega$$ where $v=\omega\frac{\ell}{2}$ and $I_0=\frac{1}{12}m\ell^2$. After the impact, the bat turns backwards with an angular velocity $\omega'$, thus the angular momentum after is $$L_a=mv'\left(x-\frac{\ell}{2}\right)-I_0\omega'$$ where $v'=\omega'\frac{\ell}{2}$. We also remember that the bat should come to a halt without recieving any impulse from the hand which means that the angular momentum with respect to the center of rotation after is actually $0$. This means that $$L_a=mv'\left(x-\frac{\ell}{2}\right)-I_0\omega'=0.$$ This intuitively makes sense because $\omega'$ will have to be zero after collision. Setting up our angular momentum equations $L_i=L_a$ gives us $$L_i=mv\left(x-\frac{\ell}{2}\right)-I_0\omega=0$$
{ "domain": "physics.stackexchange", "id": 64711, "lm_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, angular-momentum, reference-frames, rotational-dynamics", "url": null }
newtonian-mechanics, forces, free-body-diagram, free-fall Title: Could a skydiver levitate? A diver exits his plane and with decreasing acceleration, eventually reaches terminal V owing to Weight=Friction. Then he opens his chute, and friction>weight, so he decelerates (up). My question is, if the diver had enough time before he hit the ground, could he reach a point where he would be completely stationary? {Assuming uniform air density} Not unless his parachute is lighter than air. The parachute creates a new exponential decay to a lower terminal velocity, but due to the nature of the drag equation, it can only ever oppose the relative motion. As soon as you stop moving, no matter how high the drag force when moving, the restive force will be zero again, and you will begin to fall. At very best, you can slow your terminal velocity down to approximately $0$, but never actually reach it (and that would require a very large parachute).
{ "domain": "physics.stackexchange", "id": 57639, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces, free-body-diagram, free-fall", "url": null }
c++, c++17 void push_back(Entity entity, value_type&& value) { emplace_back(entity, std::move(value)); } template< typename... ConstructorArgsT > reference emplace_back(Entity entity, ConstructorArgsT&&... args) { if (const auto it = m_mapping.find(entity); it != m_mapping.cend()) { return m_components[it->second]; } m_mapping.emplace(entity, size()); m_entities.push_back(entity); return m_components.emplace_back( std::forward< ConstructorArgsT >(args)...); } void pop_back() { m_mapping.erase(m_entities.back()); m_components.pop_back(); m_entities.pop_back(); } void swap(ComponentManager& other) noexcept { std::swap(m_components, other.m_components); std::swap(m_entities, other.m_entities); std::swap(m_mapping, other.m_mapping); } // private: commented for std::cout illustration //--------------------------------------------------------------------- // Member Variables //--------------------------------------------------------------------- AlignedVector< value_type > m_components; AlignedVector< Entity > m_entities; std::unordered_map< Entity, std::size_t > m_mapping; };
{ "domain": "codereview.stackexchange", "id": 32403, "lm_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++, c++17", "url": null }