text
stringlengths
1
1.11k
source
dict
That's the only part I'm confused on. The integral itself isn't so bad. 2. Feb 25, 2012 ### Ray Vickson The limits are NOT the distance between the given points. For example, if we calculate the length of the curve (cos(t),sin(t)) once around the circle (say from (1,0) to (1,0) again), the distance between the given points is zero! In the circle case the limits would be t=0 and t=2*pi. To find them in your case, ask yourself: what t gives (x,y,z) = (1,0,1)? What t gives (x,y,z) = (e^(2pi),0,e^(2pi))? RGV 3. Feb 25, 2012 ### Timebomb3750 Oh! I see. Well then, my limits would be from 0 to 2pi, right? Because e^0, e^(0)sin(0), e^(0)cos(0) give the point (1,0,1). And e^(2pi), e^(2pi)sin(2pi), e^(2pi)cos(2pi) give the point (e^(2pi), 0, e^(2pi)). Correct? 4. Feb 25, 2012 ### Ray Vickson What do YOU think? RGV 5. Feb 25, 2012 ### Timebomb3750 Looks good to me. :D 6. Feb 25, 2012 ### HallsofIvy
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806478450307, "lm_q1q2_score": 0.8354084360163964, "lm_q2_score": 0.8519528076067262, "openwebmath_perplexity": 685.3398410257106, "openwebmath_score": 0.9018276929855347, "tags": null, "url": "https://www.physicsforums.com/threads/finding-the-length-of-a-curve.581164/" }
ros, catkin, deb, bloom-release, package Thanks in advance for any advice and guidelines. You will have understood that we know more or less what we want, but have little idea of the available options and how to implement this... what a program :-) For the question point 2, for a first package that in particular defines its own services, we started to follow some steps found here http://answers.ros.org/question/173804/generate-deb-from-ros-package/ but without success yet... We do run bloom-generate rosdebian --os-name ubuntu --os-version precise --ros-distro hydro without error in the prompt. But when running fakeroot debian/rules binary the compiler doesn’t find the include files that are located in the "devel/include/" directory of the catkin workspace and thus aborts. Those header files are auto-generated by catkin_make when defining services in my main code... Any idea on to solve this? Also, could you elaborate on the 2 alternatives you are proposing: checkinstall and dpkg-buildpackage ? Thanks in advance.
{ "domain": "robotics.stackexchange", "id": 19366, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, catkin, deb, bloom-release, package", "url": null }
python, pandas, hash-map I need all data[0]["infocard"] values, and within data[0]["unified_source"]["step_11"][k] values, I need person, sizeIncome values (and source_ua_company_code if possible - it's not in the code). I'm adding all sizeIncome values if the person == 1 Sample data (data[0]): {'guid': 'nacp_3bb5b983-edd9...', 'infocard': {'first_name': 'NAME', 'patronymic': 'SNAME', 'last_name': 'SURNAME', 'office': '"OFFICE"', 'position': 'POSITION"', 'source': 'NACP', 'id': 'nacp_3bb5b983-edd9...', 'url': 'https://declarations.com.ua/declaration/nacp_3bb5b983-edd9...', 'document_type': 'Yearly', 'is_corrected': False, 'created_date': '2018-03-27T00:00:00', 'declaration_year': 2017}, 'raw_source': {'url': 'https://public-api.nazk.gov.ua/v1/declaration/nacp_3bb5b983-edd9...'}, 'unified_source': {'step_0': {'declarationType': '1', 'declarationYear1': '2017'}, 'step_1': {'actual_cityType': '[hidden]', 'actual_country': '', 'actual_postCode': '[hidden]',
{ "domain": "codereview.stackexchange", "id": 36018, "lm_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, pandas, hash-map", "url": null }
($\sin \theta=2/4=1/2 \therefore \theta=\pi/6$) Length of the arc=$r*\theta=4*\large\frac{\pi}{6}=\large \frac{2\pi}{3}$ • I don't know why you are give 3 points on the circle, only two are enough to find the center,(2 unknowns, 2 equations) – Vikram Jun 11 '14 at 13:36 • replace the word "origin" in second last line with "center" – Vikram Jun 11 '14 at 13:47 • Sorry, probably I'm too stupid, but can you please give me an example how this works? – enne87 Jun 12 '14 at 10:03 • Hey, cool thing, thanks :D – enne87 Jun 12 '14 at 15:32 • @enne87, you’re welcome – Vikram Jun 12 '14 at 16:01
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226341042414, "lm_q1q2_score": 0.8399109366979328, "lm_q2_score": 0.8596637451167997, "openwebmath_perplexity": 390.4446218473956, "openwebmath_score": 0.7579015493392944, "tags": null, "url": "https://math.stackexchange.com/questions/830413/calculating-the-arc-length-of-a-circle-segment" }
javascript, performance, jquery, datetime if (MondayFridayOpen == SaturdayOpen) { if (MondayFridayOpen == SundayOpen) { $("input:text[name='entry.7.group.other_option_']").val("Monday-Sunday: " + MondayFridayOpen); } else { $("input:text[name='entry.7.group.other_option_']").val("Monday-Saturday: " + MondayFridayOpen + ", Sunday: " + SundayOpen); } } else if (MondayFridayOpen != SaturdayOpen && SaturdayOpen == SundayOpen) { $("input:text[name='entry.7.group.other_option_']").val("Monday-Friday: " + MondayFridayOpen + ", Saturday-Sunday: " + SaturdayOpen); } else { $("input:text[name='entry.7.group.other_option_']").val("Monday-Friday: " + MondayFridayOpen + ", Saturday: " + SaturdayOpen + ", Sunday: " + SundayOpen); } } $("div#hourForm select").change(function() { $("input:radio[name='entry.7.group']:nth(3)").attr("checked", true); });
{ "domain": "codereview.stackexchange", "id": 1569, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, performance, jquery, datetime", "url": null }
c++, algorithm, queue Title: Simple array operation using a Queue Question We are given an array (indexed from 1) of N elements on which we make M queries: add(Left, Right, X) - all the elements between the position Left and Right (1<=Left<=Right<=N) are raising their values with X. After all the operations are completed, print the array. example Array: 1 1 1 4 5 6 operations: (1, 5, 2), (2, 3, 10) Final array: 3 13 13 6 7 6 Discussion I managed to produce the expected output but I was wondering if this code can be simplified using a queue data structure somehow? The complexity of this code is M*N (please correct me if I am wrong) - This naive approach is looping all the operations for every element of the input array. Naive approach #include <iostream> using namespace std; int Queue[1000], backInd; void push(int i) { ++backInd; Queue[backInd] = i; }
{ "domain": "codereview.stackexchange", "id": 32598, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, algorithm, queue", "url": null }
$$T_n = \frac{1}{2}(n^2 + n)$$ Hence, $$S_n = \frac{1}{2}\left(\frac{n(n + 1)(2n + 1)}{6} + \frac{n(n + 1)}{2}\right)$$ On substituting n = 11, I get: $$S_n = 286$$ But this isn't one of the options I got on the test. All the options were between 300-400 and all had their last digit '9' [that's all i remember.. they took the question paper away]. Last edited:
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9830850897067342, "lm_q1q2_score": 0.8541306592748014, "lm_q2_score": 0.8688267864276108, "openwebmath_perplexity": 1922.9059068215759, "openwebmath_score": 0.8423073887825012, "tags": null, "url": "https://www.physicsforums.com/threads/sum-of-series.230104/" }
Follow the low frequency asymptote until one tenth the break frequency (0.1 ω0) then decrease linearly to meet the high frequency asymptote at ten times the break frequency (10 ω0).  This line is shown above.  Note that there is no error at the break frequency and about 5.7° of error at one tenth and ten times the break frequency. ##### Example 1: Real Pole The first example is a simple pole at 10 radians per second.  The low frequency asymptote is the dashed blue line, the exact function is the solid black line, the cyan line represents 0. ##### Example 2:  Repeated Real Pole The second example shows a double pole at 30 radians per second.  Note that the slope of the asymptote is -40 dB/decade and the phase goes from 0 to -180°.
{ "domain": "swarthmore.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9861513901914406, "lm_q1q2_score": 0.8174591561260882, "lm_q2_score": 0.828938806208442, "openwebmath_perplexity": 960.2559998778279, "openwebmath_score": 0.8952716588973999, "tags": null, "url": "http://lpsa.swarthmore.edu/Bode/BodeHow.html" }
c#, multithreading, email // Start a new thread for each email account new Thread((x => SyncAccount(copyEmailAccount))).Start(); } } private void SyncAccount(EmailAccount emailAccount) { // Sync forever while (true) { // Set the next syncing date _nextSyncingDate = DateTime.Now.AddMinutes(5); // Create a fresh start for the database context InitRepositories();
{ "domain": "codereview.stackexchange", "id": 10282, "lm_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#, multithreading, email", "url": null }
electrostatics, electric-fields, capacitance, dielectric In other words: $q = CV = C_{eq}V$ and voltage hasn't changed. But $CV \ne C_{eq}V$! What am I missing? My friend, you spoke too soon. If you find the new voltage, $$V^\prime = \frac{q\kappa(D-d)x + qd}{\epsilon_0 A \kappa} = \frac{q}{\epsilon_0A\kappa}\bigg(\kappa(D-d)+d\bigg)$$ Where $$C_{eq} = \frac{\kappa \epsilon_0 A}{k(D-d)+d}$$ Multiply out $C_{eq}V^\prime$ everything cancels and you are left with: $$q^\prime = C_{eq} V^\prime = q$$ Therefore $q$ is constant wrt introduction of dielectrics. Clarification Regarding $\kappa$ In the derivation we implicitly assume that $E^\prime = \frac{E_0}{\kappa}$, the same $\kappa$ from $\kappa = \frac{C^\prime}{C}$. The textbook justifies this by writing that such is true. That we are dealing with the same kappa in both of the last two equations is quite startling – what is the motivation for making the assumption that $E^\prime = \frac{E_0}{\kappa}$.
{ "domain": "physics.stackexchange", "id": 38691, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics, electric-fields, capacitance, dielectric", "url": null }
Thanks! • I think it simply means that the value of the function does not change as you move along the direction given by that vector. I sounds redundant, I guess. Hope this helps – Vishesh Sep 13 '13 at 12:38 • As an afterthought, this happens when you look at tangent vectors to level curves of the given function. Also if you know $D_{v}f = \nabla f . v$, where $v$ is your tangent vector. The gradient is always normal to a level curve of a function. – Vishesh Sep 13 '13 at 12:43 • But if the value long curve of that direction doesn't change, doesn't it imply that the curve is a constant? But hardly can I imagine a concrete function like this. – Cancan Sep 13 '13 at 12:54 • Other better answers have already been given. Anyway for the sake of completion, just take a look at $f(x,y)= 2e^{x}+3e^{y}$ at $(0,0)$ Then use the vector $(-3,2)$. Cheers – Vishesh Sep 13 '13 at 13:05 • What do you mean by saying a curve is a constant??? – Vishesh Sep 13 '13 at 13:06
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9793540656452214, "lm_q1q2_score": 0.8593604499158454, "lm_q2_score": 0.8774767778695834, "openwebmath_perplexity": 139.1178588428774, "openwebmath_score": 0.8285149931907654, "tags": null, "url": "https://math.stackexchange.com/questions/492547/what-does-directional-derivative-zeros-imply-when-directional-vector-is-not-zero" }
for whatever the input value is, the output is the value without regard to sign. The ABSOLUTE function in Excel returns the absolute value of a number. It resembles a “V” shape. From the hardware perspective, it is easier to flip the sign bit on a signed integer type. When k < 0, the graph of g (x) translated k units down. The absolute value of a number is always positive. An absolute value function can be used to show how much a value deviates from the norm. f ( x) = ( x − 3) + 2. Returning to that equation from above, here's how the new method works: The first absolute-value expression, in the left-hand side of the equation, is positive when the argument is positive. EXAMPLES at 4:33 13:08 16:40 I explain and work through three examples of finding the derivative of an absolute value function. Since the other argument is positive on this interval (because I'm above katex.render("\\small{ x = -\\frac{2}{3},\\,3 }", typed13);x = 2/3), I can just drop the bars and proceed. Do the graphs
{ "domain": "webmediaart.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9504109798251321, "lm_q1q2_score": 0.8188153737821404, "lm_q2_score": 0.8615382094310355, "openwebmath_perplexity": 408.10128956106996, "openwebmath_score": 0.7582396864891052, "tags": null, "url": "http://webmediaart.com/fidelity-logo-rvuu/9737ac-helsinki-native---crossword-clue" }
filter-design, finite-impulse-response A simple Matlab/Octave code could look like this: n = -10:10; omc = 0.4*pi; % normalized cut-off frequency in rad h = sin(omc*n)./(pi*n); % impulse response h(11) = omc/pi; % correct NaN value at n=0 H = fft(h,1024); % complex frequency response f = 1000/1024*(0:512); % FFT frequency grid up to fs/2 plot(f,abs(H(1:513))); % plot magnitude of frequency response
{ "domain": "dsp.stackexchange", "id": 1736, "lm_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, finite-impulse-response", "url": null }
decoherence, open-quantum-systems, two-level-system This clearly falls to zero over a time scale $T =1/\Omega$. The decoherence rate is $$ \gamma(t) = \frac{g^2}{\Omega} ( 1- \ee^{-\Omega t}),$$ and the noise power spectral density is $$ S(\omega) = \frac{1}{\pi} \frac{g^2\Omega}{\omega^2 + \Omega^2},$$ implying an asymptotic decoherence rate $\gamma_\infty = \pi S(0) = g^2/\Omega$. The dynamics will be approximately Markovian if $\Omega \gg \gamma_\infty$, or in other words if $\Omega\gg g$. This means that the coupling of the qubit to its noisy environment ($g$) must be small in comparison to the bandwidth of the noise ($\Omega$).
{ "domain": "physics.stackexchange", "id": 33980, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "decoherence, open-quantum-systems, two-level-system", "url": null }
microbiology, bacteriology, antibiotics Title: Aren't antibiotic resistant probiotics dangerous? Multidrug resistant probiotics are often recommended by doctors in various cases. But since bacteriae can easily exchange genes by conjugation or other means they could promote the drug resistance of other dangerous bacteriae residing in the bowels. (Which could be just "visitors" otherwise causing infections somewhere else) Or there is something that withholds this transfer? I think not and so my former genetics professor. Usually, resistance genes are located on plasmids---additional DNA rings in the bacterium that are part of the genome. These plasmids cause their own exchange with other bacteria, even from other species.
{ "domain": "biology.stackexchange", "id": 459, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "microbiology, bacteriology, antibiotics", "url": null }
of \overrightarrow{AB} and \overrightarrow{AD} = AB\cdot AD\cdot sin. Use this interactive widget to create a parallelogram and then calculate its area. Then ABCD is a parallelogram. It takes 24 grid squares to cover the shape without gaps and overlaps. Find the area of this parallelogram. The area of a parallelogram is also equal to the magnitude of the vector cross product of two adjacent sides. As we're given three points of the parallelogram, we can find the slope of. base height Units are measured in: Label the parallelogram:0 Example: Calculating Area 5. 👍 Correct answer to the question PLS HELP What is the area, in square of the parallelogram below? - e-eduanswers. Ready-to-use mathematics resources for Key Stage 3, Key Stage 4 and GCSE maths classes. T(4, -1) '10 AA6C js h+ be-QuSQ Te. At some point, we can make every interior angle a right angle and get a rectangle. To solve this problem use coordinate geometry proof. hi, bit stuck on how to find a missing coordinate in a
{ "domain": "antoniothiery.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713844203499, "lm_q1q2_score": 0.810079425031103, "lm_q2_score": 0.8221891327004133, "openwebmath_perplexity": 359.9710085073352, "openwebmath_score": 0.7525807619094849, "tags": null, "url": "http://antoniothiery.it/area-of-parallelogram-with-coordinates-calculator.html" }
python-3.x, mathematics Title: Multiply by 9 without multiplying by 9, using vedic math # digit containing 9 has to be greater or equal in length mul9 = { str(i): str(9-i) for i in range(10)} print(f"{mul9}\n") number1 = int(input("Enter 9s': ")) len1 = len(str(number1)) number2 = int(input(f"Enter (0 - {str(9)*len1}): ")) if len(str(number1)) < len(str(number2)): print("This trick won't work") else: res = str(number2 - 1) print(f"{number2} - 1 = {res} ") end = '' for i in res: end += mul9[i] print(f"{i} needs {mul9[i]} to become 9") res += (len(str(number1)) - len(str(number2))) * "9" + end # This accounts for adding the invisible 0s at the start of 'res' in the video. I've simply added the correct number of 9s and avoided but avoided looping through them in the for loop. print(res) gives {'0': '9', '1': '8', '2': '7', '3': '6', '4': '5', '5': '4', '6': '3', '7': '2', '8': '1', '9': '0'}
{ "domain": "codereview.stackexchange", "id": 41721, "lm_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-3.x, mathematics", "url": null }
r, genomics, gsea I found the binary phenotype labeled group fgseaL test results below looked satisfactory. correcttest <- data.frame(names = row.names(normal)) correcttest <- cbind(correcttest3, normal) correcttest <- cbind(correcttest3, ALL3m) rownames(correcttest) <- correcttest$names correcttest$names <- NULL correctlabelnormal <- rep(0:0, 73) correctlabelALL3m <- rep(1:1, 122) correctlabel <- as.vector(c(correctlabelnormal,correctlabelALL3m)) fgseaL(df,correcttest,correctlabel,nperm = 2000,minSize = 1, maxSize=50000) pathway pval padj ES NES nMoreExtreme size 1: Gene.Symbol 0.003940887 0.003940887 -0.2460126 -1.180009 3 45714 leadingEdge 1: AKIRIN2,LRRC20,HSPA5,HSPA5,DTWD2,ZFYVE28,
{ "domain": "bioinformatics.stackexchange", "id": 215, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "r, genomics, gsea", "url": null }
cosmology, geometry, geodesics, visualization Once the north and the south poles are fixed, one can imagine and draw the shortest arc-like path connecting two arbitrary points on the sphere that is neither along a latitude nor along any longitude. Such paths are also geodesics with varying $\theta$ and $\phi$. How does their claim $d\theta=d\phi=0$ work for a geodesic hold in general? The problem is three dimensional, not on a 2D sphere. The crucial point here is that space is homogeneous. Any point in space can be taken as the origin. So suppose you have an observer. You are perfectly allowed to decide that the position of this observer is the origin of your system of coordinated. So he is sitting at the point $r_0=0$ and there, $\phi$ and $\theta$ are not defined.
{ "domain": "physics.stackexchange", "id": 61993, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, geometry, geodesics, visualization", "url": null }
• I see. Is there some common name to these sort of diagrams, or have you come up with these for the first time? – Ranjan May 24 at 4:12 • @Ranjan They are just polar graphs, bar charts, and graphs of a DFT of a pure tone. I didn't copy anybody. With the second pic there you should be able to tell what the other square is. The outer circles around the clock are also representations of the bin values. The line shows the phase angle and the size of the inner circle shows the magnitude (the area gives you "energy"). Computer geeks will note that the Nyquist bin is labeled -8, (1000b). The animation is cool, but it is huuuuuge. (gif) – Cedron Dawg May 24 at 4:22
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806484125338, "lm_q1q2_score": 0.8128413479423036, "lm_q2_score": 0.8289388019824947, "openwebmath_perplexity": 850.0363155586765, "openwebmath_score": 0.7998527884483337, "tags": null, "url": "https://dsp.stackexchange.com/questions/67773/positive-and-negative-frequencies-in-dft-due-to-frequency-folding-or-due-to-neg" }
See also this question, especially the accepted answer by Gerry Myerson, which indicates that you’ve found the only examples known as of 2004. • I was too busy searching for "binomial coefficients" to even consider the more general problem so I missed that post entirely. Tunnel vision got the better of me on this one. This is really neat. Jun 11 '15 at 21:26 • I do wonder whether the additional structure here offers enough to conclude that there are no more solutions for this special case. It seems unlikely (since in particular you would presumably need some results about e.g. $n$ and $n+1$ not being simultaneously smooth that could be really hard) but this case does seem more within reach than the general question of products-of-factorials. Jun 11 '15 at 21:40 I think they are quite rare.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9683812309063186, "lm_q1q2_score": 0.809066570111944, "lm_q2_score": 0.8354835309589074, "openwebmath_perplexity": 237.86345411112998, "openwebmath_score": 0.8179789185523987, "tags": null, "url": "https://math.stackexchange.com/questions/1321905/when-is-a-binomial-coefficient-a-factorial-i-e-when-is-binommj-n-for/1321926#1321926" }
matlab, fft Is there an easy way to remove drift/bias from the signal? Do you mean DC value? In that case, you can just substract the mean value of the signal, or apply a high-pass filter with sufficiently low cutoff frequency. I would also welcome comments on any other aspects of this process if you feel it would make it more robust. At some point in your script, you just set some FFT coefficients to zero. Note that this approach is generally not a good idea.
{ "domain": "dsp.stackexchange", "id": 5999, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "matlab, fft", "url": null }
complexity-theory, context-free Title: Is $\{\langle G,x\rangle \mid x\in L(G)\}$ context-free? Our problem is: Given a context-free grammar $G$ and a string $x$, decide whether $x\in L(G)$. Is this language itself context-free? If your language were context-free, then by intersecting it with a regular language, we would deduce that the following language would be context-free: $$ \{ \langle G,x \rangle \mid \text{$x \in L(G)$ and $G$ contains a single production $S \to w$} \} $$ However, this is just the celebrated language $\{ ww : w \in \Sigma^* \}$ in disguise, which is known not to be context-free. It follows that your language (using any reasonable encoding) is also not context-free.
{ "domain": "cs.stackexchange", "id": 12360, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, context-free", "url": null }
signal-analysis, modulation, bandpass, baseband EDIT: This is what happens in the frequency domain when you use a sinusoid for modulation as opposed to IQ modulation. Let $$r(t)=x(t)\cos(\omega_ct)=x(t)\frac12\big[e^{j\omega_ct}+e^{-j\omega_ct}\big]\tag{4}$$ In the frequency domain this corresponds to $$R(j\omega)=\frac12\big[X(j(\omega-\omega_c)+X(j(\omega+\omega_c))\big]\tag{5}$$ For the IQ modulated signal $s(t)$ we get (from $(2)$) $$s(t)=\text{Re}\{x(t)e^{j\omega_ct}\}=\frac12\big[x(t)e^{j\omega_ct}+x^*(t)e^{-j\omega_ct}\big]\tag{6}$$ The Fourier transform of $(6)$ is $$S(j\omega)=\frac12\big[X(j(\omega-\omega_c)+X^*(-j(\omega+\omega_c))\big]\tag{7}$$ Comparing $(5)$ and $(7)$ you see that the part of the spectrum that is centered around $-\omega_c$ is inverted for $s(t)$ (i.e., it is a mirror image of $X(j\omega)$; note the negative sign before $j$), whereas it is just shifted without inversion for the cosine modulated signal $r(t)$.
{ "domain": "dsp.stackexchange", "id": 6566, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "signal-analysis, modulation, bandpass, baseband", "url": null }
javascript, performance, array, dom return author; }); } For your example, it returns: [ { name: { first: 'Gustavo', middle: '', last: 'Fring' }, location: 'US - New Mexico', login: 'i:0ǵ.t|adfs|gfring', sip: 'gfring@LPH.com', email: 'gfring@LPH.com', username: 'gfring' }, { name: { first: 'Lydia', middle: '', last: 'Rodarte-Quaylet' }, location: 'US - Houston', login: 'i:0#.w|atremalrquaylet', sip: 'lrquaylet@madrigal.com', email: 'lrquaylet@madrigal.com', username: 'lrquaylet' } ] (p.s. there's a backslash in Lydia's login-info, which I think is supposed to be a pipe character |, right?) As mentioned, the sip property isn't really explained, and since it's set to just be the email address, I don't see the need for it. It's just duplication. But anyway, now you've got structured data to work with. About grabPerson()
{ "domain": "codereview.stackexchange", "id": 9696, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, performance, array, dom", "url": null }
homework-and-exercises, classical-mechanics, fluid-dynamics, water, fluid-statics On the upper hole there is less pressure than on the lower hole, which I then thought, since water moves from lower pressure to higher pressure then it must flow in this tube from up to down, but Brilliant says it doesn't move at all! How is that possible if it exists a difference in pressure? First of all, water flows from higher pressure to lower pressure, not the other way around. The reason it won't flow (in either direction, even if you start with the tube filled with water) is that the pressure difference, which pushes water from bottom to top, is cancelled by gravity, which pulls water from top to bottom. The reason these forces cancel exactly is that the pressure difference is itself caused by gravity. Pressure lower in the fluid builds up until it exactly cancels the gravitational force pulling down on the liquid above it.
{ "domain": "physics.stackexchange", "id": 96623, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, classical-mechanics, fluid-dynamics, water, fluid-statics", "url": null }
javascript, jquery, ajax, authorization function checkUser() { $.ajax({ url: "/submit/checkuser/", async: false, success: function (userStatus) { if (userStatus == 'Disabled') { // check if user if disabled if (Shadowbox.isOpen()) { Shadowbox.close(); setTimeout(function () { accountDisabled(); }, 750); } else { Shadowbox.clearCache(); accountDisabled(); }; setTimeout(function () { location.replace('/'); }, 10000); } else if (userStatus == 'Deleted') { // check if user if deleted if (Shadowbox.isOpen()) { Shadowbox.close(); setTimeout(function () { accountDeleted(); }, 750); } else { Shadowbox.clearCache(); accountDeleted(); }; setTimeout(function () { location.replace('/'); }, 10000);
{ "domain": "codereview.stackexchange", "id": 12388, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, ajax, authorization", "url": null }
python, python-3.x, formatting, curses Pet Peeves Avoid extraneous whitespace… immediately inside parentheses, brackets or braces. You wrote: return [ word[i:i+length] for i in range(0, len(word), length) ]
{ "domain": "codereview.stackexchange", "id": 26678, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, formatting, curses", "url": null }
c#, python public static class SaveDataEncryptDecrypt { private static readonly Blowfish _BlowFish = new Blowfish(Encoding.ASCII.GetBytes("my key")); public static byte[] Decrypt(byte[] buffer) { //make sure we don't modify buffer from caller buffer = buffer.Clone() as byte[]; //blowfish decrypt in big endian ByteSwapUIntBuffer(buffer); _BlowFish.Decipher(buffer, buffer.Length); ByteSwapUIntBuffer(buffer); //pop 4 byte seed and XOR uint seed = BitConverter.ToUInt32(buffer, 0) >> 16; buffer = buffer.Skip(4).ToArray(); XOR(buffer, seed); //pop 4 byte checksum and make sure decrypt was successful uint checksum = BitConverter.ToUInt32(buffer, 0); buffer = buffer.Skip(4).ToArray(); if (checksum != GetChecksum(buffer)) throw new ArgumentException("CHECKSUM_MISMATCH"); return buffer; }
{ "domain": "codereview.stackexchange", "id": 18330, "lm_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 }
c++, tic-tac-toe, ai return 0; } int checkComputerInput() { if(computerPick == 1 && blockOne == '1') blockOne = 'O'; if(computerPick == 2 && blockTwo == '2') blockTwo = 'O'; if(computerPick == 3 && blockThree == '3') blockThree = 'O'; if(computerPick == 4 && blockFour == '4') blockFour = 'O'; if(computerPick == 5 && blockFive == '5') blockFive = 'O'; if(computerPick == 6 && blockSix == '6') blockSix = 'O'; if(computerPick == 7 && blockSeven == '7') blockSeven = 'O'; if(computerPick == 8 && blockEight == '8') blockEight = 'O'; if(computerPick == 9 && blockNine == '9') blockNine = 'O'; return 0; }
{ "domain": "codereview.stackexchange", "id": 10043, "lm_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++, tic-tac-toe, ai", "url": null }
machine-learning, deep-rl, alphazero At the end of the game, the terminal position $s_T$ is scored according to the rules of the game to compute the game outcome $z: −1$ for a loss, $0$ for a draw, and $+1$ for a win. The neural network parameters $\theta$ are updated so as to minimise the error between the predicted outcome $v_t$ and the game outcome $z$, and to maximise the similarity of the policy vector $p_t$ to the search probabilities $\pi_t$. This implies only a single game is buffered in this way before running each update and then discarding the dataset generated in that game. Theoretically the same approach could be used with any number of games for each update step (provided the training system has capacity to store more moves).
{ "domain": "ai.stackexchange", "id": 2508, "lm_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-rl, alphazero", "url": null }
java, game-of-life public int getGen() { return genCount; } public void setGen(int gen) { this.genCount = gen; } public void randomGrid(double probability) { Random r = new Random(); for (int j = 0; j < height; j++) { for (int i = 0; i < width; i++) { grid[j][i] = Math.random() < probability; } } } public boolean[][] makeCopy() { // making a copy of the current grid, avoiding aliasing. boolean[][] nGrid = new boolean[height][width]; for (int j = 0; j < height; j++) { for (int i = 0; i < width; i++) { nGrid[j][i] = grid[j][i]; } } return nGrid; } public void newGen() { boolean[][] nGrid = makeCopy();
{ "domain": "codereview.stackexchange", "id": 38156, "lm_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-of-life", "url": null }
strings, unit-testing, go, rags-to-riches, unicode I have also written some test cases, and a documentation example: package kata import ( "fmt" "testing" ) func TestAlternateCase(t *testing.T) { cases := []struct{ input, output string }{ {"hello, world!", "HeLlO, wOrLd!"}, {"a!b", "A!b"}, {"AAAA", "AAAA"}, {"", ""}, {"h", "H"}, {"!h", "!H"}, {"日本語", "日本語"}, {"f日u本b語ar", "F日U本B語Ar"}, } for _, c := range cases { got := AlternateCase(c.input) if got != c.output { t.Errorf("For input '%v' expect '%v' but got '%v'", c.input, c.output, got) } } } func ExampleAlternateCase() { hi := "hello, world!" fmt.Printf("The AlternateCase of '%v' is '%v'\n", hi, AlternateCase(hi)) // Output: The AlternateCase of 'hello, world!' is 'HeLlO, wOrLd!' }
{ "domain": "codereview.stackexchange", "id": 19788, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "strings, unit-testing, go, rags-to-riches, unicode", "url": null }
This sort of matches my (hopefully correct) intuition. Firstly, we notice that we got out a continuous function, so convolution is smoothing things. Secondly, we took in two piecewise constant functions (with the same height) with overlapping pieces and "smoothly averaged" them over time. I would expect this to look linear with positive slope as we start to pick up the piecewise function $g$, then $2$ as we pick up both ($\frac{1}{2}(2+2)=2$). Finally, one of the functions in the convolution is zero again, and we have a negative slope as $g$ is getting lost.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126444811033, "lm_q1q2_score": 0.8279345541950955, "lm_q2_score": 0.8459424314825853, "openwebmath_perplexity": 499.7206297412595, "openwebmath_score": 0.7884857654571533, "tags": null, "url": "https://math.stackexchange.com/questions/2595642/doubt-on-the-convolution-of-two-piecewise-functions" }
quantum-mechanics, quantum-field-theory, symmetry, quantum-electrodynamics, lorentz-symmetry This is no accident that angular momentum operators can give you rotation operators. In (relativistic) classical field theory, we can write down objects like scalars, vectors, spinors (maybe more on this later) as part of a Lagrangian that describes the dynamics (e.g. Klein-Gordon or Dirac equations). These Lagrangians have a symmetry under Lorentz transforms (the full symmetry group is the Poincaré group, which includes spacetime translations). By Noether's theorem, there are conserved quantities. Linear energy-momentum is one, resulting from translation invariance. Angular momentum is another, resulting from rotational invariance. But what do we mean by angular momentum?
{ "domain": "physics.stackexchange", "id": 65706, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, quantum-field-theory, symmetry, quantum-electrodynamics, lorentz-symmetry", "url": null }
Here is an answer assuming that $\alpha$ is a chain map; without this assumption I do not see how you can talk about induced maps of integer homology groups. Then the answer to your question is positive and follows from the Universal coefficient Theorem (UCT). Indeed, since $\alpha$ is a chain map, it induces maps $\alpha_{i*}: H_i(C; G)\to H_i(C'; G)$ for arbitrary abelian groups $G$. Since the statement of the UCT provides a natural short exact sequence, we get isomorphisms $$\beta_i: H_i(C)\otimes G \to H_i(C')\otimes G$$ $$\gamma_i: Tor(H_{i-1}(C), G)\to Tor(H_{i-1}(C'), G)$$ which (together with $\alpha_{i*}$) make a commutative diagram with UCT sequences for $C, C'$ on the top and on the bottom. (Sorry, I am not very good at drawing diagrams in the version of TeX used at MSE.) Now, the fact that $\alpha_{i*}$ is an isomorphism follows from the diagram chasing in this commutative diagram. For instance, to see injectivity, note that an element $x$ of the kernel has to project to
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429120895839, "lm_q1q2_score": 0.809891581855383, "lm_q2_score": 0.8221891370573388, "openwebmath_perplexity": 162.83598190403958, "openwebmath_score": 0.967610776424408, "tags": null, "url": "https://math.stackexchange.com/questions/564323/induced-isomorphism-of-homology-implies-isomorphism-with-coefficients-in-any-gro" }
introsort), or any comparison-based sorting algorithm is more common than radix-sort? Why Quick Sort preferred for Arrays and Merge Sort for Linked Lists? I am not able to get this formula  (number of input * number of digit *base of number ), number of comparison require in RADIX sort. If k is the maximum possible value, then d would be O(logb(k)). But it still doesn’t beat comparison-based sorting algorithms. So overall time complexity is O((n+b) * logb(k)). brightness_4 Also, Radix sort uses counting sort as a subroutine and counting sort takes extra space to sort numbers. Here comparisons account to the comparisons involved in iterations. Use any stable sorting technique to sort the digits at each significant place. We have used counting sort for this. Merging the 4 arrays requires 6 comparisons. Question is ⇒ The maximum number of comparisons needed to sort 7 items using radix sort is (assume each item is 4 digit decimal number), Options are ⇒ (A) 23, (B) 110, (C) 280, (D) 450,
{ "domain": "a2zwebsolutions.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9372107896491796, "lm_q1q2_score": 0.8039095196060109, "lm_q2_score": 0.8577681013541611, "openwebmath_perplexity": 1185.4432293064933, "openwebmath_score": 0.27756467461586, "tags": null, "url": "http://a2zwebsolutions.com/ewt4yla/dca0ba-number-of-comparisons-in-radix-sort" }
quantum-mechanics, quantum-information, quantum-optics Here the expectation value is constant. So my questions are: What am I doing wrong in my calculations? Do I construct the PBS operator the correct way? If I were to only do a measurement at port c, I would have to project the state at port d onto $\mathbb{1}$. The problem is the fact that the measurement operator is the outer product of two (2x1) vectors, and I cannot make $\mathbb{1}$ as a (2x1) vector. How can I make a measurement operator, that projects the state after the PBS onto for example $\left| H \right>$ at port c and $\mathbb{1}$ at port d? When I have a well functioning PBS operator, how do I include losses in it?
{ "domain": "physics.stackexchange", "id": 49714, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, quantum-information, quantum-optics", "url": null }
quantum-field-theory, renormalization, greens-functions, self-energy Further reading: For the use of $\not p$ as a formal complex variable, see Spinor field normalisation from poles in the propagator. For the asymptotic behaviour of $\Sigma(\not p)$ for $\not p\to\infty$, instead of $\not p\to m$, see Is there any known bound to the growth of interacting correlation functions?.
{ "domain": "physics.stackexchange", "id": 36486, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, renormalization, greens-functions, self-energy", "url": null }
python, python-3.x, tkinter def _next_image(self, event): if len(self.poly_coords): self._dump_coord_dict() self.image_index += 1 if self.image_index > len(self.files) - 1: print("End of images!") return self._draw_image(self.files[self.image_index]) self._load_and_draw_predrawn_polys(self.files[self.image_index]) self._update_string()
{ "domain": "codereview.stackexchange", "id": 36833, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, tkinter", "url": null }
c#, asp.net-mvc-5 public TimesheetDailyVM() { Tasks = new List<TimesheetDailyHoursVM>(); } } public class TimesheetDailyHoursVM { public int TimesheetID { get; set; } public DateTime StartDateTime { get; set; } public DateTime EndDateTime { get; set; } public string ProjectCode { get; set; } public string TaskCode { get; set; } public string ProjectDescription { get; set; } public string TaskDescription { get; set; } } Note, I'm not sure if TotalHours is calculated differently but if it's just a sum of the Task times then you could include that logic into the Viewmodel itself as in. public double TotalHours { get { return TimeSpan.FromSeconds(Tasks.Sum(p => (p.StartDateTime - p.EndDateTime).TotalSeconds)).TotalHours; } }
{ "domain": "codereview.stackexchange", "id": 19799, "lm_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#, asp.net-mvc-5", "url": null }
hydrocarbons, hydrogen Hydrazine, $\ce{N2H4}$, has used as a fuel in some rocket engine applications. Hydrazine derivatives such as unsymmetrical dimethyl hydrazine (UDMH) give better performance, but contain carbon. However, maybe amino-hydrazine or hydroxy-hydrazine, assuming they exist, would be viable possibilities. Hydrazine is very poisonous and nasty stuff to deal with. Derivatives probably likewise. Hydrogen sulfide, $\ce{H2S}$, burns in air, producing water and sulfur dioxide, $\ce{SO2}$. The latter is produced in large quantities when sulfur is burned in the course of producing sulfuric acid, $\ce{H2SO4}$. So the $\ce{SO2}$ product of combustion of $\ce{H2S}$ would have potential commercial value. The downsides are that $\ce{H2S}$ is poisonous and is the main rotten egg smell in actual rotten eggs.
{ "domain": "chemistry.stackexchange", "id": 13270, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "hydrocarbons, hydrogen", "url": null }
reinforcement-learning, markov-decision-process, policies, path-planning The learning algorithm used The approximators (e.g. neural networks) used for learning, and their respective hyperparameters The formulation of the reward function The number of episodes/total steps the policy/agent is trained over. To sum this answer up, I believe you could train the policy in such a way (using the mechanisms above) such that it resembles the field you describe.
{ "domain": "ai.stackexchange", "id": 2200, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, markov-decision-process, policies, path-planning", "url": null }
electromagnetism, resonance, asteroids If you need an example, imagine a ball of 1km radius made entirely of iron heading towards the Earth with a slightly curved trajectory at any variable speed. You can, of course, use EM radiation to break the bonds of a crystal and thus cause damage to the asteroid. In a sense, this is a form of "resonance" because the bonds will react to photons of some wavelengths more than of others - that's why materials have "color", after all. The trick is that you won't be able to completely destroy it without supplying energy approaching the order of the energy required to vaporize the asteroid, since that's pretty much what "vaporize" means - it means to completely dissolve the crystal lattice, so that every atom is separated from every other. Conservation of energy cannot be cheated!
{ "domain": "physics.stackexchange", "id": 87320, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, resonance, asteroids", "url": null }
python, linked-list, stack stack.push(a) return stack.pop() Notes on LinkedList: The import is unused. It should allow creation of an empty list. Normally a linked list inserts items after the last item. Maybe I'm confused by the way insert works, but it looks like in your case head is always the last inserted entry in the list, and the list is traversed from head backwards through history using .next. delete should use search. Notes on Stack: self.data should be self.entries or something else descriptive. prnt should be as_string or even __str__. int(val) does not check whether something is an integer, it just tries to convert a value to an integer. +, -, * and / are arithmetic, not binary, operators. In Python 3 mathematical operators are modeled as functions. is_integer, is_binary_operator and postfixEval should not be part of Stack - they are not fundamental to the stack in any way.
{ "domain": "codereview.stackexchange", "id": 30649, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, linked-list, stack", "url": null }
With this you could have finished your proof. Alas, I don't see this as duplicate, but rather as proof-explanation. $x^2+y^2+z^2=2xyz...........................(1)$ in this equation $RHS$ is even .then, $LHS$ is also even. w.l.o.g, $z$ is even $\exists z_1$ such that $z= 2 z_1$ and $x,y$ are in same parity. substituting $z= 2 z_1$ in given equation $x^2+y^2+4z_1^2=4xyz_1 ........................(2)$ $x^2+y^2=4xyz_1-4z_1^2$ $RHS$ is multiple of 4 .then ,$LHS$ must be multiple of 4 therefore $x$ and $y$ are even. let $x=2x_1$ and $y=2y_1$ substituting $x=2x_1$ and $y=2y_1$ in $(2)$ we get, $4x_1^2+4y_1^2+4z_1^2=16x_1y_1z_1$ $\implies x_1^2+y_1^2+z_1^2=4x_1y_1z_1$ $LHS$ is multiple of $4$.then,$RHS$ is also multile of $4$ w.l.o.g,$z_1$ is even, let $z_1=2z_2$ $\implies x_1^2+y_1^2+4z_2^2=8x_1y_1z_2$ in similar argument .We can find three sequence of infinite integers $$x_1 \gt x_2 \gt x_3 \dots \gt x_n$$ $$y_1 \gt y_2 \gt y_3 \dots \gt y_n$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9648551556203815, "lm_q1q2_score": 0.8239021239289726, "lm_q2_score": 0.8539127548105611, "openwebmath_perplexity": 241.47541558849804, "openwebmath_score": 0.9149721264839172, "tags": null, "url": "https://math.stackexchange.com/questions/2779723/show-x2-y2-z2-2xyz-has-no-non-trivial-solutions-using-infinite" }
imu, ubuntu, xsens, ros-fuerte, ubuntu-precise The above command should result in something like this Configuring mode and settings Ok Running the driver roslaunch xsens_driver xsens_driver.launch rostopic echo /imu/data Then it should display `header: seq: 166 stamp: secs: 1396073832 nsecs: 314651012 frame_id: /imu orientation: x: -0.00116935407277 y: -0.0249380189925 z: 0.306782633066 w: 0.95145213604 orientation_covariance: [0.017453292519943295, 0.0, 0.0, 0.0, 0.017453292519943295, 0.0, 0.0, 0.0, 0.15707963267948966] angular_velocity: x: 0.00783694628626 y: -0.0136562986299 z: 0.00587089639157 angular_velocity_covariance: [0.0004363323129985824, 0.0, 0.0, 0.0, 0.0004363323129985824, 0.0, 0.0, 0.0, 0.0004363323129985824] linear_acceleration: x: 0.347801417112 y: -0.202733114362 z: 9.81818389893 linear_acceleration_covariance: [0.0004, 0.0, 0.0, 0.0, 0.0004, 0.0, 0.0, 0.0, 0.0004] Good day! Originally posted by sai with karma: 1935 on 2014-03-28 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 14976, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "imu, ubuntu, xsens, ros-fuerte, ubuntu-precise", "url": null }
organic-chemistry Title: Decomposition products of magnesium ethanoate What does magnesium ethanoate decompose to? The Wikipedia page states that one of the products is magnesium oxide. What's the other product? I can come up with some guesses: Ethanoic anhydride ($\ce{MgC4H6O4(s) -> C4H6O3(g) + MgO(s)}$) Propanone and carbon dioxide ($\ce{MgC4H6O4(s) -> C3H6O(g) + CO2(g) + MgO(s)}$) EDIT: Ok, here's your answer (Thermochimica Acta, 78 (1984) 17-27): It decomposes into the oxide, carbon dioxide and propanone: $Mg(C_2H_3O_2)_{2(s)} \rightarrow MgO_{(s)} + CO_{2(g)} + CH_3COCH_{3(g)}$ PRE-EDIT: The Russian Wikipedia favors the second reaction. This seems to support the idea. This site mentions magnesium carbonate and propane-2-one as products, but this seems to be questionable, given the other sources.
{ "domain": "chemistry.stackexchange", "id": 5918, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry", "url": null }
c, time-limit-exceeded Description Given two sets of numbers, output their intersection set. Input There are multiple test cases. Each case contains four lines. The first line begins with an integer N. The second line contains N integers, representing the numbers in the first set. The third line has one integer M, and the fourth line contains M integers, represent the numbers in the second set. All the numbers are 32 bit signed integers. The input is terminated if N = 0. For case 1, 1 <= N, M <= 10^3 (Time Limit: 1 sec) For case 2, 1 <= N, M <= 10^4 (Time Limit: 1 sec) For case 3, 1 <= N, M <= 10^5 (Time Limit: 1 sec) For case 4, 1 <= N, M <= 10^6 (Time Limit: 3 sec) Output For each test case, print the intersection of the two sets. Output them in ascending order. If the intersection of the two sets is an empty set, print 「empty」 (without quotes). Sample Input 3 1 2 3 3 4 5 6 8 4 10 13 8 9 2 1 5 4 4 2 3 1 5 1 2 2 3 2 5 1 2 2 3 1 0 Sample Output empty 1 2 4 1 2 2 3
{ "domain": "codereview.stackexchange", "id": 13800, "lm_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, time-limit-exceeded", "url": null }
set-theory, topology, topological-graph-theory $$ \begin{matrix} \mathbf{Computability} & \mathbf{Topology}\\ \mbox{Type} & \mbox{Space} \\ \mbox{Computable function} & \mbox{Continuous function} \\ \mbox{Decidable set} & \mbox{Clopen set} \\ \mbox{Semi-decidable set} & \mbox{Open set} \\ \mbox{Set with semidecidable complement} & \mbox{Closed set} \\ \mbox{Set with decidable equality} & \mbox{Discrete space} \\ \mbox{Set with semidecidable equality} & \mbox{Hausdorff space} \\ \mbox{Exhaustively searchable set} & \mbox{Compact space} \\ \end{matrix} $$ Two good surveys of these ideas are MB Smyth's Topology in the Handbook of Logic in Computer Science and Martin Escardo's Synthetic topology of data types and classical spaces. Topological methods also play an important role in the semantics of concurrency, but I know much less about that.
{ "domain": "cstheory.stackexchange", "id": 3229, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "set-theory, topology, topological-graph-theory", "url": null }
game, rust println!("Generated {} cards.", deck.len()); } static WHITE_SUITS: [Suit; 2] = [Suit::DIAMONDS, Suit::HEARTS]; static BLACK_SUITS: [Suit; 2] = [Suit::CLUBS, Suit::SPADES]; static RANKS: [Rank; 13] = [Rank::ACE, Rank::TWO, Rank::THREE, Rank::FOUR, Rank::FIVE, Rank::SIX, Rank::SEVEN, Rank::EIGHT, Rank::NINE, Rank::TEN, Rank::JACK, Rank::QUEEN, Rank::KING]; fn build_poker_deck(include_jokers: bool) -> Vec<Card> { let mut deck: Vec<Card> = Vec::with_capacity(54); for s in WHITE_SUITS.iter() { for r in RANKS.iter() { deck.push(Card { suit: *s, rank: *r, color: 0 }); } } for s in BLACK_SUITS.iter() { for r in RANKS.iter() { deck.push(Card { suit: *s, rank: *r, color: 1 }); } }
{ "domain": "codereview.stackexchange", "id": 38384, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "game, rust", "url": null }
special-relativity, forces, spring From the standpoint of B, the final length of the spring $L_u$ is thus calculated to be: $$L_u=x_0\sqrt{\alpha_u^2+\frac{u^2v^2}{c^4}}$$ The difference in spring's length is: $$\Delta L_u=x_0\sqrt{\alpha_u^2+\frac{u^2v^2}{c^4}}-\alpha_u x_0$$ If the spring constant is $K_u$ from the standpoint of B, the above difference exerts a spring force to the spaceships calculated as follows: $$F_u=K_u\Delta L_u=K_u x_0 (\sqrt{\alpha_u^2+\frac{u^2v^2}{c^4}}-\alpha_u)$$ One observer detects tension, whereas the other one does not. What is wrong with my calculations?!
{ "domain": "physics.stackexchange", "id": 97573, "lm_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, forces, spring", "url": null }
electromagnetism, general-relativity, stress-energy-momentum-tensor, gauge My attempt I have attempted to include an auxiliary field, such that $$\mathcal{L}' = -\frac{1}{4} F_{\mu \nu} F^{\mu \nu} + B \nabla_\mu A^\mu + \frac{\xi}{2} B^2$$ which becomes the original one after finding and imposing the equations of motion for $B$. But is it true that the two stress energy tensors are going to be the same? What I find is that $$T_{\mu \nu} = \eta_{\mu \nu} \mathcal{L} + F_{\alpha \mu} F_{\beta \nu} g^{\alpha \beta} + \frac{4}{\xi} \partial_\alpha A^\alpha \partial_{(\mu} A_{\nu)} + \frac{2}{\xi} \partial_{(\mu} \left(\partial_\alpha A^\alpha \right) A_{\nu)} - \frac{1}{\xi} \eta_{\mu \nu} \partial_\rho(A^\rho \partial_\alpha A^\alpha)$$ in Minkowski, and after getting rid of the auxiliary field. Can this be correct? What if I integrate by parts the first term involving the auxiliary field, so that I get:
{ "domain": "physics.stackexchange", "id": 57094, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, general-relativity, stress-energy-momentum-tensor, gauge", "url": null }
quantum-mechanics, dirac-equation What are the physical interpretations for $\rho$ and $J_k$ in the continuity equation? Do they have any physical significance?
{ "domain": "physics.stackexchange", "id": 25582, "lm_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, dirac-equation", "url": null }
0 [This was tried to be posted by Slavko.] I have tried several times to post my answer but akismet wasn't allow me to do it. My proposition was: If $$c > 0$$ and $$f(y) > 0$$, then the constraint can be formulated as follows. \left\{ \begin{align} f(y) \ge x c \\ f(y) \le x c \end{align} \right\}. answered 08 May '15, 09:42 Mike Trick ♦♦ 1.0k●1●6 accept rate: 21% Paul Rubin ♦♦ 14.6k●5●13 1 This would limit $$f(y)$$ to only two possible values: $$c$$ (if $$x=1$$) or 0 (if $$x=0$$). (08 May '15, 10:26) Paul Rubin ♦♦ Yes, indeed... So, below is a correction, which is based on Your earlier post. In those constraints $$u$$ and $$v$$ are binary and $$M$$ is enough big. $f(y) \ge c -uM +v \\ f(y) \leq c +vM-u \\ u+v+x=1$ (12 May '15, 11:23) Slavko @Slavko, Thanks for your consideration and comments. Yes, I am expected your constraints will work better, because binary variables $$u$$ and $$v$$ don't appear in the same constraint. But I think it need to be improved, see a small counterexample,
{ "domain": "or-exchange.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9678992960608886, "lm_q1q2_score": 0.810731774838526, "lm_q2_score": 0.8376199653600372, "openwebmath_perplexity": 912.7381277311823, "openwebmath_score": 0.9133768677711487, "tags": null, "url": "https://www.or-exchange.org/questions/12149/to-linearize-a-logical-constraint?sort=oldest" }
gazebo, c++ GZ_ADD_PLUGIN(myclasssystem::MyClassSystem, gz::sim::System, myclasssystem::MyClassSystem::ISystemPreUpdate, myclasssystem::MyClassSystem::ISystemPostUpdate ) using namespace myclasssystem; ////////////////////////////////////////////////// void MyClassSystem::PreUpdate(const gz::sim::UpdateInfo &, gz::sim::EntityComponentManager &_ecm) { myclass::MyClass myClass; myClass.Test(true); } ////////////////////////////////////////////////// void MyClassSystem::PostUpdate(const gz::sim::UpdateInfo &_info, const gz::sim::EntityComponentManager &_ecm) { } MyClassSystem.hh #ifndef MYCLASSSYSTEM_HH_ #define MYCLASSSYSTEM_HH_ #include <gz/sim/System.hh> #include <gz/sensors/Sensor.hh> #include <gz/transport/Node.hh>
{ "domain": "robotics.stackexchange", "id": 39030, "lm_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, c++", "url": null }
$\Delta m$ is the mass of the segment of the chain, and when chain begins to slip normal force is $\Delta N = \frac{\Delta mg}{k}$ (so the friction is equal to mg) ? BvU Homework Helper 2019 Award So my sketch is what you had in mind, just T should be inwards? And the T - N relationship I wrote - is it right? T should be outwards. T1 to the left, T2 to the right. Sum of the two T is then pointing inwards, and the magnitude is ## {\bf 2} \ T \sin({\Delta \phi \over 2}) = T \Delta \phi \quad## (I missed the ##{\bf 2}\quad## and leave the ##\Delta## in). This T resultant provides the centripetal force ## m \omega^2 R## for this little piece of chain, for which you now must also express the mass in therms of ##\Delta \phi##. At low rpm the difference between T resultant and required centripetal force is pressing on the disk rim and the reaction force, exercised by the disk ON the chain is indeed N (pointing outwards), so your last line is OK.
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9728307747659751, "lm_q1q2_score": 0.886423663828439, "lm_q2_score": 0.9111797106148062, "openwebmath_perplexity": 599.4055982067038, "openwebmath_score": 0.8067883253097534, "tags": null, "url": "https://www.physicsforums.com/threads/chain-and-spinning-disk-problem.741529/" }
black-holes, metric-tensor, event-horizon, hawking-radiation, complex-systems Title: Existence of Black hole radiation (through conservation) and Analysis of classification of black holes in classical dynamical system I was taking nonlinear dynamical system where I found a confusion with black hole. (The dependency here was with respect to single $t$ and space was "flat", in a sense that the metric does not carry curvature, think it as the simplest Malinowski metric $\mu_{00}=-\mu_{11}=-1$.) In a conserved dynamical system, there could not be an attracting fixed point(the fixed point that all the trajectories close to the fixed point converge to the fixed point.), thus it made perfect sense that there must be some particles or energy that gets out. (Otherwise it would meant our universe was all in the same energy states.)
{ "domain": "physics.stackexchange", "id": 48611, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "black-holes, metric-tensor, event-horizon, hawking-radiation, complex-systems", "url": null }
annotation Is XML a the format required for being considered PASCAL VOC? Or can it be shared as JSON dictionary? Here's an example of PASCAL VOC XML(from this src). <annotation> <folder>vehicles</folder> <filename>ff9435ee-ba7e-4d32-93bb-d931b3d2aca7.jpg</filename> <path>E:\vehicles\ff9435ee-ba7e-4d32-93bb-d931b3d2aca7.jpg</path> <size> <width>800</width> <height>598</height> <depth>3</depth> </size> <segmented>0</segmented> <object> <name>truck</name> <bndbox> <xmin>7</xmin> <ymin>119</ymin> <xmax>630</xmax> <ymax>468</ymax> </bndbox> </object> <object> <name>person</name> <bndbox> <xmin>40</xmin> <ymin>90</ymin> <xmax>100</xmax> <ymax>350</ymax> </bndbox> </object> </annotation> Is XML a requirement for being considered PASCAL VOC? Or can it be shared as JSON dictionary?
{ "domain": "datascience.stackexchange", "id": 11006, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "annotation", "url": null }
quantum-state, entanglement I'll show here that it is crucial that both bases are non-orthogonal for this to be possible. If only one of the two sets, say $\{\ket{v_k}\}_k$, is orthonormal, then the matrix of coefficients of $\ket\Psi$, write it with $\Psi$, has the form $\Psi = U \sqrt D V^T$, where $U,V$ are the matrices whose columns equal $\ket{u_k}$ and $\ket{v_k}$, respectively, and $D$ is diagonal. The orthonormality of $\{\ket{v_k}\}_k$ (and thus of $\{\ket{\bar v_k}\}_k$) then implies that $$\Psi\Psi^\dagger = UDU^\dagger,$$ which tells us that the Schmidt coefficients of $\ket\Psi$ majorize the diagonal of $\sqrt{D}$. E.g. if $D$ is a multiple of the identity then $\Psi\Psi^\dagger \simeq UU^\dagger\neq I$, and thus $\ket\Psi$ is not maximally entangled. This would seem to suggest that, if at least one of the bases is orthonormal, then indeed $\ket\Psi$ is maximally entangled only if the other basis is also orthonormal.
{ "domain": "quantumcomputing.stackexchange", "id": 1967, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-state, entanglement", "url": null }
general-relativity "Homework-like questions and check-my-work questions are considered off-topic here, particularly when asking about specific computations instead of underlying physics concepts" EDIT: For the sake of clarity, when I say (i.e.) Bob "sees" Alice, I mean what Bob derives, calculates, or inferrs from his frame of reference. This is meant to remove the additional doppler complication while attempting to not fundamentally change the essence of the question. Let me know if I need to rephrase this edit. Hint: There is no reason a slow-moving clock can't show the right time. Try setting your alarm clock foeward an hour, then let it run slow. It will show the right time eventually. Now: At any given moment, Alice's clock runs slow in Bob's instantaneous frame, and vice versa.
{ "domain": "physics.stackexchange", "id": 97004, "lm_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", "url": null }
Or else we can look at $(k+1)^4-k^4=4k^3+6k^2+6k+1$. Sum from $k=1$ to $n$. On the right, almost everything cancels. On the right, we get $4\sum k^3$ plus already known things. – André Nicolas Mar 5 '13 at 2:39 thanks, I was trying to figure out a way from the same $(k+1)^3$ now that I knew the sum for $k^2$, but I couldn't so I should have put it to $(k+1)^4$ like you said. – AlexHeuman Mar 5 '13 at 2:42
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.984810954312569, "lm_q1q2_score": 0.8350879354625007, "lm_q2_score": 0.8479677564567912, "openwebmath_perplexity": 287.10139998295625, "openwebmath_score": 0.9632834792137146, "tags": null, "url": "http://math.stackexchange.com/questions/320985/how-to-determine-equation-for-sum-k-1n-k3" }
javascript, php, jquery, css, chess For more tips on cleaning up code, check out this video of a presentation Rafael Dohms talk about cleaning up code (or see the slides here). Exception Handling Exceptions are thrown but never caught. Currently if an exception is thrown, that is displayed to the user, like the one I see when I change the URL of a move:
{ "domain": "codereview.stackexchange", "id": 31987, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, php, jquery, css, chess", "url": null }
newtonian-mechanics, classical-mechanics, energy-conservation, brachistochrone-problem So now I would just substitute the function y corresponding to the hypocycloid curve Is my reasoning right?
{ "domain": "physics.stackexchange", "id": 20550, "lm_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, classical-mechanics, energy-conservation, brachistochrone-problem", "url": null }
classes, delphi, object-pascal property Green: Byte read GetGreen write SetGreen; property Blue: Byte read GetBlue write SetBlue; property Cyan: Byte read GetCyan write SetCyan; property Magenta: Byte read GetMagenta write SetMagenta; property Yellow: Byte read GetYellow write SetYellow; end;
{ "domain": "codereview.stackexchange", "id": 39095, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classes, delphi, object-pascal", "url": null }
python, beginner, python-3.x # ask the user for bread choice and append to order list breadChoice = pyip.inputMenu(['white', 'wheat', 'sour dough'], 'Please choose your bread:\n', lettered=True) customerOrder.append(breadChoice) # ask the user for protein choice and append to order list proteinChoice = pyip.inputMenu(['chicken', 'turkey', 'ham', 'tofu'], 'Please choose your protein:\n', lettered=True) customerOrder.append(proteinChoice) # ask if the user wants cheese, and if so, record cheese choice cheeseResponse = pyip.inputYesNo('Would you like cheese?\n') if cheeseResponse == 'yes': cheeseChoice = pyip.inputMenu(['cheddar', 'swiss', 'mozzarella'], 'Please choose your cheese:\n', lettered=True) customerOrder.append(cheeseChoice) else: cheeseChoice = ''
{ "domain": "codereview.stackexchange", "id": 40523, "lm_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", "url": null }
Since $A$ and $B$ are real and symmetric, they are diagonalizable, with real eigenvalues. It turns out that $A$ and $B$ have one eigenvalue positive and the other negative (in fact, $A$ and $B$ have the same eigenvalues), explicitly: \begin{align*} &\text{Eigenvalues of $A$:}\quad \frac{1}{2} \left(-1-\sqrt{13}\right),\frac{1}{2} \left(\sqrt{13}-1\right)\\ &\text{Eigenvalues of $B$:}\quad \text{same of $A$} \end{align*} If, for example, the eigenvalues of $A$ were both positive, then $\dot{\alpha}$ would be positive for all points except origin, and then the origin would be unstable (because trajectories starting out of the origin would increase their $\alpha$'s to infinity). But when both $\dot{\alpha}$ and $\dot{\beta}$ are positive or negative depending on the point $(\alpha,\beta)$, as in this case, how can you determine the stability of the fixed point? EDIT: The phase portrait is:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587250685455, "lm_q1q2_score": 0.8029167788003431, "lm_q2_score": 0.8128673110375458, "openwebmath_perplexity": 292.82801767071066, "openwebmath_score": 0.99964439868927, "tags": null, "url": "https://math.stackexchange.com/questions/2336200/stability-of-a-fixed-point-in-a-nonlinear-system-with-no-linear-part/2339631#2339631" }
search-trees, balanced-search-trees, binary-search-trees, avl-trees Title: Height of AVL Tree I found an AVL tree implementation on the internet and experimented: For a tree with node count of 2^20, the minimal and maximal tree heights are 16 and 24. While these heights are lg(n)-ish, I am concerned about their difference. Doesn't AVL guarantee maximal-minimal height difference to be 1? The repository from which I got the code The AVL invariant does not guarantee that, given any two tree paths, their length differs at most by one unit. They can differ by more than one unit, as shown by the following tree (Fibonacci AVL tree from Wikipedia):
{ "domain": "cs.stackexchange", "id": 19388, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "search-trees, balanced-search-trees, binary-search-trees, avl-trees", "url": null }
# Of all polygons inscribed in a given circle which one has the maximum sum of squares of side lengths? My son presented me with an interesting problem: Of all possible polygons inscribed in a circle of radius $R$, find the one that has the sum $S$ of squared side lengths maximized: $S=a_1^2+a_2^2+\dots+a_n^2$, with $a_i$ representing the length of the $i$-th side. The number of sides is not fixed, you should consider all triangles, quadrilaterals, pentagons... It's not that complicated, at least in the beginning. It's easy to show that the optimal polygon (with $n>3$) cannot have obtuse ($>90^\circ$) angles. For example, if such an angle $A_{i-1}A_{i}A_{i+1}$ exists, by cosine theorem: $$|A_{i-1}A_{i}|^2+|A_{i}A_{i+1}|^2<|A_{i-1}A_{i+1}|^2$$ So if you drop vertex $A_i$, you get a polygon with a bigger $S$. This quickly eliminates all polygons with $n>4$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9865717476269469, "lm_q1q2_score": 0.8911645537605937, "lm_q2_score": 0.903294216466424, "openwebmath_perplexity": 224.18168856934906, "openwebmath_score": 0.9784698486328125, "tags": null, "url": "https://math.stackexchange.com/questions/2919921/of-all-polygons-inscribed-in-a-given-circle-which-one-has-the-maximum-sum-of-squ" }
java, api, rest if (params == null) { logger.warn("Parameter problem. Returning 400 code."); resultInfo.setError(400, "Invalid parameter"); } else { for (double param : params) { // If passed parameter is not fit to double if (Double.isInfinite(param)){ logger.info("Result number is too big. Returning 402 error"); resultInfo.setError(402, "Too big number"); resultInfo.setResult(0); return resultInfo; } } logger.info("Calling act method to calculate final result ..."); resultInfo = logic.act(action, params); } logger.info("Final result calculated. Adding to cache and returning: " + resultInfo.getResult());
{ "domain": "codereview.stackexchange", "id": 20527, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, api, rest", "url": null }
optics, laser Every source I've read describes how a laser diode produces photons via recombination, and has metallic walls to allow photons to bounce back and forth inside the cavity, but no mention of an amplifying medium. The amplifying medium in a semiconductor diode laser is the semiconductor itself. More precisely, it's a thin layer of material surrounding the junction that separates the p-type side of the diode from the n-type. Application of an electric current through the diode allows a non-equilibrium condition to exist in that layer in which electrons and holes can exist in the same region of material ... briefly, until recombination occurs, and light is emitted. The current, however, continues to provide a fresh supply of electrons and holes. So a steady-state condition, not an equilibrium condition, exists where electrons and holes are constantly injected, electrons and holes constantly recombine, and light is constantly emitted.
{ "domain": "physics.stackexchange", "id": 13750, "lm_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, laser", "url": null }
food, biotechnology -The fermentation process is the most important one for developing flavor and texture. The two live bacterial strains of Streptococcus salivarius subsp. thermophilus (ST) and Lactobacillus delbrueckii subsp. bulgaricus (LB) are the two most basic strains used in yogurt. LB is what metabolizes lactose into lactic acid and LB and ST acting in synergy is what causes a decrease in milk pH. "When the pH of the yogurt approaches 5.0, activity of ST subsides and LB gradually dominates the overall fermentation process until the target value of pH is reached and the fermentation process ceases. Normally, the fermentation period is terminated by lowering the temperature to 4 °C. At this temperature, the culture is still alive, but its activity is drastically limited to allow controlled flavor during storage and distribution." I think to answer your question, yogurt manufacturers probably have a very sensitive gauge for pH and can control temperature fluctuations finely to maintain yogurt pH and
{ "domain": "biology.stackexchange", "id": 3669, "lm_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, biotechnology", "url": null }
c#, enum case QueryType.OuUsersDirectReports: contextMenuItems.Add( _directReportGetDirectReportsMenuItem); contextMenuItems.Add(_directReportGetGroupsMenuItem); contextMenuItems.Add(_directReportGetSummaryMenuItem); contextMenuItems.Add(_userGetDirectReportsMenuItem); contextMenuItems.Add(_userGetGroupsMenuItem); contextMenuItems.Add(_userGetSummaryMenuItem); break; case QueryType.OuUsersGroups: contextMenuItems.Add(_groupGetComputersMenuItem); contextMenuItems.Add(_groupGetUsersMenuItem); contextMenuItems.Add(_groupGetUsersDirectReportsMenuItem); contextMenuItems.Add(_groupGetUsersGroupsMenuItem); contextMenuItems.Add(_userGetDirectReportsMenuItem); contextMenuItems.Add(_userGetGroupsMenuItem); contextMenuItems.Add(_userGetSummaryMenuItem); break;
{ "domain": "codereview.stackexchange", "id": 20790, "lm_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#, enum", "url": null }
$$\omega = 5rad/s$$ 2. Determine the speed v of the 1-kilogram object immediately after the collision Total kinetic energy is conserved. Subscript o represents object, b represents bar. $$K_i = K_f$$ -- Initial kinetic energy equals final kinetic energy. $$(1/2)mv^2_o = (1/2)mv^2_o + (1/2)I\omega^2$$ $$(1/2) * 1kg * (10m/s)^2 = (1/2) * 1kg * V^2_f + (1/2)[(1/3)ml^2]\omega^2$$ $$50J = (1/2)V^2_f + (1/6) ml^2\omega^2$$ $$50J - [(1/6)3kg * (1.2m)^2] * [5rad/s]^2 = (1/2)V^2_f$$ $$32m^2/s^2 = (1/2)v^2_f$$ $$v_f = 8m/s$$ 3. Determine the magnitude of the angular momentum of the object about the pivot just before the collision $$L = mvr sin(\theta)$$ $$L = 1kg * 10m/s * 1.2m * 1$$ $$L_i = 12kg m^2/s$$ 4. Determine the angle $\theta$. $$L = mvr sin(\theta)$$ $$L = 1kg * 8m/s * 1.2m * sin(\theta)$$ $$L = 9.6sin(\theta)$$ $$L_b = I\omega$$ $$L_b = [(ml^2)/3] * 5rad/s$$ $$L_b = 7.2kg m^2/s$$ $$12kg m^2/s - 7.2kg m^2/s = 4.8kg m^2/s$$ -- Plug this into the equation above...
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9518632316144274, "lm_q1q2_score": 0.8164779186612036, "lm_q2_score": 0.8577681031721324, "openwebmath_perplexity": 642.1970006535261, "openwebmath_score": 0.656635582447052, "tags": null, "url": "https://www.physicsforums.com/threads/angular-momentum-find-angular-velocity-of-a-hanging-bar-after-a-collision.383125/" }
The sides of EFGH are divided into the segments $x\text{ and }y.$ The perimeter of $EFGH$ is 64. . . Hence: . $x + y \:=\:16\quad\Rightarrow\quad y \:=\:16-x\;\;{\color{blue}[1]}$ The area of $ABCD$ is 130. . . Hence: . $AB = BC = CD = AD = \sqrt{130}$ In right triangle $AFB\!:\;\;x^2 + y^2 \:=\:AB^2\quad\Rightarrow\quad x^2 + y^2 \:=\:130\;\;{\color{blue}[2]}$ Substitute [1] into [2]: . $x^2 + (16-x)^2 \:=\:130 \quad\Rightarrow\quad x^2 - 16x + 63 \:=\:0$ . . which factors: . $(x-7)(x-9) \:=\:0$ . . and has roots: . $x \;=\;7,\,9$ Therefore: . $\{x,\,y\} \;=\;\{7,\,9\}$ 5. thank you so much! hopefully i can solve the rest of the word problems i have.. 6. Hello again, polakio92!
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713848528318, "lm_q1q2_score": 0.8100794318258159, "lm_q2_score": 0.8221891392358015, "openwebmath_perplexity": 710.1887562928279, "openwebmath_score": 0.6193947196006775, "tags": null, "url": "http://mathhelpforum.com/pre-calculus/32422-how-do-u-do-these-word-problems.html" }
c++, beginner, thread-safety, openmp Please review the code, especially the flush() commands. Should atomic be used instead of a critical section? With just one function provided and some return information, it's hard to tell everything about it. Since this is a member function with "get" in its name (meaning it's an accessor), and only local variables are being modified (no data members), then this should likely be a const function. int Window_Shift :: get_window_shift() const {} If you are actually modifying data members somewhere, then disregard this. The whitespace in the for loop statement is a little inconsistent: for(unsigned int node_id = 0;node_id< no_of_valid_nodes ;node_id++) This is how it could look: for (unsigned int node_id = 0; node_id < no_of_valid_nodes; node_id++)
{ "domain": "codereview.stackexchange", "id": 7524, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, beginner, thread-safety, openmp", "url": null }
digital-communications, nyquist, qpsk, gnuradio, baseband This illustrates a fundamental challenge in decreasing the sampling rate to exactly twice the bandwidth (where bandwidth would be the significant bandwidth after which any folding/aliasing is far enough below that dictated by a performance requirement), which is more of a concern on the transmitter side dictated by the subsequent filtering required to meet out of band emissions: given the image frequency response of the passband that would be symmetrically around the sampling rate; if we sampled at exactly twice the significant bandwidth in the transmitter the required filtering would not be realizable given there is no transition band for the filter to reject the images after the DAC that would be positioned at integer multiples of the sampling rate.
{ "domain": "dsp.stackexchange", "id": 9042, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "digital-communications, nyquist, qpsk, gnuradio, baseband", "url": null }
java, beginner, swing, pokemon case "Electric": groundMulti1 = 2.0; elecMulti1 = 0.5; flyMulti1 = 0.5; steelMulti1 = 0.5; break; case "Grass": bugMulti1 = 2.0; iceMulti1 = 2.0; fireMulti1 = 2.0; flyMulti1 = 2.0; poisMulti1 = 2.0; elecMulti1 = 0.5; grassMulti1 = 0.5; groundMulti1 = 0.5; waterMulti1 = 0.5; break; case "Bug": fireMulti1 = 2.0; flyMulti1 = 2.0; rockMulti1 = 2.0; fightMulti1 = 0.5; grassMulti1 = 0.5; groundMulti1 = 0.5; break; case "Poison":
{ "domain": "codereview.stackexchange", "id": 9226, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, swing, pokemon", "url": null }
simulation, chemistry Title: Where can I get circuits of interest to quantum chemistry to try and simplify? I am a computer science undergraduate working on a project in simplifying quantum circuits (using the ZX-calculus). I was hoping to try to simplify some circuits of interest rather than randomly generated circuits. I am uninitiated in the physics/chemistry. Where can I find ready-to-go circuits of interest or how can I easily generate circuits like this to try to simplify them? In the paper A Generic Compilation Strategy for the Unitary Coupled Cluster Ansatz they benchmark on a bunch of chemistry circuits that can be found here. I should add that these circuits contain only a single Trotterisation step of the chemistry simulation. The actual simulation circuit would repeat this structure many many times.
{ "domain": "quantumcomputing.stackexchange", "id": 2231, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "simulation, chemistry", "url": null }
comparison, tensorflow, pytorch Title: What are the differences between TensorFlow and PyTorch? What are the differences between TensorFlow and PyTorch, both in terms of performance and functionality? TensorFlow was developed by Google and is based on Theano (Python library), while Facebook developed PyTorch using the Torch library. Both frames are useful and have a great community behind them. Both provide machine learning libraries to accomplish various tasks and do the job. TensorFlow is a powerful and deep learning tool with active visualization and debugging capabilities. TensorFlow also offers serialization benefits since the entire graphic is saved as a protocol buffer. It also has support for mobile platforms and offers a production-ready implementation. PyTorch, on the other hand, is still gaining momentum and attracting Python developers, since it is more Python friendly. In summary, TensorFlow is used to speed things up and create AI-related products, while research-oriented developers prefer PyTorch.
{ "domain": "ai.stackexchange", "id": 1650, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "comparison, tensorflow, pytorch", "url": null }
c++, c++11, sorting, mergesort But a vector contains two sizes: size() and capacity(). There is no need to allocate a new vector just because the size has been exceeded: you can go until you reach capacity. But even then, why are you doing it manually? The vector is designed to do this stuff all internally in the most efficient way. You should just copy using move iterators and a back inserter. Let the vector sort out its own resizing (this will be usually be more efficient). buf.clear(); std::copy(std::make_move_iterator(head), std::make_move_iterator(mid), std::back_inserter(buf)); Using move iterators and correctly sizing the buffer will make the following code cleaner. auto a = buf.begin (); auto a_end = a + (mid - head); Iter b = mid; Iter dest = head;
{ "domain": "codereview.stackexchange", "id": 33583, "lm_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, sorting, mergesort", "url": null }
beginner, c, calculator Exit_0() { printf("Thank you for using my calculator. Hope to see you again!!"); Sleep(1250); system("cls"); system("COLOR 0F"); exit(0); } Any help will be nice. float vs. double Little reason to use float here, suggest double instead. Save float for selective space/speed issues - which are not present here. If code uses float variables, use float functions like sinf(), log10f(), powf(), ... than sin(), log10(), pow(). Printing floating point Rather than printf("%f", ans), print using "%g" or "%e". When values are much smaller than 1.0, "%f" prints as 0.000000 and large values with many uninformative digits. // printf("%f", ans); printf("%g", ans);
{ "domain": "codereview.stackexchange", "id": 38878, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, c, calculator", "url": null }
neural-network, keras, cross-validation, python-3.x model.add(Dense(16, activation='relu')) model.add(Dense(8, activation='relu')) model.add(Dense(1, activation='relu')) # Compile model model.compile(loss='mean_absolute_error', optimizer='adam', metrics=['accuracy']) # Fit the model model.fit(X.iloc[train], Y.iloc[train], epochs=150, batch_size=10, verbose=0) # evaluate the model scores = model.evaluate(X.iloc[test], Y.iloc[test], verbose=0) print("%s: %.2f%%" % (model.metrics_names[1], scores[1]*100)) cvscores.append(scores[1] * 100) print("%.2f%% (+/- %.2f%%)" % (numpy.mean(cvscores), numpy.std(cvscores)))
{ "domain": "datascience.stackexchange", "id": 9951, "lm_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, keras, cross-validation, python-3.x", "url": null }
left identity is also a right and that associativity holds in G. Assume x' is a left inverse for a group element x and assume x'' is a right inverse. g = gh = h. 3. the multiplicative inverse of a. show that Shas a right identity but no left identity. It's also possible, albeit less obvious, to generalize the notion of an inverse by dropping the identity element but keeping associativity, i.e., in a semigroup.. By its own definition, unity itself is necessarily a unit.[15][16]. A semigroup may have one or more left identities but no right identity, and vice versa. [1][2][3] This concept is used in algebraic structures such as groups and rings. In fact, every element can be a left identity. There is a left inverse a' such that a' * a = e for all a. Proposition 1.4. This group is one of three finite groups with the property that any two elements of the same order are conjugate. 26. Since e = f, e=f, e = f, it is both a left and a right identity, so it is an identity element, and any
{ "domain": "com.br", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924818279466, "lm_q1q2_score": 0.8162151052622127, "lm_q2_score": 0.83973396967765, "openwebmath_perplexity": 373.86383830629217, "openwebmath_score": 0.8577609658241272, "tags": null, "url": "https://www.escolaamiga.com.br/6pusxdwv/190890-left-identity-left-inverse-group" }
beginner, c, state-machine sbState fetchNextState(sbState, sbTransition); /** * Structure: {<state name>, <function pointer> , transitions{{<encounters> -> <next state>}} */ static sbStateDef states[9] = { {"Idle", sbIdleState, {{sbStartupTrans, sbStartup}, {sbSelfTestTrans, sbSelfTest}}}, {"Self Test", sbSelfTestState, {{sbStartupTrans, sbStartup}, {sbErr, sbIdle}}}, {"Startup", sbStartupState, {{sbStartupOK, sbFlightStart}, {sbErr, sbIdle}}}, {"Flight Start", sbFlightStartState, {{sbFlightStartOK, sbAscend}, {sbErr, sbError}}}, {"Ascend", sbAscendState, {{sbAscendOK, sbDescend}, {sbErr, sbError}, {sbRepeat, sbAscend}}}, {"Descend", sbDescendState, {{sbDescendOK, sbRecovery}, {sbErr, sbError}, {sbRepeat, sbDescend}}}, {"Recovery", sbRecoveryState, {{sbRecoveryOK, sbEnd}, {sbErr, sbError}, {sbRepeat, sbRecovery}}}, {"Error", sbErrorState, {{sbRepeat, sbError}}}, {"End", sbEndState, {}} };
{ "domain": "codereview.stackexchange", "id": 40069, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, c, state-machine", "url": null }
at point ‘c’, i.e., (f ‘ (c)) is equal to the average slope of the path, i.e., Example: Verify mean value theorm for f(x) = x 2 in interval [2,4]. How to pronounce mean value theorem? Learn mean value theorem with free interactive flashcards. If. Cauchy mean value theorem in simple language? Section 4-7 : The Mean Value Theorem. I understood other basic calculus theorems and their proofs. Now for the plain English version. Think about it. Practice using the mean value theorem. The Mean Value Theorem states əm] (mathematics) The proposition that, if a function ƒ (x) is continuous on the closed interval [a,b ] and differentiable on the open interval (a,b), then there exists x0, a <>x0<>b, such that ƒ(b) - ƒ(a) = (b-a)ƒ′(x0). The mean value theorem guarantees that you are going exactly 50 mph for at least one moment during your drive. First, let’s start with a special case of the Mean Value Theorem, called Rolle’s theorem. And that will allow us in just a day or so to launch into the
{ "domain": "hiitfit.is", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9706877667047451, "lm_q1q2_score": 0.834465091334529, "lm_q2_score": 0.8596637559030338, "openwebmath_perplexity": 823.5710277581143, "openwebmath_score": 0.7786087989807129, "tags": null, "url": "https://hiitfit.is/ffa-full-sqgsicl/c9d368-language-mean-value-theorem" }
meteorology, atmosphere, climate, climate-change, climate-models Global Mean Temperature Anomaly Relative to the 1961–1990 mean, the GMST anomaly has been positive and larger than 0.25°C since 2001. Observations are generally well within the range of the extent of the earlier IPCC projections (TFE.3, Figure1, middle left) This is also true for the Coupled Model Intercomparison Project Phase 5 (CMIP5) results (TFE.3, Figure 1; middle right) in the sense that the observed record lies within the range of the model projections, but on the lower end of the plume. Mt Pinatubo erupted in 1991 (see FAQ 11.2 for discussion of how volcanoes impact the climate system), leading to a brief period of relative global mean cooling during the early 1990s. The IPCC First, Second and Third Assessment Reports (FAR, SAR and TAR) did not include the effects of volcanic eruptions and thus failed to include the cooling associated with the Pinatubo eruption. AR4 and AR5, however, did include the effects from volcanoes and did simulate successfully the
{ "domain": "earthscience.stackexchange", "id": 586, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "meteorology, atmosphere, climate, climate-change, climate-models", "url": null }
java, linked-list I'd follow the convention of Deque interface when naming methods. getFirst(), getLast(), addFirst(value), addLast(value), removeFirst(), removeLast(). Methods pushFirst(value), pushLast(value), popFirst(), popLast() would be also useful. Document your public api. Javadocs would be fine.
{ "domain": "codereview.stackexchange", "id": 30403, "lm_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, linked-list", "url": null }
quantum-field-theory, general-relativity &= \frac{\partial f^\mu}{\partial x^\alpha}(x_1)\frac{\partial f^\nu}{\partial x^\beta}(x_2)\int [dA] e^{-S[A]} A^\alpha(x_1) A^\beta(x_2)\\ &= \frac{\partial f^\mu}{\partial x^\alpha}(x_1)\frac{\partial f^\nu}{\partial x^\beta}(x_2)\langle A^\mu(x_1)A^\nu(x_2)\rangle \end{align} In other words, the desired result follows simply from linearity of the functional integral. A Note on diffeomorphism invariance. In my original answer, I had claimed that diffeomorphism invariance was necessary for the above result, but I believe that was wrong, as the above computation shows. However, I do have something relevant to say about diffeomorphism invariance. What we proved above is that the two-point function transforms as a two-tensor. That did not require diffeomorphism invariance; diffeomorphism invariance gives us a different constraint on the two-point function.
{ "domain": "physics.stackexchange", "id": 8262, "lm_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, general-relativity", "url": null }
Note that the above also implies that if $$d < 0$$, the horizontal configuration is an unstable equilibrium. This would correspond to the case where the mass suspension points are (for whatever reason) above the pivot point. • does this mean that theoretically if we were able to perfectly balance the scale we may attain neutral equilibrium at any deviation? Aug 30 at 11:45 • @utkarsh: Yes. If the scale were perfectly balanced, then the potential energy would be constant as a function of the angle, with no local minima or maxima. Aug 30 at 11:57 With a balance beam scale, the point of support is shifted slightly up (think of the beam as being a little bent). Then the effective horizontal becomes a position of stable equilibrium (if the loads are equal).
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.969324199175492, "lm_q1q2_score": 0.8139744576782448, "lm_q2_score": 0.8397339696776499, "openwebmath_perplexity": 284.55603316191537, "openwebmath_score": 0.7788105607032776, "tags": null, "url": "https://physics.stackexchange.com/questions/648679/why-isnt-this-rod-in-neutral-equilibrium" }
r, phylogenetics Title: Simulating DNA sequence evolution in R I hope someone can lend their thoughts on the below code to generate DNA sequences under the Kimura-2-Parameter model of DNA substitution. The issue is that each time the code is run and the haplotype distribution is examined, there always is a very skewed distribution. What I would like is for a different distribution to be generated each time the code is run. that is, there should be multiple specimens sharing the same haplotype (instead of most sharing the most common haplotype). Here is my code: library(pegas) set.seed(17) sim.seqs <- TRUE length.seqs <- 500 num.seqs <- 100 # number of DNA sequences subst.model <- "K80" # nucleotide substitution model transi.rate <- 1e-4 # transition rate transv.rate <- transi.rate / 2 # transversion rate if (sim.seqs == TRUE) { nucl <- as.DNAbin(c('a','c','g','t')) res <- sample(nucl, size = length.seqs, replace = TRUE, prob = rep(0.25, 4))
{ "domain": "bioinformatics.stackexchange", "id": 727, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "r, phylogenetics", "url": null }
ions, hydrogen-bond, proteins, amino-acids a hydrogen atom (check) bonded to an electronegative atom (typically $\ce{O, N, F}$ — check) and another electronegative atom that can receive (typically the same atoms — check) So a hydrogen bond is possible where an ionic interaction is not. Note that ionic interactions do happen in peptides. The side chains aspartate and glutamate are deprotonated (negatively charged) at ambient $\mathrm{pH}$ and the residues of lysine and arginine are positively charged. These can now form actual ionic interactions — although typically there will also be a significant hydrogen bonding component in these tertiary structure-creating bonds, too.
{ "domain": "chemistry.stackexchange", "id": 6638, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ions, hydrogen-bond, proteins, amino-acids", "url": null }
$$\vert x^2 - 4 \vert = \vert x - 2 \vert \cdot \vert x + 2 \vert < \frac{\epsilon}{5}\cdot 5 = \epsilon.$$ But why do we say that $\delta$ is the minimum of $\epsilon/5$ and $1$? Why don't we just let $\delta = \epsilon/5$? I'm not quite sure why we mention $1$ here. • Because we need to have a bound for $|x+2|$, of which it depends on the assumption that $|x-2|<1$. – Juniven Feb 23 '17 at 16:25 Because $\varepsilon$ could be any positive number. If for example, $\varepsilon=20$, then $\delta=\varepsilon/5$ does NOT work. Say $x=5$, then $|x-2|=3< 4=\varepsilon/5$, but $|x^2-4|=21>\varepsilon$! Note. If we have a function $f:\mathbb R\to\mathbb R$, which we need to show that it is continuous at $x_0$, it is usually convenient to pick an initial interval $(x_0-d,x_0+d)$, where we look for $\delta=\delta(\varepsilon)$. And as $x\in(x_0-d,x_0+d)$, then clearly, $\delta(\varepsilon)\le d$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9732407168145568, "lm_q1q2_score": 0.8023999099164807, "lm_q2_score": 0.8244619199068831, "openwebmath_perplexity": 105.71158496417726, "openwebmath_score": 0.9789531826972961, "tags": null, "url": "https://math.stackexchange.com/questions/2158054/clarification-on-step-in-basic-delta-epsilon-limit-proof" }
cosmology, universe, hubble-constant Title: Interpretation of Hubble constant in SI units The standard interpretation of Hubble constant $\approx 70~\text{km/s/Mpc}$ means that each mega-parsec of distance adds $70~\text{km/s}$ to a galaxy recession velocity from us (or to a space expansion rate ). But when expressing Hubble constant in SI units directly one gets about $2.27 \times 10^{−18} ~\text{Hz}$ frequency. What does this SI unit version interpretation of the Hubble constant mean? I'm not satisfied with the Wikipedia explanation about expansion rate within 1 exa-second, because exa-second is not strictly an SI unit.
{ "domain": "astronomy.stackexchange", "id": 6704, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, universe, hubble-constant", "url": null }
c#, .net-core Title: Sending emails from .net core console hostedservice In my .net core hosted service console application, I am reading a database table, retrieving some values, and based on a status, I am sending emails. It is working as it is expected, I wonder if there are any improvements to make it better. So I would be glad if you can share your comments. Thanks in advance. Program.cs using System.IO; using System.Net; using System.Threading.Tasks; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Serilog; using Serilog.Events; using Serilog.Sinks.Email;
{ "domain": "codereview.stackexchange", "id": 42500, "lm_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#, .net-core", "url": null }
rna-seq, software-recommendation, rna-splicing The alignments have been generated with Minimap2. It did not behave as expected: this gives me as output a file with only junctions annotated as 'new' ($11==N), while other annotations should be possible according to the manual:
{ "domain": "bioinformatics.stackexchange", "id": 425, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rna-seq, software-recommendation, rna-splicing", "url": null }
Maybe this is of interest: Pawłowicz, Marta. Linear combinations of the classic Cantor set. Tatra Mt. Math. Publ. 56 (2013), 47–60. From Math Review: In this paper, linear combinations of classic Cantor sets are studied. The problem goes back to a result by Hugo Steinhaus [in Selected papers, 205–207, PWN, Warsaw, 1985], who proved in 1917 that $$C+C=[0,2]$$, where $$C$$ is the classic Cantor set and $$C+C=\{c_1+c_2; c_1,c_2∈C\}$$. This result was extended and generalized by several authors during the last hundred years. The main result of the present paper is the topological classification of linear combinations of $$C$$, i.e., sets of the form $$aC+bC=\{ac_1+bc_2; c_1,c_2∈C\}$$ where $$a,b∈R$$ are fixed. It is shown that this problem can be reduced to characterization of $$C+mC$$, where $$m∈(0,1)$$. This is given by the following theorem.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.986571747626947, "lm_q1q2_score": 0.8976885415095459, "lm_q2_score": 0.9099070023734244, "openwebmath_perplexity": 146.98010200419125, "openwebmath_score": 0.9852447509765625, "tags": null, "url": "https://math.stackexchange.com/questions/4455035/does-the-set-of-convex-combination-of-points-in-cantor-set-contains-a-non-empty" }
is one-dimensional. This shows that every irrep of <code>$G$</code> appears in <code>$\mathcal{O}(G/U)$</code> exactly once. <em>But that's not all:</em> using the right <code>$G$</code>-action, we can "capture" the irrep of highest weight <code>$\lambda$</code>. Indeed, as a <code>$T$</code>-module, <code>$(V^\ast)^U = \mathbb C_\mu$</code>, where <code>$\mu$</code> is the lowest weight of <code>$V^\ast$</code>, or said differently, <code>$-\mu$</code> is the highest weight of <code>$V$</code>. So, using the fact that <code>$\text{Hom}_T(\mathbb C_\lambda, \mathbb C_\mu) = \delta_{\lambda\mu} \mathbb C_\lambda$</code>, we see that the irrep of <code>$G$</code> of highest weight <code>$\lambda$</code> can be gotten as <code>$$\text{Hom}_T(\mathbb C_{-\lambda}, \mathcal{O}(G/U)) = \bigoplus V \otimes \text{Hom}_T(\mathbb C_{-\lambda}, (V^\ast)^U).$$</code></p> <p>We can re-write the left side of the above as <code>\begin{align} (\mathbb C_\lambda \otimes \mathcal{O}(G/U))^T &amp;= \{ f
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9879462215484651, "lm_q1q2_score": 0.8100105276363543, "lm_q2_score": 0.8198933403143929, "openwebmath_perplexity": 598.38865623681, "openwebmath_score": 0.9509128332138062, "tags": null, "url": "http://mathoverflow.net/feeds/user/430" }
ds.algorithms, st.statistics Note that the functions are smooth. Changing one element in {r_1, r_2, ..., r_k} will not change f_i({r_1, r_2, ..., r_k}) by much. These are the m constraints that I need to satisfy. Moreover I want to do this so that the set of subsets I choose is uniformly distributed over the set of all subsets of size k that satisfy these m constraints. Not only that, but I want to do this in an efficient manner. How quickly it runs will depend on the density of solutions within the space of all possible solutions (if this is 0.0, then the algorithm can run forever). Note that n is large enough that I cannot brute-force the problem. That is, I cannot just iterate through all k-element subsets and find which ones satisfy the m constraints. Is there a way to do this?
{ "domain": "cstheory.stackexchange", "id": 112, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ds.algorithms, st.statistics", "url": null }
algorithms, integers Title: Sum to a certain value of a group of integers Take a group filled with an arbitrary number of random integers. Is there any way of finding out whether it is possible for the sum of the integers can equal a certain number, with the condition that any of the integers can (but do not have to) be multiplied by 0 or -1? The only possible solution I could think of was to have the algorithm test all possible sums with each integer multiplied by 0 or -1, but this seems to be extremely inefficient, especially with larger groups of integers. Example:
{ "domain": "cs.stackexchange", "id": 5875, "lm_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, integers", "url": null }