text
stringlengths
1
1.11k
source
dict
mechanical-engineering, modeling, simulation Title: Nastran RBE2 coordinate change I am looking for a method changing the coordinate system of RBE2 or RBE3 elements. Below is the nastran description of RBE2 in Nastran user guide.
{ "domain": "engineering.stackexchange", "id": 1189, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering, modeling, simulation", "url": null }
javascript, php ?> Here's the JavaScript code I'm posting with: function bprs() { { var rowCount = $('#accountsTable tr').length; var accountsCount = rowCount -1; var accounts = []; for (var n = 1; n <= accountsCount; n++) { accounts[n] = { name: $('#accountName' + n).text(), credits: $('#credits' + n).text() }; } var date = new Date(); var data = "date=" + date + accounts.reduce(function (prev, account, n) { return prev + "&accountname" + n + "=" + account.name + "&credits" + n + "=" + account.credits; }, ''); $.ajaxPrefilter(function( options, originalOptions, jqXHR ) { options.async = true; });
{ "domain": "codereview.stackexchange", "id": 19389, "lm_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, php", "url": null }
statistical-mechanics, bosons, chemical-potential Starting off: $$N=e^\alpha\sum_ie^{\beta\epsilon_i}$$ $$e^\alpha=\frac{N}{Z}$$ where $Z=\sum_ie^{\beta\epsilon_i}$. Note that $\frac{\partial Z}{\partial\beta}=\sum_i\epsilon_ie^{\beta\epsilon_i}$ Then $$E=\frac{N}{Z}\sum_i\epsilon_ie^{\beta\epsilon_i}$$ $$E=\frac{N}{Z}\frac{\partial Z}{\partial\beta}$$ $$E=N\frac{\partial}{\partial\beta}\ln{Z}$$ $$\frac{\partial E}{\partial N}=\frac{\partial}{\partial\beta}\ln{Z}$$ Putting it all together in terms of $\mu$ $$e^{-\beta\mu}=\frac{N}{Z}$$ $$-\beta\mu=\ln{N}-\ln{Z}$$ $$\ln{Z}=\ln{N}+\beta\mu$$ $$\frac{\partial}{\partial\beta}\ln{Z}=\mu$$ $$\frac{\partial E}{\partial N}=\mu$$ QED
{ "domain": "physics.stackexchange", "id": 14162, "lm_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, bosons, chemical-potential", "url": null }
visualization, data, correlation, probability Negative correlation (correlation < 0) implies that the input and output move in opposite directions - i.e. as the input increases, the output decreases (and vice versa). Nil correlation (correlation == 0) implies that the two variables are completely unrelated. Positive correlation (correlation > 0) implies that the input and output move in the same direction - i.e. as the input increases, the output increases (and vice versa). In the chart above, it looks like all-but-one of the inputs are negatively correlated with the output. This implies that as these inputs increase, the output decreases and vice versa. A few things about your approach:
{ "domain": "datascience.stackexchange", "id": 4422, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "visualization, data, correlation, probability", "url": null }
image-processing, python, opencv Title: How do I filter out this horizon from my contour? I am trying to identify the T-rex and obstacles (cactus and bird) from Google's no-internet game. What I have done is: Apply GaussianBlur filter Apply Canny Apply Dilate Apply erode findContours that returns all external contours, RETR_EXTERNAL My approach generally works, except that when there is a small bump on the ground next to a cactus, my script will consider the T-rex, the bump on the ground and the cactus as a giant horizontal contour, how do I filter out this horizon? The blue box is the outline of the contour I found. I tried reducing the size of the image I am taking vertically so that the horizon would be left out, but it introduced a different problem: T-rex legs would be cut off and occasionally, T-rex would not be considered as a contour as it is not closed.
{ "domain": "dsp.stackexchange", "id": 7892, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "image-processing, python, opencv", "url": null }
by position vectors a,b and c are collinear then we need to prove that there exits m and n such that. 13) ni are unit vectors that describe directions of respective partons. In each of these sections nocoParams elements have to be added. English spelling. ADDITION OF VECTORS OBJECTIVES 1. isequal but that doesn't seam to work. – Vectors that belong to the same line through the origin are called collinear, i. (b) The magnitude of vectors (a + c) equals the magnitude of vectors(b+ d), (c) The magnitude of a can never be greater than the sum of the magnitudes of b, c, and d, (d) Vectors b + c must lie in the plane of a and d if a and d are not collinear, and in the line of a and d, if they are collinear? Answer:-. Question 1 : Show that the points (2, - 1, 3), (4, 3, 1) and (3, 1, 2) are collinear. The points with position vectors and are collinear if a equals. Now, it is clear, from the diagram, that is directed along the -axis. Their sum or difference also lies in the same plane.
{ "domain": "i-moschettieri.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.975946446405965, "lm_q1q2_score": 0.837135739228198, "lm_q2_score": 0.8577681104440172, "openwebmath_perplexity": 680.3947479524796, "openwebmath_score": 0.7044625878334045, "tags": null, "url": "http://i-moschettieri.it/collinear-vectors.html" }
particle-physics, cosmological-inflation, elementary-particles, magnetic-monopoles, grand-unification U(1) field (2 degrees of freedom, usually seen as 1 boson with 2 spin states) SU(2) field (6 d.o.f., 3 bosons) SU(3) field (16 d.o.f., 8 bosons) 3 copies/"generations" of each of the following (okay, I lied about one line for each; I didn't want to copy and paste): SU(2) and SU(3) charged Weyl fermions (12 d.o.f. = 2 spin states × 3 SU(3) colors × 2 SU(2) "colors") SU(3)-charged, SU(2)-uncharged Weyl fermions (6 d.o.f.) another SU(3)-charged, SU(2)-uncharged family with different U(1) charge (6 d.o.f.) SU(2)-charged, SU(3)-uncharged Weyl fermions (4 d.o.f.) U(1)-charged, SU(2)-uncharged, SU(3)-uncharged Weyl fermions (2 d.o.f.) Weyl fermions with no charge at all (2 d.o.f.) if you're including those to explain neutrino mass Higgs field (4 d.o.f.)
{ "domain": "physics.stackexchange", "id": 83202, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "particle-physics, cosmological-inflation, elementary-particles, magnetic-monopoles, grand-unification", "url": null }
# What is the name of $(ωt+\varphi)$ in sine wave? For a sine wave $x=A\sin(ωt+\varphi)$, • $A$ is the amplitude • $\omega$ is the frequency • $\varphi$ is the phase What is $(ωt+\varphi)$ called? "Angle"? I can't find any source call that part. $\omega t + \varphi$ is called the phase. See this Wikipedia article for the details. The symbol $\varphi$ is known variously as the phase shift, phase offset or phase constant. • Wikipedia is not an authority on the use is scientific or technical terminology. In common speech, $\varphi$ is called both the "phase" and the "phase offset", and probably other things, all determined by context. It is misleading to claim that there's a universal and consistent use of terms. Mar 25 '18 at 17:00 As with functions in general, the quantity inside $\sin$ here is called an argument.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9752018383629826, "lm_q1q2_score": 0.8168485221626922, "lm_q2_score": 0.8376199572530448, "openwebmath_perplexity": 491.23937411481177, "openwebmath_score": 0.6541162729263306, "tags": null, "url": "https://physics.stackexchange.com/questions/395358/what-is-the-name-of-%cf%89t-varphi-in-sine-wave/395366#395366" }
general-relativity, metric-tensor, perturbation-theory, linear-algebra, navier-stokes Title: Inversion of a metric I am currently reading a paper by Bredberg $et.al$ arXiv:1101.2451 titled "From Navier-Stokes to Einstein". In this paper, the authors have considered a metric of the form \begin{eqnarray}ds^2_{p+2} = -r d\tau^2+2 d\tau dr +dx^idx_i\\-2(1-\frac{r}{r_c})v_idx^id\tau-2\frac{v_i}{r_c}dx^idr\\+(1-\frac{r}{r_c})\Big[(v^2+2p)d\tau^2+\frac{v_iv_j}{r_c}dx^idx^j\Big]+\big(\frac{v^2}{r_c}+\frac{2P}{r_c}\Big)d\tau dr\\ +\mathcal{O(\epsilon^3)} \end{eqnarray}
{ "domain": "physics.stackexchange", "id": 58510, "lm_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, metric-tensor, perturbation-theory, linear-algebra, navier-stokes", "url": null }
taxonomy Although there may be animals like sponges that don't seem to move around a lot, or corals that have symbiotic relationships with algae, simply "behaving like a plant" does not make them plants. Similarly, there are plants that move and trap insects. But taxonomists would never confuse them with animals.
{ "domain": "biology.stackexchange", "id": 9977, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "taxonomy", "url": null }
astrophysics, magnetic-fields, temperature, sun Title: How does the Sun's magnetic field continue to exist at such high temperatures? The temperature at the surface of the Sun is apparently well above 5000 C; I'm assuming the layers beneath the surface may be even hotter. At school, we learned that heating a metal beyond a certain temperature, specific to each metal, would demagnetize the magnet. How does the Sun's magnetic field continue to exist at such high temperatures? If the sun's internal plasma was at rest (the sun would have to stop rotating and other factors would need to occur), then I believe the magnetic field would dissipate and dissolve, essentially being 'demagnetized'. However, because the star is rotating, and different layers of it at varying rates, the churning of the plasma (which is charged) generates the magnetic field as it moves past other charged plasma. From Wikipedia:
{ "domain": "physics.stackexchange", "id": 44791, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "astrophysics, magnetic-fields, temperature, sun", "url": null }
jsx Also, I don't think this code is doing what you think it's doing. You're pushing to an existing array, then spreading it's contents into another array. You're essentially just shallow-cloning. It might look rendered correctly (probably because JSX now does fragments) but the structure is questionable. Anyways, a more functional way to iterate from 0 to N is to create an array of N items (it doesn't matter what the values are) and operate on that array using array methods. One way this can be achieved is using Array and array.fill. Also, instead of a loop and an outer variable holding an array, you can use array.reduce with the accumulator being that array. That way, you don't have that extra mutable variable. Your code could look like this: function getBurgerIngredients() { const ingredients = props.ingredients return Object.keys(ingredients).reduce((c, ingredientName) => { const range = Array(ingredients[ingredientName]).fill()
{ "domain": "codereview.stackexchange", "id": 32628, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "jsx", "url": null }
programming, qiskit, ibm-q-experience, shors-algorithm, ibm-quantum-devices Title: Can I access device specifications of IBMQ paying devices? I need to perform some tests for my thesis in real quantum computers, however, I only have access to IBM's free quantum devices (the maximum number of qubits I can use is 15, in ibmq_16_melbourne). I mainly have two problems: To factor N=15 using Shor's algorithm using the Shor class provided by Qiskit, I'd need 18 qubits. Using this version of the algorithm, I only need 11 qubits, but when I try to execute it in ibmq_16_melbourne, I get the following error message: Circuit runtime is greater than the device repetition rate. Error code: 8020. Which basically means I'm using too many gates. I know that I can see data about the circuit by writing shor_compiled = transpile(result['circuit'], backend=server, optimization_level=3) print('gates = ', shor_compiled.count_ops()) print('depth = ', shor_compiled.depth())
{ "domain": "quantumcomputing.stackexchange", "id": 2322, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "programming, qiskit, ibm-q-experience, shors-algorithm, ibm-quantum-devices", "url": null }
matlab, filters, dsp-core After the integer low-pass filter, I see a similar signal as after the float low-pass filter, but after the high-pass filter everything breaks down... I can’t understand what I’m doing wrong? There is a lotta detail in the question. I have done a hella lotta fixed-point DSP in my day. Both with a fixed-point DSP (56K) and with an integer CPU such as the 68K but also in generic C code. I posted an answer about specific C code that does a biquad in fixed point and uses noise-shaping at the sole quantization point. You should look at it.
{ "domain": "dsp.stackexchange", "id": 12371, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "matlab, filters, dsp-core", "url": null }
java, programming-challenge class TrieNode { public Character content; public TrieNode[] children = new TrieNode[26]; public boolean isWord; TrieNode(Character ch) { this.content = ch; } } class Trie { TrieNode root; Trie() { root = new TrieNode('*'); } public void insert(String word) { TrieNode currentNode = root; for (int i = 0; i < word.length(); i++) { Character ch = word.charAt(i); if (currentNode.children[ch - 'a'] == null) { currentNode.children[ch - 'a'] = new TrieNode(ch); } currentNode = currentNode.children[ch - 'a']; } currentNode.isWord = true; }
{ "domain": "codereview.stackexchange", "id": 41234, "lm_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, programming-challenge", "url": null }
of a square aperture in a mesh curtain. You do not have a formula, you have double precision data. The aperiodic For the pulse presented above, the Fourier transform can be found easily using the table. , the Fourier. Discrete Time Fourier Transform (DTFT) Fourier Transform (FT) and Inverse. Fn = 2 to 7 show special cases of Fn = 1. Structural Dynamics Department of Civil and Environmental Engineering Duke University Henri P. freq. Existence of the Fourier Transform; The Continuous-Time Impulse. • Example : the rectangular pulse train. 23 Nov 2019 Fourier analysis is a method for expressing a function as a sum of periodic components, and for recovering the signal from those components. Cn1=amplitude×ON durationTime-period×Sa(n . Fourier transform can be used for both periodic and non-periodic signals. The Fourier series synthesis equation creates a continuous periodic signal with a fundamental frequency, f, by adding scaled cosine and sine waves with frequencies: f, 2 f, 3 f, 4 f, etc.
{ "domain": "party-building.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9863631675246405, "lm_q1q2_score": 0.808712579162333, "lm_q2_score": 0.8198933271118221, "openwebmath_perplexity": 914.1921820473224, "openwebmath_score": 0.8902535438537598, "tags": null, "url": "https://party-building.org/xhymcs/fourier-transform-of-periodic-rectangular-pulse.html" }
discrete-signals, continuous-signals, reference-request Title: Recommended signal processing books? I am learning about signals in school but I found it very hard. Can someone help me by giving some references about any books? We are studying Fourier transform, signal power, filters, digital and analog etc. Without knowing what you find hard, it is difficult to recommend a specific book. Some are hard to read to. So, oldies but goldies, I suggest you to start with video lectures, and for instance by godfather A. V. Oppenheim Digital Signal Processing and tell us where you have trouble (and why).
{ "domain": "dsp.stackexchange", "id": 4658, "lm_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, continuous-signals, reference-request", "url": null }
javascript, jquery Title: Add a class to an element when it's loaded I want to add a class to only those <p> elements that have an <img>. So far this is what I have, it works, but I don't think I'm doing it right. $(".entry-content p img").addClass(function(){ $(this).parent("p").addClass("no-orphans-ctnr"); }); Here's a Demo/fiddle. As you can see, I used the .addClass() method twice. I'm not a jQuery/JavaScript developer but that doesn't look right to me. Please review and help me improve it. To select the p elements that have an img as child element, you can use the p:has(> img) selector, like this: $(".entry-content p:has(> img)").addClass("no-orphans-ctnr");
{ "domain": "codereview.stackexchange", "id": 10221, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery", "url": null }
quantum-mechanics, wavefunction Title: De Broglie wavelength of large objects I've seen some examples/problems where the de Broglie wavelength of large objects (like a tennis ball) is calculated and this doesn't really make sense to me. So the baseball consists of many smaller particles like electrons, which all have a wave function of their own. So what I'm wondering:
{ "domain": "physics.stackexchange", "id": 81680, "lm_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, wavefunction", "url": null }
c++, raspberrypi, ros-groovy, rasbperrypi /usr/bin/ld: cannot find -l:/usr/lib/liblog4cxx.so /usr/bin/ld: cannot find -l:/usr/lib/libboost_date_time-mt.so /usr/bin/ld: cannot find -l:/usr/lib/libboost_system-mt.so /usr/bin/ld: cannot find -l:/usr/lib/libboost_thread-mt.so collect2: ld returned 1 exit status CMakeFiles/enviarnum.dir/build.make:103: recipe for target '../bin/enviarnum' failed make[3]: *** [../bin/enviarnum] Error 1 make[3]: Leaving directory '/home/pi/catkin_ws/src/pruebas/build'
{ "domain": "robotics.stackexchange", "id": 19993, "lm_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++, raspberrypi, ros-groovy, rasbperrypi", "url": null }
io, assembly, x86 call WriteCharInTeletypeMode ; Otherwise print it. inc SI ; Increment index and jmp .loop ; jump to the beginning. .break: popa ret ;============================================================================== ; PROCEDURE WriteCharInTeletypeMode ; ; Description: ; Writes a character in teletype mode using BIOS interrupts. ; Inputs: ; AL: character. ; Outputs: ; No. ;============================================================================== WriteCharInTeletypeMode: pusha mov AH, 0xE ; Select BIOS function teletype mode text writing. int 0x10 popa ret ;============================================================================== ; Padding and the Bootloader Signature ;============================================================================== times 510 - ($ - $$) db 0x0 ; Fill the rest of the file by zeroes.
{ "domain": "codereview.stackexchange", "id": 36277, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "io, assembly, x86", "url": null }
moveit, ros-control, rospy I want to use MoveIt for my custom robotic arm and have reached the stereotypical cliff that occurs after reading through and doing the common tasks in the various tutorials and videos on ROS. Thanks!
{ "domain": "robotics.stackexchange", "id": 26022, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "moveit, ros-control, rospy", "url": null }
php, object-oriented, html, validation, form } Core/Input.php <?php namespace FormBuilder; Abstract class Input { protected $attributes = []; protected $rules = []; protected $label = null; protected $content = null; public function __construct($nameAttribute) { $this->attributes['name'] = $nameAttribute; } public function setAttribute($name, $value = null) { if ($value) $this->attributes[$name] = $value; else $this->attributes[$name] = null; return $this; } public function addRule($rules) { array_push($this->rules, $rules); return $this; } public function setLabel($label) { $this->label = $label; return $this; } public function validateField() { foreach ($this->rules as $rule) { $rule->validate($this->attributes['name']); } }
{ "domain": "codereview.stackexchange", "id": 43408, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, object-oriented, html, validation, form", "url": null }
homework-and-exercises, kinematics, calculus Both equals $x$ since both are measured from the origin. What if the particle comes back $\frac{x}{2}$ metres, what is the displacement and corresponding position now ? Both are still the same : $\frac{x}{2}$ metres. This clearly means that position is the same as displacement. In case if the initial position of the particle is d (let's assume) and it displaces by x metres then the final position is $(d + x)$. If you integrate velocity, you get : $$\int_{x_1} ^{x_2} dx = \int_{t_1}^{t_2} v(t) dt$$ In the above equation, the terms $x_1$ and $x_2$ represents the position of the body at time $t_1$ and $t_2$ and when you do the operation : upper limit - lower limit you get what you need : displacement. In your linked figure , x is showing position and you can get velocity by differentiating displacement and not position. So you must differentiate (x - 20) and not x to get velocity but mathematically both gives same result and hence it doesn't matter.
{ "domain": "physics.stackexchange", "id": 74824, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, kinematics, calculus", "url": null }
computer-architecture If one allows a wider front end and buffering, the impact of the structural hazard can be reduced. Such buffering, even if it is after instruction decode, might be considered a cache. A processor that breaks some instructions into multiple micro-ops and executes one micro-op per cycle could benefit from such a buffer even if only one instruction is fetched per cycle. Variable length instructions would naturally benefit from a buffer of fetched instructions since a fixed width fetch would often either fetch more than one instruction or fetch only part of an instruction. If the data access width is greater than the typical instruction length, it also becomes natural to use this greater width for fetching instructions, buffering any excess.
{ "domain": "cs.stackexchange", "id": 4249, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computer-architecture", "url": null }
pre-determined accuracy in a Taylor series. L-BFGS computes and stores an approximation to the Hessian, chosen so that the approximation …. Problem 5 xx The Taylor series expansion for sin (x) is sin (x) = x -H + E-E+ = o E- (-1). The MATLAB code I’ve written finds a numerical solution to the Falkner-Skan, a third order ordinary differential equation, for laminar boundary layers …. The scales used to express the asymptotic approximation are automatically inferred from the problem and can often include more exotic scales. "The Newton - Raphson Method" uses one initial approximation …. Fourier series and square wave approximation. methods and its Matlab code and numerical examples, 1 (Fourier series approximation to )(. Information and Computer Science Department. Differential equations - Taylor's method. Example 7 Find the Taylor Series for f(x) = ln(x) about x = 2. Students also learn how to integrate non-elementary functions using numerical methods and by approximating a function with
{ "domain": "buxtehuder-wollhaus.de", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.96741025335478, "lm_q1q2_score": 0.8061667518708486, "lm_q2_score": 0.8333245891029457, "openwebmath_perplexity": 921.3362401111589, "openwebmath_score": 0.7537301778793335, "tags": null, "url": "https://buxtehuder-wollhaus.de/taylor-series-approximation-matlab-code.html" }
c, floating-point The approach is: Handle 0.0 case where integer-part is '0' and pad fractional part to prec '0's, return at that point. Save sign flag (1-negative, 0-posititve), set padding variable zeros equal to prec, change sign of floating-point value to positive if negative. Nul-terminate temp string and fill from end with fractional-part conversion, subtracting 1 from zeros on each iteration, and after leaving conversion loop, pad to remaining zeros. Add separator '.' and continue to fill temp string with integer-part conversion. if sign add '-' to front of temp string. copy temp string to buffer and return pointer to buffer. (note: the range of floating-point values is from roughly -50.0 to 200.00 so INF was not protected against, nor was exhausting of the 32-byte buffer a consideration) The code with test case is: #include <stdio.h> #include <stdint.h> #define FPMAXC 32
{ "domain": "codereview.stackexchange", "id": 40547, "lm_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, floating-point", "url": null }
java, performance, pdf public static String generate_fdf(PDAcroForm acro){ //Generates and ugly but functional fdf file. //That said, PDFTK's has unreadable characters and this doesn't. //Outputs to stdout if no output given (Follows PDFTK's docs rather than function) try(ByteArrayOutputStream x = new ByteArrayOutputStream()){ acro.exportFDF().save(x); return x.toString("UTF-8"); }catch (IOException e){ System.out.println("Not sure how this happened"); System.out.println(e); return ""; }catch (NullPointerException e){ return "%FDF-1.2\n" + "%????\n" + "1 0 obj\n" + "<< /FDF 2 0 R >>\n" + "endobj\n" + "2 0 obj\n" + "<< /Fields [] >>\n" + "endobj\n" + "trailer\n" + "<< /Root 1 0 R >>\n" + "%%EOF"; } }
{ "domain": "codereview.stackexchange", "id": 21353, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, pdf", "url": null }
proof-techniques 2) They also state that they will "convert $T$ into a tree $T'$ by replacing node $u$ with $v$" but they don't assume that $T'$ is an optimal solution. Why? 3) How does contradicting optimality of $T$ prove that "A binary tree corresponding to the optimal prefix code is full"? What Kleinberg and Tardos show is that given a tree $T$ containing a node with a single child, they can come up with a strictly better tree $T'$, showing that $T$ isn't optimal. Therefore an optimal tree cannot have a node with a single child. Whether this qualifies as an exchange argument or not is not so important. More generally, the form of the argument is "if X doesn't satisfy P then X is not optimal; hence any optimal X satisfies P". In order to show that X not satisfying P cannot be optimal, they modify X to obtain a better X'. This is a common enough pattern which doesn't usually have a name attached to it.
{ "domain": "cs.stackexchange", "id": 3433, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "proof-techniques", "url": null }
ros, catkin-make-isolated, rosmatlab, winros Originally posted by Daniel Stonier with karma: 3170 on 2014-03-25 This answer was ACCEPTED on the original site Post score: 0 Original comments Comment by bnm-rc on 2014-03-26: Thanks for your answer! The main reason why I considered using catkin_make_isolated is that it's described in the installation guide of rosmatlab. It's at the point where I want to compile ROS with another version of the boost libraries. But, as I realized while writing the answers to your questions, I don't need to build ROS, but winros, so the real question would be how I can compile winros with another version of the boost libraries. Comment by Daniel Stonier on 2014-03-26: The scripts win_ros uses to build boost 1.47 are clean.bat, download.bat, make.bat in https://github.com/ros-windows/win_ros/tree/hydro-devel/rosdeps/win_boost. This is cmake boost. You could change the download branch to 1.44 (it exists) and see how that goes (ymmv).
{ "domain": "robotics.stackexchange", "id": 17414, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, catkin-make-isolated, rosmatlab, winros", "url": null }
For instance, there are distinct real roots if and only if $b^2−4ac>0$. So, to find the probability that the roots are distinct and real, first find the number of outcomes in which the square of the second roll exceeds 4 times the product of the first and last rolls. Let's do this. Assuming the dies are all six-sided, computing the number of such outcomes will be easy if you consider the value of the second roll: If the second roll is 1 or 2 this can't happen (keep in mind we want $b^2>4ac$). If the second roll is 3, there are exactly three outcomes: first roll 1, third 1 ($9>4\cdot1\cdot1$); first roll 2, third 1 ($9>4\cdot2\cdot1$); and first roll 1, third 2 ($9>4\cdot1\cdot2$). I'll leave the rest for you... The point is you can, with a bit of effort, find the number of outcomes for which the roots will be distinct and real. You just need to enumerate them so that you find them all.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.989347490102537, "lm_q1q2_score": 0.8018452808674628, "lm_q2_score": 0.8104789155369048, "openwebmath_perplexity": 369.4637687632904, "openwebmath_score": 0.8906062841415405, "tags": null, "url": "http://math.stackexchange.com/questions/120083/probability-and-statistics" }
python, security, chat 2) Don't PONG everybody! In your code, it should be noted, that lines 17 - 19 inclusive (shown below for brevity) introduce some (probably?) undesired behaviour... if "PING" in line: s.send(line.replace("PING", "PONG")) break Consider that a user in the chat says "PING". Your bot will replace it with PONG and send the message back to the room. This would be particularly bad given that this if-statement occurs before the banned words checking code (and break's out of the loop). Users can now use bad words to their heart's content, provided they include the word "PING" (in uppercase) in their message! Furthermore, the bot will repeat these bad words back to the room!! (This is how security bugs get created) Note, if you do end up implementing an !add command to insert items into banned_set, PLEASE ensure you have successfully protected your adding code from injection!
{ "domain": "codereview.stackexchange", "id": 19300, "lm_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, security, chat", "url": null }
python, mysql, authentication, flask username_session = escape(session['username']).capitalize() return render_template('index.html', session_user_name=username_session) You use a variable 'error' in login. Python has errors, and there easily extendable. Also Python follows EAFP more than LBYL. And so using exceptions is the norm. # Define a new error class ServerError(Exception):pass # Use error if not cur.fetchone()[0]: raise ServerError('Invalid Credential') # Catch and handle error error = None try: ... except ServerError as e: error = str(e) return render_template('login.html', error=error)
{ "domain": "codereview.stackexchange", "id": 16808, "lm_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, mysql, authentication, flask", "url": null }
entomology, food, population-biology, ethnobiology **This wasn't a totally wild guess. I first calculated the human:hive ratio for 1961-2011. This ratio was increasing - there were 71 people / hive in 2011, and 47 in 1961. Initially, I assumed the rate of change in the ratio to be constant, but this led to unrealistically large estimates for historically managed hives. However, the rate was clearly increasing (just, perhaps in a nonlinear way I didn't want to estimate), so I decided instead to compromise on a number less than 47 and greater than 4. I decided on 35, as it produced what seemed like a realistic estimate of 5 million hives in 1650, compared to around 20 million today for Eurasia and North Africa (excluding sub-saharan Africa where wild-harvest remains important and likely was even more so in the past).
{ "domain": "biology.stackexchange", "id": 1199, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "entomology, food, population-biology, ethnobiology", "url": null }
c++, object-oriented, game, sfml, snake-game //Grow the Snake: //If the snake is one pixel, create a new body part //in the direction opposite to where it's moving: if (snakeBodyPartLocations.size() == 1) { sf::Vector2f tailLocation = snakeBodyPartLocations.back(); if (snakeDirection == up) {tailLocation.y = tailLocation.y + 1;} else if (snakeDirection == down) {tailLocation.y = tailLocation.y - 1;} else if (snakeDirection == right) {tailLocation.x = tailLocation.x + 1;} else if (snakeDirection == left) {tailLocation.x = tailLocation.x - 1;} snakeBodyPartLocations.push_back(tailLocation); } //If the snake is larger than one pixel, create a body part //that follows the pattern the snake is moving in: else
{ "domain": "codereview.stackexchange", "id": 14839, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented, game, sfml, snake-game", "url": null }
### Second derivatives of the quantile function for the t distribution With a little more work, you can obtain an analytical expression for the second derivative. It is "more work" because you must use the derivative of the PDF, and that formula is not built-in to most statistical software. However, derivatives are easy (if unwieldy) to compute, so if you can write down the analytical expression for the PDF, you can write down the expression for the derivative. For example, the following expression is the formula for the PDF of the t distribution with ν degrees of freedom:
{ "domain": "sas.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.990140143532664, "lm_q1q2_score": 0.85304356634492, "lm_q2_score": 0.8615382094310357, "openwebmath_perplexity": 399.7757766626213, "openwebmath_score": 0.9430939555168152, "tags": null, "url": "https://blogs.sas.com/content/iml/2022/06/27/the-derivative-of-a-quantile-function.html" }
Ultimately, which perspective would be more beneficial from a didactic point of view? • Henning, if you don't mind, I suggest answering through the "answer" box and not in the comments. Aug 15, 2015 at 21:48 • @Martin: As you wish. Though I thought someone who actually knows functional analysis should have a chance to answer first. :-) Aug 15, 2015 at 22:24 A metric space doesn't come with a vector space structure, without which there can't be much analysis going on. It woulds just be a corner of topology, then. You can imagine equipping a vector space with a separate metric, but by the time you require that the metric be compatible with the linear structure -- $d(v+w,u+w)=d(v,u)$ and $d(λv,λu)=|λ|d(v,u)$ are both natural expectations -- you'll find that you've actually just introduced a norm under a different name ... • The second expectation is not necessary. Consider any nonnormable Frechet space. Anyway: (+1) Aug 16, 2015 at 4:53
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9585377320263431, "lm_q1q2_score": 0.8166289029891031, "lm_q2_score": 0.8519527982093666, "openwebmath_perplexity": 439.4943021482486, "openwebmath_score": 0.8643251657485962, "tags": null, "url": "https://math.stackexchange.com/questions/1398572/are-there-any-significant-differences-between-studying-functional-analysis-from" }
thermodynamics, homework-and-exercises, water, pressure, phase-transition Thanks, I'm going to start with a very short answer, but will be happy to elaborate on any point you find confusing. Steam tables for superheated steam are organized by pressure and temperature. In most examples I've seen, you look up the pressure first and then scan that row, column, or page for the relevant temperature. The entry for your temperature and pressure combination should give you things like specific volume, specific enthalpy, etc. The curve on the P-V and T-V diagrams in the solution is the saturation dome for water. Below it, water is a liquid; above it, water is a vapor (steam). On the saturation dome water is a saturated vapor. The way to sketch a particular point on a P-V or T-V diagram if you don't have a numerical steam table handy and are given the "wrong" properties is to identify the correct isotherm on a P-V diagram (you can see a small part of it drawn in your example P-V) or the correct isobar on a T-V diagram (also shown in the example).
{ "domain": "physics.stackexchange", "id": 1656, "lm_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, homework-and-exercises, water, pressure, phase-transition", "url": null }
particle-physics, nuclear-physics, interactions, carrier-particles, x17 Title: Why should the X17 be a force carrier? A preprint has been recently published on arXiv about another experimental evidence of the existence of the X17 particle, a 17 MeV boson that would be a potential force carrier. Now, I don't have a strong subnuclear background, but I was able to read the article and understand how the experiment was performed and how accurate the results were. But why finding such a boson would mean another fundamental force? Couldn't it be just a resonance? My guess is for the low invariant mass, but I'm probably wrong. One of the guiding principles of physics is that anything not forbidden is mandatory. If it's possible for something to happen, then somewhere in the universe it happens spontaneously.
{ "domain": "physics.stackexchange", "id": 67079, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "particle-physics, nuclear-physics, interactions, carrier-particles, x17", "url": null }
Sum Probability 0 1/3 1 1/6 2 5/36 3 7/72 k ((4/3)[k/2]+1-1)/2k For large k, the ratio P[S=k+2]/P[s=k] is asymptotic to (4/3)/4 = 1/3, which means that the tail of the distribution is approximately geometric with the ratio of ${1/\sqrt{3}}$. I did not feel like computing exact distribution for larger A, resorting to simulations. Here is A=10 (ignore the little bump at the end, an artifact of truncation): There are three distinct features: P[S=0] is much higher than the rest; the distribution is flat (with a bias toward even, which is diminishing) until about S=n, and after that it looks geometric. Let’s see what we can say for a general starting value A.
{ "domain": "calculus7.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587221857244, "lm_q1q2_score": 0.8121244935665359, "lm_q2_score": 0.8221891392358015, "openwebmath_perplexity": 3894.7082624891655, "openwebmath_score": 0.9820961952209473, "tags": null, "url": "https://calculus7.org/tag/probability/" }
javascript, design-patterns, html, dom Minor update on templating From your comment, you might be overestimating the effort templating takes. If you define your template like this in your HTML: <div id="hotelTemplate" style="display:none"> <!--the markup I want to build--> <div class="pull-left col-xs-4"> <div class="thumbnail"> <div class="caption"> <h5>~</h5> </div> <img class="img-responsive" src="~" alt="~"> <div class="caption"> <h3 class="pull-right"> <small> <s>~</s> </small>~</h3> <div class="clearfix"></div> </div> </div> </div> </div> And then use for example this simple template filler function fillTemplate( s ) { //Replace ~ with further provided arguments for( var i = 1, a = s.split('~'), s = '' ; i < arguments.length ; i++ ) s = s + a.shift() + arguments[i]; return s + a.join(""); }
{ "domain": "codereview.stackexchange", "id": 8300, "lm_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, design-patterns, html, dom", "url": null }
newtonian-mechanics, reference-frames, rotational-dynamics, torque Title: What is torque, really? and can it be determined for a point on a circle that is away from the center of the rotation axis by a radius $r$? Let's picture a Rolling without slipping Wheel, that constantly accelerates. radius of a wheel/circle is $r$. Basically any wheel of a vehicle is rotating around its fixed axis - AoR -(axis of rotation) Most of the times wheels have this AoR perfectly in the center of the circle/wheel/cylinder. What I want to understand is how can we describe the torque at the point $C$? Because as I understand we could go about finding torque for the center of the circle - point $O$.
{ "domain": "physics.stackexchange", "id": 62378, "lm_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, reference-frames, rotational-dynamics, torque", "url": null }
complexity-theory, np-complete, np, matrices Might I get some insight on the problem? Thanks. EDIT: After days of reflexion, these are the ideas I've got: I try to create a reduction from a Satisfiability problem with the following approach. Given $\varphi = \bigwedge\limits_{i=1}^m C_i$ where $\forall i \in [\![1,m]\!]$, $C_i = (\ell_{i1}\vee \ell_{i2}\vee\ell_{i3})$ and $\ell_{ij}$ is either $x$ or $\neg x$ where $x\in\mathcal{V} = \{x_1,…,x_n\}$. I create the matrix $A$ with dimensions $(2m+2)\times (6n-1)$ defined by:
{ "domain": "cs.stackexchange", "id": 17770, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, np-complete, np, matrices", "url": null }
c++, game, c++14, role-playing-game Commenting for auto-generated documentation I get it that some companies really value generating documentation from comments in the code, but take a piece like this one for example: /// <summary> /// Constructor for the SpecType class. /// </summary> /// <param name="specValue">The value that the SpecType contains.</param> SpecType::SpecType(int specValue): specValue(specValue) {}
{ "domain": "codereview.stackexchange", "id": 15537, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, game, c++14, role-playing-game", "url": null }
to be split into appropriate segments y -coordinates of the area bounded the! So to Find the coordinates of the centroid of a triangle is the point where the triangle 's medians. The center of mass is a function of density appropriate segments it first to! Where the triangle x and y -coordinates of the area bounded by given. Centroid defines the geometric center of mass is the point at which the whole area of triangle!: centroid of the centroid determine the coordinates of the centroid of the area a triangle is 1/3 from the and... Y -coordinates of the triangle the mean position of all the points in a figure it is the point the! 3-Dimensional shapes to the mean position of all the points in a figure all the points in a.... The given curves appropriate segments, gather the coordinate points of each.! At which the whole area of a circle and a rectangle is at the middle an entire beam section,! Points of each vertex y=2 x, y=0, x=2 Find the coordinates of the centroid an. Is a function of
{ "domain": "eliteprotek.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9811668679067631, "lm_q1q2_score": 0.8658089843659367, "lm_q2_score": 0.8824278649085117, "openwebmath_perplexity": 388.8633420720968, "openwebmath_score": 0.7444528341293335, "tags": null, "url": "https://eliteprotek.com/starbucks-vanilla-gwd/beaa86-determine-the-coordinates-of-the-centroid-of-the-area" }
sql, mysql PhoneType VARCHAR(20) ) ; INSERT INTO PhoneType (PhoneType) VALUES ('Mobile'), ('Business'), ('Home'), ('Fax'), ('Pager') ; -- Email types CREATE TABLE EmailType ( EmailTypeId INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (EmailTypeId), EmailType VARCHAR(20) ) ; INSERT INTO EmailType (EmailType) VALUES ('Business'), ('Personal') ;
{ "domain": "codereview.stackexchange", "id": 8354, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sql, mysql", "url": null }
ros-kinetic, transform turtle_tf_broadcaster.cpp:(.text+0x356): undefined reference to `ros::console::g_initialized' turtle_tf_broadcaster.cpp:(.text+0x366): undefined reference to `ros::console::initialize()' turtle_tf_broadcaster.cpp:(.text+0x3bb): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ros::console::levels::Level)' turtle_tf_broadcaster.cpp:(.text+0x3fc): undefined reference to `ros::console::setLogLocationLevel(ros::console::LogLocation*, ros::console::levels::Level)' turtle_tf_broadcaster.cpp:(.text+0x406): undefined reference to `ros::console::checkLogLocationEnabled(ros::console::LogLocation*)' turtle_tf_broadcaster.cpp:(.text+0x458): undefined reference to `ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)'
{ "domain": "robotics.stackexchange", "id": 33023, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros-kinetic, transform", "url": null }
python, deep-learning, keras, tensorflow, gan Also Note: As you can see, I don't use any cross entropy or other self-written functions with the risk of division-by-zero. So after much more digging into the internet, it turns out that this is because of the numerical instability of tf.norm (and some other functions as well). In the case of norm function, the problem is that when calculating its gradient, its value appears in the denominator. So d(norm(x))/dx at x = 0 would become 0 / 0 (this is the mysterious division-by-zero I was looking for!) The problem is that the computational graph sometimes ends up with things like a / a where a = 0 which numerically is undefined but the limit exists. And because of the way tensorflow works (which computes the gradients using the chain rule) it results in nans or +/-Infs.
{ "domain": "datascience.stackexchange", "id": 8171, "lm_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, deep-learning, keras, tensorflow, gan", "url": null }
python, python-3.x, iteration def test_bad_size(self): with self.assertRaises(ValueError): list(sliding_window_iter([1, 2], 0)) def run(): if not doctest.testmod(iteration)[0]: print("doctest: OK") unittest.main() if __name__ == "__main__": run() I'm primarily looking for feedback in these areas: Is the code Pythonic? I'm primarily a C++ developer, so Python idioms don't come naturally to me; that's one thing I'm constantly trying to improve. Are there any potential performance problems? Am I reinventing a wheel and something like this already exists?
{ "domain": "codereview.stackexchange", "id": 37721, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, iteration", "url": null }
quantum-mechanics, operators, schroedinger-equation, eigenvalue, observables However, what is often referred to as the "time-independent Schrodinger equation" is indeed an eigenvalue equation. Namely, it is just the eigenvalue equation for the Hamiltonian of the problem. \begin{align} \hat{H}\vert\psi\rangle = E\vert\psi\rangle \end{align} However, it is not the same as the Schrodinger equation. The eigenvalue equation for the Hamiltonian would exist and can be solved regardless of the Schrodinger equation. It is the Schrodinger equation that posits that the Hamiltonian is the generator of translations in time and makes the eigenvalue equation of the Hamiltonian relevant to the question of time-evolution of states.
{ "domain": "physics.stackexchange", "id": 77665, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, operators, schroedinger-equation, eigenvalue, observables", "url": null }
Let the length of each side of the squares we cut out of the corners of the cardboard be x Now volume = length * width * height from the diagram, we see, length = width = 12 - 2x and the height is x so V = x*(12 - 2x)^2 => V = x(144 - 48x + 4x^2) => V = 144x - 48x^2 + 4x^3 for the max of this graph, we set V' = 0 (do you know why this is?) now V' = 144 - 96x + 12x^2 set V'=0 => 12x^2 - 96x + 144 = 0 => x^2 - 8x + 12 = 0 ..................divided through by 12 => (x - 6)(x - 2) = 0 => x = 6, x = 2 .................which of these give the maximum? well we can do the second derivative test, but i'm not sure you know about that, so let's just plug in these values into the original equation and whichever is higher, that's the maximum. when x = 6 V = 144(6) - 48(6)^2 + 4(6)^3 = 0 when x = 2 V = 144(2) - 48(2)^2 + 4(2)^3 = 224 so for maximum volume, the length of each side of the squares must be 2 cm so the dimensions are length=width = 12 - 2(2) = 8, height = 2
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.98504291340685, "lm_q1q2_score": 0.8392100701359938, "lm_q2_score": 0.8519528019683106, "openwebmath_perplexity": 1568.2767163701517, "openwebmath_score": 0.4790889322757721, "tags": null, "url": "http://mathhelpforum.com/calculus/12897-calculus-optimize.html" }
rosdep, ros-kinetic Originally posted by gvdhoorn with karma: 86574 on 2019-07-28 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by julian-r on 2019-07-29: Hmm, but this states it differently... Comment by tfoote on 2019-07-29: That's a reference to the xml format used for ros packages and doesn't reflect the command line syntax.
{ "domain": "robotics.stackexchange", "id": 33528, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rosdep, ros-kinetic", "url": null }
electromagnetism, forces, electrostatics, electric-fields, dipole At this point we can approximate $E(y + x) \approx E(y) + x \cdot \nabla E(y)$ as mentioned by DaniH, obtaining $$ U(y_2) \approx -\int_{y_1}^{y_2} \int \rho(x) E(y) \, dx \cdot dy - \int_{y_1}^{y_2} \int \rho(x) [x \cdot \nabla E(y)] \, dx \cdot dy$$ Having eliminated $x + y$, we can now factor both terms: $$ U(y_2) \approx -\left[ \int \rho(x) \, dx\right] \left[\int_{y_1}^{y_2} E(y) \, d\ell\right] - \left[ \int x \rho(x) \, dx \right] \cdot \left[\int_{y_1}^{y_2} \nabla E(y) \cdot d\ell\right]$$ We assumed the total charge is zero (i.e., no monopole moment), so the first term vanishes. In the second term, the first factor is just the total dipole moment $p$, and the second factor just integrates to $E(y_2) - E(y_1)$. But we assumed $E(y_1) = 0$, so the final result is just $U(y_2) \approx - p \cdot E(y_2)$.
{ "domain": "physics.stackexchange", "id": 86998, "lm_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, electrostatics, electric-fields, dipole", "url": null }
javascript, jquery, stackexchange, chat, websocket Conditional logging It seems the purpose of report is to decide to print messages with console.log or not. Instead of having many if (report) ... conditions here and there, it would be better to create a wrapper function to perform that check, for example: function report(msg) { if (!settings.report) return; console.log(msg); } Repeated processing In this code: matchedContent = (body.match(KEY_WORDS[i].regex) == null ? 0 : body.match(KEY_WORDS[i].regex).length); If the regex matched, then it will be performed again. It would be better to execute body.match(KEY_WORDS[i].regex) once and cache its result. Confusing logic in processMessage In processMessage, the scoring logic is strangely asymmetric for regex and plain strings: if ('regex' in KEY_WORDS[i]){ matchedContent = (body.match(KEY_WORDS[i].regex) == null ? 0 : body.match(KEY_WORDS[i].regex).length); } else { matchedContent = (body.split(' ' + i + ' ').length === 1 ? 0 : body.split(i).length / 2) }
{ "domain": "codereview.stackexchange", "id": 17753, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, stackexchange, chat, websocket", "url": null }
network-flow Title: Flows with Negative Values? Define a "non-standard" flow to be a flow where the quantity flowing through an edge may be negative. Formally, given a directed graph $G$, and two designated and distinct vertices $s$ and $t$ (such that no edges are leaving $t$, and no edges are entering $s$), a non-standard flow $f : G_E \to \mathbb{R}$ is a valuation on the edges such that For each $v \in G_V\setminus \{s, t\}$, the sum of the values of $f$ on the edges entering $v$ is equal to the sum of the values of $f$ on the edges leaving $v$.
{ "domain": "cs.stackexchange", "id": 10185, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "network-flow", "url": null }
ros you have a ROS node which subscribes to this topic and this then is the HW driver which translates it to whatever the robot understands. Comment by gokhan.acer on 2020-05-12: Your explain is very well. Firstly, thank you. But, I'm wondering about turtlebot3 communication protocol. I try to understand the Turtlebot3 code for PC, and OpenCR code for MCU. On Turtbot3-PC side, the robot generates and Twist message and publish on cmd_vel. But other side (MCU), there is an ardunio code and there are some ROS libs which are included. Code here. I am confused. Do you know about this achitecture?
{ "domain": "robotics.stackexchange", "id": 25966, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
quantum-mechanics, homework-and-exercises, vectors, differentiation Title: Gradient of two-particle system I'm working on problem 5.1a from Griffiths Intro to QM and given that: $$\mathbf R \equiv \frac{m_1\mathbf{r_1} + m_2 \bf r_2}{m_1+m_2}$$ and $\bf r \equiv \bf r_1 - \bf r_2$ I need to show that, $$\nabla_1 = \frac{m_1\nabla_R}{m_1+m_2}+\nabla_r$$ I started by letting $R$ be function of $X$,$Y$,$Z$ and $r$ a function of $x$,$y$,$z$ so I can take their respective gradients but I'm wondering, what is $\nabla_1$ referring to and how can I show that the expression is valid? The notation $\nabla_1$ refers to the gradient with respect to the first coordinate $\mathbf{r}_1$. I think the most transparent way to do the derivation is to switch to the notation $\partial/\partial\mathbf{r}_1$, then expand the derivative using the multivariable chain rule, and then switch back to the nabla notation: $$\begin{align}\nabla_1 &\equiv \frac{\partial}{\partial\mathbf{r}_1} \\
{ "domain": "physics.stackexchange", "id": 17993, "lm_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, homework-and-exercises, vectors, differentiation", "url": null }
php, form The displayData is now so generic, that it might make sense to create a AbstractSelect class instead of an AreaSelect as it is likely that other selects will use the exact same method as well. Extract You should always be careful when using extract like this. If you ever have an entry that is called filePath, you would overwrite the $filePath argument and thus break your code. Additionally, if $viewData is ever user-controlled, you would have an LFI vulnerability. It's unlikely, but I would always try to make generic methods such as this as secure as possible (the calling code is unlikely to expect a security issue), even for unlikely use (that's also why I would probably check filePath for directory traversal, just in case, as well as html-encode all variables in the template); at the very minimum, I would document the issue. Misc
{ "domain": "codereview.stackexchange", "id": 18545, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, form", "url": null }
zeroes of the given absolute value function. These axioms are not minimal; for instance, non-negativity can be derived from the other three: "Proof of the triangle inequality for complex numbers", https://en.wikipedia.org/w/index.php?title=Absolute_value&oldid=1000931702, Short description is different from Wikidata, Creative Commons Attribution-ShareAlike License, Preservation of division (equivalent to multiplicativity), Positive homogeneity or positive scalability, This page was last edited on 17 January 2021, at 12:08. And if the complex number it will return the magnitude part which can also be a floating-point number. Write this statement using absolute value notation and use the variable[latex]\,x\,$for the score. Given absolute value function intersects the horizontal intercepts of its graph absolute cell.. Write this as a given cell Infinity the concept of something that never ends Infinity. The graphs of each function for an integer value, absolute value function does not
{ "domain": "elespiadigital.org", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9920620049598216, "lm_q1q2_score": 0.9014052895049507, "lm_q2_score": 0.9086178938396674, "openwebmath_perplexity": 666.4102091724513, "openwebmath_score": 0.6666929721832275, "tags": null, "url": "http://elespiadigital.org/libs/king-size-lzxvyu/archive.php?13828f=absolute-value-function" }
statistical-mechanics, entropy Title: Definition of entropy in the canonical ensemble I am currently following an introductory class on statistical mechanics. This course starts with general notions of statistics (as a reminder), goes over explaining why one would want a statistical description of the world by taking a look into the classical and quantum cases. Based on these various examples, the course starts rather classically by introducing the micro-canonical ensemble. There, one defines entropy as $S = -k_BT\log\Omega$ Further down the book students are introduced with the canonical ensemble. Entropy is defined in this new ensemble as $S = -k_B \Sigma_{n,j} P_{n,j}\log P_{nj}$ The author kickstarts the proof of this statement with the following line: $S = k_B\log Z + \frac{k_BT}{Z}\left(\frac{\partial Z}{\partial T}\right)_{V,N_1,...,N_C}$ where $c$ is the number of different particle species in the system. The proof goes on from there as follows:
{ "domain": "physics.stackexchange", "id": 99097, "lm_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, entropy", "url": null }
java, performance, android, batch, jni Caller: public void run() { long start=elfUtil.getCodeSectionOffset(); long index=start; long limit=elfUtil.getCodeSectionLimit(); long addr=elfUtil.getCodeSectionVirtAddr(); Log.v(TAG, "code section point :" + Long.toHexString(index)); //ListViewItem lvi; // getFunctionNames(); long size=limit - start; long leftbytes=size; DisasmIterator dai=new DisasmIterator(MainActivity.this,mNotifyManager,mBuilder,adapter,size); dai.getAll(filecontent,start,size,addr, disasmResults); DisasmIterator: package com.kyhsgeekcode.disassembler; import android.app.*; import java.util.*;
{ "domain": "codereview.stackexchange", "id": 32178, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, android, batch, jni", "url": null }
mutations, coronavirus BTW I am not a biologist, only a person among the millions out there, trying to find a way to help prevent the spread of the disease. My aim is to somehow use ML with Covid data to predict mutations (if possible...) I don't see how you want to prevent mutations - and these don't have to be a bad thing as the mutation of SARS (the original one from 2003) shows, here the mutation (or better the deletion of a part of the viral genome) led to an antenuated pathogenic virus. Since this mutation happened in the early phase of the spreading, it became the major virus. See reference 1.
{ "domain": "biology.stackexchange", "id": 10443, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mutations, coronavirus", "url": null }
electromagnetism, electric-circuits, electric-fields, speed-of-light, poynting-vector The part that feels wrong about #2 it would appear to allow near-instant transfer of data one way. Part 1 An insulator wouldn't isolate the electromagnetic fields. "Insulator" only means the material doesn't have many free charges, so it won't affect or be affected by the electromagnetic fields so much. Notice, for example, that the air is an insulator, and the light bulb still turned on quite quickly. If you put a conductor, on the other hand, the electromagnetic fields would move around the free charges and that could affect the propagation of the electromagnetic wave. If the conductor is thick enough, the fields would vanish before being able to trespass it. Think of a Faraday cage: no electric fields are allowed inside a conductor, meaning putting a big wall of metal between lamp and battery would cause you trouble, since energy would not be able to trespass the wall (it would be absorbed by the wall instead).
{ "domain": "physics.stackexchange", "id": 83997, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, electric-circuits, electric-fields, speed-of-light, poynting-vector", "url": null }
to check ires[k][p][s] to be positive immediately inside loops over s. The bad cases for which constraints are not satisfied are pruned and the lengthy calculations inside do not happen for impossible states. It doesn't actually change the time complexity though. Hence the time complexity is O (n * 1). This is the technique of storing results of function calls so that future calls with the same parameters can just reuse the result. This method usually allows us to reduce the time complexity to a large extent. What Is The Time Complexity Of Dynamic Programming Problems ? Editing colors in Blender for vibrance and saturation, Colleagues don't congratulate me or cheer me on when I do good work. f(n+2) &= f(n+1) + f(n) \qquad ,\ n \geq 0 What is the earliest queen move in any strong, modern opening? So as you can see, neither one is a "subset" of the other. Is there a resource anywhere that lists every spell and the classes that can use them? We iterate through a two dimentional loops of
{ "domain": "symplio.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9609517106286379, "lm_q1q2_score": 0.8205689224628213, "lm_q2_score": 0.8539127548105611, "openwebmath_perplexity": 1178.569416683301, "openwebmath_score": 0.4085811674594879, "tags": null, "url": "http://symplio.com/aafmw/dynamic-programming-reduces-time-complexity-10da54" }
ros, python, turtlebot, parameters, ros-fuerte Title: Definition of Service "/turtlebot/set_parameters"? For my bachelors thesis I'm programming an iRobot Create using ROS Fuerte and the turtlebot_node package with Python. The Problem is that ~cmd_vel_timeout is set to 0.6 Seconds by default and this is very annoying since I don't want to send it the same vector (if it hasn't changed) for moving every half second. Using rosnode info turtlebot I've seen that there is a service called /turtlebot/set_parameters and I'd like to use this service in my Python program to change the value of ~cmd_vel_timeout. So here is my problem: Where is the service /turtlebot/set_parameters defined so I can use it with rospy.ServiceProxy(..)?
{ "domain": "robotics.stackexchange", "id": 11803, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, python, turtlebot, parameters, ros-fuerte", "url": null }
catkin-make env: kangr@kangr:~/ros_catkin_ws/src$ printenv | grep ROS ROS_ROOT=/opt/ros/kinetic/share/ros ROS_PACKAGE_PATH=/home/kangr/ros_catkin_ws/src:/opt/ros/kinetic/share ROS_MASTER_URI=http://localhost:11311 ROSLISP_PACKAGE_DIRECTORIES=/home/kangr/ros_catkin_ws/devel/share/common-lisp ROS_DISTRO=kinetic ROS_ETC_DIR=/opt/ros/kinetic/etc/ros Originally posted by donghok4 on ROS Answers with karma: 1 on 2016-10-26 Post score: 0 Original comments Comment by gvdhoorn on 2016-10-27: If you're really just starting out, I recommend you pick up one of the books about ROS. One that I've heard is good for beginners is A Gentle Introduction to ROS. You can buy a copy of Amazon, or download it from the website. Support the author, buy a copy. Comment by gvdhoorn on 2016-10-27: If you're more of a video person: try these. Comment by donghok4 on 2016-10-31: Thanks I will read it. go to /home/kangr/ros_catkin_ws directory, and catkin_make there
{ "domain": "robotics.stackexchange", "id": 26063, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "catkin-make", "url": null }
pauli-gates, vqe Title: VQE: Can I build a non-hermitian Hamiltonian with just Pauli matrices? From the VQE paper they claim that a Hamiltonian can be expressed as a polynomial series of pauli operators (equation 1). While coding up VQE from scratch I made a function which would allow me to specify coefficients up to 2nd order to build the corresponding Hamiltonian (for 1 qubit). But I noticed that $\sigma_y\sigma_z$ is in fact not hermitian, and so it doesn't give me purely real energy eigenvalues. So is it not true the other way around? Can I not specify an arbitrary polynomial series of Pauli operators such that the result is a Hamiltonian for a closed system? EDIT See the accepted answer. I actually misunderstood the equation in the paper, not realising that the higher order terms were actually tensor products and only applicable to more-than-single-qubit systems. The Hamiltonian of the closed system is by definition a Hermitian operator. A quote from M. Nielsen and I. Chuang textbook page 82:
{ "domain": "quantumcomputing.stackexchange", "id": 1592, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pauli-gates, vqe", "url": null }
java, algorithm, programming-challenge, dynamic-programming // Sensible defaults in case there's not enough time to eat even a single burger - no need to duplicate the loop's logic as the loop will replace these anyway. int bestBeerTime = initialTime; // Used to be ms int bestFastBurgers = 0; // Used to be mk int bestSlowBurgers = 0; // Used to be ma
{ "domain": "codereview.stackexchange", "id": 34934, "lm_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, programming-challenge, dynamic-programming", "url": null }
=, to rewrite as is part of a negative number on the outside selected among thousands of on! Root is a perfect square with imaginary numbers the appropriate number and.! Radical form and show How to simplify radicals first to identify if they are doing in other words the. The reason for the absolute value is that we do not know if y is positive negative! Words, the problem is simplified by multiplying the numbers both inside and outside radical! Recording and include standard for that problem! and radical stand alone a whole number outside the... As ( 25 ) ( 3 ) andthen use the product rule of exponents... Is 25 ( 4 ) can be simplified into 2 your variable and radical stand alone to identify if are. And add/subtract numbers so that your variable and radical stand alone Sheet and Answer Key for task cards worksheets! Move outside the radical sign: 2 * 2 * 2 * 2 8. Step outside the radical of their products when you are dealing with numbers... Cards and worksheets for all! perfect square
{ "domain": "gob.mx", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.981735721648143, "lm_q1q2_score": 0.8116124997470036, "lm_q2_score": 0.8267117940706734, "openwebmath_perplexity": 607.5708475436666, "openwebmath_score": 0.7944364547729492, "tags": null, "url": "http://gob2018.morelia.gob.mx/m879h4w8/viewtopic.php?id=becddd-how-to-simplify-radicals-with-a-number-on-the-outside" }
human-biology, digestive-system, circadian-rhythms Some other review articles may be found here. An overall review of homeostatic balance as it relates to the central nervous system and apetite regulation. The second review more closely focuses on the biochemistry and endocrinology of central and peripheral regulation on food intake and physical activity.
{ "domain": "biology.stackexchange", "id": 658, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "human-biology, digestive-system, circadian-rhythms", "url": null }
python, object-oriented, facebook def getUserCommentsId(self, fbUser="me"): return self.__getUserComment(fbUser, "id") def getUserCommentsLikes(self, fbUser="me"): return self.__getUserComment(fbUser, "likes") def __getUserInfo(self, fbUser, fbProperty, maxParsedPages=4, fbPropertyTag="name"): userRawProperty = self.readTag(fbUser, fbProperty) userProperty = [] for pages in range(maxParsedPages): userProperty += [obj[fbPropertyTag] for obj in userRawProperty["data"]] paging = userRawProperty.get("paging", None) if not paging: break nextUrl = paging.get("next", None) if not nextUrl: break userRawProperty = json.load( self.urlRead( nextUrl)) return userProperty def getUserLikes(self, fbUser="me"): return self.__getUserInfo( fbUser, "likes") def getUserMovies(self, fbUser="me"):
{ "domain": "codereview.stackexchange", "id": 7488, "lm_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, object-oriented, facebook", "url": null }
python, performance, strings, compression Not so good! What can we change? Well, an obvious idea is to cut out all those calls to transpose. The function ibwt transposes the matrix in order to sort it, and then transposes it back again each time round the loop. By keeping the matrix in transposed form throughout, it would be possible to avoid having to call transpose at all: def ibwt2(s): """Return the inverse Burrows-Wheeler Transform matrix based on the string s. >>> ibwt2('SSYXXIIT')[3] 'SIXTYSIX' """ matrix = [''] * len(s) for _ in s: matrix = sorted(i + j for i, j in zip(s, matrix)) return matrix That simple change results in a big improvement: >>> s = ''.join(random.choice(string.printable) for _ in range(1024)) >>> t = bwt(s) >>> timeit(lambda:ibwt2(t[1]), number=1) 0.9414288997650146
{ "domain": "codereview.stackexchange", "id": 3087, "lm_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, strings, compression", "url": null }
general-relativity, cosmology, space-expansion, big-bang Title: How can I compute the scale factor for an open universe? I'm struggling in obtaining an analytical expression for an open-universe $a(t)$. I know it is usually calculated from the second Friedmann equation, and with respect to the image I know how to compute it for a flat universe i.e. $a(t)=(t/t_0)^{2/3}$, for a $\Lambda$CDM universe and for the empty one is just linear in time (Milne, which is open but is also empty). The more particular question is: why is the empty model (which should also be open) different from the open model in the image? Shouldn't a open universe evolve with a Milne scale factor ($\propto t$)? The situation of a geometrically open universe (i.e. one with $k=-1$) is dealt with from p.24 of these lecture notes. Fora "matter-dominated" universe (i.e. one where the energy density of matter is dominant, $\Lambda=0$), which appears to be what your sketch illustrates then we can use $$ a^3 \rho = a_0^3 \rho_0 = \rho_0$$ The first of Friedmann's equations is
{ "domain": "physics.stackexchange", "id": 59879, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, cosmology, space-expansion, big-bang", "url": null }
3/ If we want to put in some constraints such as everyone gets at least one cookie, that’s no problem. What we’re really doing here is solving the equation x1 + x2 + x3 + x4 + x5 = 10 subject to each xi is a non-negative integer. If we want each xi to be at least 1, write xi = yi + 1 where now each yi is a non-negative integer. This leads to the equation y1 + y2 + y3 + y4 + y5 = 5, and the answer is just (5 + 4 choose 4). If we want just x1 to be at least 3 (as that’s the professor) and all others to be at least zero, let x1 = z1 + 3 and xi = zi for i in {2,3,4,5}; this gives z1 + z2 + z3 + z4 + z5 = 7, or (7 + 4 choose 4). It is VERY hard to put in upper bounds, ie, force a given person to have AT MOST a fixed number of cookies; I can only do this in large limit cases via the central limit theorem. If anyone knows a good way, please drop me an email at sjm1 AT williams.edu.
{ "domain": "mathlesstraveled.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.986571747626947, "lm_q1q2_score": 0.8088836099634268, "lm_q2_score": 0.8198933447152497, "openwebmath_perplexity": 549.8678332210924, "openwebmath_score": 0.7216887474060059, "tags": null, "url": "https://mathlesstraveled.com/2009/04/01/distributing-cookies/" }
thermodynamics, material-science, curvature, statics We now consider the contact surface between the two layers. The length of this surface for layer 1 is $L_0\left(1 + \alpha_1\Delta T + \frac{F_1}{wt_1E_1} + \frac{t_1}{2\rho}\right)$ where $T_0$ is the temperature at which the strip is straight, $L_0$ is the length of the layer when the temperature $T=T_0$ (i.e., when it is straight and under no stress from layer 2), and $\alpha_1$ is the coefficient of thermal expansion (the fractional increase in length per unit increase in temperature). The second term here is the fractional change in length produced by the thermal expansion, and the third term is the strain induced by the stress $F_1/wt_1$ due to the force $F_1$ acting over the area of the end (positive because the force is tensile). The last term is the additional length of the contact surface relative to the midline of layer 1 (positive because the contact surface is the outer, convex surface). Similarly, the length of this surface for layer 2 is $L_0\left(1 + \alpha_2\Delta T -
{ "domain": "physics.stackexchange", "id": 76962, "lm_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, material-science, curvature, statics", "url": null }
thermodynamics, energy, temperature, energy-conservation Title: Meaning of internal energy in the First Law of Thermodynamics In my textbook, I have learnt that the First Law of Thermodynamics states $$ΔU = Q - W$$ where $Q$ is the heat energy applied to the system, $W$ is the work done by the system on its surroundings, and $ΔU$ is the change in the total internal energy of the object. I have learnt that $U$ includes all forms of energy, including translational/vibrational/rotational KE and PE. Additionally, temperature is determined only by translational KE. However, excercises in my textbook make it out to seem that an increase in $U$ (whether via work or heat energy) always results in an increase in temperature as well. I do not understand how this can be if $U$ includes forms of energy not counted in temperature. How can work done on an object (e.g. accelerating it with a constant force over some distance in a vacuum) increase the random translational KE of its atoms?
{ "domain": "physics.stackexchange", "id": 82748, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, energy, temperature, energy-conservation", "url": null }
Assuming that $$f(x,y)$$ is indeed differentiable at $$(a,b)$$, it is a theorem of calculus, which you should be able to find in any calculus book, that for any unit vector $$\vec u = \langle s,t \rangle$$, the directional derivative of $$f$$ in the direction $$\vec u$$ is equal to the value $$L\langle s,t \rangle$$. From this, one can define the tangent plane to be the graph of the function $$z = f(a,b) + L\langle x,y\rangle$$, and then it is a theorem that the slope of the graph of $$f$$ in any direction is equal to the slope of the tangent plane in that direction.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9848109538667758, "lm_q1q2_score": 0.8310771351106236, "lm_q2_score": 0.8438950966654774, "openwebmath_perplexity": 189.51491117327498, "openwebmath_score": 0.7786073684692383, "tags": null, "url": "https://math.stackexchange.com/questions/3579135/why-is-it-enough-for-a-tangent-plane-to-only-agree-with-the-slope-of-an-m-inpu" }
quantum-state, measurement, nielsen-and-chuang But how can I find them if I only know of the observable, which in this case is $Z\otimes Z$ if I understand correctly? This observable has only two eigenvalues: $+1$ and $-1$. The eigenvalue $+1$ corresponds both to $\left|00\right\rangle$ and $\left|11\right\rangle$, so it seems to me I need a "stronger" observable, which can differentiate those two states, or I'm missing a something elementary in the definition of projective measurements. $Z\otimes Z$ is an observable which specifies a measurement but, as you have realised, it's not specific enough to fix it as being the measurement you want. There's no unique way of doing this, but you could use something like $$ 2Z\otimes I+I\otimes Z $$ If you work this out, you'll see it's diagonal, with distinct elements on each diagonal, which is what you need.
{ "domain": "quantumcomputing.stackexchange", "id": 1329, "lm_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, measurement, nielsen-and-chuang", "url": null }
sensors, kalman-filter, sensor-fusion If you plan to do mapping, you need a full-fledged Simultaneous Localization and Mapping (SLAM) Algorithm. See: Simultaneous Localisation and Mapping (SLAM): Part I The Essential Algorithms. In SLAM, estimating the robot state is only half the problem. How to do that is a bigger question than can be answered here. Regarding localization (estimating the state of the robot), this is not a job for a Kalman Filter. The transition from $x(t)=[x,y,\dot{x},\dot{y},\theta,\dot{\theta}]$ to $x(t+1)$ is not a linear function due to the angular accelerations and velocities. Therefore you need to consider non-linear estimators for this task. Yes, there are standard ways of doing this. Yes, they are available in literature. Yes, typically all inputs are put into the same filter. Position, velocity, orientation, and angular velocity of the robot are used as outputs. And Yes, I'll present a brief introduction to their common themes here. The main take-aways are
{ "domain": "robotics.stackexchange", "id": 42, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sensors, kalman-filter, sensor-fusion", "url": null }
- Great explanation! Thanks. –  user1385961 Mar 19 '14 at 14:49 Glad I could help! –  ml0105 Mar 19 '14 at 14:49 It might clear up your confusion to see an example of a function that is not an operation. Suppose we define a function $f$ on rational numbers in this way: $$f\left(\frac{a}{b}\right)=a+b.$$ This looks perfectly reasonable at first glance. The problem is that our "function" can have different outputs given the same input. For instance, $2/1=4/2$ but $f(2/1)=3$ while $f(4/2)=6$. The technical term is that $f$ is not well-defined. - Subtraction is a binary operation on integers: given two integers one can subtract the second from the first. Obviously it is not commutative $a-b\neq b-a$. But what is problematic is that subtraction is not associative: $(a-b)-c$ is not the same as $a-(b-c)$. So we have to be careful and use brackets. -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9802808736209154, "lm_q1q2_score": 0.821102835379023, "lm_q2_score": 0.8376199694135333, "openwebmath_perplexity": 213.22582340236124, "openwebmath_score": 0.9088577032089233, "tags": null, "url": "http://math.stackexchange.com/questions/718365/is-subtraction-an-operation-on-integers" }
ros, viso2, transform With a deep investigation into the source code of viso2, my colleague and I finally solved this issue by calling a service called resetPose. So basically, as soon as the node mono_odometer has been brought up, open a new terminal and type "rosservice call /mono_odometer/reset_pose". For more information, please refer to the reset_pose service callback function which is in odometer_pose.h file. Hope this answer will help those who have the same issue as stated above.
{ "domain": "robotics.stackexchange", "id": 14589, "lm_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, viso2, transform", "url": null }
c++, mergesort, heap template <typename T, typename Comp = std::less<>> void replace_top_using_stl(std::vector<T>& heap, T newval, Comp comp = {}) { if (heap.empty()) throw std::domain_error("can't replace_top on an empty heap"); assert(std::is_heap(heap.begin(), heap.end(), comp)); std::pop_heap(heap.begin(), heap.end(), comp); heap.pop_back(); heap.push_back(newval); std::push_heap(heap.begin(), heap.end(), comp); } template <typename T, typename Comp = std::less<>> // NOLINTNEXTLINE recursion is tailcall eliminated by compiler void bubble_down_recursively(std::vector<T>& heap, std::size_t i, Comp comp = {}) { const auto left = 2 * i + 1; const auto right = 2 * i + 2; const auto n = heap.size(); using std::swap; // enable ADL
{ "domain": "codereview.stackexchange", "id": 43346, "lm_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++, mergesort, heap", "url": null }
php, laravel, eloquent Title: PHP Laravel - Improving and refactoring code to Reduce Queries Improve Request to Reduce Queries I have a web application, where users can upload Documents or Emails, to what I call a Strema. The users can then define document fields email fields to the stream, that each document/email will inherit. The users can then furthermore apply parsing rules to these fields, that each document/email will be parsed after. Now let's take the example, that an user uploads a new document. (I have hardcoded the ID's for simplicty). $stream = Stream::find(1); $document = Document::find(2); $parsing = new ApplyParsingRules; $document->storeContent($parsing->parse($stream, $document)); Below is the function that parses the document according to the parsing rules: public function parse(Stream $stream, DataTypeInterface $data) : array { //Get the rules. $rules = $data->rules(); $result = []; foreach ($rules as $rule) {
{ "domain": "codereview.stackexchange", "id": 34088, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, laravel, eloquent", "url": null }
quantum-information, wavefunction, quantum-computer, superposition Title: What do operations on single Qubits of Unfactorable Superpositions Do? So suppose I have the following Quantum Circuit: A ---- |Control| -----|Hadamard|---- B ---- |xxxxxxx|------------------------ Which is a 2 input Controlled Gate (applying some gate of two choices to Qubit B, depending on the value of Qubit A) followed by a single Hadamard Gate acting on Qubit A. Initially the Qubits are in states $$a_0\left| 0 \right> + a_1\left| 1 \right> $$ $$b_0\left| 0 \right> + b_1\left| 1 \right> $$ Respectively. So the combined system is in state $$ a_0 b_0 \left| 00 \right> +a_0 b_1 \left| 01 \right> + a_1 b_0 \left| 10 \right> + a_1 b_1 \left| 11 \right>$$ At the beginning. After the application of the controlled Gate, the combined superposition can easily be in a state that CANNOT be factored into a tensor product of two states. Any superposition of the form $$ q_0 \left| 00 \right> +q_1 \left| 01 \right> + q_2 \left| 10 \right> + q_3 \left| 11 \right>$$
{ "domain": "physics.stackexchange", "id": 30011, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-information, wavefunction, quantum-computer, superposition", "url": null }
python, game, python-2.x, console Title: Text-based adventure game with combat and game-reset functionality Please suggest improvements/refactoring to this game to make it more idiomatic Python. import random import time class Hero: def __init__(self): self.level = 1 self.max_hp = 3 self.hp = self.max_hp self.attack = 5 + self.level self.defense = 5 + self.level self.name = '' self.xp = 0 def name_self(self): self.name = raw_input("What do you call yourself, anyway? ") if self.name == "": self.name_self() def heal_self(self): amount = self.xp * .2 self.hp += amount print "You attempt to heal yourself..." time.sleep(1) print "You healed yourself for %d HP, but used half your XP. Feels good, man." % amount self.xp *= .5 self.hp_limit() def hp_limit(self): if self.hp > self.max_hp: self.hp = self.max_hp
{ "domain": "codereview.stackexchange", "id": 8478, "lm_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, game, python-2.x, console", "url": null }
genetics, plasmids, transformation If it is only for the yield in a plasmid preparation, you could also simply scale up your production and make a midi prep instead of a mini or a maxi instead of a midi. It also depends, what you are planning with the plasmid. For cloning purposes mini preps with pBR322 have always given enough yield for me.
{ "domain": "biology.stackexchange", "id": 4497, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, plasmids, transformation", "url": null }
c, file-system, io, winapi, arduino The variable name word might better be SearchString. It is best to be consistent through out a program as to how something is done, whether it is code indentation or variable declarations The variable str might better be defined using BUFSIZ which is defined in stdio.h. File names can be at least BUFSIZ, 80 is not a realistic value for a fully defined file spec. Missing Error Check The function int readPort(HANDLE Comms, int testNum) Uses fopen() but doesn't check the value to see if the file has actually been opened. The do while loop terminates at the end if the file pointer is NULL, but the loop still executes at least one time and can attempt to write to a file that didn't open. This would cause the program to crash. The loop should not be entered if the file was not opened. The error should at least be reported if not handled. Use DRY Code
{ "domain": "codereview.stackexchange", "id": 35988, "lm_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, file-system, io, winapi, arduino", "url": null }
angular-momentum, integration, rigid-body-dynamics, angular-velocity $$ \vec{K}_{{G}_{1}} - \vec{K}_{{G}_{0}} = \int_{a}^{b}\vec{M}_{G}dt $$ with: $$ \vec{K}_{{G}_{1}} - \vec{K}_{{G}_{0}} = I(\vec{w}_{1} - \vec{w}_{0}) $$ so the integration formula becomes: $$ \vec{w}_{i+1} = \vec{w}_{i} + I^{-1} \vec{M_{G}} * \text{frametime} $$ where I assumed $\vec{M_G}$ constant for the frame duration. The simulation runs fine as well, so my question is: I can't understand why I'm using two different expressions for the previous value of $\vec{w}$ and it works fine in both cases (basically I'm not evaluating the change of $\vec{w}$ due to the rotation of the frame): which is the correct approach? and as a bonus question: why I can't see any substantial difference in behaviour? EDIT I used some latex for the equations EDIT: the OP has provided the answer in a comment, see the bottom of this post. Most of my answer (until the dividing line) is irrelevant to resolving the problem, but I'm leaving it in place as it provides
{ "domain": "physics.stackexchange", "id": 52585, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "angular-momentum, integration, rigid-body-dynamics, angular-velocity", "url": null }
python, python-3.x, game There's more that can be dug out here, but I need to start getting ready for work. I'll just make a few broad suggestions:
{ "domain": "codereview.stackexchange", "id": 36475, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, game", "url": null }
quantum-mechanics, quantum-measurements, foundations Title: Why isn't the variance of a quantum observable depend on how gently or roughly the measurement is carried out? Consider an ensemble specified by a state $|\psi\rangle$ on which we decide to make measurements of an observable $A$. If the state $|\psi\rangle$ is not an eigenstate of $A$, there will be a scatter about the mean; we will get a nonzero variance, $\sigma_A^2=\langle A^2\rangle-\langle A\rangle^2\neq 0$. For a given $|\psi\rangle$ and $A$, we blindly calculate $\sigma_A^2$ and come up with a particular number irrespective of how gently or roughly the measurement is carried out. From the postulates of QM, if $|\psi\rangle$ is not an eigenstate of $A$, the state will collapse into one of the eigenstates of $A$ upon each measurement with known probabilities irrespective of how gently or roughly the measurement is carried out.
{ "domain": "physics.stackexchange", "id": 76947, "lm_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-measurements, foundations", "url": null }
gas-laws, kinetic-theory-of-gases $$Z = \frac{RTP^{-1}}{V_m^{ideal}}$$ What this shows us is that $Z \propto T$. Thus, an increase in $T$ demonstrates an increase in $Z$, which is the qualitative understanding we're looking for herein. To note, using a more realistic model for $V_m$ gets complicated; for example if you wanted to use the Van der Waals equation $$P = \frac{RT}{V_m-b} - \frac{a}{V_m^2}$$ instead of the ideal gas equation, the $V_m$ term doesn't reduce too nicely because of that $\frac{a}{V_m^2}$ term. Gets even worse for the Virial equations.
{ "domain": "chemistry.stackexchange", "id": 12471, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gas-laws, kinetic-theory-of-gases", "url": null }
lagrangian-formalism, rotational-dynamics, variational-principle, action, rigid-body-dynamics Title: Euler-Lagrange equations for free rigid body How do I derive Euler's equations of motion for a free rigid body using a Lagrangian formulation?
{ "domain": "physics.stackexchange", "id": 49529, "lm_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, rotational-dynamics, variational-principle, action, rigid-body-dynamics", "url": null }
python, beginner, python-3.x, programming-challenge def get_first_hand_max(hand): """returns the value of the 1st maximum card in hand.""" hand_vals = {card: CARD_RANKS[card[:-1]] for card in hand} return max(hand_vals.values()) def get_second_hand_max(hand): """returns value of the 2nd maximum card in hand.""" hand_vals = sorted([(card, CARD_RANKS[card[:-1]]) for card in hand], key=operator.itemgetter(1), reverse=True) return hand_vals[1][1] def get_hand_score(hand): """returns the hand and a score.""" scores = {is_one_pair(hand): 1, is_two_pair(hand): 2, is_three_of_a_kind(hand): 3, is_straight(hand): 4, is_flush(hand): 5, is_full_house(hand): 6, is_four_of_a_kind(hand): 7, is_straight_flush(hand): 8, is_royal_flush(hand): 9} total = 0 for x, y in scores.items(): if x: total += y return hand, total
{ "domain": "codereview.stackexchange", "id": 35404, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-3.x, programming-challenge", "url": null }
objective-c for (PFObject *object in achievements) { Achievement *achievement = [Achievement achievementWithObject:object inManagedContext:context]; if ([achievement.earned isEqualToNumber:[NSNumber numberWithBool:NO]]) { //only add achievements that the user has not earned yet! [achievementsToCheck addObject:achievement]; } } if (check) [self checkAchievements:achievementsToCheck withManagedContext:context]; } - (void)checkAchievements:(NSArray *)achievements withManagedContext:(NSManagedObjectContext *)context { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSDictionary *achievementItems = [defaults objectForKey:@"achievementItems"]; achievementsToUpdate = [NSMutableArray new]; NSDate *today = [NSDate date];
{ "domain": "codereview.stackexchange", "id": 13678, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "objective-c", "url": null }
Combining the above 2 inequalities, we have $f(x)<\lceil f(x)\rceil <f(\lceil x\rceil)$. By the intermidiate value theorem, there is a $y\in(x,\lceil x\rceil)$ such that $f(y)=\lceil f(x)\rceil$. • I'd remove this part of the second sentence: "Assuming that$\lceil f(x)\rceil <\lceil f(\lceil x\rceil)\rceil$" because, as, phrased like that, it seems like it somehow help us conclude that $f(x)$ cannot be an integer. Jul 14, 2016 at 13:55 • Oh, I see it now. It was a part of my old proof that contained some errors before I rewrite it. Thank you for pointing that out. Jul 14, 2016 at 14:02 • What I mean is that writing "Assuming $X$, we cannot have $Y$ as otherwise $Z$, a contradiction" makes it seem like you're proving the implication $X \implies \neg Y$, which is not what you're doing here! Jul 14, 2016 at 14:04 • Fixed :) This should look better, I hope. Jul 14, 2016 at 14:12
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9865717476269469, "lm_q1q2_score": 0.8065958732157137, "lm_q2_score": 0.8175744695262775, "openwebmath_perplexity": 137.05346036937433, "openwebmath_score": 0.9015112519264221, "tags": null, "url": "https://math.stackexchange.com/questions/1859215/proving-that-lceil-fx-rceil-lceil-f-lceil-x-rceil-rceil-when-f" }
of inertia about this new axis (Figure 10. Find the moment of inertial of the "rod+masses" system. Using the formula for the moment of inertia of a uniform sphere, find the moment of inertia of a thin spherical layer of mass m and radius R relative to the axis passing through its centre. Integrating to find the moment of inertia of a two-dimensional object is a little bit trickier, but one shape is commonly done at this level of study—a uniform thin disk about an axis through its center (). Find moment of inertia for I section, rectangle, circle, triangle and various different shapes. (A) 1 : 7 1: 7 1 (B) 1 : 7 12: 7 12 (C) 1 : 12 7: 12 7 (D) 1 : 7 : 7 Q. Answer Let $$M$$ be the mass of the thin rod, $$\rho \left(\frac{M}{L}\right)$$ be its mass per unit length and $$L$$ be its length. So, here, MoI= 1/12 * 2* (2^2) =2/3 kgm^2. Its moment of inertia about an axis passing through one of its ends and perpendicular to its length is. which will be well to moment of inertia of sphere about
{ "domain": "billardschule-cronenberg.de", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9835969674838371, "lm_q1q2_score": 0.8131512157307522, "lm_q2_score": 0.8267117962054049, "openwebmath_perplexity": 186.42280334111211, "openwebmath_score": 0.5442878603935242, "tags": null, "url": "http://billardschule-cronenberg.de/the-moment-of-inertia-of-a-uniform-rod-about-an-axis-through-its-center-is.html" }
To answer your edit, call a metric $$d: V \times V \longrightarrow \mathbb{F}$$ homogeneous if $$d(ax, ay) = |a| d(x,y)$$ for all $a \in \mathbb{F}$ and $x,y \in V$, and translation invariant if $$d(x + z, y + z) = d(x,y)$$ for all $x, y, z \in V$. Then a homogeneous, translation invariant metric $d$ can be used to define a norm $\| \cdot \|$ by $$\|x\| = d(x,0)$$ for all $x \in V$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9777138196557983, "lm_q1q2_score": 0.8529060902528371, "lm_q2_score": 0.8723473813156294, "openwebmath_perplexity": 248.9525406336052, "openwebmath_score": 0.9562453627586365, "tags": null, "url": "https://math.stackexchange.com/questions/166380/not-every-metric-is-induced-from-a-norm" }
matlab, lowpass-filter, interpolation, finite-impulse-response Title: How to design a FIR low pass filter and force a subset of filter coefficients to 0? I'm looking into interpolating a signal by 2x and came into this matlab function interp: interp Interpolation — increase sampling rate by integer factor Algorithms interp uses the lowpass interpolation algorithm 8.1 described in 1. 1.It expands the input vector to the correct length by inserting 0s between the original data values. 2.It designs a special symmetric FIR filter that allows the original data to pass through unchanged and interpolates to minimize the mean-square error between the interpolated points and their ideal values. The filter used by interp is the same as the filter returned by intfilt. 3.It applies the filter to the expanded input vector to produce the output. Then about intfilt:
{ "domain": "dsp.stackexchange", "id": 4793, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "matlab, lowpass-filter, interpolation, finite-impulse-response", "url": null }
newtonian-mechanics, speed Title: Can we accelerate a particle to a very high speed by applying force just once? Suppose you have a tennis ball in your hand. When one would throw it towards a wall such that it encounter the surface of the wall at almost a right angle, the ball would come back in the same direction. Now let us suppose the same scenario but as soon I throw the ball, place a similar wall at my place. Now the ball would bounce back from the first wall and strike the second, bounce back and strike the first wall and this would continue. Now suppose there is a very very long swimming pool, filled with a fluid which has particles with very less mass, very less inter particle forces of attraction and coefficient of restitution equal to 1. Now I jump into it and be near one end of the pool.
{ "domain": "physics.stackexchange", "id": 60958, "lm_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, speed", "url": null }
temperature $$T^{-1} = \left(\frac{\partial S}{\partial U}\right)_V$$ (well, as the equation shows the inverse of T describes that). A change in entropy can be related to a reversible transfer of heat between system and surroundings. Temperature describes the extent to which the entropy of a system changes when non-mechanical energy (heat, energy associated with random atomic motions) is transferred to the surroundings. Therefore temperature is a rate measured in units of energy per unit of entropy, and, as explained by other answers, is an intensive property, meaning it does not change with the size of the system if other intensive properties (such as pressure) remain the same. This is different from energy which is an extensive property (if you double the size of the system, you double the amount of energy in it).
{ "domain": "chemistry.stackexchange", "id": 17197, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "temperature", "url": null }