text
stringlengths
1
1.11k
source
dict
c++, arduino read_gyro(); read_accel(); // Calculate time (in s) passed float time_s = time_elapsed_s(); // Calculate attitude from relative gyrometer changes m_vAttitude += m_vGyro * time_s; // For yaw changes the compass could be used as reference, // otherwise take the gyrometer if(COMPASS_FOR_YAW) { m_vAccel.z = -read_comp(0, 0); } else { m_vAccel.z = m_vAttitude.z; } // Calculate absolute attitude from relative gyrometer changes m_vAttitude = anneal_V3f(m_vAttitude, m_vAccel, time_s, 20.f, 5.f); } A few notes: inline float smaller_float(float value, float bias) { return value < bias ? value : bias; }
{ "domain": "codereview.stackexchange", "id": 6403, "lm_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++, arduino", "url": null }
fourier-transform, plane-wave Title: Function expansion in terms of plane waves I would like to expand a function $f(r)$ in terms of plane waves of the form $e^{ikr}$. With expansion coefficients $f_k$, one can write $$ f(r) = \sum_kf_k e^{ikr}. $$ Now I need the coefficients $f_k$ which is what I need help with. My textbook tells me that by multiplying both sides of the equation by $e^{-ikr}/V$ and integrating over some volume $V$, one gets $$ f_k = \frac{1}{V}\int_V\mathop{d^3r} e^{-ikr} f(r).$$ Unfortunately, I can't quite figure out how to get rid of the sum for example. I would be glad if someone could show me how to determine the expansion coefficients. HINT: It is better to relabel the sum index $k \mapsto l$: $e^{-ikr}/V \sum_l f_l e^{ilr} = \sum_l f_le^{i(l-k)r}/V$. By linearity of Integration and the General identity (holds for any number $p$ ) $\int_V d^3re^{ipr} = V \delta_{p,0}$ (*) you are done.
{ "domain": "physics.stackexchange", "id": 45780, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fourier-transform, plane-wave", "url": null }
#Create the points necessary to build a polygon circle_data<-data.frame(x_val=c(0,seq(0,1,length.out=1000)), y_val=c(0,sqrt(1-seq(0,1,length.out=1000)^2))) #create the shaded area for the quarter circle plot_pi <- ggplot() + geom_polygon(data=circle_data,aes(x=x_val,y=y_val),alpha=0.1) + theme_bw() plot_pi Now, let’s randomly put dots on the unit square (i.e. square with side length of 1). Then, we define them “in” or “out” depending on whether they are within the circle area or not.
{ "domain": "github.io", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9865717464424894, "lm_q1q2_score": 0.8111485707034921, "lm_q2_score": 0.822189134878876, "openwebmath_perplexity": 1919.0135008901761, "openwebmath_score": 0.5941701531410217, "tags": null, "url": "https://berkorbay.github.io/fe522/02_Monte_Carlo_Simulation.html" }
In other words we can say that a scalar matrix is basically a multiple of an identity matrix. Scalar multiplication is generally easy. Just treat them as normal numbers. How to multiply a matrix by a scalar. How charge is a scalar quantity? EDIT The question is this: Scalar multiplication is defined as B = A * s, where B and A are equally sized matrices (2D array of numbers, in this example let's use integers) and s is a scalar value. The matrix can be any order Multiply all elements in the matrix by the scalar Scalar multiplication is commutative Scalar multiplication is associative Properties of Matrices If a real valued matrix A has a height of m and a width of n, then we say that A in R^(m x n). This video teaches you about the product of a scalar and a matrix through an example. So a matrix of order 3 by 2 called A might look like this: A = A matrix called B of order 4 by 4 might look like this: B = By convention, matrices in text are printed in bold face. A scalar is a number,
{ "domain": "kamolkhon.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561694652215, "lm_q1q2_score": 0.8094633813936785, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 532.494001085102, "openwebmath_score": 0.7371047139167786, "tags": null, "url": "http://kamolkhon.com/best-invest-pxmje/78d5b.php?page=what-is-scalar-matrix-with-example-68d451" }
quantum-field-theory, quantum-spin, propagator Title: Behavior of propagator of quantum field as function of spin Can we write down a generic expression for propagator for any arbitrary spin? At the least, about the ultraviolet behavior of these propagator. Especially, I would like to know whether there is a specific dependence on spin of the field. It is possible to write an expression for the propagator of a massive spin $j$ particle whose ultraviolet limit can be shown to vary as $q^{-2+2j}$. To see why this holds one has to find a natural generalization of Pauli matrices for $(j,0)$ and $(0,j)$ and of gamma matrices for the one where you deal with parity conserving interaction which involves fields transforming as $(j,0)\oplus (0,j)$ representation the details to which can be found in the reference mentioned.
{ "domain": "physics.stackexchange", "id": 32934, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, quantum-spin, propagator", "url": null }
zoology, food of things we see in other animals. Animals who use techniques often in their stomachs to tenderise food seem to try and make it more easily absorbable. If we turn to the other question of when all this happened the real question is when do we first find evidence of fire? That seems to be about half a million years ago or so. We don’t find direct evidence of cooking then but we do see over the next 100,000 years or so the beginnings of things like burnt stone which suggests that meat is cooked. It’s probably goes quite a long way back in our evolutionary history and some people would argue it’s really a very major change in the way we are able to live and survive.
{ "domain": "biology.stackexchange", "id": 5016, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "zoology, food", "url": null }
newtonian-mechanics, forces, newtonian-gravity, reference-frames, free-fall Image source: Purdue University The reason why the people rise above in the clip linked by you is, the aircraft initially accelerates downward more than the local value of $g$. You can experience a similar situation in an elevator, if a giant monster pushes the elevator down so hard that it accelerates down with an acceleration greater than $g$ say $50~\mathrm{ms^{-2}}$. In this case, with respect to the elevator, you'll not only be moving upward, but will be accelerating upward with an acceleration equal to $a-g$ where $a$ is the acceleration provided by the monster. Now you can stand on the elevator's roof! If you're interested in how such aircrafts stimulate reduced gravity environments, I've given a short explanation in this answer.
{ "domain": "physics.stackexchange", "id": 65943, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces, newtonian-gravity, reference-frames, free-fall", "url": null }
general-relativity, gravity, rotational-dynamics, group-theory, group-representations In general relativity, thefour velocity is an invariant. There exists a local Lorentz frame in which all velocity components are constants.
{ "domain": "physics.stackexchange", "id": 3767, "lm_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, gravity, rotational-dynamics, group-theory, group-representations", "url": null }
html, html5 The HTML element represents a generic section of a document, i.e., a thematic grouping of content, typically with a heading. Navigation and such I wouldn't call a thematic grouping of content, and the content of the header would be better moved to be a child of body. The remainder of the content in the section is, I think, a little to sparse to use a section so I would recommend a div. Header Apart from the header at the top of the page used the others incorrectly. In the example below you seem to be using them in place of a hgroup. hgroup is like a heading element that can contain several elements, but it has been removed from the W3C spec and shouldn't be used. These should be replaced with suitable header elements and the subtitles should remain p's styled as needed with css. <section id="jibarito-sandwich"> <header> <p class="title">The Jibarito Sandwich</p> <p class="sub-title">The best sandwaich you've ever tasted!</p> </header>
{ "domain": "codereview.stackexchange", "id": 24147, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "html, html5", "url": null }
food-chemistry reason to suppose that the trend wouldn't continue as temperature decreases further. Assuming the comparison is reasonably valid, you could extrapolate that the increase in density you'd observe over the temperature range you specified should be on the order of approximately 2% at best.
{ "domain": "chemistry.stackexchange", "id": 543, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "food-chemistry", "url": null }
c++, c++11, template, bitwise, overloading }; int main() { std::cout << (Binary<16>(4) << 2) << "\n"; } Updated versions of this code are on GitHub. I wanted to expand on @vnp's comment about the #defines, and focus on the use of the preprocessor overall. I would say every use of the preprocessor here, not counting the #includes, is a mistake. First, as @vnp points out, defining the logical operators like this has little value. 99.999% of C++ programmers will prefer to type a && b rather than a AND b. The 0.001% who really like to spell those operations out will write a and b... because and, bitand, xor, and so on, are all already keywords. So all those #defines could be removed, and your code would change from stuff like: res[idx] = rem XOR (lhs[idx] XOR rhs[idx]); rem = (not lhs[idx] BIT_AND rhs[idx]) or (not lhs[idx] BIT_AND rem) or (rhs[idx] BIT_AND rem);
{ "domain": "codereview.stackexchange", "id": 30710, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++11, template, bitwise, overloading", "url": null }
electricity, electric-circuits However, I believe this is likely to be incorrect since electrons do not carry energy per se. At least I don't think they do? They carry charge and the movement of this charge transfers energy around the circuit through generation of the electric field. So how does one explain why voltage is shared in a circuit with components in series? I would rather receive an intuitive explanation as opposed to 'current is fixed' so just use $V = IR$. Consider it in this way, voltage in a way is work done in moving a charge. When we have a series connection of 'n' resistors, we would need to perform work to push the charge across all of them and the total work would be a summation of the work done to move it across one of those 'n' resistors. The total work refers to the voltage drop across the entire series of resistors which is getting split for overcoming each resistor
{ "domain": "physics.stackexchange", "id": 69376, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electricity, electric-circuits", "url": null }
python, beginner, python-3.x, json with open(os.path.expanduser(ics_calendar_full_path_announcements), 'w') as f: f.writelines(ann_cal) sys.exit(0) In the above code Task is now a class whose instances are also hashable, hence you can also store unique tasks in a set. create_task_calendar_description is now the __str__ representation of the task. create_uniqueness has been replaced with id property. is_unique_calendar_task has been removed and instead we use task's id and id_valid properties to identify whether we want to process it or not. We are no longer maintaining unique tasks in a global list, instead we are now using a set in get_unique_tasks to keep track of already processed(and valid) tasks. You could also change the logic here to just store just the task's id in set.
{ "domain": "codereview.stackexchange", "id": 26299, "lm_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, json", "url": null }
audio, waveform-similarity, visualization samplerate = 44100 # generate simple sound sound_data = numpy.sin(numpy.linspace(0,20000,100000))*1000 # converts to a string representation (I suspect there might be a more natural way to do this) raw = "".join((wave.struct.pack('h', item) for item in sound_data)) # saving to .wav file filename = 'aaa.wav' sound = wave.open(filename, 'wb') sound.setparams((1, 2, samplerate, 1, 'NONE', 'noncompressed')) sound.writeframes(raw) sound.close() # plotting spectrogram plt.specgram(sound_data) plt.show()
{ "domain": "dsp.stackexchange", "id": 590, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "audio, waveform-similarity, visualization", "url": null }
ros, urdf, sdf, xacro Originally posted by VictorLamoine with karma: 1505 on 2017-01-12 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by gvdhoorn on 2017-01-12: This is basically the answer. xmlns is short for "XML NameSpace", and is a special XML construct that is expained in the links @VictorLamoine posted. @shawnysh: you can essentially consider them like import statements in the example you posted. But it's really an XML thing, not ROS specific. Comment by shawnysh on 2017-01-14: Thank @VictorLamoine and @gvdhoorn!!!
{ "domain": "robotics.stackexchange", "id": 26704, "lm_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, urdf, sdf, xacro", "url": null }
optimization, performance, array, linq, vb.net Casting the array to List and then slowly using IndexOf to select the indices is not really great. Is there a better method maybe using LINQ? Both VB.NET and C# answers are very much appreciated. Unfortunately I don't really know visual basic but I think that you will find it easy to grasp the idea (and implement it in any language) of the following java code: int[] source = new int[]{2,0,1}; int[] dest = new int[source.length]; for (int i = 0; i < source.length; i += 1) { dest[source[i]] = i; } The code runs at \$O(n)\$ time whereas if you search for every element you get \$O(n^2)\$ time.
{ "domain": "codereview.stackexchange", "id": 6963, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optimization, performance, array, linq, vb.net", "url": null }
Nathan's answer, I've identified these three manifolds and got a little closer to understanding how to work SnapPea to maximal advantage. </p> <p>tri11, as Nathan mentioned, is hyperbolic. It has a fairly pretty Dirichlet domain.</p> <p><img src="http://dl.dropbox.com/u/46424505/triangulations/tri11.jpg" alt="Tri11 Dirichlet Domain"></p> <p>Another common name for this manifold would be the 0-surgery on the 2-component link $7a_6$ (in the Thistlethwaite table). Similarly tri12 can be identified as Nathan says. </p> <p>After playing around with Regina a bit I found an incompressible torus in tri13 that splits tri13 into the union of an orientable $I$-bundle over the Klein bottle and a figure-8 complement. So this answers the core of my question. </p> http://mathoverflow.net/questions/111409/twisted-bundle-definition/111411#111411 Answer by Ryan Budney for twisted bundle definition Ryan Budney 2012-11-03T22:45:05Z 2012-11-03T22:45:05Z <p>$S^2$ bundles over $S^2$ (smooth, PL, topological)
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9748211553734217, "lm_q1q2_score": 0.8037029360408563, "lm_q2_score": 0.8244619350028204, "openwebmath_perplexity": 669.3258553513047, "openwebmath_score": 0.8011058568954468, "tags": null, "url": "http://mathoverflow.net/feeds/user/1465" }
go Compare manually (byte-by-byte) We can also do the comparison manually, it's relatively easy and straightforward. But first to do it manually, let's create a simple helper function which tells if a hex digit (the text representation) equals to the raw data: func match(hex, raw byte) bool { if raw < 10 { return hex-'0' == raw } return hex-'a'+10 == raw || hex-'A'+10 == raw } And with this the solution: checkSum = bytes.TrimSpace(checkSum) argHash := makeHash(flag.Arg(0)) if len(checkSum) != 2*len(argHash) { // Quick check: length differ, they don't match! } else { equal := true for i, v := range argHash { if !match(checkSum[i*2], v >> 4) || !match(checkSum[i*2+1], v & 0x0f) { equal = false break } } // Now the variable "equal" tells if they are equal }
{ "domain": "codereview.stackexchange", "id": 16648, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "go", "url": null }
Here's another solution. It's not very slick, but it works. First, let's find the number of arrangements with 5 or more consecutive heads. Consider the eight symbols: T, 5T, H,H,H,H,H,H. These can be put into 8!/6!=56 distinct orders. For 14 of these, the symbols T and 5T are neighbors. Now, for example if we expand 5T into TTTTT in either "5T T HHHHHH" or "T 5T HHHHHH" we get the same result. Compensating for that, the number of arrangements with 5 or more consecutive heads is 42+14/2 = 49. Similarly, the number of arrangements with 5 or more consecutive tails is 49. How many arrangements have both 5 or more consecutive heads and 5 or more consecutive tails? We can arrange the four symbols 5T,T,5H,H in 24 different ways. 1. For eight of these arrangements, the heads and tails are separated, e.g., T 5H 5T H. Each of these counts once when expanded.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9706877692486436, "lm_q1q2_score": 0.8344650830513608, "lm_q2_score": 0.8596637451167997, "openwebmath_perplexity": 381.6023605919213, "openwebmath_score": 0.7606801390647888, "tags": null, "url": "http://math.stackexchange.com/questions/157634/combinatorics-of-coin-tosses" }
the-moon, declination, precession, space-geometry I have provided there a rough estimate of the range. The calculation of this was as follows: If at the Solar-node we make the declination of the Moon +5 deg. (due to his tilt 5deg to the ecliptic), and if we assume (this is the estimate) that in this setting the max declination of the Moon is 23.5, this Solar node is 12.62 deg from the the Lunar node. ($\sin(x) = \sin(5)/\sin(23.5)$); hence my estimate of ~12.5 on each side of the Solar node. But I believe the answer should come a little lower, for at this setting the max declination of the Moon is higher than 23.5 and also it seems not to be 5deg at the Solar node. I tried to calculate this but got somewhat confused, and I'm not sure how to calculate this at the end. Also, I didn't find the correct figure online so I was missing something to validate whatever answer I will come up with.
{ "domain": "astronomy.stackexchange", "id": 6014, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "the-moon, declination, precession, space-geometry", "url": null }
Now define $H_j: X \times Y \rightarrow [0,1]$ by the following: $\displaystyle H_j(x,y)=\sum \limits_{O(B) \times B \in \mathcal{W}_j} F_{O(B),j}(x) \ G_{B,j}(y)$ for all $(x,y) \in X \times Y$. Note that the function $H_j$ is well defined. Since $\mathcal{B}_j$ is locally finite in $Y$, $\mathcal{W}_j$ is locally finite in $X \times Y$. Thus $H_j(x,y)$ is obtained by summing a finite number of values of $F_{O(B),j}(x) \ G_{B,j}(y)$. On the other hand, it can be shown that $H_j$ is continuous for each $j$. Based on the definition of $H_j$, it can be readily verified that $H_j(x,y)>0$ for all $(x,y) \in \cup \mathcal{W}_j$ and $H_j(x,y)=0$ for all $(x,y) \notin \cup \mathcal{W}_j$. Define $H: X \times Y \rightarrow [0,1]$ by the following: $\displaystyle H(x,y)=\sum \limits_{j=1}^\infty \biggl[ \frac{1}{2^j} \ \frac{H_j(x,y)}{1+H_j(x,y)} \biggr]$
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9780517469248845, "lm_q1q2_score": 0.8293563511751529, "lm_q2_score": 0.8479677622198946, "openwebmath_perplexity": 99.66562212800767, "openwebmath_score": 0.9851532578468323, "tags": null, "url": "https://dantopology.wordpress.com/tag/metrizable-spaces/" }
camera ^C[rosout-1] killing on exit [master] killing on exit shutting down processing monitor... ... shutting down processing monitor complete done Running the node with kdbg, found that the segmentation fault, occurs in stereoDeinterlace2 method, in the last for loop. I'm sorry for the huge message! I hope someone could help! Michael Skolarikis PANDORA Robotics Team Originally posted by Michael Skolarikis on ROS Answers with karma: 16 on 2011-03-23 Post score: 0 Problem solved!!! My Videre STOC camera sends image data as 2byte pixels in YUV422 format. For some reason, the camera reports that the frame it sends is in YUV411 format! YUV422 bit size is set to 16, instead of YUV411 which is set to 12 in dc1394/utils.c. This was causing incomplete frames. In libdc1394-2.1.2, at dc1394/control.c, line 672 I made the following change: *mode= (uint32_t)((value >> 29) & 0x7UL) + DC1394_VIDEO_MODE_FORMAT0_MIN; -> *mode= DC1394_VIDEO_MODE_640x480_YUV422;
{ "domain": "robotics.stackexchange", "id": 5188, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "camera", "url": null }
< (k+2)^n - (k+1)^n$$This is false. Consider the validity of the statement for k=6, n=3. One has 6^3=216 and (6+2)^3 - (6+1)^3 = 512 - 343 = 169$$6^3 = 216> 169 = (6+2)^3 - (6+1)^3$$Why ... 4 In hoping to see this more clearly, let's start with an example. Consider \tau the euclidean topology on \mathbb{R}, that is to say the topology induced by the distant d(x,y) := |x-y|. The open interval (1,2) is an element of the topology \tau for any, i.e. (1,2) is open. Therefore (1,2) \in \tau. More generally, any interval of the form ... 3 You have the correct approach. Just clean up a few details. You are trying to show that given any \epsilon > 0, there exists a partition P_\epsilon such that U(P_\epsilon,f) - L(P_\epsilon,f) < \epsilon. First define M,$$M := \sup_{x \in [a,b]} |f(x)|.$$Then it follows that for i = 1, 2, \ldots, n we have$$M_i - m_i \leqslant 2M,$$... 3 Since (e^x)' = e^x for all x, and e^x > 1 for x > 0, we have, for x > 0, \begin{array}\\ e^x-1 &=\int_0^x e^t dt\\ &>
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9546474168650673, "lm_q1q2_score": 0.8056222760107878, "lm_q2_score": 0.8438950986284991, "openwebmath_perplexity": 194.02123763679134, "openwebmath_score": 0.9418020844459534, "tags": null, "url": "http://math.stackexchange.com/tags/proof-writing/hot?filter=month" }
human-biology, human-evolution Physiologically it's going to push your body to the limit. After all, you sense your life is in serious danger. But as many people deal with this stress, they can start to acclimate until they ideally stay fearful, but become extremely focused on the fight. The adrenaline rush (and again, other chems) is part of what you need to get used to. If your body has a naturally stable system when exposed to these chemicals, or you have trained it to be so, then you are at an advantage compared to your peers. https://www.psychologytoday.com/blog/threat-management/201001/adrenaline-rushes-can-they-help-us-deal-real-crisis http://www.faqs.org/health/topics/15/Risk-taking-behaviors.html
{ "domain": "biology.stackexchange", "id": 5517, "lm_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, human-evolution", "url": null }
quantum-mechanics, symmetry, time, time-evolution where it's the equality marked with (?) which I can't follow and which I think has to do with my lack of understanding of time translations. If I am doing $t \to t' = t + s$ on the system then shouldn't my system get mapped to $|\psi'(t')\rangle=|\psi(t+s)\rangle$? If $s>0$ I am ahead in time after the active transformation. This is related to my not understanding the end of Saoirse's answer here. Edit on my understanding after answers from Prof. Moretti and ACuriousMind:
{ "domain": "physics.stackexchange", "id": 93194, "lm_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, symmetry, time, time-evolution", "url": null }
filters, discrete-signals, infinite-impulse-response, digital-filters Title: Coefficient Scaling of IIR filter to obtain unity gain response I am designing a 2nd order IIR digital filter : My tf equation with coefficients is b = [0 1.209e09] a= [9.2175 -2.6952 1.0000] sys=tf(b,a,0.1,'Variable','z^-1') bode(sys) I have couple of questions :
{ "domain": "dsp.stackexchange", "id": 9026, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filters, discrete-signals, infinite-impulse-response, digital-filters", "url": null }
filter-design, kalman-filters, least-squares Title: Defining Model in Kalman for Getting Position Using I am stuck at modeling a system model, i.e. getting my state vector and input vector for navigating just using navaid and ins (tactical). My guess is that position is my only state vector and INS output (acceleration or velocity) is input vector. What is state vector and what is input vector in my case? As I just need 2 position which sensor must be used for update and which must be used for predict. Should I use 1d 2 kalman implementation for lat and lon or no etc? In general, for position-related Kalman filters, you want your state vector to contain $x$, and $\dot{x}$ (location and velocity) components. See, for example, the Wikipedia page or this question and answer here. If you have a measure of velocity, then it can certainly also be an input to the Kalman filter.
{ "domain": "dsp.stackexchange", "id": 7140, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "filter-design, kalman-filters, least-squares", "url": null }
ros, c++, ros-melodic, nodehandle // Creating quaternion from RPY to pass to ekf tf::Quaternion quat = tf::createQuaternionFromRPY(-phi,-theta, -psi); // Computing bias of the gyroscope double gyro_bias[3] = {0,0,0}; res.gyro_bias[0] = sum_gyro[0] / num_data; res.gyro_bias[1] = sum_gyro[1] / num_data; res.gyro_bias[2] = sum_gyro[2] / num_data; // Converting from tf::Quaternion to geometry_msgs::Quaternion to pass as a msg quaternionTFToMsg(quat , res.init_orientation); ROS_INFO("sending back response: \n gyro_bias[1]: %f gyro_bias[2]: %f gyro_bias[3]: %f ", (double)res.gyro_bias[0], (double)res.gyro_bias[1], (double)res.gyro_bias[2]); ROS_INFO("quat x: %f y: %f z: %f w: %f ", (double)quat[0], (double)quat[1], (double)quat[2], (double)quat[3]); return true; } int main(int argc, char **argv) { // Initializing the node and creating the node handle ros::init(argc, argv, "ahrs_init_server"); ros::NodeHandle n; n_ptr = &n;
{ "domain": "robotics.stackexchange", "id": 35309, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, c++, ros-melodic, nodehandle", "url": null }
c, homework, floating-point Title: Determine how many bits are in a floating point value I'm writing a program which determines how many bits are in a floating point value (this will be run on Unix). #include <stdio.h> #include <stdlib.h> void countbits(int k); int main(){ int input; // int a = (int) malloc(sizeof(int)); printf("Please enter a number: "); scanf("%d",&input); // a = input; countbits(input); } void countbits(int k){ int j,count; count = 0; for(j = 0; j < 31; j++){ if(k & 0x000001 == 1){ count++; } k >>= 1; } printf("%d has %d bits set\n",k,count); // count = 0; } Output example: 2 has 1 bits set 6 has 2 bits set 32 has 1 bits set
{ "domain": "codereview.stackexchange", "id": 7404, "lm_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, homework, floating-point", "url": null }
c, linked-list, pointers Finally: return deleted; }; You don't need that last semi-colon.
{ "domain": "codereview.stackexchange", "id": 27394, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c, linked-list, pointers", "url": null }
special-relativity, gravity, potential-energy, mass-energy Everyday example: Which state has more energy: a tidied or an untidies room? The answer is the tidied one because we've spent energy to tidy it Since the gravitational field is a conservative one the work done to do this action is always $-\Delta U = -mg \Delta h$, so if you were already at $h$ then the change in height is 0. It may be a bit confusing but it has to do with your choice of zero potential energy level
{ "domain": "physics.stackexchange", "id": 11948, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, gravity, potential-energy, mass-energy", "url": null }
php, mysql, php5, pdo, reinventing-the-wheel In this case, get will be called twice. Doesn't that look pretty inefficient and clumsy to you? Because it sure does to me. One more thing: There is one more issue to address: PDOStatement instances should be reusable, and users should have access to them. You are hiding the brilliant things PDOStatement instances can do for you.
{ "domain": "codereview.stackexchange", "id": 8870, "lm_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, mysql, php5, pdo, reinventing-the-wheel", "url": null }
algorithms Title: Compound interest with varying compounding frequency Here is the problem I have attempted to solve. Given original principal $n$ and aggregate rate $r$, find the maximum final principal that can be yielded. Though I know that the higher the compounding frequency is, the higher the final principal will be, a special condition applies: Intermediate principals are rounded down to the the nearest integer each time. So for example $n = 10000$ and $r = 3$, I can choose to have 1% growth 3 times a 2% growth then a 1% growth or a 3% growth.
{ "domain": "cs.stackexchange", "id": 12591, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms", "url": null }
solar-system, solar-eclipse, planetary-transits, eclipse-non-earth-related Proof that no planets could fully eclipse the sun from another planet: To rule out the possibility that any eclipses are possible, We only have to verify orbits pairwise in order of increasing distance from the sun. Since, if the $nth$ planet can't fully eclipse the sun from the $n+1_{th}$ planet than it certainly won't be able to do so from any other planet. For example, if Jupiter can't eclipse the sun from Saturn, it certainly won't be able to from Neptune. As seen from a planet, if the apparent size of the sun in the sky is smaller than the apparent size of the next inner planet, then a full eclipse is possible. The largest an inner planet can appear from an outer planet is when the inner planet is at aphelion and the outer planet is at perihelion and the pass is directly overhead of the observer. The formula for angular radius of a sphere is $\delta = \arcsin (d/2D)$ where d is the diameter of the sphere and D is the distance between the observer and the center of the sphere.
{ "domain": "astronomy.stackexchange", "id": 4959, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "solar-system, solar-eclipse, planetary-transits, eclipse-non-earth-related", "url": null }
Is it also a necessary condition? If no, is there another necessary condition for $e^A$ and $e^B$ to commute? • It is a necessary condition if we require that $e^{tA}$ commute with $e^{tB}$ for all $t \in \Bbb R$. I don't know about the weaker requirement, though. – Ben Grossmann Aug 22 '16 at 10:52 • Related. I'll leave it to others to decide whether this question is a duplicate. – Ben Grossmann Aug 22 '16 at 11:44 • It appears this is a duplicate indeed. I'm really sorry, I thought I searched enough! Thanks for your answers though. – user9037 Aug 22 '16 at 11:46 • don't worry about it; duplicates like these make it easier for future potential askers to find what they need. – Ben Grossmann Aug 22 '16 at 11:48 It's not necessary. See If $e^A$ and $e^B$ commute, do $A$ and $B$ commute?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9609517095103498, "lm_q1q2_score": 0.8314385696108972, "lm_q2_score": 0.865224091265267, "openwebmath_perplexity": 331.4442317969062, "openwebmath_score": 0.871580958366394, "tags": null, "url": "https://math.stackexchange.com/questions/1899864/commuting-matrix-exponentials-necessary-condition" }
java, game, swing Title: Ping Pong game in Java This is my first application in Java, it imitates the world-known Ping Pong Game. I have a lot of questions in my mind... I read that the class Timer is not recommended with multiple timers so I use ScheduledThreadPoolExecutor which probably does the same? Is there something better than that? The collision detection in the Ball class includes a lot of else if statements but I don't have any idea how to improve that... KeyInput - there was a problem with multiple using keys so I uses a idea from this website, simply "try" to adopt to my code, it works but is it OK? RandomGenerator class contains several switch-statement, how to make this cleaner? Is there any more sophisticated way than switch? Every opinion is really appreciated. In case someone wants to play the game I can send .jar file :) GameFrame class import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame;
{ "domain": "codereview.stackexchange", "id": 21672, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, game, swing", "url": null }
algorithms, reference-request, integers, numerical-algorithms def sqrt(r) // r is an unsigned integer residue = r // residue will be the 'remainder' root = 0 // root will be the integer square root (floor(r**0.5)) onebit = 2**(bitlength(r)-2) // onebit is a moving 'bitpicker' while onebit > r onebit = onebit / 4 // find highest bitpicker less than r while onebit > 0 x = root + onebit // Current root plus onebit if residue >= x // Room to subtract? residue = residue - x // Yes - deduct from residue root = x + onebit // and step root root = root / 2 // Slide evolving root 1 bit down the residue onebit = onebit / 4 // Slide the bitpick 1 bit down the root assert(root**2 + residue == r) assert((root+1)**2 > r)
{ "domain": "cs.stackexchange", "id": 6003, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, reference-request, integers, numerical-algorithms", "url": null }
java, security, cryptography, aes SecretKeySpec secretKeySpec = new SecretKeySpec(decryptedSymmetricKey, "AES"); decrypted = decrypt(encryptedData, secretKeySpec, iv); } catch (Exception e) { e.printStackTrace(); } return decrypted; } private byte[] decrypt(byte[] data, SecretKeySpec secretKeySpec, byte[] iv) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException { //decryption utility method Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); GCMParameterSpec gcmParameterSpec = new GCMParameterSpec(GCM_TAG_LENGTH * 8, iv); cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, gcmParameterSpec); return cipher.doFinal(data); } } The IV, and either RSA-encrypted symmetric key or salt used for key derivation are prepended to the output byte[]. It is used as follows: GCM gcm = new GCM();
{ "domain": "codereview.stackexchange", "id": 36924, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, security, cryptography, aes", "url": null }
collapse due to spreading, especially under snow loads, but also under just the load of the roof itself. Smooth a time series using moving averages or other filters. Browse all » Wolfram Community » Wolfram Language » Demonstrations ». We cannot add up an infinite number of terms in this sequence because we do not have a closed formula for the coefficients c[k], it is a recursive formula and will exceed the finite recursion depth of Mathematica. SumConvergence[2^^(n 1);n] 5. Mathematica Q&A Series: Converting to Conventional Mathematical Typesetting December 15, 2011 — Vitaliy Kaurov , Academic Director, Wolfram Science and Innovation Initiatives. MathWorld » The web's most extensive mathematics resource. Share code & files. Information for authors. Assume that f(x) is defined and integrable on the interval [-L,L]. students of year 12. What they decide could help shape the future of. SymPy and Mathematica are Computer algebra systems. Table of Contents Volume 3, Issue 1 Winter 1993.
{ "domain": "cascsub.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9632305318133554, "lm_q1q2_score": 0.8026836931155493, "lm_q2_score": 0.8333245953120233, "openwebmath_perplexity": 1062.2757806070022, "openwebmath_score": 0.2423764318227768, "tags": null, "url": "http://reon.cascsub.it/mathematica-series.html" }
7. If box 1 contained 1 coin, and that information was disclosed, it would automatically mean the previous box contained 0 coins, which would be box 10 (since it is arranged in a circle). Is that not a correct assertion? 8. It is box 7 (I think). If you imagine the circle as a clock, where the box's numbers remain constant (That is: Box No. 1 is at 12 O'clock, Box No. 3 is at 1 O'clock, etc...) and the number of coins change as I rotate the circle, the number of coincidences between the box number and the coins it contains will, of course, change. When the judge says that I can deduce the box that contains zero coins by knowing the number of coincidences, he's basically saying that there is a number of rotations that I can make that will produce a unique number of coincidences. If I assume an initial condition of: Time 12 1 2 3 4 5 Box 1 3 6 11 8 4 Coins 0 1 2 3 4 5 When I apply my first rotation, then the new configuration will be:
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464520028357, "lm_q1q2_score": 0.8153871957417893, "lm_q2_score": 0.8354835391516133, "openwebmath_perplexity": 528.1094111647998, "openwebmath_score": 0.5295990109443665, "tags": null, "url": "http://mathhelpforum.com/math-puzzles/101274-judge-12-boxes.html" }
python, python-2.x, validation for i in encrypt_arr: num = ord(i) + 3 new_encrypt_arr.append(chr(num)) return ''.join(new_encrypt_arr) def decrypt(encrypted_password): """ Decrypt a password when needed :type encrypted_password: String (UTF-8) """ decrypt_arr = list(encrypted_password) new_decrypt_arr = [] for char in decrypt_arr: num = ord(char) - 3 new_decrypt_arr.append(chr(num)) return ''.join(new_decrypt_arr) Except for names the only difference is the single line num = ord(char) + 3 vs num = ord(char) - 3, you could give the operation as an argument: def encrypt(password, operation=op.add): # ... same num = operation(ord(char), 3) # ... same def decrypt(password): return encrypt(password, operation=op.sub)
{ "domain": "codereview.stackexchange", "id": 21752, "lm_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-2.x, validation", "url": null }
uv-vis-spectroscopy Title: Beer's law with a polychromatic light source As is well known, Beer’s law (aka the Beer-Lambert law, among others) is predicated on a number of conditions, one of which is that the light source be monochromatic or, as a practical approximation, that the spectral bandwidth of the light source be much smaller than the spectral bandwidths of whatever absorbers are being investigated. For present purposes, a polychromatic light source may be considered to have spectral bandwidth, $\ce S_{source}$, that is not negligible relative to that of the relevant absorbers. The question posed below will deal with what happens when the light source is decisively polychromatic. Assume a cell path length, b, of 1 cm, and assume a single absorber, having triangular molar absorptivity spectral profile (Fig. 1):
{ "domain": "chemistry.stackexchange", "id": 12192, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "uv-vis-spectroscopy", "url": null }
urdf, moveit, gripper, pick-and-place, ur5 [..] but I couldn't find a document explaining all these steps. If no such document is available, maybe an overview of the necessary steps with links to the appropriate documents/tutorials would also be helpful. Afaik you're unfortunately right: no single source for this information exists. The moveit-users mailing list is a good place to start, and the various PR2 (grasping) related MoveIt packages may also be interesting. The pick-and-place pipeline is probably the least documented, although admittedly I haven't spent too much time trying to find information. I'm guessing most users only use MoveIt for its motion planning capabilities, and don't integrate EEF control with it. Originally posted by gvdhoorn with karma: 86574 on 2014-12-02 This answer was ACCEPTED on the original site Post score: 16
{ "domain": "robotics.stackexchange", "id": 20215, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "urdf, moveit, gripper, pick-and-place, ur5", "url": null }
quantum-chemistry, orbitals Title: Is there any difference between a completely filled orbital and an half-filled one? Is there any reduction in size of the orbital for a half-filled orbital? Is the probability at any point of finding an electron doubled if there are two electrons instead of one? Is there any difference at all? I'm trying to understand the quantum mechanical model. Thank you in advance! While what ssavec says about not taking orbitals away from a structure is true, it's possible to make some generalisations, particularly for lone atoms where the symmetry constraints make the orbital divisions more clear.
{ "domain": "chemistry.stackexchange", "id": 632, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-chemistry, orbitals", "url": null }
newtonian-mechanics, forces, work, spring In other words, the concept/actuality of the spring constant $k$ includes the force applied against displacement of all the increments of the spring. Thus, when integrating the force multiplied times each increment of displacement, the integration naturally/unavoidably includes the total force applied to displace all the spring's constituent inter-atomic bonds. Thus, the Work calculated for each increment of spring-end displacement implicitly includes the force needed to displace all of the interatomic bonds in the entire spring. And subsequently, integration of all those increments of Work yields the total work done by displacing the spring against the force exerted by all the bonds within the spring.
{ "domain": "physics.stackexchange", "id": 61029, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces, work, spring", "url": null }
performance, accuracy So, to answer the next question how do you get confidence that the outcome is good enough, I assume that you have heard about RMSE,MAPE and many more for predictions and confusion matrix for classification problem. We use these metrics to see access the models performance, for example if you are trying to classify whether the given cell is cancer cell or not, there are 100 records in which 90 are non-cancer cells and 10 are cancer cell, your model gives 99% accuracy but could classify 5 out of 9 literally 55% of the total in such scenarios you need to look cannot use accuracy, you need to use F1 score etc. As you were asking about a model right, all models are not useful. True not all models built are going to go for production level, you would choose the best one and productionize it. You can re-train your model on a basis(Daily, Weekly,Monthly based on business requirement). Would you call it a day off post completion of validation? I wouldn't, I would go to the Subject Matter Expert
{ "domain": "datascience.stackexchange", "id": 2789, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, accuracy", "url": null }
ros-kinetic [ERROR] [1576090944.704397757]: Error Access Mode [ INFO] [1576090944.904812464]: Sending : <STX>sWN EIHstCola 1<ETX> 1576090944.9049 Warning: Tcp::write: Failed to send data to socket. [ERROR] [1576090950.984822705]: no answer received after 5000 ms. Maybe sopas mode is wrong. [ INFO] [1576090950.984927041]: sendSOPASCommand: no full reply available for read after 5000 ms [ INFO] [1576090950.985132595]: Receiving: <STX><ETX> [ INFO] [1576090950.985210738]: SOPAS Communication -Error unexpected Sopas Answer for request <STX>sWN EIHstCola 1<ETX>
{ "domain": "robotics.stackexchange", "id": 34132, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros-kinetic", "url": null }
gazebo, navigation, ros2, robot-localization and everything is on use_sim_time True. Originally posted by morten on ROS Answers with karma: 198 on 2021-11-24 Post score: 1
{ "domain": "robotics.stackexchange", "id": 37182, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo, navigation, ros2, robot-localization", "url": null }
quantum-field-theory, momentum, hilbert-space, fourier-transform, normalization Can $\langle x,t | y,t\rangle \neq 0$ be possible for $x\neq y$? If so, why can we consistently define position space asymptotically? Isn't $\langle p_a,t |p_b,t\rangle = 0$ for $p_a\neq p_b$ where $p_a$ and $p_b$ refer to momenta? (Assume $a_p^{\dagger}|0\rangle = |p\rangle$, where $a_p^{\dagger}$ is creation operator) If so, is this the reason why we use momentum space for most QFT calculations? Both momentum and position space are not properly normalizable in Hilbert space. How do we really deflect away these problems in practice? If you define $|x,t\rangle = \phi(x)|0\rangle$, then the inner product given by $\langle y, t|x,t\rangle$ gives you an equal time two point function, which isn't necessarily 0 if $x\neq y$. You are confusing this with position space inner product, so note that your definition of $|x,t\rangle$ isn't the position space eigenket, but it is a state obtained by acting the scalar field operator on the ground state. So parts 1 and 3 are resolved.
{ "domain": "physics.stackexchange", "id": 48778, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, momentum, hilbert-space, fourier-transform, normalization", "url": null }
special-relativity, mass, speed-of-light, speed Title: What is the fastest speed that a massive object can travel at? What is the fastest speed (in miles per hour) that a massive object can travel at? I have heard that an object can travel at the speed of light, but I've also heard that massive objects cannot travel at the speed of light. Well, by massive, I assume you mean objects that have non-zero rest mass. In that case, it would take infinite energy for that object to reach the speed of light. However, their speed would get closer and closer to the speed of light as more energy is put in, until their speed was practically (but not exactly) the speed of light. Additionally, the smaller the rest mass, the easier it is to accelerate them closer to the speed of light. Neutrinos, which have the smallest non-zero rest mass that we know of, travel at speed so close to the speed of light that we have not actually been able directly measure a neutrino traveling slower than the speed of light (that is, the speed of light has been within
{ "domain": "physics.stackexchange", "id": 20034, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, mass, speed-of-light, speed", "url": null }
quantum-mechanics, electromagnetism, spectroscopy, multipole-expansion, fermis-golden-rule $$T_{0n} = T_{0n} ^{(0)} + T_{0n} ^{(1)} + T_{0n} ^{(2)} + ... $$ The oscillator strength $f_{0n}$ is related to $|T_{0n}|^2$ and the absorption cross-section $\sigma_{0n}$ via: $$ f_{0n} = \frac{m_e c}{2\pi ^2 e ^2 \hbar} \sigma_{0n} = \frac{2m_e}{e^2 E_{0n}}|T_{0n}|^2$$ where $E_{0n}$ is the transition energy. For a dipole transition we know that $T_{0n} ^{(0)}$ can be written as $$ T_{0n} ^{(0)} = \frac{e}{m_e} \sum_{i} \langle{0} \vert \hat p_i \cdot E \vert n\rangle = E \cdot \langle{0} |\hat \mu_i \vert n\rangle$$ where $\hat \mu_i$ is the electric dipole moment operator in the length representation and the summation index $i$ represents the current electron being considered $$ \hat \mu_i = e \sum_{i} \hat r_i $$ Given this, we can express the oscillator strength in terms of the individual components of the transition dipole moment as: $$ f_{0n,x} = \frac{2m_e}{e^2 E_{0n}}|E \cdot \langle{0} |\hat \mu_{i,x} \vert n\rangle|^2$$
{ "domain": "physics.stackexchange", "id": 63028, "lm_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, electromagnetism, spectroscopy, multipole-expansion, fermis-golden-rule", "url": null }
thermodynamics, energy, home-experiment Title: How to maximize the efficiency of a portable air conditioner? I have a small window AC unit that I occasionally use to rapidly cool my apartment. As I was placing it in my window today I was thinking of how I could maximize it's efficiency so that it either cools my room quicker (or uses less electricity to cool my room due to less work being required). Environment Say my room is at 80 degrees, and I'd like to lower the temperature to 75 degrees. The outside air temperature is currently 70 degrees. Premise Ignoring the option of just using a fan to pull cold air in, I'd like to focus on the physics of the AC unit. What is the "best" way to cool my room? The AC has 2 air flow paths. The cold side: air is blown across the evaporator coil and into the room. The hot side: air is blown across the condenser coil and vented to the surroundings.
{ "domain": "physics.stackexchange", "id": 51820, "lm_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, home-experiment", "url": null }
reference-request, information-theory Entropy- It is desired that the entropy of the system be maximized. Maximizing entropy means no symbol is better than the others or we do not know what the next symbol / outcome would be. However, the formula states a negative sign before the summation of the probability logarithms. Thus, it means we are maximizing a negative value!! Then if an original raw signal is quantized and the quantized information's entropy is calculated and found to be lesser than the original entropy would imply loss of information. So,why do we want to maximise entropy since it would mean that we are maximizing the uncertainty of the next symbol whereas we want to be certain about waht the next occurence of the symbol would be. What are the differences between Shannon's entropy, topological entropy and source entropy? What exactly is the significane of Kolgomorov complexity or Kolgomorov entropy. How is it related to Shannon's entropy?
{ "domain": "dsp.stackexchange", "id": 375, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reference-request, information-theory", "url": null }
of the two sets represents smooth components and the other represents edges of images. Graph implicit equations in 2 and 3 dimensions. It is sometimes called the Heaviside function. MAFA chart Plotter is a server based function plotting program which allows you to plot your function graphs online without any installation. Heaviside Step Function Heaviside Step Function to save your graphs! + New Blank Graph. Parabolas: Standard Form + Tangent example. This means we should write V(t) = 240H(t). ) The Heaviside unit step function turns on a function at The switch (change) at is in fact an impulse, i. The custom gradient is applied to tf. u(t) = 8 <: 0; t < 1; t 0 4. Graph functions of a complex variable. HeavisideTheta[x] represents the Heaviside theta function \[Theta](x), equal to 0 for x < 0 and 1 for x > 0. Simplifying exponential expressions with radicals and fractional exponents, graphs of parabolas for dummies, pre algebra practice workbook, solve my rational expressions. To write
{ "domain": "campercom.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9817357237856482, "lm_q1q2_score": 0.8026420635890474, "lm_q2_score": 0.8175744695262775, "openwebmath_perplexity": 676.8861870960559, "openwebmath_score": 0.7016867995262146, "tags": null, "url": "http://campercom.it/pglt/heaviside-function-graph.html" }
general-relativity, gravity, differential-geometry, density $$1-\frac{2M}{R} = \left(\frac{P_{c} + \rho}{P(R) + \rho}\right)^{2}$$ and $$1-\frac{2M}{R} = 1 - \frac{8\pi\rho}{3}R^{2}$$ Solving the second equation for $M$: $$M = \frac{4\pi \rho R^{3}}{3}$$ putting this into the first equation: $$1-\frac{8\pi\rho R^{2}}{3} = \left(\frac{P_{c} + \rho}{P(R) + \rho}\right)^{2}$$ But, on our first step, we worked out the value $r_{0}$ for our sign change to be equal to $r_{0} = \sqrt{\frac{3}{8\pi\rho_{0}}}$, so this really is: $$1-\left(\frac{R}{r_{0}}\right)^{2} = \left(\frac{P_{c} + \rho}{P(R) + \rho}\right)^{2}$$
{ "domain": "physics.stackexchange", "id": 28963, "lm_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, gravity, differential-geometry, density", "url": null }
c++, object-oriented, playing-cards cycle.h #pragma once #include <vector> namespace UNO { template <typename Type> class Cycle { private: int index = -1; bool reversed = false; public: std::vector<Type> items; Cycle(){}; Cycle(std::vector<Type> items_): items{items_}{}; Type* next() { index += (reversed) ? -1 : 1; if (index == items.size()) index = 0; else if (index == -1) index = items.size() - 1; return &items[index]; } void reverse() { reversed = !reversed; } }; } game.h #pragma once #include <iostream> #include <ctime> #include <algorithm> #include <windows.h> #include "card.h" #include "deck.h" #include "player.h" #include "cycle.h" namespace UNO { class Game { public: Deck cards_deck; std::vector<Player> players; Cycle<Player> player_cycle; Card top_card;
{ "domain": "codereview.stackexchange", "id": 42565, "lm_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, playing-cards", "url": null }
spectroscopy, stars, metals Title: Metal Dilemma: Only very few civilizations per galaxy This is a question in the area of extraterrestrial life. While life may be possible without it, space travel is probably impossible without metal. Metal is created in stars and heavy metals (above iron) are created in super novae. In a German posting, someone mentioned that there are only very few stars outside of the galactic core which contain a lot of metal. There is little hope for life in the core itself but if metal is so rare outside the core, that surely limits the options for aliens to build civilizations. My question: We can easily measure the amount of metal in a star by looking at its spectrum. Does that give a good indication of the metal distribution of dark bodies? Is there a theory about the relation between elements in the star and its planets?
{ "domain": "physics.stackexchange", "id": 3185, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spectroscopy, stars, metals", "url": null }
c#, python //python os.path.basename() char[] chars = filename.ToCharArray(); int key = 0; foreach (char c in chars) { key += c; } StringBuilder builder = new StringBuilder(); using (FileStream file = new FileStream(path + filename, FileMode.Open)) { bool tick = true; while (true) { int i = file.ReadByte(); //it's ok to break here because if the first byte is present, then the second byte will also be present, because the data files are well formed. if (i == -1) break; //we can skip the 2nd byte because the algorithm ignores it anyway file.ReadByte(); if (tick) key += 2; else key -= 2; tick = !tick; i ^= key; char c = (char)(i & 255); builder.Append(c); } } string result = builder.ToString();
{ "domain": "codereview.stackexchange", "id": 6758, "lm_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#, python", "url": null }
java, algorithm, pathfinding while (!openForward.isEmpty() && !openBackward.isEmpty()) { if (touchNode != null) { Integer minA = openForward.peek().node; Integer minB = openBackward.peek().node; double distanceA = distancesForward.get(minA) + heuristicFunction.estimate(minA, targetNode); double distanceB = distancesBackward.get(minB) + heuristicFunction.estimate(minB, sourceNode); if (bestPathLength <= Math.max(distanceA, distanceB)) { return tracebackPath(touchNode, parentsForward, parentsBackward); } } if (openForward.size() + closedForward.size() < openBackward.size() + closedBackward.size()) { Integer currentNode = openForward.remove().node;
{ "domain": "codereview.stackexchange", "id": 27397, "lm_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, pathfinding", "url": null }
object-detection, yolo, feature-extraction Also, you might need to fix non maxima suppression to pass the correct features.
{ "domain": "ai.stackexchange", "id": 4012, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "object-detection, yolo, feature-extraction", "url": null }
scikit-learn, topic-model, lda Thank you! You should indeed use the distribution across topics by document $p(t|d)$. There are two options: The "classification" option: for every document select the topic which has the highest probability, i.e. label every document with the most likely topic. Then simply count the number of documents for every topic. The "probabilistic" option: for every topic $t$ sum the probability $p(t|d)$ across all the documents $d$. This means counting the proportion of each document which is considered as topic $t$. Assuming there is a quite large number of documents, the two options usually produce similar results.
{ "domain": "datascience.stackexchange", "id": 9867, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "scikit-learn, topic-model, lda", "url": null }
solid-state-physics, resource-recommendations, group-theory, crystals, electronic-band-theory So far I'm having serious difficulties understanding the subject of Symmetrization of Nearly Free Electron Wave Functions, and the materials I found about this subject is not understandable at best. If someone have any recommendations for good places or books to study the subject from it would be great. I do have backgroup in mathematics and quantum materials, and I know a bit of symmetry as well. So I don't need to restudy the definition of Hamiltonian or wave vector. A modern book guiding step-by-step in the world of applications of group theory and group representation theory to the study of electronic states is
{ "domain": "physics.stackexchange", "id": 80233, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "solid-state-physics, resource-recommendations, group-theory, crystals, electronic-band-theory", "url": null }
entanglement, textbook-and-exercises, nielsen-and-chuang Exercise 12.20: Show that the assumption that $\rho_{\psi}$ is invertible may be removed from the proof of the converse part of Theorem 12.15. It is not clear to me how to define appropriate measurement operators if we do not have invertibility of $\rho_{\psi}$. My question is, how can this assumption be removed? Edit: I have added a picture (below) of the full proof given in Nielsen-Chuang, in case this helps clarify how to proceed when we remove the assumption of invertibility.
{ "domain": "quantumcomputing.stackexchange", "id": 4390, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "entanglement, textbook-and-exercises, nielsen-and-chuang", "url": null }
a matrix representation of the C2hpoint group. Once we get the matrix P, then D = P t AP. The Jordan decomposition allows one to easily compute the power of a symmetric matrix :. 2 Definiteness of Quadratic Forms. 1, is an eigenvalue of. Matrix norm the maximum gain max x6=0 kAxk kxk is called the matrix norm or spectral norm of A and is denoted kAk max x6=0 kAxk2 kxk2 = max x6=0 xTATAx. Homework Statement Hi there, I'm happy with the proof that any odd ordered matrix's determinant is equal to zero. Show that the product AAT is a symmetric matrix. If is an matrix and is an matrix, then the tensor product of and , denoted by , is the matrix and is defined as If is and is , then the Kronecker sum (or tensor sum) of and , denoted by , is the matrix of the form Let be the set of all symmetric matrices with integer. 1) means that the eigenvalues of ¡1 aC are the intersections of the graph of pn(x) with the line y = 1¡ a a¡b. If there exists a square matrix B of order n such that. Zero matrix
{ "domain": "curaben.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9910145699205375, "lm_q1q2_score": 0.8610200024040231, "lm_q2_score": 0.8688267847293731, "openwebmath_perplexity": 464.864180982628, "openwebmath_score": 0.7947157621383667, "tags": null, "url": "http://quig.curaben.it/symmetric-matrix-example-3x3.html" }
navigation, gmapping, amcl See it Comment by miguel on 2015-07-11: Thank you, in terms of only having three sensors would it lean to a smaller or larger meters/cell? I would think larger since I have less points? Comment by Naman on 2015-07-13: yes..larger meters/cell Comment by b2meer on 2016-01-15: If I want to go for option 1, can you guide me what changes I need to do in amcl to accept std_msgs/Range data? Comment by miguel on 2016-02-08: I tried to look into option 1 and never found any help. I suppose you would need to be quite knowledgeable to do so. Also the ultrasonics didnt provide near enough information (at least for Gmapping, AMCL I didn't really use) Comment by b2meer on 2016-02-08: alright. thanks for your help :) Comment by Kishore Kumar on 2017-03-07: @miguel how to convert the std_msgs/Range to laser scan, can you pls direct me to the resources or guide me?
{ "domain": "robotics.stackexchange", "id": 22106, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, gmapping, amcl", "url": null }
thermodynamics, vacuum However, radiation always occurs, and is omnidirectional, though not all materials are equally good at radiating. The amount of power sent out by radiation depends on both the temperature and the material, in particular, the equation is $$I(\epsilon, T) := \epsilon \cdot \sigma T^4$$
{ "domain": "physics.stackexchange", "id": 59103, "lm_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, vacuum", "url": null }
invertebrates Since you are planning to cover it with a cloth, the material of the cloth also matters. It has to be a material with low breathability. For eg: the survivability of the worm would depend on if you were using a wool or a silk cloth to cover it. Here is an article on the breathability of different fabrics (reference). In conclusion, I would take a guess that it should survive if the material let air pass through and would go into a state of estivation on low availability of oxygen but maybe not die. After all, they are said to be able to survive even in water if it contains enough available oxygen. (reference).
{ "domain": "biology.stackexchange", "id": 2423, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "invertebrates", "url": null }
thermodynamics, black-holes, thermal-radiation, hawking-radiation, black-hole-firewall The initial state Since "vacuum" is observer-dependent and typically only defined locally, we need to be clear about how we're choosing the global state. In the far past, long before the star collapses, the spacetime metric is flat. We can assume that the "star" is initially so diffuse that it doesn't cause any significant spacetime curvature. At those early times, we can fill the space with E-observers (defined above) and choose a state that all of them agree is empty, everywhere. The fact that such a global vacuum state exists is a special feature of inertial observers in flat spacetime. As explained in other answers (this one by Joe Schindler and this one by me), this is why we consider the formation of a black hole instead of considering a black hole that has been around forever, even though the latter would make the math easier. Hawking radiation
{ "domain": "physics.stackexchange", "id": 78751, "lm_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, black-holes, thermal-radiation, hawking-radiation, black-hole-firewall", "url": null }
general-relativity, gravity, spacetime, curvature But the problem is that few of us will recognise the qualifier with time as the major influence, and few of us would describe the motion in a curved spacetime as mass seeking a location where time runs slower. If you look at, for example, the Schwarzschild metric that describes a static black hole it is: $$ ds^2 = -\left(1-\frac{r_s}{r}\right)dt^2 + \frac{dr^2}{1-\frac{r_s}{r}}+r^2d\theta^2 + r^2\sin^2\theta d\phi^2 $$ It is not obvious that the time term is more important than the radial term or vice verse, so I can't see the justification for your claim with time as the major influence. As for the motion of an object in curved spacetime, this is determined by the curvature coefficients called the Christoffel symbols and calculated using the geodesic equation: $$ {d^2 x^\mu \over d\tau^2} + \Gamma^\mu_{\alpha\beta} {dx^\alpha \over d\tau} {dx^\beta \over d\tau} = 0 $$ Again, there is no obvious interpretation of this as mass seeking a location where time runs slower.
{ "domain": "physics.stackexchange", "id": 30573, "lm_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, gravity, spacetime, curvature", "url": null }
first off - OOPS - no we are using |sin(x)| - my apologies for the typo. i was considering a linear approximation method. separating them into the two parts seems the easiest method. thanks all. this is one of those situations where i threw out a question to my students and never checked the solution first. we all just randomly picked a function for a curve sketch analysis. i was just running through it before class tomorrow and got to that point and realized i gave those little dudes something of far more complexity than i imagined. Last edited by a moderator: Ray Vickson
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9525741214369554, "lm_q1q2_score": 0.8019013244436923, "lm_q2_score": 0.8418256452674008, "openwebmath_perplexity": 1633.5448255629171, "openwebmath_score": 0.8694120645523071, "tags": null, "url": "https://www.physicsforums.com/threads/trouble-solving-an-equation.947258/" }
algorithm-analysis, arrays, searching, average-case Here is the computation. $$\begin{align} E[\text{search for } x] &= \sum_{x!=d}\frac 1{n}E[\text{search for }x] + \frac k{n}E[\text{search for }d]\\ &=\frac{n-k}n\frac{n+1}2 + \frac k{n}\frac{n + 1}{k + 1}\\ &=\left(1-\frac{k-2}n -\frac2{n(k+1)}\right)\frac {n+1}2 \end{align}$$ In particular, if we let $n=2k$, then $$E[\text{search for } x] =\frac14\left(n+5-\frac 4{n+2}\right)$$
{ "domain": "cs.stackexchange", "id": 12092, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm-analysis, arrays, searching, average-case", "url": null }
thermodynamics, statistical-mechanics, vacuum, kinetic-theory, evaporation Another impediment is the work that has to be done against the atmosphere to form a vapor bubble inside the material. The molar volume of the gas phase might be a thousand times larger than that of the condensed-matter phase, for example. The resulting movement of the interface therefore has to push against the surrounding atmosphere, representing mechanical work.
{ "domain": "physics.stackexchange", "id": 45057, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, statistical-mechanics, vacuum, kinetic-theory, evaporation", "url": null }
# Is $[p \land (p \to q)] \to q$ a tautology? I am new to discrete mathematics, and I am trying to simplify this statement. I'm using a chart of logical equivalences, but I can't seem to find anything that really helps reduce this. Which of these would help me to solve this problem? I realize I can covert $p \to q$ into $\lnot p \lor q$, but I'm stuck after that step. Any push in the right direction would be awesome.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924802053234, "lm_q1q2_score": 0.8035576533585751, "lm_q2_score": 0.8267118004748677, "openwebmath_perplexity": 428.82292117180634, "openwebmath_score": 0.945174515247345, "tags": null, "url": "https://math.stackexchange.com/questions/1611309/is-p-land-p-to-q-to-q-a-tautology/1611327" }
python, game, python-3.x, tkinter #a countdown timer function. def countdown(): #use the globally declared 'play' variable above. global timeleft #if a game is in play... if timeleft > 0: #decrement the timer. timeleft -= 1 #update the time left label. timeLabel.config(text="Time left: " + str(timeleft)) #run the function again after 1 second. timeLabel.after(1000, countdown) #create a GUI window. root = tkinter.Tk() #set the title. root.title("TTCANTW") #set the size. root.geometry("375x200") #add an instructions label. instructions = tkinter.Label(root, text="Type in the colour of the words, and not the word text!", font=('Helvetica', 12)) instructions.pack() #add a score label. scoreLabel = tkinter.Label(root, text="Press enter to start", font= ('Helvetica', 12)) scoreLabel.pack() #add a time left label. timeLabel = tkinter.Label(root, text="Time left: " + str(timeleft), font= ('Helvetica', 12)) timeLabel.pack()
{ "domain": "codereview.stackexchange", "id": 18583, "lm_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-3.x, tkinter", "url": null }
c#, generics, inheritance, coordinate-system, constructor And public record Pixel2d(double X, double Y, int State) : Point2d(X, Y) { public int State { get; set; } = State; public virtual bool Equals(Pixel2d? other) { return base.Equals(other) && State == other.State; } } Hope that helps!
{ "domain": "codereview.stackexchange", "id": 43682, "lm_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#, generics, inheritance, coordinate-system, constructor", "url": null }
rotational-dynamics, friction Title: How does this spool have an angular acceleration opposite to its acceleration? Consider this spool. It rests on a rough horizontal force. The green lines are the ground, and a line parallel to the ground. The spool is pulled without sliding by the thread (with tension T), with force applied on the inner radius at an angle theta to the horizontal.
{ "domain": "physics.stackexchange", "id": 26605, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rotational-dynamics, friction", "url": null }
c++, file, c++17 Perhaps std::filesystem_error? if (isdigit(static_cast<unsigned char>(x))) { std::isdigit Instead of writing a loop, you could use std::any_of algorithm. for (auto it = cleaned_word.begin(); it != cleaned_word.end();) { if (std::find(invalid_signs.begin(), invalid_signs.end(), *it) != invalid_signs.end()) { it = cleaned_word.erase(it); } else{ ++it; } } Why not erase-remove, as in remove_whitespace immediately following? You could implement it like this: Word remove_invalid_signs(Word word,const std::string& invalid_signs) // replace invalid signs with whitespace { auto is_invalid = [&](char c){ return invalid_signs.find(c) != std::string::npos; }; word.erase(std::remove_if(word.begin(), word.end(), is_invalid), word.end()); return word; } (Note: I changed word from a const-ref to a value, since we only used it to copy from).
{ "domain": "codereview.stackexchange", "id": 31797, "lm_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, c++17", "url": null }
graph-traversal, model-checking, transition-systems Title: Applying DFS algorithm to a transition system to find reachable states Currently working on a past exam question which tells me to compute the product of two transition systems and then use DFS to find the reachable states of the product. I learnt how to compute the product of transition systems by looking at pages 43 and 44 in the "Principles of Model Checking" book by Christel Baier and Joost-Pieter Katoen (if anyone has a copy). I understand that the way they found the reachable states in page 44 is by tracking the value of the variable y for each state and seeing if it holds, but in my particular question I'm not using a program graph; it's a transition system that uses only sigma and gamma (as handshake actions). My first question is how do I determine what is a reachable state and what is not in a product of transition systems?
{ "domain": "cs.stackexchange", "id": 3925, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "graph-traversal, model-checking, transition-systems", "url": null }
turing-machines \delta (q_2, 0) &= (q_3, 0, R)\\ \delta (q_2, 1) &= (q_2, 1, R)\\ \delta (q_3, U) &= (q_3, U, R)\\ \delta (q_3, 0) &= (q_3, 0, R)\\ \delta (q_3, 1) &= (q_3, 1, R) \end{align*} If I input a string and it reaches the $q_{accept}$ state while there are still letters remaining in the string, would it count as accepting the string, rejecting the string, something else? As per the general definition Turing machine halts when it enters the reject or accept state.At this point there can be an arbitrary string present on the tape of the Turing machine. This is how you expect the Turing machine to compute a function of the type say $\{0,1\}^m \to \{0,1\}^n$.
{ "domain": "cs.stackexchange", "id": 6698, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turing-machines", "url": null }
quantum-mechanics Does QM theory state that reality could have been different than what it actually is? are dependent on interpretation. We only have one reality, so statements like this are non-falsifiable. In other words, this is a matter of philosophy, not science.
{ "domain": "physics.stackexchange", "id": 77193, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics", "url": null }
optics, units, unit-conversion, experimental-technology http://cvilaseroptics.com/custom/LIDT seems to contain very similar numbers for the induced damaged threshold, $$ 2\,{\rm J}\cdot {\rm cm}^{-2}, \quad 20\,{\rm ns}, \quad 20\,{\rm Hz}$$ Note that the power of the centimeter is $-2$, minus two. This simply means the amount of energy (two joules) deposited per unit area (squared centimeter) in one pulse (which takes 20 nanoseconds, and is repeated 20 times a second). My understanding is that the average power is $2\times 20=40$ watts in my case. If that material really has the exponent of the centimeter $-1$, it's probably some wire and the energy has to be focused on the wire so that it is measured per unit length. There is no conversion between joules and centimeters here.
{ "domain": "physics.stackexchange", "id": 31148, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, units, unit-conversion, experimental-technology", "url": null }
php, beginner, object-oriented, design-patterns protected function executeStatement( $sqlQuery, $parameters = array( ) ) { $sqlStatement = $this -> connection -> prepare( $sqlQuery ); if( $sqlStatement ) { if( count( $parameters ) > 0 ) { call_user_func_array( array( $sqlStatement, 'bind_param' ), $parameters ); } $resultSet = array(); if( $sqlStatement -> execute() ) { $sqlStatement -> store_result( ); if( $sqlStatement -> num_rows > 0 ) { $sqlStatement -> bind_result( $customerUserName, $firstName, $middleName, $lastName ); while( $sqlStatement -> fetch( ) ) { array_push( $resultSet, new CustomerValueObject( $customerUserName, $firstName, $middleName, $lastName ) ); } } } else {
{ "domain": "codereview.stackexchange", "id": 12431, "lm_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, beginner, object-oriented, design-patterns", "url": null }
algorithms, modular-arithmetic this.count = 0; // count of all numbers ever used. // return the number to remove and the next available number. this.get = function () { if (this.count <= this.kept - 1) { return [null, this.count]; } else { const next = this.count % this.limit; let toRemove = next - this.kept; return [toRemove + ((toRemove >= 0) ? 0 : this.limit), next]; } }; this.update = function () { this.count += 1; // this will NOT overflow before 2**53-1=9007199254740991. } } The above implementation works for all possible integer pairs limit >= maximumKept. In particular, it works even if limit is maximumKept. Here is a sample usage: function myLog(wantedNumbers) { console.log("number to remove: " + wantedNumbers[0] + " next number to use: " + wantedNumbers[1]) }
{ "domain": "cs.stackexchange", "id": 15769, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, modular-arithmetic", "url": null }
classical-mechanics, waves Title: Transmission of energy in medium and wave nature (periodicity)? Is there any example of a transmission of energy in a medium that does not show wave nature? Yes, for example heat energy is transferred through three different means: Radiation (which is wave like) Conduction (which is not wave like) Convection (which is not wave like) Of course, according to the Standard Model, everything has wave-like properties, so in a way there's no escape from waves, but I believe that your question is best answered with classical phenomena.
{ "domain": "physics.stackexchange", "id": 91, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, waves", "url": null }
scheme, sicp, numerical-methods Title: Square root calculation in Scheme (SICP Exercise 1.7) I have done exercise 1.7 in SICP (calculate square root precision when change in guesses is under a certain value), but I am calling the change-in-precision function twice in each iteration, which disturbs me. I wonder if there is a better way to implement this. (define (average . ns) (/ (apply + ns) (length ns))) (define (change-in-precision guess x) ( - (- guess (average guess (/ x guess))))) (define (sqrt guess x) (if (< (abs (change-in-precision guess x)) (/ 0.00000001 guess)) (+ guess (change-in-precision guess x)) (sqrt (+ guess (change-in-precision guess x)) x))) In change-in-precision, you can avoid the negation by swapping the operands for the subtraction. In sqrt, if the guess is already close enough, why not just return guess? To eliminate the repeated call to change-in-precision, use a let to define a variable delta. The two branches of the if should be indented.
{ "domain": "codereview.stackexchange", "id": 18594, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "scheme, sicp, numerical-methods", "url": null }
java, graph @Test public void addNode() { UndirectedGraph<Integer> graph = new UndirectedGraph<>(); graph.addNode(1); Assert.assertTrue(graph.addNode(2)); } @Test public void addAlreadyAddedNode() { UndirectedGraph<Integer> graph = new UndirectedGraph<>(); graph.addNode(1); Assert.assertFalse(graph.addNode(1)); } @Test public void addEdgeToEmptyGraph() { UndirectedGraph<Integer> graph = new UndirectedGraph<>(); Assert.assertTrue(graph.addEdge(1, 2)); } @Test public void checkEdgeAddedToEmptyGraph() { UndirectedGraph<Integer> graph = new UndirectedGraph<>(); graph.addEdge(1, 2); Assert.assertTrue(graph.hasEdge(1, 2)); } @Test public void checkOppositeEdgeAddedToEmptyGraph() { UndirectedGraph<Integer> graph = new UndirectedGraph<>(); graph.addEdge(1, 2); Assert.assertTrue(graph.hasEdge(2, 1)); }
{ "domain": "codereview.stackexchange", "id": 23830, "lm_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, graph", "url": null }
2. In how many of the distinct permutations of the letters in the word MISSISSIPPI do the 4 I's not come together? There are 11 letters in the word "MISSISSIPPI ", out of which: M=1, I=4, S=4, P=2. Total # of permutations is $$\frac{11!}{4!4!2!}$$; # of permutations with 4 I's together is $$\frac{8!}{4!2!}$$. Consider 4 I's as one unit: {M}{S}{S}{S}{S}{P}{P}{IIII} - total 8 units, out of which {M}=1, {S}=4, {P}=2, {IIII}=1. So # of permutations with 4 I's not come together is: $$\frac{11!}{4!4!2!}-\frac{8!}{4!2!}$$. Hope it helps. What about my approach to PERMUTATIONS? The word permutations consists of 12 letters. You can choose P and S in 7*2 ways so there are always 4 numbers between them P on first, S on fifth ........ P on seventh S on twelwth + reversely (SP) You are left with 10 letters, 2 of which are the same (TT) So the complete formula is: $$7*2*\frac{10!}{2!}=7*10!$$ It makes the same result, but I think is a bit quicker. _________________
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. YES\n2. YES\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9591542864252022, "lm_q1q2_score": 0.805434438396667, "lm_q2_score": 0.8397339716830606, "openwebmath_perplexity": 1317.2486085760893, "openwebmath_score": 0.8490300178527832, "tags": null, "url": "https://gmatclub.com/forum/in-how-many-ways-can-the-letters-of-the-word-permutations-be-94381.html" }
molecular-structure, vsepr-theory simply because there is no geometrical arrangement which can result in five equally sized bond angles in three dimensions. (Wikipedia) There is no arrangement in which all the angles would be the same, except in a plane, where the repulsion would obviously be a lot higher than in the pyramids.
{ "domain": "chemistry.stackexchange", "id": 3068, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "molecular-structure, vsepr-theory", "url": null }
neural-network input_dim = 17 output_dim = 1 # read and parse MONK data def parse_data(text): with open(text) as f: content = f.readlines() t = np.zeros((len(content), output_dim)) X = np.zeros((len(content), input_dim)) for i,val in enumerate(content): s = val.split(" ") t[i] = float(s[1]) for idx in xrange(17): X[i][idx] = 0.0 j = -1 # |0 |1 |2 |3 |4 |5 |6 |7 |8 |9 |10|11|12|13|14|15|16 # |a1|a1|a1|a2|a2|a2|a3|a3|a4|a4|a4|a5|a5|a5|a5|a6|a6 X[i][int(s[2])+j] = 1.0 # a1 j = 2 X[i][int(s[3])+j] = 1.0 # a2 j = 5 X[i][int(s[4])+j] = 1.0 # a3 j = 7 X[i][int(s[5])+j] = 1.0 # a4 j = 10 X[i][int(s[6])+j] = 1.0 # a5 j = 14 X[idx][int(s[7])+j] = 1.0 # a6 return (X, t) def sigmoid(x): output = 1/(1+np.exp(-x)) return output def sigmoid_output_to_derivative(output): return output*(1-output)
{ "domain": "datascience.stackexchange", "id": 1292, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-network", "url": null }
dark-matter Title: What exactly is 'Dark Matter'? There are many documentaries, forums, blogs and more dedicated to Dark Matter. I have been frantically searching for an answer to my question however none of my sources have clarity to the matter of hand. I would really love a clear explanation to: What exactly is Dark Matter? Please help me to have a clear understanding. We don't know. Though there are several ideas what dark matter could be, e.g. the humorously abbreviated WIMPs, all we know about dark matter is that is it massive (by light deflection, etc., etc.) and that it does not interact electromagnetically, and probably also not with the strong force. Other than that, there is no sufficently tested theory of dark matter to pronounce with confidence what it is. We only know what it is not (i.e. not EM charged, not strongly charged, and there are probably a few other constraints from observation).
{ "domain": "physics.stackexchange", "id": 19342, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dark-matter", "url": null }
ecology, population-dynamics Another point of reference is the estimated historical human population density during the Paleolithic, when we lived as hunter-gatherers. I have often seen population densities in the area of 1 per mile2, i.e. 2.6 individuals per km2. These estimates are naturally very uncertain, but shows that the allometric scaling relationships seem to provide at least reasonable order-of-magnitude estimates of "natural" human population density. It is also somewhat enlightening to consider that our current human population size of 7 billion corresponds to the predicted population size of a 380 gram carnivorous mammal (using the CO relationship from Peters & Raelson (1984)), making the unrealistic assumption that this mammal has managed to colonize all land areas on earth. This shows pretty clearly what an outlier modern humans represent.
{ "domain": "biology.stackexchange", "id": 3131, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ecology, population-dynamics", "url": null }
java, android For refactoring purpose could I reduce the size of this code? How? Assuming that setT5RadioGroup only sets a variable within the fragment: In your fragment, use RadioGroup[] radioGroups = new RadioGroup[10]; setTRadioGroup(int number, RadioGroup grp) { this.radioGroups[number] = grp; } In your activity, or whatever it is: for (int i = 0; i < rowids.length; i++) { // assuming rowids.length is 10 RadioGroup grp = (RadioGroup)fragView.findViewById(rowids[i]).findViewById(R.id.t1_radiogroup); fragment.setTRadioGroup(i, grp); } Whenever you find yourself using multiple numbered methods that does very similar things, think: Array!! (or possibly List<ElementType> if you want to be able to add/remove dynamically)
{ "domain": "codereview.stackexchange", "id": 5697, "lm_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, android", "url": null }
hhl-algorithm, speedup, linear-algebra we are able to get whole solution to know all the components of vector $x$, then I'm afraid you are wrong. Given a sparse $N \times N$ matrix with a condition number $\kappa$, HHL algorithm has a runtime $O(\log(N)\kappa ^{2})$. This offers an exponential speedup over the best known classical algorithm, which has a runtime $O(N\kappa )$. Now $x$ is $N$-dimensional vector, which means we need $O(N)$ measurements to get all its components. That would kill the exponential speedup. In his paper, "Equation solving by simulation", Andrew Childs said:
{ "domain": "quantumcomputing.stackexchange", "id": 2710, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "hhl-algorithm, speedup, linear-algebra", "url": null }
newtonian-mechanics, time, projectile, drag Drag takes away energy from the object's total $E_g$ (gravitational potential energy) + $E_k$ (kinetic energy). Therefore the object's total $E=E_g+E_k$ is strictly decreasing. Compare two points of equal height on the object's arc. The first point occurs while the object is rising. The second point occurs while the object is falling. Both points have the same $E_g$ because they're at the same height. The rising point has greater $E_k$ because $E=E_g+E_k$ is strictly decreasing with respect to time. Therefore for any pair of equal heights the object is moving faster when it's rising than when it's falling. It takes the object an equal distance to rise as to fall. Since the object is moving faster (for any given height) when it's rising than when it's falling, that means the object takes less time to rise than to fall.
{ "domain": "physics.stackexchange", "id": 56434, "lm_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, time, projectile, drag", "url": null }
classical-mechanics, forces, work, potential-energy, conservative-field $F^S_i$ are the specified forces acting on the particle $P_i$. $\int_{C_i} F^S_i \cdot dr$ means the work done by $F_i$ on a particle moving along any path connecting $q^A$ and $q^B.$ The first equality is just using the defintion, as is the last one. So I'm mainly wondering about the justification for the second and third equalities. Edit: I suppose you can define $V := \sum_i V_i$ which explains the third equality. Is this correct? The condition that they can be joined by a straight line parallel to the $q_j$ axis is necessary because otherwise the first integral, $\int_{q_A}^{q_B}Q_j dq_j$ might be ill defined if there is no straight line connecting $q_A$ and $q_B$. Someone with more experience than me can probably tell you in which cases the configuration space is a simplex (in which case this is always possible) and when it might not be, thus making this requirement necessary.
{ "domain": "physics.stackexchange", "id": 32632, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, forces, work, potential-energy, conservative-field", "url": null }
c#, comparative-review, async-await private YoozApi(YoozApiSettings settings) { httpClient = new HttpClient(); httpClient.DefaultRequestHeaders.ExpectContinue = false; // I'm not sure if it needed ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; // Remove this for .NET version 4.6 or higher var byteArray = Encoding.ASCII.GetBytes($"{settings.User}:{settings.Secret}"); httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray)); httpClient.BaseAddress = new Uri(settings.Url); }
{ "domain": "codereview.stackexchange", "id": 41652, "lm_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#, comparative-review, async-await", "url": null }
$f((x,y)):\!\!\equiv\;\Box\;:A+B\to\mathbf{0}$ with a “hole” $\Box$ of type $A+B\to\mathbf{0}$ indicating what remains to be done. (We could equivalently write $f:\!\!\equiv\mathsf{rec}_{(A\to\mathbf{0})\times(B\to\mathbf{0})}(A+B\to% \mathbf{0},{\lambda}x.\,{\lambda}y.\,\Box)$, using the recursor instead of pattern matching.) The next phrase “also suppose $A$ or $B$; we will derive a contradiction” indicates filling this hole by a function definition, introducing another unnamed hypothesis $z:A+B$, leading to the proof state: $f((x,y))(z):\!\!\equiv\;\Box\;:\mathbf{0}$ Now saying “there are two cases” indicates a case split, i.e. an application of the recursion principle for the coproduct $A+B$. If we write this using the recursor, it would be $f((x,y))(z):\!\!\equiv\mathsf{rec}_{A+B}(\mathbf{0},{\lambda}a.\,\Box,{\lambda% }b.\,\Box,z)$ while if we write it using pattern matching, it would be
{ "domain": "planetmath.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9873750477464142, "lm_q1q2_score": 0.8002466466258932, "lm_q2_score": 0.8104789040926008, "openwebmath_perplexity": 210.31961275263185, "openwebmath_score": 0.9204012751579285, "tags": null, "url": "http://planetmath.org/111PropositionsAsTypes" }
machine-learning, deep-learning, neural-network, convolutional-neural-network Title: How do I deal with additional input information other than images in a convolutional neural network? I try to convert a game state of a board game into the input for a convolutional neural network. A convolutional neural network is useful because the players have to place items on the board, and the convolutional neural network can take advantage of that spatial structure. Therefore I can describe the board well with a binary feature plane for each player (1 if there is an item on the board and 0 if not). The players can not only place objects but also collect cards. A player can own a maximum of 19 of five different card types. How many cards a player has and what type they are, is important information for the neural network, but I cannot describe this with another feature plane. This has nothing to do with spatial structure. So how do I give the convolutional neural network such additional information, for example that the player has 6 cards of type A, as input?
{ "domain": "datascience.stackexchange", "id": 8494, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, deep-learning, neural-network, convolutional-neural-network", "url": null }
quantum-mechanics, hilbert-space, vectors, quantum-states Basis vectors are widely used in linear algebra and are not unique to quantum mechanics. When we start talking about state vectors in QM, like $|\psi\rangle$, we can choose to express this state vector in terms of any basis we want. In other words, for a discrete basis: $$|\psi\rangle=\sum_i c_i|a_i\rangle$$ where $|a_i\rangle$ represents basis vector $i$, and $c_i$ is a coefficient saying "how much of $|a_i\rangle$ is in $|\psi\rangle$ Now it could be that $|\psi\rangle$ is equal to one of our basis vectors, say $|a_j\rangle$, so that $c_i=\delta_{i,j}$ and $$|\psi\rangle=\sum_i \delta_{i,j}|a_i\rangle=|a_j\rangle$$ We could even choose express this example in some other basis: $$|\psi\rangle=|a_j\rangle=\sum_id_i|b_i\rangle$$
{ "domain": "physics.stackexchange", "id": 52208, "lm_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, hilbert-space, vectors, quantum-states", "url": null }
quantum-mechanics, hilbert-space, harmonic-oscillator, hamiltonian-formalism, dirac-delta-distributions Is it wrong/meaningless to make such comparisons of a zero-energy classical particle to a quantum harmonic oscillator with $\psi(x)=\delta(x)$? Alternatively, is this apparent contradiction actually logically justifiable?
{ "domain": "physics.stackexchange", "id": 55450, "lm_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, hilbert-space, harmonic-oscillator, hamiltonian-formalism, dirac-delta-distributions", "url": null }