text
stringlengths
1
1.11k
source
dict
2. What is the best stopping criteria for an algorithm? I know the following ways: • Determine the number of iterations we need to perform to achieve a desired error $\epsilon$, i.e., $||x^k-x^*||<\epsilon$ or $|f(x^k)-f^*|<\epsilon$ implies $k\geq N$ for some $N$. I see that this way is very reliable. • terminating when $||x^{k+1}-x^k||$ or $|f(x^{k+1})-f(x^k)|$ is small enough. • terminating when $||\nabla f(x^k)||$ is small enough. Could you explain how the second and the third cases work? Why $||\nabla f(x^k)||$ small enough can implies that $f(x^k)$ is approximate the optimal value $f^*$. I have been know that the case $f$ is strongly convex this can be verified. Is this stopping criteria still reliable in the case where $f$ is not strongly convex?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226260757066, "lm_q1q2_score": 0.8505932228740445, "lm_q2_score": 0.8705972616934406, "openwebmath_perplexity": 172.65927548897878, "openwebmath_score": 0.9520741701126099, "tags": null, "url": "https://math.stackexchange.com/questions/1618330/stopping-criteria-for-gradient-method/1618347" }
java, algorithm if (numbersToBeProcessed.length == 0) { return null; } int bestStart = 0; int curStart = 0; int bestLength = 1; int curLength = 1; for (int i = 1; i < numbersToBeProcessed.length; i++) { if (numbersToBeProcessed[i] > numbersToBeProcessed[i-1]) { curLength++; if (curLength > bestLength) { bestStart = curStart; bestLength = curLength; } } else { curStart = i; curLength = 1; } } ArrayList<Integer> ret = new ArrayList<>(bestLength); for (int i = 0; i < bestLength; i++) { ret.add(numbersToBeProcessed[bestStart+i]); } return ret; }
{ "domain": "codereview.stackexchange", "id": 16713, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, algorithm", "url": null }
c++, concurrency, c++20 The destructor should not call wake() I see you have a destructor that calls wake(), but that is very unsafe. No thread should be in pop_wait() when the destructor is called. Consider what happens after the destructor returns and those other threads have woken up: they assume they still have a live queue object! So the only time it is safe to call the destructor is if no threads are using the queue object any more, and thus there is no need to call wake() in the destructor. For a task pool it is important that you can signal the worker threads that they should stop doing any work. That has to be done in some other way; for example by setting a flag that signals that work has to stop. The destructor of the thread pool should look like: class thead_pool { queue q; std::vector<std::thread> threads; … ~thread_pool() { q.stop(); // signal queue that no more items will be pushed for (auto& thread: threads)
{ "domain": "codereview.stackexchange", "id": 44124, "lm_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++, concurrency, c++20", "url": null }
of one of the sides of the triangle. A distance exists with respect to a distance function, and we're talking about two different distance functions here. I got both of these by visualizing concentric Euclidean circles around the origin, and … For example, in the Euclidean distance metric, the reduced distance is the squared-euclidean distance. Er... the phrase "the shortest distance" doesn't make a lot of sense. We can use hamming distance only if the strings are of … Both distances are translation invariant, so without loss of generality, translate one of the points to the origin. But sometimes (for example chess) the distance is measured with other metrics. (Or equal, if you have a degenerate triangle. ( Log Out /  --81.82.213.211 15:49, 31 January 2011 (UTC) no. We can count Euclidean distance, or Chebyshev distance or manhattan distance, etc. AB > AC. This tutorial is divided into five parts; they are: 1. Each one is different from the others. The distance can be defined as a
{ "domain": "gmina.pl", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561712637256, "lm_q1q2_score": 0.8887343366327896, "lm_q2_score": 0.9173026533686324, "openwebmath_perplexity": 788.1079260040458, "openwebmath_score": 0.6235116124153137, "tags": null, "url": "http://chodel.gmina.pl/giant-robot-uxcbi/chebyshev-distance-vs-euclidean-ff48ec" }
ros, ros-kinetic, husky, startup, robot-upstart create a new system service containing all the custom launch files to be launched at system boot or create a new system service for each launch file. I am closing towards the first. Should I proceed and do that or is there something that I have missintepreted that could cause a problem? Thank you! Originally posted by smarn on ROS Answers with karma: 54 on 2020-04-14 Post score: 0 Looks like it is sufficient to just copy any .launch file that is to be called during start-up in the /etc/ros/kinetic/ros.d directory (eventually in my case it is not husky-core.d but ros.d) so i'm closing this one. Originally posted by smarn with karma: 54 on 2020-04-24 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 34763, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, ros-kinetic, husky, startup, robot-upstart", "url": null }
java, game, parsing, graphics return null; } /* Drawing */ public void drawTiles( Graphics g ){ for( Sprite s : tileArray ){ s.move(offset.x, offset.y); if( onScreen( s, frame ) ){ if ( ! s.draw(g) ) g.drawImage(s.getImage(), s.getX(), s.getY(), getTileWidth(), getTileHeight(), getApplet()); } } } public void updateTiles(){ for( Sprite s : tileArray ){ if ( onScreen( s, frame ) ){ s.update(frame); } } } boolean onScreen(Sprite spr, JPanel applet){ if ( spr.getX() < applet.getWidth() && spr.getY() < applet.getHeight() ){ return true; } return false; } /* Parsing */ /* Mapping */
{ "domain": "codereview.stackexchange", "id": 1283, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, game, parsing, graphics", "url": null }
population-genetics, migration The mode LSS (Linear Stepping Stone), is a little complex as it is very flexible. You can specify the migration rate from a focal patch to any other patch considering they are place in a linear order. SimBit LSS indeed allows for stepping several stones apart if you want. If for example you input LSS 3 0.1 0.8 0.1 2 it means that the probably to migrate from any patch to a given adjacent patch is 0.1. The probability of migrating is 0.2 and the probability of not migrating is 0.8. With such model, the number of individuals exiting a given patch is $0.2N$ ($0.1N$ on each side) for a patch of size $N$. Assuming all patches have the same size, the total number of migrants for a (meta)population of $d$ patches is $0.2dN$. Of course, if you allow for patch size to vary with carrying capacity or for migration rate to be affected by population mean fitness, then this expected number of migrants will vary among generations.
{ "domain": "biology.stackexchange", "id": 8265, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "population-genetics, migration", "url": null }
classical-mechanics, angular-momentum, symmetry, orbital-motion, vectors We now restrict ourselves to conservative central forces, where the potential is V(r), a function of r only, so that the force is always along r. By the results of the preceding section, we need only consider the problem of a single particle of reduced mass m moving about a fixed center of force, which will be taken as the origin of the coordinate system. Since potential energy involves only the radial distance, the problem has spherical symmetry; i.e., any rotation, about any fixed axis, can have no effect on the solution. Hence, an angle coordinate representing rotation about a fixed axis must be cyclic. These symmetry properties result in a considerable simplification in the problem. Since the problem is spherically symmetric, the total angular momentum vector, $$L = r \times p$$,
{ "domain": "physics.stackexchange", "id": 69654, "lm_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, angular-momentum, symmetry, orbital-motion, vectors", "url": null }
quantum-mechanics That's nice, not because there are n particles in some volume somewhere but because you can easily relate n to experimental parameters. And obviously the wavefunction isn't literally a probability per unit volume (it is complex). But you are use to thinking of $|\psi(x,y,z,t)|^2$ as a probability per unit volume (it isn't). So it's an easier thing to compare with when you compare two things that are probabilities per unit volume. In reality what you observe is detection events happening at different frequencies. That is always what you measure. Even when you consider $|\psi(x,y,z,t)|^2$ as a probability per unit volume when you look at the experimental data, it is different frequencies of detection events that you end up seeing in the data.
{ "domain": "physics.stackexchange", "id": 23647, "lm_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", "url": null }
javascript, unit-testing, regex, roman-numerals Now we have a quick way to run our tests every time we make a change and see which, if any, failed. That should allow us to make changes to convert fearlessly, confident that we will know if we're improving the implementation or if we break behaviors which used to work. From here we could add one test case at a time, update convert to make the new test pass, clean up our work, and then repeat. Sometimes that sort of incremental approach works great. Alternately we might write a bunch of tests, all of which will fail for now, and then work on getting more and more of them to pass. Since we already have some idea what our implementation might look like let's take that second approach. var tests = [ {'input': 1, 'expected': 'I'}, {'input': 2, 'expected': 'II'}, {'input': 3, 'expected': 'III'}, {'input': 4, 'expected': 'IV'}, {'input': 5, 'expected': 'V'}, {'input': 9, 'expected': 'IX'}, {'input': 12, 'expected': 'XII'}, {'input': 16, 'expected': 'XVI'},
{ "domain": "codereview.stackexchange", "id": 32407, "lm_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, unit-testing, regex, roman-numerals", "url": null }
microcontroller, wheeled-robot, industrial-robot, first-robotics Title: What parameters can be/should be looked on while deciding to work with a microcontroller in a bot I understand that choosing a microcontroller is all based on the needs and that there is no perfect Mcu.presently I have to select an MCU for a robot my team is building for the 2018 Abu robotics competition and I want to know how does the specs matter like what clocking speeds are ideal for what applications etc... while selecting one. Typically a decision like this is made based on a list of design requirements. Have you listed these out? What do you expect the MCU to do? How many peripherals will you have? Since you have a deadline, I would focus first on getting something to work very quickly using a simple board such as an Arduino or teensy. This buys you two things: (1) You have something working, even if it doesn't have all the bells and whistles you wanted. (2) You learn your design requirements thoroughly enough to pick a good part.
{ "domain": "robotics.stackexchange", "id": 1475, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "microcontroller, wheeled-robot, industrial-robot, first-robotics", "url": null }
c++, c++11, random Next, avoid needless magic numbers. Use std::mt19937::state_size instead of manually specifying 624. Why do you use a lambda? A simple std::ref(source) suffices. The seeding itself looks perfectly fine and there's no actual error anywhere in your code. template<class T = std::mt19937, std::size_t N = T::state_size * sizeof(typename T::result_type)> auto ProperlySeededRandomEngine () -> typename std::enable_if<N, T>::type { std::random_device source; std::random_device::result_type random_data[(N - 1) / sizeof(source()) + 1]; std::generate(std::begin(random_data), std::end(random_data), std::ref(source)); std::seed_seq seeds(std::begin(random_data), std::end(random_data)); return T(seeds); }
{ "domain": "codereview.stackexchange", "id": 33402, "lm_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, random", "url": null }
solid-state-physics, fourier-transform, crystals If, on the other hand, you do want to stick to the three-dimensional formalism (which then lets you use the same formulas for both cases) then you need to supplement your basis of the plane with a third vector to make the span three-dimensional. This third vector needs to have a nonzero $z$ component (or it would be linearly dependent on $a_1$ and $a_2$), but you need additional restrictions to specify it uniquely. These restrictions come from the fact that you want $b_3\cdot a_1=b_3\cdot a_2=0$, so you want $b_3$ along the $z$ axis, and more importantly, you want $a_3\cdot b_1=a_3\cdot b_2=0$, where you want $b_1$ and $b_2$ to lie in the $xy$ plane because all your physics is two-dimensional, and this requires $a_3$ to lie along the $z$ axis. As to the precise magnitude of $a_3$, it is irrelevant ─ it is easy to see that changing $a_3\mapsto \lambda a_3$ by any $\lambda \neq 0$ does not affect in any way the 3D $b_1$ and $b_2$ expressions you quote.
{ "domain": "physics.stackexchange", "id": 75955, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "solid-state-physics, fourier-transform, crystals", "url": null }
quantum-mechanics, atomic-physics, probability, fermis-golden-rule Remarks: Fermi Golden rule is typically used in calculation involving large collections of atoms or other situations where many identical transitions are possible. So the overall effect is large, as it is proportional to the transition probability times the number of atoms in the system (e.g., we could be easily dealing with an Avogadro number of atoms $~10^{24}$. The general rule in physics is that nothing can be high/big or low/small in absolute terms, but only in comparison to something else (particularly obvious for dimensional quantities: high/low means being much bigger/smaller than $1$ - obviously, no dimensional quantity can be considered as high/low, but only dimensionless ratios of such quantities).
{ "domain": "physics.stackexchange", "id": 85114, "lm_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, atomic-physics, probability, fermis-golden-rule", "url": null }
condensed-matter, solid-state-physics, crystals, phonons It's the same reason we say springs following Hooke's law or pendulums with small oscillations are simple harmonic oscillators; neither is true, but they're mostly right and form a good starting point. We use good, old-fashioned time-dependent perturbation theory. The quadratic potential $H_0$ is mostly right; the higher order terms $H_p$ (the perturbing Hamiltonian) are small compared to the quadratic term. Together: $$H=H_0+H_p$$ You already have a complete set of solutions for the quadratic potential, so you use them along with the perturbing Hamiltonian and Fermi's Golden Rule. The rate of transition from state $\left|a\right\rangle$ to $\left|b\right\rangle$ is then: $$R_{b\to a}=\frac{2\pi}{\hbar}\left|\langle a|H_p|b\rangle\right|^2\rho$$ where $\rho$ is the density of states. Those transitions are phonon-phonon scattering.
{ "domain": "physics.stackexchange", "id": 11184, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "condensed-matter, solid-state-physics, crystals, phonons", "url": null }
representation-theory, lie-algebra, spinors, majorana-fermions, clifford-algebra Every single source I can find for Majorana spinors uses operations like the transpose, complex conjugation and Hermitian adjoint on the $\Gamma$-matrices to obtain matrices acting on the same space. This is abstractly wrong, the transpose acts on the dual, the complex conjugation on the conjugate, and the Hermitian adjoint needs an inner product we have no reason for choosing. Of course, since $V$ is finite-dimensional, one can pick a basis and define the uncanonical isomorphisms to its dual and its conjugate, but I find this inelegant, particularly since the standard derivations require us to make a particular such choice with respect to the signs the $\Gamma$-matrices have under e.g. ${}^\dagger$. Finally, the Majorana spinors are usually defined by some equation involving an unnatural and arbitrary-looking product of $\Gamma$-matrices, which varies from source to source according to different sign conventions and sign choices made in the course of the derivation.
{ "domain": "physics.stackexchange", "id": 42991, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "representation-theory, lie-algebra, spinors, majorana-fermions, clifford-algebra", "url": null }
gazebo, navigation, odometry Originally posted by Ulrich on ROS Answers with karma: 31 on 2011-05-30 Post score: 3 Check out this answer: http://answers.ros.org/question/607/rotation-error-in-gazebo-simulation Originally posted by nkoenig with karma: 431 on 2011-06-17 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 5716, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo, navigation, odometry", "url": null }
synthesis 1.) A and B must either be different metals OR $$ \ce{2AgNO3(aq) + Zn(s) -> 2Ag(s) + Zn(NO3)2(aq)}$$ 2.) A and B must be a halogen $$\ce{Mg(s) + 2 HCl(aq) → MgCl2(aq) + H2(g)}$$ This is necessary as for the redox reaction to occur, you need two differing metals on the reactivity series in order for the single replacement to work, or alternatively, use compounds that contain halogens. Even so, in combining two compounds with metals or halogens, if the element is less reactive than the element in the compound, the single replacement reaction will not proceed. Some examples are: $$\ce{Ag (s) + Cu(NO3)2 (aq) -> } \text{No reaction}$$ $$ \ce{I2 + 2KBr ->} \text{No reaction} $$
{ "domain": "chemistry.stackexchange", "id": 16455, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "synthesis", "url": null }
which operates on one number to give another number. Framing and Joinery Angle Formula Catalogue. There are two sections of the ASVAB that are related to math: Mathematics Knowledge, which will test your algebra and geometry skills, and Arithmetic Reasoning, which focuses on word problems. LibreOffice Math is an equation (formula) editor. Every year many questions of this exam can be. Our free PDF can help. You may refer to this page as you take the test. a zero divided by a zero = 0/0 c. A = lw l w V = lwh l w h Arithmetic Properties Additive Inverse: a + (ˉa) = 0 Multiplicative Inverse: a · = 1 Commutative Property: a + b = b + a a · b = b · a Associative Property: (a + b) + c = a + (b + c) (a · b. Velocity = At 1. List Of Math Volume Formulas. xyz/?book=1423203046Business Math Formulas (Quickstudy: Business). Sets, Relations and Functions. Candidates those who are all preparing for SSC Mains and All other Competitive Examination can use this material. This Mathematical Formaulae
{ "domain": "podistiagnadello.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399026119352, "lm_q1q2_score": 0.8167728340055909, "lm_q2_score": 0.8418256472515683, "openwebmath_perplexity": 2224.0756255834276, "openwebmath_score": 0.6267150044441223, "tags": null, "url": "http://wgml.podistiagnadello.it/math-formulas-pdf.html" }
strings, rust, pig-latin So this is a zero-cost abstraction. The reason this works is that, in Rust (unlike C++ or Java), adding something to a string consumes the string on the left side of the +. (Therefore, if you do want to add something to a String and also use the original again, you want something like let hello_world = hello.clone() + ", world!";.) Work on Slices Instead Whenever possible, you want to be working with slices of the underlying array of bytes, which can be created, resized or passed around in constant time. This is a bit tricky to do here, because a Rust String is, internally, not an array of char like in many other languages. It’s really an array of u8 holding bytes encoded in UTF-8, so you do not have random access to each char, only sequential. Therefore, concatenating string slices is a zero-cost abstraction, but iterating over each char in a string is not: it has to convert between UTF-8 and UCS-4.
{ "domain": "codereview.stackexchange", "id": 44564, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "strings, rust, pig-latin", "url": null }
java, quick-sort Is there a better (more efficient) way to handle duplicate keys? If not, is there any way to significantly improve my code? Use a swap function rather then repeating the three lines required to swap elements three times Put spaces around your operators You avoid recursing for the second partition. I don't think the performance gain from this is sufficient for the extra complexity in your code. Rather then swapping before/after for the element equal to the pivot, count the number of elements equal to the pivot. Then when you sort the subarray make the one subarray shorter so as not to sort the elements equal to the pivot. Another issue as Rafe has noted is that there are other issues besides duplicate keys that can cause a O(n^2) behavior. Your code doesn't handle any of those.
{ "domain": "codereview.stackexchange", "id": 551, "lm_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, quick-sort", "url": null }
botany, plant-physiology, species, plant-perception Catasetum (Flower) Male flowers are poised to respond to visitors that contact antennae in the center of the flower by the release of stamen filaments held under tension by petals. The force by which a sticky disc with pollen sacs hits the chosen pollinator can be strong enough to knock a bee from the flower (Simons, 1992). This experience and the burden of the attached large pollen sac can be so traumatic that the bee will carefully evaluate potential future visiting sites and strongly prefer female flowers rather than the explosive male ones (Romero & Nelson, 1986). In this way, male Catasetum flowers may have evolved to compete for exclusive pollination rights of female flowers (Romero & Nelson, 1986).1 Arabidopsis
{ "domain": "biology.stackexchange", "id": 6974, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "botany, plant-physiology, species, plant-perception", "url": null }
# Removable discontinuity 1. Nov 9, 2005 ### maria curie the book says that g(x)= x ,if x is not equal to 2 / 1,if x=2 has a removable disc. at x =2. I couldn't remove it.I guess I didn't understand a removable dic. completely.I have an exam on friday.I need your help thanks 2. Nov 9, 2005 ### HallsofIvy Staff Emeritus f(x)= x if x is not equal to 2 f(x)= 1 if x is equal to 2. What is the limit of f, as x-> 2? (Remember that the limit depends only on the values of f close to 2, not at 2!) WHY is f not continuous at x= 2?? What would happen if you changed the value of f(2) to 2? 3. Nov 9, 2005 ### maria curie f(x) is not cont at x=2 because f(2)=1 is not equal to lim x->2f(x)=2.I know what continuity is.I dont know how we change the value of f(2) to 2 to be continuous x=2?? and what are the conditions of the continuous extension ?Can be every funct.that is not continuous become cont.? Last edited: Nov 9, 2005 4. Nov 9, 2005 ### 1800bigk
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.976310525254243, "lm_q1q2_score": 0.8482447312380746, "lm_q2_score": 0.8688267813328977, "openwebmath_perplexity": 823.7656686793732, "openwebmath_score": 0.7743803262710571, "tags": null, "url": "https://www.physicsforums.com/threads/removable-discontinuity.99142/" }
navigation, ros-melodic, costmap Apparently I am not the first to have this issue: https://answers.ros.org/question/367180/costmap_generator-node-do-not-work-well-2361/ https://answers.ros.org/question/367056/costmap_generator-workbut-it-topic-semanticscostmap_generatoroccupancy_grid-do-not-have-data/ How could I fix this issue? Or at least found another way to detect the Agent with AutowareAi AD Stack? Thanks in advance
{ "domain": "robotics.stackexchange", "id": 36400, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, ros-melodic, costmap", "url": null }
cosmology, astrophysics i.e.: $$ v_p = cz - H_0 d,$$ where $z$ is the redshift, $c$ is the speed of light, $d$ is the distance and $H_0$ is the Hubble parameter. There are several problems with this approach including: (1) Although $z$ is reasonably easy to measure, $d$ is a nightmare! (2) This only gives you the line of sight peculiar velocity. At present the tangential motion of all but the very nearest galaxies are not measurable, so one has to make assumptions and adopt some statistical reconstruction procedures to get the 3D field. (3) Uncertainties in distance translate fairly directly to uncertainties in peculiar velocity and this eventually swamps the signal. However, such measurements are important because they test ideas of cosmic structure formation - the velocity field is sensitive to the dark matter distribution for instance - and can yield estimates of cosmological parameters.
{ "domain": "physics.stackexchange", "id": 24987, "lm_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, astrophysics", "url": null }
c++, formatting char *pout = output; //POSSIBLE REIMPL char *pout = out.data(); const char *p = payload; const char *const end = payload + payload_len; size_t ascii_offset = strchr(line_placeholder,'|') - line_placeholder + 1; //could be calculated at compile time unsigned short offset = 0; for(unsigned l=0; l < number_of_lines; l++, offset+=16) { char* pline_begin = pout; char* pline = pout; strcpy(pline,line_placeholder); pline += sprintf(pline, "0x%02X: ", offset); for(unsigned i=0; i<16 && p < end; ++i, ++p){ pline += sprintf(pline, "%02X ", *p); *(pline_begin+ascii_offset+i) = isprint(*p) ? *p : '.'; } *pline=' '; pout += sizeof line_placeholder; // move pointer to next line pout[-1] = '\n'; } pout[-1] = '\0'; assert(pout == output + sizeof_output); // sanity check
{ "domain": "codereview.stackexchange", "id": 37296, "lm_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++, formatting", "url": null }
python # all integers between 1 & 9,999 == [x for x in range(1,10000)] # func2 # func >>> 0.02 >>> 297.54 # 9,999 random integers between 1 & 10,000 == [random.randint(0,10000) for x in range (1,10000)] # Re-ran this one about 5 times for func2 since it was so quick, # with 20 loops its lowest was 0.25 & highest 0.32 seconds taken # You'll also need to sort 'l' for this one to work with func2 # func2 # func >>> ~0.3 >>> 312.83 Again, with a low number of entries in l, the cost of removing duplicates & sorting the array would probably cause my function to run slower than yours. None of these speedups change the fact that the overall operation is worst-case O(N^2); however, they should drastically improve the best/average-case scenarios. Additionally, getting a large average speedup with an O(N^2) operation is huge when it comes to a big dataset, as it will be the limiting factor: I.e. 100,000 items:
{ "domain": "codereview.stackexchange", "id": 34045, "lm_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", "url": null }
regular-expressions, compilers, lexical-analysis So, during lexical analysis, you have nothing to indicate the end of a lexical element, as the program text goes on to give the next lexical element. For example, if you are scanning the string $foobar$, is it the identifier $f$ followed by $oobar$, or $foo$ followed by $bar$, or $fo$ followed by $oba$ and $r$. For a strict lexical point of view, all these possibilities would be correct ... though the grammatical parser that will use the lexical element can be unhappy with some choices. To simplify matters, a simple rule is often followed by scanners performing lexical analysis, called maximal munch rule, or longest match rule. It works as follows: While recognizing a lexical element, the lexical analyzer will keep reading the input string as long as it is reading a prefix of a lexical element, according to the lexical specification, and will halt when the next symbol to be read would no longer constitute such a prefix if added to the part of the input already scanned. At that
{ "domain": "cs.stackexchange", "id": 4863, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "regular-expressions, compilers, lexical-analysis", "url": null }
electrostatics, charge, potential, work, self-energy $$ However, if you took a trillion such spheres and assembled them into a bigger sphere of radius $R\gg r$, then the potential in the center of that bigger sphere would be approximately $(3/2) kNQ/R$, where $N$ is the number of smaller spheres. Consider a small sphere sitting near the middle of the big sphere. Since $R\propto N^{1/3}$, the potential it experiences is much bigger than $kQ/r$ (by a factor $\sim N^{2/3}$), so its self assembly energy is much smaller than the energy it took to move to the center. This is the sense in which your various forms of this work formula are correct - they are correct if self assembly energies of the blobs are negligible. And furthermore, this example shows that it's reasonably common that most of the energy does come from assembling the macroscopic charge distribution, not from making the microscopic charges that are a part of that.
{ "domain": "physics.stackexchange", "id": 95185, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics, charge, potential, work, self-energy", "url": null }
1. What is the distribution of number of rounds played in a single game? 2. What is the expected number of rounds in a game? What is the standard deviation of number of rounds in a game? 3. Let $$n$$ be the number of games played. How big must $$n$$ be to ensure at least 100 rounds are played with 90% probability? Use an appropriate approximation to estimate. ## Birds Arrive at a Bird Feeder Birds arrive at a bird feeder according to a Poisson arrival process with a rate of 6 birds per hour. A person starts watching the feeder at time 0.
{ "domain": "duke.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9896718459575752, "lm_q1q2_score": 0.8091304410623609, "lm_q2_score": 0.8175744761936437, "openwebmath_perplexity": 412.3017261860738, "openwebmath_score": 0.6653500199317932, "tags": null, "url": "https://sites.duke.edu/probabilityworkbook/" }
python, performance, python-3.x, programming-challenge if __name__ == '__main__': START_TIME = perf_counter() UPPER_BOUND = 10 ** 4 TARGET_PERMUTATIONS = 5 MINIMUM_CUBE = get_cube_permutations(UPPER_BOUND, TARGET_PERMUTATIONS) if MINIMUM_CUBE: print(f'Minimum cube that has {TARGET_PERMUTATIONS} permutations of its digits as cubes: {MINIMUM_CUBE}.') else: print(f'No cube found that has {TARGET_PERMUTATIONS} of its digits for numbers within range {UPPER_BOUND}.') print(f'Time: {perf_counter() - START_TIME} seconds.') Several issues with your code: You are storing too much data. Inefficient usage of Counter() Is Counter() ordered? You are needing to guess at upper bounds to the solution Your timing code is flawed. Storing too much data You store the cubes of 1 to \$10^4\$: cubes = [str(number ** 3) for number in range(1, upper_bound)]
{ "domain": "codereview.stackexchange", "id": 35628, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, python-3.x, programming-challenge", "url": null }
; Reviewers balanced on the tip of a of. Open Digital Education.Data for CBSE, GCSE, ICSE and Indian state boards to show or the. Note that the centroid is shown as a cross, x Mechanics centroid formulas now is not of. Of recent coinage ( 1814 ) links to admittance them in particular locating the plastic neutral axis individual can properly... The distance to the centroid of the most operating sellers here will be! An object we use centroid of Java applets and HTML5 visuals you to. De gravité '' on most centroid in mechanics, and others use terms of similar meaning could be perfectly balanced on tip... Cross sectional area.y 9–55 Asia Pacific University of Technology and Innovation axes cross that axis remain! Coinage ( 1814 ) Indian state boards of Materials or Deformable Body Mechanics class to admittance them sample from. Center of Mass via the method of geometric decomposition a set of points width of the most sellers... The points around and note how the centroids of simple
{ "domain": "comosystems.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9597620585273154, "lm_q1q2_score": 0.8176719803967575, "lm_q2_score": 0.8519528076067262, "openwebmath_perplexity": 2120.2227978662204, "openwebmath_score": 0.48041167855262756, "tags": null, "url": "https://comosystems.com/rmmnrk0/a9d2d1-centroid-in-mechanics" }
lisp, elisp (defun poj-login() (interactive) (request-site poj 'login)) (defun poj-logout() (interactive) (request-site poj 'logout)) (defun poj-submit() (interactive) (request-site poj 'submit)) Above is my code, I have tried this (let* ((form (cdr (assoc 'submit (site-forms poj)))) (frm-inst (apply (car form) (cdr form)))) ; get weird result (eval form)) ; get proper result
{ "domain": "codereview.stackexchange", "id": 4884, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lisp, elisp", "url": null }
javascript, error-handling, null Title: Writing null-safe code to set form values I will ask my question using the following example: HTML <div> <input id="ABC" placeholder="abc"></input> <textarea id="XYZ" placeholder="xyz"></textarea> </div> JS Code var valArray = [{id: "ABC", value: "INPUT"}, {id: "UNKNOWN", value: ""}, {id: "XYZ", value: "TEXTAREA"}] function process(arr) { for(var i=0; i<arr.length; i++) { var elem = document.getElementById(arr[i].id); if (elem != null) { elem.value = arr[i].value; } } } process(valArray); It works fine, but now I want to do it without an explicit if statement. How about the following code? Is it a proper JavaScript way to handle such situations? function process(arr) { for(var i=0; i<arr.length; i++) { (document.getElementById(arr[i].id) || 0).value = arr[i].value; } } From Programming JavaScript Applications by Eric Elliott- Chapter 3. Objects:
{ "domain": "codereview.stackexchange", "id": 9780, "lm_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, error-handling, null", "url": null }
c#, linq } } return students; } Is there any better way to doo this? Some things that just pop out when seeing your code: 1) Classes/POCOs definition They do not seem properly written, probably reproduced from memory. A better version would be: class Student { int StudentId { get; set; } List<Book> Books { get; set; } bool IsPassed { get; set; } } class Book { int BookId { get; set; } List<int> Pages { get; set; } } I have used properties, a more generic list type (IList<>) and put a more C#ish capitalization (Pascal case). 2) Proper disposal of disposable objects SqlConnection implements IDisposable and should also included in a using block (as its close friends SqlCommand and SqlDataReader). Also, in order to shorten things a bit, C# allows usage of var to replace the actual data type: private static List<Student> GetStudents() { string connStr = ConfigurationManager.AppSettings["Conn"];
{ "domain": "codereview.stackexchange", "id": 18483, "lm_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#, linq", "url": null }
c++, algorithm, performance, pathfinding Here is my code. Are there any ways of making it faster, please? #include <iostream> #include <stdio.h> #include <queue> #include <vector> #include <math.h> #include <stdlib.h> #include <utility>
{ "domain": "codereview.stackexchange", "id": 6059, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, algorithm, performance, pathfinding", "url": null }
sampling, downsampling, supersampling The task of upsampling consists in calculating $x_{L,k}$ from $x_k$. First, $L-1$ zeros are inserted after every sample of $x_k$. Actually this just changes the basic frequency support of the DTFT to $-L/(2T)\ldots L/(2T)$ containing $L$ copies of the original (analog) spectrum. Therefore the unwanted copies are filtered out with a lowpass filter so that only the original spectrum in range $-1/(2T)\ldots 1/(2T)$ remains. This is identical to $x_{L,K}$ The above steps are quite well explained in the figure of the Wiki article you quoted (in the same order).
{ "domain": "dsp.stackexchange", "id": 1624, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sampling, downsampling, supersampling", "url": null }
java, design-patterns, reinventing-the-wheel Enums Used QueryType.java package aseemEnums; public enum QueryType { READ, DELETE; } Databases.java package aseemEnums; public enum Databases { Oracle; } TableName.java package aseemEnums; public enum TableName { STUDENT_TABLE("STUDENT_TABLE"); private final String tableName; TableName(String tableName) { this.tableName = tableName; } public String toString() { return tableName; } } The Abstraction layer DAOFactory.java package aseemDao; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.naming.NamingException; import aseemEnums.Databases; public abstract class DAOFactory { // Abstract Instance methods public abstract DAOInsert getDAOInsert() throws SQLException; public abstract DAORead getDAORead() throws SQLException; public abstract DAODelete getDAODelete(); public abstract DAOUpdate getDAOUpdate();
{ "domain": "codereview.stackexchange", "id": 5210, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, design-patterns, reinventing-the-wheel", "url": null }
thermodynamics, energy, energy-conservation, conservation-laws The resulting Sankey diagram for the grinder running at constant speeds looks like this:
{ "domain": "physics.stackexchange", "id": 50621, "lm_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, energy-conservation, conservation-laws", "url": null }
1 Verified Answer | Published on 17th 09, 2020 Q2 Subjective Medium Evaluate the given integral. $\int { x\sec ^{ 2 }{ x } } dx\quad \quad$ 1 Verified Answer | Published on 17th 09, 2020 Q3 Single Correct Hard The value of the definite integral $\int_\limits{ 1}^e( (x+1)e^x\ln x) dx$ is- • A. $e$ • B. $e^e(e-1)$ • C. $e^{x+1}$ • D. $e^{e+1}+e$ 1 Verified Answer | Published on 17th 09, 2020 Q4 Single Correct Hard The integral $\displaystyle \int (1+x-\displaystyle \frac{1}{x})e^{x+\frac{1}{x}} dx$ is equal to • A. $(x-1)e^{x+ \frac{1}{x}} +c$ • B. $(x+1)e^{x+\frac{1}{x}} +c$ • C. $-xe^{x+\frac{1}{x}} +c$ • D. $xe^{x+\frac{1}{x}} +c$
{ "domain": "eduzip.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9825575162853136, "lm_q1q2_score": 0.8806185217920576, "lm_q2_score": 0.896251371748038, "openwebmath_perplexity": 9092.350503343334, "openwebmath_score": 0.66084885597229, "tags": null, "url": "https://www.eduzip.com/ask/question/if-displaystyleint-x5e-x2dxgxcdot-e-x2c-then-the-value-of-g-1-is-582347" }
c++, sorting The Search and BSearch methods are the same, one uses a hand-coded binary search and the other uses the STL version. (I was verifying their speed differences...unsurprisingly, there isn't one.) As an after thought: Is there a better way to count the number of lines in a file? Maybe without having to open and close the file twice? P.S. If you're wondering about the message at the end of the program, that's due to the vector of 170,000+ strings cleaning up after going out of scope. It takes a while. Answer to generic questions In order to search the massive list of 172,820 words That's relatively small (OK small->medium). I figured sorting it then using a binary search would be a good idea. Yes that's a good idea. The sorting algorithm I used was std::stable_sort as I wanted similar words stay in their locations.
{ "domain": "codereview.stackexchange", "id": 1285, "lm_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++, sorting", "url": null }
algorithms Title: Algorithm to find the median with a complexity of nlog(n) Does it exist an algorithm to find a median of table with a complexity nlog(n) Thank An algorithm I learned back in school was something along the following lines. First, you will start out with one empty min-heap and one empty max-heap. You will then loop through your data, inserting the next piece of data into the max-heap. At each iteration of the loop, you check if the max-heap has 2 more pieces of data than the min-heap. If the max-heap does, you pop the max value in the max-heap and insert it into the min-heap. After completing the insertion of the data stream, you then select the median value. If you have an odd number of data, you pop the max value off the max-heap as the median. If the data is even, you can pop the max/min value from the max/min heaps depending on what you decide is the median when data is an even size. This approach is $O(n\log{n})$.
{ "domain": "cs.stackexchange", "id": 9124, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms", "url": null }
dft, python, zero-padding But my plot in the frequency domain is off. I thought I should be looking at a sampled sinc wave centered on 20.1Hz, and since I'm sampling well above the Nyquist limit the centering should be perfect, right? But, if that were the case, 20Hz should be the largest bin (translates to bin 20). Instead, the largest bin is 21Hz. Plotting, we can confirm that's the case. f = np.linspace(0,fs/2,int(fs*T*zp/2)+1)# frequency domain x axis freqspan = 4 # number of samples to plot around the peak, so we get some detail plt.figure() plt.plot(f[fmaxindex-freqspan:fmaxindex+freqspan+1],abs(dft[fmaxindex-freqspan:fmaxindex+freqspan+1]))
{ "domain": "dsp.stackexchange", "id": 6736, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dft, python, zero-padding", "url": null }
ros, ros-melodic, rospy, clock def simtime_talker(): pub1 = rospy.Publisher('clock',Clock, queue_size=10) rospy.init_node('talker', anonymous=True) rate = rospy.Rate(10) # 10hz sim_speed_multiplier = 10 sim_clock = Clock() zero_time = rospy.get_time() while not rospy.is_shutdown(): sim_clock.clock = rospy.Time.from_sec(sim_speed_multiplier*(rospy.get_time() - zero_time)) rospy.loginfo(sim_clock) pub1.publish(sim_clock) rate.sleep() if __name__ == '__main__': try: simtime_talker() except rospy.ROSInterruptException: pass Originally posted by Craigstar with karma: 36 on 2020-03-29 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 34647, "lm_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, rospy, clock", "url": null }
For example, the sequence: $$a_1,a_3,a_4,a_7, \dots$$ would be a subsequence of the sequence written earlier. In this case, we can then find a strictly increasing function $k: \mathbb{N} \to \mathbb{N}$ such that $$1 \mapsto 1$$ $$2 \mapsto 3$$ $$3 \mapsto 4$$ $$4 \mapsto 7$$ $$\dots$$ and write $b_n = a_{k_{n}}$ to denote the subsequence . The strictly increasing part is important to preserve the order of the elements as in the original sequence. This leads us to the following definition: A sequence $(y_n)_n$ is subsequence of a function $(x_n)_n$ iff there exists a strictly increasing function $k: \mathbb{N} \to \mathbb{N}$ such that for all $n \in \mathbb{N}$, we have $y_n = x_{k(n)}$ No. A subsequence is a sequence taken from the original, where terms are selected in the order they appear. For example, let $x_n = \frac{1}{n}$. Let's take a subsequence $x_{n_j}$ where we pick every other term, i.e.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9830850862376966, "lm_q1q2_score": 0.8375420993365063, "lm_q2_score": 0.8519528076067262, "openwebmath_perplexity": 172.92551193961881, "openwebmath_score": 0.918485164642334, "tags": null, "url": "https://math.stackexchange.com/questions/2442042/what-is-a-subsequence-in-calculus/2442044" }
general-relativity, stress-energy-momentum-tensor, point-particles Why should the $u^\nu(x^\mu)$ of a "single-particle fluid" be equal to the particle four-velocity $d\gamma^\mu/d\tau$? The "single-particle fluid" as you introduce it in the OP is somewhat artificial, but we can work with it as well. So we have the mass density $$\rho(x^\mu) = \int \frac{m}{\sqrt{-g(x^\mu)}}\delta^{4}[x^\mu - \gamma^\mu(\tau)] d\tau$$ If you think about it, the stress-energy tensor $T^{\nu\lambda}(x^\mu) = \rho(x^\mu) u^\nu u^\lambda$ is zero everywhere apart from the worldline $\gamma^\mu(\tau)$ no matter what are the actual values of $u^\nu(x^\mu)$ away from it. So the only important question is, is it necessary to have $u^\nu(\gamma^\mu(\tau)) = d \gamma^\nu/d\tau$?
{ "domain": "physics.stackexchange", "id": 86907, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, stress-energy-momentum-tensor, point-particles", "url": null }
electromagnetism, optics, waves, visible-light $$\nabla \times \mathbf B = \mu_0 \epsilon_0 \frac{\partial \mathbf E}{\partial t}$$ so that in the wave equation, derived from the above and the other three: $$\frac{\partial^2 \mathbf E}{\partial t^2} = \frac{1}{\mu_0 \epsilon_0}\frac{\partial^2 \mathbf E}{\partial x^2}$$ the wave speed is determined by then. In the water, that constants are different: $\mu_w$ and $\epsilon_w$, and the speed is smaller. For a plane wave of the form: $\mathbf E = E(k_w(x - vt))$, where $v = (\mu_w \epsilon_w)^{-1/2}$ if the frequency $\omega = k_wv$ is the same as in the vacuum, then $k_wv = kc$ => $$k_w = \frac{c}{v}k = \left(\frac {\mu_w \epsilon_w}{\mu_0 \epsilon_0}\right)^{1/2}k$$
{ "domain": "physics.stackexchange", "id": 67804, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, optics, waves, visible-light", "url": null }
filters, filter-design, infinite-impulse-response a2 = poly( - r * ones(n,1) ); % EQ denominator k = sum(a2)/sum(b2); b2 = k*b2; % scaling (for 0dB gain) [H1,w] = freqz(b,a,1024); % Butterworth frequency response H2 = freqz(b2,a2,1024); % EQ frequency response
{ "domain": "dsp.stackexchange", "id": 2911, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filters, filter-design, infinite-impulse-response", "url": null }
machine-learning, nlp, lstm, machine-learning-model tokenizer = Tokenizer(num_words=MAX_NB_WORDS, filters='!"#$%&()*+,-./:;<=>?@[\]^_`{|}~', lower=True) tokenizer.fit_on_texts(df['Perguntas'].values) word_index = tokenizer.word_index X = tokenizer.texts_to_sequences(df['Perguntas'].values) X = pad_sequences(X, maxlen=MAX_SEQUENCE_LENGTH) Y = pd.get_dummies(df['Class']).values X_train, X_test, Y_train, Y_test = train_test_split(X,Y, test_size = 0.05, random_state = 42) print(X_train.shape,Y_train.shape) print(X_test.shape,Y_test.shape) #Balance data sm = SMOTE(random_state=12) X_train, Y_train = sm.fit_sample(X_train, Y_train) print(X_train.shape,Y_train.shape)
{ "domain": "datascience.stackexchange", "id": 6266, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, nlp, lstm, machine-learning-model", "url": null }
Note also for those not familiar with the older terminology, Mumford uses the term "prescheme" in the same way modern authors use the term "scheme", and reserves that term for those preschemes which are separated. • He only proves f is surjective when A is the zero ideal. – user204299 Oct 7 '17 at 1:57 • @Jake Where does he use the fact that $A$ is the zero ideal? Or even suggest that? – Joe Oct 7 '17 at 2:00 • He explicitly assumes A=(0) in the proof. He shows f factors as $Y \to \operatorname{Spec} \left( {R/A} \right) \to \operatorname{Spec} \left( R \right)$ and so what is left is to prove $Y \to \operatorname{Spec} \left( {R/A} \right)$ isomorphism. Since ${\mathcal{O}_Y}$ is just ${\mathcal{O}_{\operatorname{Spec} R}}/\mathcal{Q}$, he reduces to proving the case where A=(0). – user204299 Oct 7 '17 at 2:38
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.971992482639258, "lm_q1q2_score": 0.801370798852633, "lm_q2_score": 0.8244619306896955, "openwebmath_perplexity": 128.39492419916152, "openwebmath_score": 0.9739192128181458, "tags": null, "url": "https://math.stackexchange.com/questions/2460977/the-only-closed-subscheme-of-an-affine-scheme-is-the-scheme-itself" }
discrete-signals, fourier, fundamental-frequency Furthermore, in the continous-time case the harmonic family of the complex exponential $e^{j \Omega_0 t}$ is defined to be: $$\phi_k(t) = e^{j k \Omega_0 t}$$ for integer $k = 1,2,...,\infty $. The particular period associated with the k-th harmonic $\phi_k(t) = e^{j k \Omega_0 t}$ is $T_k = \frac{T_0}{k}$, nevertheless its fundamental period is $T_0$. Now, since the period in continous-time is a real variable it can take any value possible, as you can see, as the harmonic member index $k$ increases the particular period decreases like $T_k = \frac{T_0}{k}$. As the member index $k$ goes to infinity, the member period goes to zero but is a valid value. Hence we see that there are an infinite number of such members; i.e., the harmonic family in continuous-time has infinite members. for each $k=1,2,... , \infty$ Part-II: The discrete-time case :
{ "domain": "dsp.stackexchange", "id": 6927, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "discrete-signals, fourier, fundamental-frequency", "url": null }
statistical-mechanics, condensed-matter, interactions, liquid-state You should be aware that there are many different versions of the potential. In simulations it is truncated at a maximum "cutoff" distance; $r_\text{cut}=2.5\sigma$ is a common choice. It may or may not be shifted up by a constant amount, so as to make its value zero at the cutoff distance. Other choices apply a distance-dependent correction, so that the potential and its derivative(s) vanish at the cutoff. For any of these choices, it is possible to apply long-range corrections to simulation results, to get an estimate of the equation of state for the true infinite-range potential. Some features of the phase diagram are very sensitive to these choices. For example, the liquid-vapour coexistence curve is noticeably different: the critical temperature is at $k_BT_c/\epsilon\approx 1.32$ for the full potential, but $k_BT_c/\epsilon\approx 1.086$ for the cutoff and shifted potential with $r_\text{cut}=2.5\sigma$.
{ "domain": "physics.stackexchange", "id": 57361, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics, condensed-matter, interactions, liquid-state", "url": null }
c++, classes, windows, role-playing-game #include "Utilities.h" #include "Game.h" #include "BoardObject.h" #include "Board.h" #include "Player.h" #include "Enemy.h" #include "Teleport.h" // TODO: optimize // TODO: file reader, txt to board setup // FIX: why does it take so much time to compile // TODO: Board function to move a BoardObject to another board // TODO: optimize Board.cpp coloring // IDEA: console window widens on inventory open on the right side / slowly // TODO: threading / doing things while waiting on input int main() { //Init srand(time(NULL)); bool running = true; bool debug_mode = true; //Game / Config Game game; game.setTitle("ascii-rpg-game"); game.setCursorVisibility(false); game.resizeWindow(get_screen_width()*0.85, get_screen_height()*0.8); game.moveWindowCenter(); game.setConsoleBufferSize(0, 0); //game.maxemizeWindow(true); game.resizeableWindow(false); //game.resizeableWindow(true); // not working //game.disableInput(true);
{ "domain": "codereview.stackexchange", "id": 43208, "lm_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++, classes, windows, role-playing-game", "url": null }
quantum-state, programming 0 0 0 1 0 0 0 0 First, read my previous answer on what the bra-ket notation means. Now proceed: In your post, ket([0]) stands for $|0\rangle$, ket([0,1]) stands for $|0\rangle\otimes |1\rangle = |01\rangle$ and ket([0,1,1]) stands for $|0\rangle\otimes |1\rangle \otimes |1\rangle = |011\rangle$. The computational basis states of a single qubit are $|0\rangle$ and $|1\rangle$. The computational basis states of a $2$-qubit system are $|00\rangle, |01\rangle, |10\rangle$ and $|11\rangle$. Basically, take all $2$-digit permutations of $0$ and $1$. That is the first qubit can be in state $|0\rangle$ and second can be in $|0\rangle$ too; the first can be in $|0\rangle$ while the second is in $|1\rangle$ and so on. So as you see, a $2$-qubit system resides in a $4$-dimensional complex vector space $\Bbb C^4$ (as it has four basis states).
{ "domain": "quantumcomputing.stackexchange", "id": 458, "lm_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-state, programming", "url": null }
type-theory Does this count as a "dependent type", "a type whose definition depends on a value"? Since the type of the Array<MemorySlab<size>> is dependent on the value assigned to the size field on MemorySlabCache. If not, what is this? What would make it into an example of dependent types? So, the answer is arguably "yes," this is an example of dependent types. However, the problem with a lot of simple examples that people create for this is that they don't demonstrate non-trivial aspects of dependent typing. Arguably yours is better in this respect, because the type in question depends on an arbitrary value in MemorySlabCache. However, you never use a MemorySlabCache without a statically known value. So a more interesting example would be like: let cacheSize = readInteger(stdin) store.caches.push(new MemorySlabCache(cacheSize))
{ "domain": "cs.stackexchange", "id": 16878, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "type-theory", "url": null }
c++, opengl private: void init(std::string, std::string); }; } shader.cpp: shader::shader(std::string vert, std::string frag) { init(vert, frag); } void shader::init(std::string vert, std::string frag) { program = load_shader(vert.c_str(), frag.c_str()); // Get handles for our uniforms mvp_matrix = glGetUniformLocation(program, "MVP"); view_matrix = glGetUniformLocation(program, "V"); model_matrix = glGetUniformLocation(program, "M"); texture_sampler = glGetUniformLocation(program, "Sampler"); light_world_pos = glGetUniformLocation(program, "LightPosition_worldspace"); light_color = glGetUniformLocation(program, "LightColor"); light_intensity = glGetUniformLocation(program, "LightPower"); glUseProgram(program); } void shader::bind() { glUseProgram(program); }
{ "domain": "codereview.stackexchange", "id": 30915, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, opengl", "url": null }
c++, linked-list, reinventing-the-wheel auto ret_val = p.curr->succ; if (p.curr->prev) hook(p.curr->prev, ret_val); else { first = ret_val; first->prev = nullptr; } delete p.curr; --sz; return iterator(ret_val); } template<typename T> inline void List<T>::push_back(const T & v) { Link<T>* new_link = new Link<T>{ v }; if (empty()) insert_first_element(new_link); else insert_back_unchecked(new_link); } template<typename T> inline void List<T>::push_front(const T & v) { Link<T>* new_link = new Link<T>{ v }; if (empty()) insert_first_element(new_link); else insert_front_unchecked(new_link); } template<typename T> void List<T>::resize(size_type new_size, T val) { //store old sz b/c erase will decrement sz so the loop will execute less times than it should const auto old_sz = sz; for (auto i = new_size; i < old_sz; ++i) erase(--end()); for (auto i = sz; i < new_size; ++i) push_back(val); }
{ "domain": "codereview.stackexchange", "id": 30536, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, linked-list, reinventing-the-wheel", "url": null }
electromagnetic-radiation What is reason for heavily attenuated UV radiation at 320nm causing as strong response as for far less attenuated UV radiation at 380nm? What happens if you do the same tests without the lens in place ? It is entirely possible that the sensor is not responding to the 320 nm UV, but to a longer wavelength fluorescence due to one or more of the lens elements, absorbing the 320 nm photons, and fluorescing at a longer wavelength that the sensor responds to. A good many optical glasses are known to fluoresce, so it is important to check that an output signal is still at the same wavelength as the input signal. And a first requirement of a fluorescence output, is to have a strong absorption of the input signal.
{ "domain": "physics.stackexchange", "id": 9445, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetic-radiation", "url": null }
lagrangian-formalism gravitational force $F_g = mg \hat z$ along the z-direction. centrifugal force $F_c = m\rho \omega^2$ pointing in the $\hat\rho$ direction. Normal force from the surface $N (-\hat r)$ along the radial direction inward. These three force have to cancel in order to have a steady circular motion. We then have: \begin{align} N \sin\theta & = m \rho \omega^2 \tag{1}\\ N \cos\theta & = mg \tag{2} \end{align} Cancel the normal force in the above two equations and remind that $\rho = R \sin\theta$ we then obtain $$ \frac{\sin\theta}{\cos\theta} = \frac{m R\sin\theta \omega^2 }{mg} $$ The angular frequency: $$ \omega^2 =\frac{g}{R \cos\theta} \tag{3} $$ Eq.(3) is the same as the OP's result. Now, we may understand the physical reason from the force analysis.
{ "domain": "physics.stackexchange", "id": 85744, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lagrangian-formalism", "url": null }
thermodynamics, statistical-mechanics, entropy, phase-space But it is now also possible that i.e. a single particle takes on an impulse of $4$, while the other three particles do not move, or a particle has an impulse of $3$ and one of the other particles an impulse of $1$, etc. So the total number of accessible microstates is higher than just the multiplication of the two separate systems. In thermodynamics the total amount of accessible microstates of two combined systems systems (with equal temperature) is only the multiplication and doesn't include the the additionally gained microstates. No entropy should be produced, but in our thought experiment additional microstates are produced? Where am I making a mistake? Kind regards. $\Omega(E)$ is the number of microstates of the system with energy $E$. If the system can be divided into two non-interacting parts $A$ and $B$ with respective energies $E_A$ and $E_B$, then the total number of microstates accessible to the composite system is $\Omega_A(E_A) \cdot \Omega_B(E_B)$.
{ "domain": "physics.stackexchange", "id": 68387, "lm_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, statistical-mechanics, entropy, phase-space", "url": null }
fluid-dynamics, water Let's denote the ball's radius by $R$, its speed by $v$, and its mass density by $\rho_{ball}$. The kinetic energy $E_k$ equals $\frac 1 2 M v^2 = \frac{2 \pi}{3} \rho_{ball} R^3 v^2$. The drag force $F_d$ is given by $\frac 1 2 C_d \rho_{water} v^2 A = \frac {\pi}{2} C_d \rho_{water} v^2 R^2$. Here, $C_d$ denotes the drag coefficient for a sphere. The maximum distance $L _{max}$ that can be traversed by a cannonball $L_{max} = E_k/F_d$ is therefore $\frac 4 3 \frac {R}{C_d} \frac {\rho_{ball}}{\rho_{water}}$. For typical values ( $\frac{\rho_{ball}}{\rho_{water}} < 8$ and $C_d > 0.1$, see here), we find $L_{max} < 100 R$. In other words, a cannonball loses much of its kinetic energy when it traverses a layer of water larger than about fifty times its diameter.
{ "domain": "physics.stackexchange", "id": 18289, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-dynamics, water", "url": null }
thermodynamics, quantum-information The internal memory switches would use energy, increasing global entropy (seems to violate the claims of quantum computing) The particular type of problem can't be solved by quantum computers with sufficient efficiency (implying there exists a set of problems that could violate the 2nd law if solved with polynomial time) The problem is irrelevant of both memory and processing capability, as the sensors and the control input themselves require too much energy (seems this would trash certain explanations I've heard for why various Maxwell's Demons wouldn't work, in fact, it would seem to flagrantly ignore the principle behind the Landauer limit)
{ "domain": "physics.stackexchange", "id": 34278, "lm_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, quantum-information", "url": null }
newtonian-mechanics, rotational-dynamics, friction If F is the rolling resistance force slowing the ball and N is the weight of the ball, a rolling resistance coefficient, C, can be defined as: $$F=C\;N$$ The following is presented here and elsewhere as a physical formula for the rolling friction of a slow rigid wheel on a perfectly elastic surface, but I’ve so far been unable to derive it (or locate the original source.) Where z is the sinkage depth and R is the ball radius. $$C = (\frac{z}{2 R})^\frac{1}{2} $$ The classical solution for the contact between a sphere and half-space gives the relation of sinkage depth to load (ball weight,) ball radius, and an effective modulus, E. $$ N = \frac{4}{3} E\, R^\frac{1}{2}\; z^\frac{3}{2} $$ Expressing the ball weight using radius and ball density, this analysis suggests that F may be proportional to $R^\frac{1}{3}$. So the exponent is not really close to any of the integer values I guessed at in the original question.
{ "domain": "physics.stackexchange", "id": 5512, "lm_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, rotational-dynamics, friction", "url": null }
quantum-field-theory, renormalization, feynman-diagrams, correlation-functions, self-energy Title: What is the self-energy, and what are the vertex corrections? In the paper I am reading, they said "If we want to evaluate a transport coefficient, in a typical situation the single-electron self-energy is not sufficient: one needs to know vertex corrections as well. "
{ "domain": "physics.stackexchange", "id": 91165, "lm_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, renormalization, feynman-diagrams, correlation-functions, self-energy", "url": null }
quantum-mechanics, quantum-field-theory, condensed-matter, perturbation-theory, greens-functions I think these are the main characteristics of how QFT is different from QM. Certainly, there is much more to say, but this can be read in QFT-books. I admit, most books advance in big steps towards Feynman diagrams and renormalization, so the basics are often treated quickly. One last advice: forget about wave-functions; they no longer exist in QFT. Field operators, often designated by the same symbol have nothing to do with wave-functions. The multi-particle states take over the role of the wave-functions. Read books or/and ask your professor. Most well-known sources are Peskin-Schroeder, Srednicki, (both are not so easy to read for a beginner), Zee's book QFT in a nutshell, L.H.Ryder QFT etc.
{ "domain": "physics.stackexchange", "id": 38204, "lm_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, condensed-matter, perturbation-theory, greens-functions", "url": null }
quantum-mechanics, complex-numbers, differential-equations, semiclassical For contour $C_1$ the vertical edge of the rectangle gives zero contribution to the integral as the length of the rectangle tends to $\infty$. So, we get the first solution $y_1(x)=\int_{-\infty}^\infty\cos(kx+\frac{k^3}{3})dk$. But we know that a second order differential equation has two linearly independent solutions. We get one of the two solutions. After Fourier transforming the differential equation we have got that $y=\frac{1}{2\pi}\int_{-\infty}^{\infty}e^{i\left(kx+\frac{k^3}{3}\right)}dk$. That means the solution is the integral of the given function along $\mathrm{Re}(k)$. So it would give just one function $y_1(x)$. How would it give the another function? Please help me in figuring out how the second solution of the Airy differential equation can be determined? After Fourier transforming the equation, we get $$ y=\frac{1}{2\pi}\int_{-\infty}^{\infty}e^{i\left(kx+\frac{k^3}{3}\right)}\mathrm dk. $$
{ "domain": "physics.stackexchange", "id": 86861, "lm_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, complex-numbers, differential-equations, semiclassical", "url": null }
quantum-mechanics, quantum-information, quantum-entanglement, density-operator, duality fact, measurement based computing can be understood as a way of doing teleportation based computation in a way where in each step, only two outcomes in the teleportation are allowed, and thus only one Pauli correction can occur.
{ "domain": "physics.stackexchange", "id": 47324, "lm_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-information, quantum-entanglement, density-operator, duality", "url": null }
c# var attachments = r.GetMailAttachmentsByMailId(item.Mail_ID); var attachmentsCloud = r.GetMailAttachmentsCloudByMailId(item.Mail_ID).ToList(); var mailMsg = new MailMessage() { From = new MailAddress(item.MailAgent_FromEmail, item.MailAgent_FromName), Subject = item.Mail_Subject, SubjectEncoding = Encoding.UTF8, Body = String.Format("{0}{1}{2}", fotmattingInfo.Header, item.Mail_Body, fotmattingInfo.Footer), BodyEncoding = Encoding.UTF8, IsBodyHtml = true }; //attachments foreach (var att in attachments.Where(x => x.Filename != "")) mailMsg.Attachments.Add(new Attachment(att.Filename));
{ "domain": "codereview.stackexchange", "id": 1982, "lm_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 }
arm-navigation Title: Draw a circle with a robotic arm? I believe the technical term for this would be "arm navigation planning with hard dynamic geometric constraints". But my question would be how can I implement trajectory planning of a circle or similar geometric path with a robotic arm? Using a series of concentrated waypoints in the arm navigation would be one way I would guess. But slow to compute and carry out? To want to draw a circle or other geometric object with a robotic arm seems fairly fundamental, yet it actually appears to be quite complicated. Any advice? Originally posted by Jeremy Corbett on ROS Answers with karma: 397 on 2012-08-01 Post score: 2
{ "domain": "robotics.stackexchange", "id": 10446, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "arm-navigation", "url": null }
nanopore, base-calling Title: Which basecaller for nanopore is the best to produce event tables with information about the block size/move table? I previously used albacore version 2.3.1 to make initial move tables, but then I re-squiggle using Tombo version 1.5.1 to fix the errors. Example of move table produced by albacore, in which all the moves have the same size: When it is re-squiggled by Tombo (which produces variable length moves/blocks):
{ "domain": "bioinformatics.stackexchange", "id": 2422, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nanopore, base-calling", "url": null }
experiences of all learners. The first is to calculate any random element in the sequence (which mathematicians like to call the "nth" element), and the second is to find the sum of the geometric sequence up to the nth element. 1 #7,9,23­31odd find the general (nth) term of the sequence. Find the 20th term in the arithmetic sequence for which _____ 4. What I want to do in this video is familiarize ourselves with a very common class of sequences. org READY ! Topic:!Distinguishing!betweenarithmetic!and!geometric!sequences!!. Marcus An unbiased forecast of the terminal value of a portfolio requires compounding of its initial lvalue ut its arithmetic mean return for the length of the investment period. Standard: CCSS. 2: Geometric Sequences pg. Chapter 13 Sequences and Series 251 (c) If S 2 = t 1 + t 2, what does S 2 represent? What does S n mean? Calculate S10, S20 and S50. Arithmetic And Geometric Sequences Worksheet Pdf in an understanding medium may be used to check students qualities
{ "domain": "ecui.pw", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.985042916041382, "lm_q1q2_score": 0.820860487336424, "lm_q2_score": 0.8333245932423308, "openwebmath_perplexity": 701.0967153701463, "openwebmath_score": 0.4918925166130066, "tags": null, "url": "http://wjuy.ecui.pw/arithmetic-and-geometric-sequences-test-pdf.html" }
reference-request, lo.logic, computability, finite-model-theory The second part is quite a large question indeed. Depending on the relational structure you're working on, multiple solutions can be given. For instance, if you're interested in formal languages, MSO over word structures corresponds to regular languages, and the matching logic (see this) corresponds to CFL, and thus have their satisfiability problem decidable. You should have a look at Chapter 14 of Libkin, where nice segments of FO are proven to have a decidable satisfiability problem, according to the amount of quantifier alternations allowed.
{ "domain": "cstheory.stackexchange", "id": 3690, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reference-request, lo.logic, computability, finite-model-theory", "url": null }
algorithm-analysis, software-testing Title: In control flow graphs, what is the difference between a path and a branch? I'm studying for an exam on software testing and in my notes I found this: Many more paths than branches. A pragmatic compromise will be needed I cannot understand the difference between paths and branches; each time I work out the paths and branches of a graph I end up with the same number. Thanks! I do not know the exact definitions used by your class, so I am saying this with caution. A branch normally correspnds to a graph edge that allows control to pass from one node to another in the graph. A path is a succession of edges connected to each other, with possible repetition and representing the successive parts traversed by the control. So a branch will be a element of the program structure, a static entity. The path represent a fragment of computation. If you say more about what you understood, I may be able to tell you whether it makes sense.
{ "domain": "cs.stackexchange", "id": 1462, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm-analysis, software-testing", "url": null }
ros, dynamixel, ros-kinetic, dynamixel-motor, turtlebot3 Originally posted by Pyo with karma: 358 on 2018-04-16 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 30649, "lm_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, dynamixel, ros-kinetic, dynamixel-motor, turtlebot3", "url": null }
the-sun, ecliptic Title: What objects (if any) are there above or below the ecliptic, or just vaccum/gases Per the ecliptic Plane of the Solar System. Most of the planets orbit the Sun very nearly in the same plane in which Earth orbits, the ecliptic
{ "domain": "astronomy.stackexchange", "id": 7283, "lm_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-sun, ecliptic", "url": null }
quantum-chemistry Now, in you case, the probability $|4/5|^2$ corresponds to the following: $$ P(\text{-}a) = |\langle \text{-}a|\psi\rangle|^2. $$ This is the probability of projecting (by measurement) the state of the system into $|-a\rangle$. This corresponds to computing the probability of obtaining the eigenvalue $\text{-}a$ as a result of your measurement. If you want to know the probability of being in a give energy state, you have to compute the following probability $$ P(E) = |\langle E|\psi\rangle|^2. $$ where $|E\rangle$ is the state with energy $E$ (eigenstate of the Hamiltonian). Therefore, in order to compute the braket $\langle E|\psi\rangle$ you need to write $|\psi\rangle $ in the basis of Hamiltonian's eigenstates: in this basis, the solution is trivial.
{ "domain": "chemistry.stackexchange", "id": 4626, "lm_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-chemistry", "url": null }
an angle. But keep in mind that it's meant to be overlapping so rays one and two will interfere. And in this case because we're looking for dark bands the interference is going to be destructive. And then at some position later further down here some distance <i>delta x</i> you'll have the next dark band occurring when there is destructive interference again as a result of this increased path length difference. So let's figure out expressions for the phase shifts of Rays one and two and then and then we'll see how that changes with horizontal position. Now the phase shift of Ray one is zero because this reflection here occurs at an interface where you're beginning in a medium with high index refraction and some kind of glass and then going to a medium of low index refraction which is air. And so there is no phase shift there. And then for Ray two however there's a reflection off of this interface between the air in the glass and this does have a phase shift automatically of half of a
{ "domain": "collegephysicsanswers.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9830850862376967, "lm_q1q2_score": 0.8213514010964447, "lm_q2_score": 0.8354835330070839, "openwebmath_perplexity": 665.6531901739241, "openwebmath_score": 0.6801311373710632, "tags": null, "url": "https://collegephysicsanswers.com/openstax-solutions/figure-2734-shows-two-glass-slides-illuminated-pure-wavelength-light-incident" }
photons, quantum-electrodynamics was a photon, this one equation produced all of the laws and equations from electromagnetics that we already knew and loved. Thus, we said, "we're pretty sure this equation is the right one to use. We assumed this particle we invented was a photon, and it resulted in the equations and laws we have in the real universe. So this must be the way it actually is!". Having said that, we can never actually observe the photon as it mediates the force. This is simply because if we were to observe the photon, it would no longer be able to mediate the force because we have no method of observing a photon without destroying it.
{ "domain": "physics.stackexchange", "id": 7699, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "photons, quantum-electrodynamics", "url": null }
condensed-matter, topological-phase, spin-models, spin-chains -\theta_{\vec r}\big)\Big]\cr &\simeq -JS^2\Big[\cos\big(a\partial_x\theta\big) +\cos\Big(-{a\over 2}\partial_x\theta+a{\sqrt 3\over 2} \partial_y\theta\Big)+\cos\Big(-{a\over 2}\partial_x\theta -a{\sqrt 3\over 2}\partial_y\theta\Big)\Big]\cr &\simeq -{JS^2\over 2}\sum_{\vec r} \Big[1-a^2 \big(a\partial_x\theta\big)^2-a^2\Big(-{1\over 2}\partial_x\theta +{\sqrt 3\over 2}\partial_y\theta\Big)^2-a^2\Big(-{1\over 2} \partial_x\theta-{\sqrt 3\over 2}\partial_y\theta\Big)^2\Big]\cr &={\rm Cst}+{JS^2a^2\over 2}\times {3\over 2}||\vec\nabla\theta||^2 }$$ The only difference with the square lattice is a geometric factor $3/2$.
{ "domain": "physics.stackexchange", "id": 44007, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "condensed-matter, topological-phase, spin-models, spin-chains", "url": null }
I believe the other questions address case $(1)$, which is by far the harder case. For completeness, I will answer case $(2)$ here, but I warn a reader of this post that the answer is not very exciting. We simply observe that any word of length less than $n$ is contained in some number of length $n$. In fact, it is contained in many a number. To construct just one of these numbers, simply type the numbers on the phone keypad corresponding to the given word, and fill in the rest with whatever you like. Thus the question reduces to: how many words of length $n$ or less can be formed from the $26$ letter alphabet? There are $26$ one letter words, $26^2$ two letter words, $26^3$ three letter words, and so on. So the answer is simply the geometric sum: $$26 + 26^2 + \dots + 26^n = \dfrac{26^{n+1} - 26}{25}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9799765575409524, "lm_q1q2_score": 0.8269974194507849, "lm_q2_score": 0.8438951045175643, "openwebmath_perplexity": 402.46051856560456, "openwebmath_score": 0.7934415936470032, "tags": null, "url": "https://math.stackexchange.com/questions/1559838/how-many-possible-phone-words-exist-for-a-phone-number-of-length-n-when-also-cou" }
newtonian-mechanics, newtonian-gravity, projectile, drag As the forces here are balanced we can see that once the object has reached it's terminal velocity it will no longer increase in speed. This means that if $B$ has a lower terminal velocity than $A$, it will stop accelerating before $A$, and $A$ will continue until it reaches it's higher terminal velocity. From this we can see that $A$ will hit the ground before $B$, as long as $B$ reaches its terminal velocity. From this we could say that if $B$ hasn't reached it's terminal velocity, they should both hit the ground at the same time, but we should think about why terminal velocity comes about - due to the drag force. If $B$ has a lower terminal velocity than $A$, then it's clear that $B$ experiences more drag than $A$, and therefore it will not accelerate towards the ground at the same speed as $A$, because the force of drag pushing it up is greater, so the net force downwards is smaller.
{ "domain": "physics.stackexchange", "id": 44756, "lm_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, newtonian-gravity, projectile, drag", "url": null }
c++, performance, image, genetic-algorithm Title: Binary genetic programming image classifier's fitness function I am trying to figure out how to improve my binary image genetic programming classifier's fitness. It takes images and classifies them if it has some feature X or not in it. These are the main points: It takes an image and looks at the first 8 x 8 pixel values (called window). It saves these 8 x 8 values into an array and runs decodeIndividual on them. decodeIndividual simply runs the individual's function and retrieves the first and last registers. Last register is the scratchVariable that is updated per each window throughout an image. The first register is the main identifier per window and it adds it to the y_result which is kept for one image. When all the windows have been evaluated, y_result is compared to the ground truth and the difference is added to the error. Then the same steps are repeated for another image.
{ "domain": "codereview.stackexchange", "id": 34250, "lm_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++, performance, image, genetic-algorithm", "url": null }
it requires, measured typically as execution time and the amount of space, or memory, that the algorithm uses. From Wikibooks, open books for an open world < LaTeX. . Improving MSE as fitness function for a genetic algorithm. Because latexdiff uses internal functions of Algorithm:Diff whose calling format or availability can change without notice, the preferred method is now to use the standalone version. Particle Swarm Optimization Algorithm Algorithm Outline. by Jeff Erickson January 2015 revision. Kreher Department of Mathematical Sciences Michigan Technological University Houghton, MI 49931 kreher@mtu. This article explains how to create posters with latex This article explains how to create posters with latex Writing algorithms in latex That problem gets mitigated if we replace algorithmic with algo. For Job shop scheduling, I built a fitness function: def makespan_timeCalculation Block hashing algorithm. , typewriter fonts) so that constructs such as loops or conditionals are
{ "domain": "com.ph", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995752693051, "lm_q1q2_score": 0.8303488532283497, "lm_q2_score": 0.8596637523076225, "openwebmath_perplexity": 1303.5526224385758, "openwebmath_score": 0.8193498849868774, "tags": null, "url": "http://www.cybernate.com.ph/58t2kya/iowsjys.php?juyibuocn=latex-algorithm-function" }
More generally: Thm. (Cameron 1973, 1.35 on page 11) if \D is an extendable square 2-(v,k,λ) design then: (b) v = (λ + 2) (λ^2 + 4λ + 2) and k = λ^2 + 3 λ + 1, or (c) (v,k,λ) = (495,39,3). Example: in (b), λ=1 gives (v,k,λ) = (21,5,1): a projective plane of order 4. We'll see that all such planes are isomorphic, and that they are extendable (which follows from the uniqueness result plus the existence of a Steiner (3,6,22) system which you've proved in the last problem set). The next case is impossible (Bagchi's result cited on p.13); beyond that I don't know. [proof postponed]
{ "domain": "harvard.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9908743632845277, "lm_q1q2_score": 0.819167516223836, "lm_q2_score": 0.8267117876664789, "openwebmath_perplexity": 3260.0613332805115, "openwebmath_score": 0.862601101398468, "tags": null, "url": "http://www.math.harvard.edu/~elkies/M155.15/notes.html" }
• I do not think the claim is true (see my answer below). Where did you find this statement? Is it a conjecture of your own? Is it from a textbook? – parsiad Feb 4 at 2:53 • it's from a textbook, I will look for the original wording again – geo17 Feb 4 at 15:12 • my apologies, I misunderstood the question. The starting vector is $x_0 = [{\lambda_1}^{-1},0, \ldots,0 , {\lambda_n}^{-1}]^T$ – geo17 Feb 4 at 15:17
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226327661525, "lm_q1q2_score": 0.8435531370161633, "lm_q2_score": 0.863391602943619, "openwebmath_perplexity": 150.35568790098085, "openwebmath_score": 0.9649354219436646, "tags": null, "url": "https://math.stackexchange.com/questions/3099256/slow-convergence-of-gradient-descent-for-a-strictly-convex-quadratic" }
metallurgy Title: What's the benefit of copper plating paper clips? (Sorry, not an engineer or student, just looking for the most metallurgically relevant stack.) Recently I was in someone's office and, while playing with their paper clips, it occurred to me that copper is kind of a precious material for humble paper clips ... one look at the box, they're merely copper plated. But why even do that though? Why not just leave them bare steel or aluminium or whatever they are made of (which, curiously, the box doesn't say)? It makes them not rust in humid conditions while holding papers together. The required amount of copper coating on the clip is extremely small.
{ "domain": "engineering.stackexchange", "id": 3395, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "metallurgy", "url": null }
general-relativity, black-holes, gravitational-waves, event-horizon Even without gravity, the mass of a system can be wildly different than the sum of the masses of the parts. But the thing you called a mass in a gravitational system was probably an energy anyway. So now the two black holes have a mass that can be less than the mass of the holes. Great. And energy could be extracted from that the same way. If the parts are moving we can slow them down while they are getting closer. Just like we did with the shell. Every atom of the objects might still be there. But we steal their energy and so the system they are a part of can have a smaller $M$ parameter.
{ "domain": "physics.stackexchange", "id": 28651, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, black-holes, gravitational-waves, event-horizon", "url": null }
noise, spectrum-estimation The circuit is assumed to be linear. In other words the circuit is first solved for a specific DC operating point then each of the components' equivalent linear noise sources are modeled as thermal noise sources. Each of the components internal resistance values produce thermal noise whose frequency spectrum is shaped by the LINEAR response of the circuit. Each source is assumed to be uncorrelated with any other. That means that the power spectral density of the resulting noise is the sum of the power spectral density of each source individually. This is not necessarily the case when you have matched pairs of transistors that are closely coupled and share phonic coupling. The 1/f noise is a complex parameter model. 1/f noise is difficult to model but there have been several standard models developed. If you stay away from low frequency in the analysis you can avoid dealing with this issue. See google for more info on noise models such as Noise Sources in Bulk CMOS.
{ "domain": "dsp.stackexchange", "id": 5637, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "noise, spectrum-estimation", "url": null }
# Simple number puzzle You have to solve the following: $0$ _ $0$ _ $0 = 6$ $1$ _ $1$ _ $1 = 6$ $2$ _ $2$ _ $2 = 6$ $3$ _ $3$ _ $3 = 6$ $4$ _ $4$ _ $4 = 6$ $5$ _ $5$ _ $5 = 6$ $6$ _ $6$ _ $6 = 6$ $7$ _ $7$ _ $7 = 6$ $8$ _ $8$ _ $8 = 6$ $9$ _ $9$ _ $9 = 6$ You can put as many operations in the spaces but they must not contain a digit/letter. e.g. You can have $2 \times \sqrt{2} + 2!$ but not $2^2 + \sqrt [3]{2} + 2e$. You can only use factorials and double factorials, BODMAS/PEMDAS operations and square roots. Good luck. Extension: Find the smallest positive integral value of $n$ such that $n$ _ $n$ _ $n = 6$ has no solutions. Note by Sharky Kesa 5 years, 10 months ago
{ "domain": "brilliant.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.970687766704745, "lm_q1q2_score": 0.8088979823274624, "lm_q2_score": 0.8333245870332531, "openwebmath_perplexity": 3921.7325483566597, "openwebmath_score": 0.993182361125946, "tags": null, "url": "https://brilliant.org/discussions/thread/simple-numbr-puzzle/" }
ros, message, trajectory-msgs, ros-industrial Just to keep every information: I will not use answers like forum posts any more. Therefor some edits were done. UR5 doesn't use simple message. Comment by RosBort on 2014-10-17: Is there a robot already implemented in ROS-I that uses simple message? Or what topic do I need to publish to, so that the robot_interface_streaming will send anything to my controller? Comment by gvdhoorn on 2014-10-17: Have you read the latest edit to my answer? Comment by RosBort on 2014-10-17: Yes thanks! I was trying around before spaming around, but I will add a comment to your Edit 2 in a minute. Comment by gvdhoorn on 2014-10-17: This is getting a bit long (and slightly off-topic), but in short: yes, remapping would work, and the joint names are needed by the generic client to correctly map trajectories to simple message types. In any case, you can also send a message to the ROS-Industrial mailing list (see the wiki). After edit:
{ "domain": "robotics.stackexchange", "id": 19743, "lm_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, message, trajectory-msgs, ros-industrial", "url": null }
cubed gives the original number sure its asking that. Power of 3 is an integer that results from cubing another integer when cubed gives the number... The problem is cubed root can be used to find the length of a side a! Volume to ( Weight ) Mass Converter for Recipes, Weight ( Mass ) to volume to Converter for,... The answer for the square root, cubic root, cubic root, the cubed root be! Another integer of 1/27 multiplying that number by itself 3 times ( ^3 ) is...: n √ a = b b n = 3 is because cubing negative. Questions like: What is the cube root of -8 is written as \ ( \sqrt 3... Whole number, it is a cubed ( power of 3 one be. Because 3 x 3 is equal to 27 is said to be a perfect because... 3 = n × n × n × n 2 = n × 2. Is always positive to find the length of a cubed when the volume is known OUR cube of... Cubing a negative number results in an answer different to that of cubing it 's positive.... 1 to 1000 be 49 a negative number results in an answer different to that of cubing is
{ "domain": "torrecaprese.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399034724604, "lm_q1q2_score": 0.8322408416234852, "lm_q2_score": 0.8577681031721325, "openwebmath_perplexity": 739.1474650648767, "openwebmath_score": 0.7161109447479248, "tags": null, "url": "https://torrecaprese.com/archive/z70k07.php?720e9a=27-square-root-cubed" }
as sample size increases the standard error tends to As Sample Size Increases The Standard Error Tends To table id toc tbody tr td div id toctitle Contents div ul li a href As The Size Of A Random Sample Increases The Standard Error Of The Mean Decreases a li li a href As The Sample Size Increases The Standard Error Also Increases a li li a href What Is Standard Error Of The Mean For Dummies a li ul td tr tbody table p WorkSocial MediaSoftwareProgrammingWeb Design DevelopmentBusinessCareersComputers Online Courses B B Solutions Shop for Books San Francisco CA Brr it s cold outside Search Submit Learn more asp net redirect to standard error page
{ "domain": "winbytes.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936068886641, "lm_q1q2_score": 0.899143230082056, "lm_q2_score": 0.9136765281148513, "openwebmath_perplexity": 10404.382160598483, "openwebmath_score": 0.3121330142021179, "tags": null, "url": "http://winbytes.org/help/standard-error/proportion-standard-error.html" }
urdf, rosdep Title: rosdep error while urdf developing Hello I am very new to ROS and trying to develop a URDF for my own robot. First I wanted to learn the tutorials on the links below and then I would develop my own urdf. but when i run this command given in the totorial. http://wiki.ros.org/urdf/Tutorials/Building%20a%20Visual%20Robot%20Model%20with%20URDF%20from%20Scratch it gives error: $rosdep install joint_state_publisher ERROR: Rosdep cannot find all required resources to answer your query Missing resource joint_state_publisher Originally posted by wafeeq on ROS Answers with karma: 3 on 2013-09-17 Post score: 0
{ "domain": "robotics.stackexchange", "id": 15551, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "urdf, rosdep", "url": null }
javascript, natural-language-processing {romaji: 'bbyo', hiragana: 'っびょ', katakana: 'ッビョ'}, {romaji: 'ppya', hiragana: 'っぴゃ', katakana: 'ッピャ'}, {romaji: 'ppyu', hiragana: 'っぴゅ', katakana: 'ッピュ'}, {romaji: 'ppyo', hiragana: 'っぴょ', katakana: 'ッピョ'}, {romaji: 'yye', hiragana: 'っいぇ', katakana: 'ッイェ'}, {romaji: 'wwi', hiragana: 'っわぃ', katakana: 'ッウィ'}, {romaji: 'wwe', hiragana: 'っわぇ', katakana: 'ッウェ'}, {romaji: 'wwo', hiragana: 'っわぉ', katakana: 'ッウォ'}, {romaji: 'vva', hiragana: 'っゔぁ', katakana: 'ッヴァ'}, {romaji: 'vvi', hiragana: 'っゔぃ', katakana: 'ッヴィ'}, {romaji: 'vve', hiragana: 'っゔぇ', katakana: 'ッヴェ'}, {romaji: 'vvo', hiragana: 'っゔぉ', katakana: 'ッヴォ'}, {romaji: 'ssi', hiragana: 'っすぃ', katakana: 'ッスィ'}, {romaji: 'zzi', hiragana: 'っずぃ', katakana: 'ッズィ'}, {romaji: 'sshe', hiragana: 'っしぇ', katakana: 'ッシェ'}, {romaji: 'jje', hiragana: 'っじぇ', katakana: 'ッジェ'},
{ "domain": "codereview.stackexchange", "id": 16881, "lm_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, natural-language-processing", "url": null }
experimental-realization, classical-computing, communication state (notwithstanding the difficulty of superposition!), spin etc. You are totally right in your assumption about transporting qubits from Alice to Bob implies something physical. Usually problems/situations that have this setup of a transmission between two parties are called quantum communications. These problems/situations sometimes disambiguate by calling their qubits "flying qubits" which are almost always photons. Single photons are also quantum systems that can be prepared in useful qubit states, they can be operated on with gates (but not all kinds of gates and not as easily as some other physical implementations of qubits), and can be measured just like any other qubit system. Alice and Bob would literally share these photos by either an optical fiber they are connected by or through free space (which could be literally to a satellite in space).
{ "domain": "quantumcomputing.stackexchange", "id": 304, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "experimental-realization, classical-computing, communication", "url": null }
fft, dft, algorithms Title: Non Radix-2 FFT Algorithms I have 25,200 samples of data. My bandwidth is 12.6KHz and my Fs is 1.26MHz, I want to plot an Amplitude-Frequency Spectrum to display up to 100 different signals, that's on purpose (12,600 * 100 = 1,260,000), For that I need to compute FFT on the first 100 samples, I can't really do that because the algorithm I'm using is a Radix-2 algorithm, I thought about padding with 0s to 128 but then my BW is changing to 9.74KHz. the other thing I thought is to compute FFT of 128 and just cut the last 28 samples, but then I can't see anything after 974KHz, so I think I have to use some other type of FFT algorithm, which one should I use? I want to implement one myself and efficiency doesn't really matter here, because I'm working with small amount of samples. You can use the Prime-factor FFT algorithm recursively, since $100 = 5 \cdot 5 \cdot 2 \cdot 2$, you only have to implement the radix-5 and radix-2 reductions.
{ "domain": "dsp.stackexchange", "id": 10575, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fft, dft, algorithms", "url": null }
electromagnetism, forces, gravity, interactions, carrier-particles Title: How is the electromagnetic/gravitational force transmitted? So I was thinking about how a positive and a negative charge (or positive/positive, negative/negative) interact. I have read previously about how photons carry the electromagnetic force. However, how does this occur exactly? How does a photon compel a particle to move towards/away from another? At the very least, if we say that a positive charge emits photons and a negative one absorbs them (seems wrong, but I guess that's what happens?), then wouldn't the negative one be repelled away instead? Similarly, for gravitation, I understand that it's the curvature of spacetime that results in the "force". However, what compels a particle to move down the curvature of spacetime and not just stay where it is? In a regular rubber sheet situation, it is gravity that pulls an object down a curve. However, in spacetime there's no such equivalent.
{ "domain": "physics.stackexchange", "id": 59833, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, forces, gravity, interactions, carrier-particles", "url": null }
pressure, ideal-gas, evaporation, humidity, condensation The other important variable in what affects dew point is the pressure, which is where Pressure Dew Point (PDP) comes into play. As a rule of thumb (without the use of complex equations), compression increases/raises the dew point temperature and expansion/decompression lowers the dew point. This makes sense considering if you have a fixed amount of vapor in the air, and expand/decompress that vapor, the overall percentage of moisture in the air will be smaller, meaning the relative humidity percentage will decrease, and therefore lower the dew point. At this point, the standard atmospheric dew point formulas can then be applied to find dew points at different levels of pressure. As an actual example, the dew point for a parcel of air at 200 PSIg would have a dew point at -40°F, whereas the same parcel at 5 PSIg, significantly less compressed than the 200 PSIg parcel, would have a dew point of -77°F.
{ "domain": "physics.stackexchange", "id": 97140, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pressure, ideal-gas, evaporation, humidity, condensation", "url": null }
special-relativity, spacetime, metric-tensor, inertial-frames, time-dilation Takeuchi Mermin my own SR book, which is free online
{ "domain": "physics.stackexchange", "id": 57252, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, spacetime, metric-tensor, inertial-frames, time-dilation", "url": null }
time-complexity Title: Complexity of finding factors of factors of N number for (int i = 1; i <= N; i++) for (int j = i; j <= N; j+=i) for(int k = j; k <= N; k+=j) How to express this mathematically to calculate the complexity of the above code. I guess, its complexity is $O(N\log\log N)$ but couldn't prove it mathematically! For each value of $j$, the inner loop runs for $O(N/j)$ iterations. Fixing $i$ and varying over all $j$ in the middle loop, the total number of iterations in the inner loop is $$ O(N/i + N/(2i) + N/(3i) + N/(ki)) = O(N\log k/i), $$ where $ki$ is the maximal multiple of $i$ which is at most $N$. We can bound $k$ by $N/i$, and so the expression above equals $O(N\log (N/i)/i) = O(N\log N/i)$. Summing over all $i$ from 1 to $N$, we get $O(N\log^2 N)$. Using rudimentary calculus (approximating the sum by an integral), you can show that if you sum $N\log (N/i)/i$ over $i$ from 1 to $N$ then you still get $\Theta(N\log^2 N)$, and so the bound above should be tight.
{ "domain": "cs.stackexchange", "id": 15735, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "time-complexity", "url": null }