text
stringlengths
1
1.11k
source
dict
newtonian-mechanics, newtonian-gravity, pressure, fluid-statics In a liquid this is different. The equation of state for water is generally given by the Tait equation $$p - p_0 = C \left[ \left( \frac{\rho}{\rho_0} \right)^m - 1 \right] $$ where the exponent $m$ is estimated to be around $7$. This means that in a liquid assuming incompressibility holds even for very high liquid columns, as a small change in density leads to a huge change in pressure.
{ "domain": "physics.stackexchange", "id": 89044, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, newtonian-gravity, pressure, fluid-statics", "url": null }
nlp, tokenization For all these different options (and others), the reason why it's often worth testing different variants is clear: it affects performance and it's not always clear which one is the best without trying, so one must evaluate the different options. Btw it's crucial to precisely define how the target task is evaluated first, otherwise one just subjectively interprets results. Basically imho this is a matter of proper data-driven methodology. Of course experience and intuition also play a role, especially if there are time or resources constrains.
{ "domain": "datascience.stackexchange", "id": 11225, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nlp, tokenization", "url": null }
electromagnetism, mathematical-physics, vector-fields, calculus Also one of the major concerns is that, given a charge distributions, the maxwell equations in differential form, will always give a nicely behaved continuous and differentiable vector field solution. But the integral form (alone, not satisfying the differential form) can give a discontinuous solution as well. Leading to two different answers for the same configuration of charges. hence there is an inconsistency. Like there is an discontinuous solution for the boundary condition of 2D surface, the perpendicular component of the electric field is discontinuous. ( May be it is just an approximation) and actually the field is continuous but due to not being able to solve the differential equation we give such an approximation, but this isn't mentioned in the textbooks. One of the major issues that seems to be going on here is the notion of point and surface structures in our 3D world. When we define electrostatic fields by a distribution of point charges, we are being somewhat
{ "domain": "physics.stackexchange", "id": 15999, "lm_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, mathematical-physics, vector-fields, calculus", "url": null }
and logic. The cardinality of a set is the cardinal number that tells us, roughly speaking, the size of the set.. There are eleven birds on the tree. {{courseNav.course.mDynamicIntFields.lessonCount}} lessons A number is a cardinal number if it describes a quantity related to objects or events, for example. This lesson will explain what they are and also give some examples. lessons in math, English, science, history, and more. Try refreshing the page, or contact customer support. Examples of cardinal number in a Sentence Recent Examples on the Web With the hypothesis unresolved, many other properties of cardinal numbers and infinity remain uncertain too. And so ostensibly are the greatest cardinal number and the abominable snowman. {{courseNav.course.topics.length}} chapters | They do not show quantity or rank. The operations of addition and multiplication of two given cardinal numbers can be defined by taking two classes a and 13, satisfying the conditions (1) that their cardinal
{ "domain": "dccapco.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9664104933824753, "lm_q1q2_score": 0.8379124580708391, "lm_q2_score": 0.8670357615200474, "openwebmath_perplexity": 1825.8435610759211, "openwebmath_score": 0.49610114097595215, "tags": null, "url": "http://www.dccapco.com/company-location-yflc/1978cd-cardinal-number-example" }
Another good series, Brother's Formula (converges to $e$ faster than the one noted earlier): $$\sum_{n=0}^\infty \frac{2n+2}{(2n+1)!}$$ Edit: To find the digits that are correct, add the upper bound for the error to the estimate and the digits before the first digit that changed are correct. For example, let's say that we have found $3.1234122$ as an estimate to some series. Let's say that we compute the error to be less than $0.0001879$. To find the digits that are correct in the estimate: $$3.1234122 + 0.0001879 = 3.1236001$$ Thus we can see that the digits that we can be sure to be correct are $3.123$ so the first 4 digits of the number are $3.123$. - I've written another answer on this subject for Taylor series, and use $e^x$ as an example. For Brother's formula, I've never seen it before but we can use some standard tricks to represent it. I can first define $f(x) = (e^x - e^{-x})/2$ to cancel out all of the even terms out of the Taylor series for $e^x$:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9658995723244552, "lm_q1q2_score": 0.844270827624288, "lm_q2_score": 0.8740772351648677, "openwebmath_perplexity": 185.83247305739764, "openwebmath_score": 0.9911168217658997, "tags": null, "url": "http://math.stackexchange.com/questions/377868/taylor-series-for-ex-where-x-1-estimating-the-error" }
condensed-matter, solid-state-physics, diffraction, x-ray-crystallography Take a moment to think about that and let it sink in. What it's saying is that x-ray diffraction hands us a picture of the crystal in Fourier-transform space. (However, note that the formula $I({\bf \Omega})\propto F({\bf \Omega}+{\bf k})$ is perfectly general, and does not assume that the object $f$ is a crystal, is periodic, or anything else. So it works for non-periodic structures like a single unit cell as well.) We can get a complete reconstruction of the reciprocal lattice by rotating the crystal while imaging. Applying various rotations matrices $R(\theta,\phi)$ to the crystal (which is equivalent to sending in the x-rays at different directions), we find that the set of images $S$ obtained is $$S=\{F({\hat n}|{\bf k}|+R(\theta,\phi){\bf k}),{\hat n}\in\mbox{all directions},\theta\in[0,\pi],\phi\in[0,2\pi] \}$$ $$=\{F({\bf r}),|{\bf r}|\leq2|{\bf k}| \}.$$
{ "domain": "physics.stackexchange", "id": 9736, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "condensed-matter, solid-state-physics, diffraction, x-ray-crystallography", "url": null }
java, parsing, android, json, kotlin And here it's easier if I would follow the solution above. EDIT Also any solution in Kotlin is welcomed You can create a generic container/entity for "data" and "metadata" and reuse it. e.g.: data class MEntity<T>( var data: T? = null, var metadata: String? = null ) data class User( var name: String? = null, var pid: String? = null, var position: MEntity<Position>? = null ) data class Position( var x: String? = null, var y: String? = null ) Due to type erasure you must use a TypeToken to deserialize the JSON into a generic type: gson.fromJson<MEntity<User>>(json, object : TypeToken<MEntity<User>>() {}.type) This isn't very convenient but thankfully Kotlin allows us to use reified type parameters to define an extension function to simplify this: inline fun <reified T> Gson.fromJsonToGeneric(json: String): T { return fromJson(json, object : TypeToken<T>() {}.type) }
{ "domain": "codereview.stackexchange", "id": 25159, "lm_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, parsing, android, json, kotlin", "url": null }
newtonian-gravity, potential, differentiation, calculus Title: Trying to understand gravitational force equation I don't understand the red underlined equations but I understand gravitational force equation in simpler form. Can anyone please explain the equations? Source An Introduction to Celestial Mechanics by sir Richard Fitzpatrick The first equation is gravitational acceleration which is related with the gravitational force $F$ by $\vec{F}=m\vec{g}$ or in different writing $\mathbf{F}=m\mathbf{g}$. So equation (2.3) is just the gravitational force divided by the test mass $m$ in general coordinates. If the origin of the coordinate system is placed in the center of the mass of the field generating mass $m'$ which is equivalent with putting $\mathbf{r}'=0$ (2.3) adopts the form of the gravitational force equation: $$\frac{\mathbf{F}}{m} = \mathbf{g}(\mathbf{r}) = -G\frac{m'}{|\mathbf{r}|^3 }\mathbf{r}$$ In its simplest form only the absolute value of the force vector $\mathbf{F}$ is considered:
{ "domain": "physics.stackexchange", "id": 89413, "lm_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-gravity, potential, differentiation, calculus", "url": null }
pandas, outlier, dataframe Title: Remove Local Outliers from Dataframe using pandas Could someone please suggest how to remove local outliers from the dataframe? I have the code to detect the local outliers, but I need help removing them(setting these values to zero) in the dataframe. Any advice would be highly appreciated. The code to detect the local outliers is below: def printOutliers(series, window, scale= 1.96, print_outliers=False): rolling_mean = series.rolling(window=window).mean()
{ "domain": "datascience.stackexchange", "id": 4158, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pandas, outlier, dataframe", "url": null }
thermodynamics, energy, temperature, energy-conservation (Additional question). However, in my understanding $U$ includes both PE and KE, so if PE was converted into KE there should be no change in $U$. If the conversion is between the internal (molecular) PE and internal (molecular) KE then yes, there should be no change in internal energy $U$. But it's not clear (at least to me) if they are treating the 5J of elastic potential energy as external mechanical PE of $\frac{1}{2}kx^2$ (like a spring) or internal intermolecular potential energy. Hope this helps.
{ "domain": "physics.stackexchange", "id": 82748, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, energy, temperature, energy-conservation", "url": null }
electromagnetism, vacuum $$\epsilon_0 = \frac{e^2}{2\alpha \hbar c},\ \epsilon_0 \mu_0 = \frac{1}{c^2}$$ We note that if somehow $\epsilon_0$ and $\mu_0$ were both zero, the latter would imply that $c$ would have to be $\infty$ - which also is another unit-independent fact. $0$ and $\infty$ are special points, the latter not even being a usual real number, and behaving in some ways even more "exceptionally" than $0$ does. If $c = \infty$ we effectively have no special relativity. If there is no special relativity, however, then there are no electromagnetic waves, and even better it may be (though my chops aren't enough to know) the whole usual structure of the quantum field theories either does not work or becomes very degenerate. The Universe becomes rather sterile and lifeless, I'd think, if the laws still keep making sense.
{ "domain": "physics.stackexchange", "id": 99049, "lm_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, vacuum", "url": null }
Jr Ie osoeCr4v2e odN. It is estimatedthat t years fromnowthepopulationof a certainlakeside community will be changing at the rate of 0. Then the Fundamental Theorem of Calculus allows us to evaluate this area by using a definite integral, so that The area bounded by the polar curve is given by the formula: 2 2 wholecircle r q ×p q 2 2 r q p p × 1 2 2 rq rf a b=(qq) on ££ f(q i) ba n q-=D (())2 1 1 Area 2i n i fqq = »×Då (())2 1 1 Area 2 lim i n ni fqq ®¥= =å×D rf. LINK TO THE TEXTBOOK'S VIDEOS FOR EACH SECTION: This week students will learn the Fundamental Theorem of Calculus and use calculus to find area under a curve instead of just using geometry. The goal is for all students to have the background and knowledge base to take the AP Calculus exam in May. 09kb; Physics 01-02 Displacement and Vectors. Example: Use the Fundamental Theorem of Calculus to nd each de nite integral. b) State and apply the Mean Value Theorem for integrals. f 1 f x d x 4 6. com Geometry for the SAT from
{ "domain": "gesuitialquirinale.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9854964194566753, "lm_q1q2_score": 0.8471955498358522, "lm_q2_score": 0.8596637523076225, "openwebmath_perplexity": 1111.9521134672673, "openwebmath_score": 0.7030860781669617, "tags": null, "url": "http://gesuitialquirinale.it/hkqo/fundamental-theorem-of-calculus-worksheet-doc.html" }
$\displaystyle \nu^-(n) = \sum_{d \in {\mathcal D}} \lambda^-_d 1_{E_d}$ for some coefficients ${\lambda^-_d \in {\bf R}}$, and obeying the pointwise upper bound $\displaystyle \nu^-(n) \leq 1_{n \not \in\bigcup_{p|P} E_p}(n)$ for all ${n \in {\bf Z}}$. Thus for instance ${1}$ and ${0}$ are (trivially) upper bound sieves and lower bound sieves respectively. • (i) The supremal value of the quantity (1), subject to the constraints in Problem 3, is equal to the infimal value of the quantity ${\sum_{d \in {\mathcal D}} \lambda^+_d X_d}$, as ${\nu^+ = \sum_{d \in {\mathcal D}} \lambda^+_d 1_{E_d}}$ ranges over all upper bound sieves. • (ii) The infimal value of the quantity (1), subject to the constraints in Problem 3, is equal to the supremal value of the quantity ${\sum_{d \in {\mathcal D}} \lambda^-_d X_d}$, as ${\nu^- = \sum_{d \in {\mathcal D}} \lambda^-_d 1_{E_d}}$ ranges over all lower bound sieves.
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9886682444653242, "lm_q1q2_score": 0.8012947666000314, "lm_q2_score": 0.8104789155369048, "openwebmath_perplexity": 248.19796379327, "openwebmath_score": 0.9931489825248718, "tags": null, "url": "https://terrytao.wordpress.com/2015/01/21/254a-notes-4-some-sieve-theory/" }
sql, random, t-sql, statistics, stored-procedure /* Return the result finished result set: */ select * from #CoinFlipAndDiceRolls order by row_id asc; /* Statistics about the finished result set, if the call includes this parameter: */ if @includeStatistics = 1 begin select [NumberOfRuns] = @numberOfRuns, [ChanceToWinDiceRoll] = @chanceToWinDiceRoll, [TotalCoinFlipWins] = sum(convert(int, CoinFlipWon)), [TotalDiceRolls] = sum(coalesce(NumberOfDiceRolls, 0)), [AverageDiceRollsPerCoinFlipWon] = (select avg(NumberOfDiceRolls) from #CoinFlipAndDiceRolls where NumberOfDiceRolls is not null) from #CoinFlipAndDiceRolls; end; /* Cleanup */ if object_id('tempdb..#CoinFlipAndDiceRolls') is not null drop table #CoinFlipAndDiceRolls; end; go
{ "domain": "codereview.stackexchange", "id": 18635, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sql, random, t-sql, statistics, stored-procedure", "url": null }
[Image will be Uploaded Soon] Then you would get ∂D Pdx + Qdy =  ∫∫D(∂Q/∂x - ∂P/∂y)dA, ∂D - Qdx + pdy =  ∫∫D(∂P/∂x - ∂Q/∂y)dA. The second formula here follows the first formula in which P is replaced by -Q and Q is replaced by P. we will prove this theorem using the simplest in which the region D is a rectangle. [Image will be Uploaded Soon] The line integral in 3D is a total of four different partial integrals. ∂D Pdx + Qdy = a1a2 P(x,b1)dx +  b1b2 Q(a2,y)dy + a2a1 P(x,b2)dx + b2b1 Q(a1,y) dy  = b1b2 Q(a2,y) - Q(a1,y)dy - a2a1P(x,b2) - P(x,b1)dx. Using the Fundamental Theorem of Calculus, Q(a2,y) - Q(a1,y) = a1a2(∂Q/∂x)dx, P(x,b2) - P(x,b1) = b1b2(∂P/∂y)dy Hence, you get ∂D Pdx + Qdy = b1b2 a1a2 (∂Q/∂x)dxdy - a1a2 b1b2(∂P/∂y)dydx = b1b2 a1a2 (∂Q/∂x) -  (∂P/∂y) dxdy You can apply Green’s Theorem for evaluating a line integral through double integration, or for evaluating a double integral through the line integration. Green’s Theorem Example
{ "domain": "vedantu.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713848528318, "lm_q1q2_score": 0.8167296876330972, "lm_q2_score": 0.8289388083214155, "openwebmath_perplexity": 914.3277068817843, "openwebmath_score": 0.8579751253128052, "tags": null, "url": "https://www.vedantu.com/maths/greens-theorem" }
• @Ben has said it better than I would've. I'll add that, in general, impulse doesn't have to be applied over a short interval of time. For example, the block slows down due to friction, and this takes a relatively longer period of time. During that time, the block receives an impulse due to the ground's friction force. We could calculate that impulse using $mΔv$. In general, whenever an object's velocity changes, it receives an impulse. As another example, a car speeding up on a road feels an impulse--and this is true even if the car speeds up gradually over a long interval of time. – jdphysics Aug 20 '18 at 20:12
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9609517106286378, "lm_q1q2_score": 0.8148560642790603, "lm_q2_score": 0.8479677545357568, "openwebmath_perplexity": 274.0411651075944, "openwebmath_score": 0.7795600891113281, "tags": null, "url": "https://physics.stackexchange.com/questions/423632/why-conservation-of-momentum" }
thermodynamics, ideal-gas, gas From the 1st law of thermodynamics for this reversible process, we have: $$dU=nC_vdT=dQ-PdV$$or $$dQ=nC_vdT+PdV\tag{2}$$Combining this with the ideal gas law gives:$$dQ=\frac{C_v}{R}d(PV)+PdV\tag{3}$$ Substituting Eqn. 1 into Eqn. 3 gives: $$dQ=\frac{C_v}{R}P_0\left(3-2\frac{V}{V_0}\right)dV+P_0\left(3-\frac{V}{V_0}\right)dV\tag{4}$$ At $V=V_0$, this becomes $$dQ=P_0\left(\frac{C_v}{R}+2\right)dV$$which is greater than zero. At $V=2V_0$, Eqn. 4 yields: $$dQ=P_0\left(1-\frac{C_v}{R}\right)dV$$Since $C_v/R>1$, dQ is negative at $V=2V_0$. So dQ changes sign between the initial volume and the final volume.
{ "domain": "physics.stackexchange", "id": 47699, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, ideal-gas, gas", "url": null }
organic-chemistry, molecular-structure, vsepr-theory Source. Green indicates $\mathrm{p}$ orbitals; blue $\mathrm{sp^2}$; and red $\mathrm{s}$. Hybridization The terminal carbons are $\mathrm{sp^2}$ hybridized, and form three $\sigma$-bonds each. This means that each terminal carbon has one unhybridized $\mathrm{p}$-orbital. The central carbon atom is $\mathrm{sp}$ hybridized, and forms two $\sigma$-bonds. This means it has two unhybridized $\mathrm{p}$-orbitals. For our sake, we will call these two orbitals $\mathrm{p_x}$ and $\mathrm{p_y}$. These orbitals are perpendicular to one another. $\mathrm{\pi}$-Bonds
{ "domain": "chemistry.stackexchange", "id": 5435, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "organic-chemistry, molecular-structure, vsepr-theory", "url": null }
c++, security, cryptography, aes Ah, here's that assurance() method again. And a throw, which is also problematic. It turns out that this one line is responsible for at least three different problems with twofish256: It allocates space for FAIL_MSG's text on the heap It allocates ~24 bytes for FAIL_MSG in each twofish256 object It throws exceptions, preventing us from marking twofish256's constructor as noexcept It causes us to pay for assurance() on each construction, even though that function will never return false It drags in a dependency on <stdexcept> It drags in a dependency on <string> Arguably, the text of the message is too long, potentially confusing, and/or difficult to translate (Okay, seven problems. I was close with "three".) Removing this one line (and moving the assurance() function into a unit test) would fix all of these issues in one fell swoop. return std::move(block_t {
{ "domain": "codereview.stackexchange", "id": 28202, "lm_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++, security, cryptography, aes", "url": null }
lagrangian-formalism, variational-calculus The function $\eta(x)$ has the property that it vanishes at $A$ and $B$, i.e. $\eta (A) = \eta(B) = 0$. And the two different path which deviate from $f(x)$ are different due to different $\eta(x)$ for each $f^*(x)$. And therefore you can not relate the two modified path by just a scalar.
{ "domain": "physics.stackexchange", "id": 62704, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lagrangian-formalism, variational-calculus", "url": null }
java, beginner, generator Note: How parsing (form representation String to value ID) and formatting (from value ID to representation String) was implemented using static facotry method fromString and instance method toString. The above classes implement requirements 1. - 4. and 6. - 7. Now the ID-generator comes into play. Using Factory Design-Pattern we can implement it like follows. The counter for each entity-type should be managed inside the generator, not be dependent on some DataManager. Thus make use of Java's concurrent counter classes [AtomicInteger](https://stackoverflow.com/questions/4818699/practical-uses-for-atomicinteger] public class EntityIdGenerator { protected AtomicInteger counter; protected Integer counterMax; protected Integer workstationId;
{ "domain": "codereview.stackexchange", "id": 36963, "lm_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, generator", "url": null }
quantum-chemistry, orbitals, theoretical-chemistry Of course, the end result of either way of looking at things is the same hydrogen molecule that we also get from combining two hydrogen atoms the standard way. I thus suggest to abandon the view of orbitals carried around by atoms (except in the computational chemist way, as will be outlined below). Rather, I suggest to think of the effective potential felt by a newly added electron - where would it go? Regardless of how the nuclei got to where they are now, where do the electrons go? "Unoccupied orbital" is then a useful shorthand for the relevant regions.
{ "domain": "chemistry.stackexchange", "id": 9209, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-chemistry, orbitals, theoretical-chemistry", "url": null }
acceleration, vectors Title: Need Help Understanding Why $\Delta \vec{v}$ is Perpendicular to $\vec{v}$ I am confused about the statement of how vector $\Delta \vec{v}$ is perpendicular to vector. I highlighted the statement in pink. I ended up copying the image of the right vector $\vec{v}$ in the velocity isosceles triangle and moved its tail to touch the tail of vector $\vec{v}(t)$. It does not look perpendicular so could someone clarify my misunderstanding? This is only true if ${\bf v}$ just changes direction but keeps the same length. If ${\bf v}$ and ${\bf v}+ \Delta {\bf v}$ have the same length, then $$ {\bf v}\cdot {\bf v}= ({\bf v}+ \Delta {\bf v})\cdot ({\bf v}+ \Delta {\bf v})= {\bf v}\cdot {\bf v}+ 2{\bf v}\cdot \Delta{\bf v}+ (\Delta {\bf v})\cdot (\Delta {\bf v}) $$ so as $\Delta {\bf v}$ gets small we must have ${\bf v}\cdot \Delta{\bf v}=0$. i.e. they become perpendicular.
{ "domain": "physics.stackexchange", "id": 70092, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "acceleration, vectors", "url": null }
material-science, elasticity Title: About elongation produced in a body, when 2 forces of equal magnitude but opp. in direction are applied on a body When 2 oppositely- directed forces are applied on the same body , they act at the body's center of mass(com). The vector sum of the forces thus becomes 0(zero). How do the forces then bring about deformation(elongation or de-elongation) in the body? As CuriousOne said, the forces may be said to "exactly cancel" and be neglected only if they act on the same part of the body, i.e. if both of them act on the center of mass (or on the whole object "uniformly").
{ "domain": "physics.stackexchange", "id": 31224, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "material-science, elasticity", "url": null }
python, scikit-learn, cross-validation, gridsearchcv n.b. actually, the thought just occurred to me that this might be time spent retraining the model on the parameters it identified as giving the best performance, so that it's available to the .predict() etc methods. I'm just checking that now by passing refit=False to prevent that from happening, and if it works I'll answer my own question. Yep I figured it out. The answer is that by default GridSearchCV's last act is to expose the API of the estimator object you passed so that you can directly call things like .predict() or .score() on the GridSearchCV object itself. It does this by retraining the estimator against the best parameters it found during cross validation. If you want to skip this step (because, for example, you're going to go on to do more development or cross-validation afterwards) then you can pass refit=False to prevent that from happening.
{ "domain": "datascience.stackexchange", "id": 4598, "lm_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, scikit-learn, cross-validation, gridsearchcv", "url": null }
electromagnetism, energy, electric-circuits, electricity, poynting-vector Title: Does a lightbulb glow due to the interaction with electromagnetic waves or due to the interaction between its atoms and the moving electrons? Today I learned that energy is transferred to a lightbulb through electromagnetic waves produced by the movement of electrons and according to Poynting's law, the direction of this energy is perpendicular to the electric field. On the other hand, from what I previously know, light is produced due to the interaction between the light bulb's atoms and the moving electrons which means energy is carried by the moving electrons and not by the electromagnetic waves produced by the electrons. I'm new to the this subject, so I'm confused. Does the electromagnetic waves turn on the light bulb or the moving electrons in the wires? You are confusing two different electromagnetic waves which are involved here. So I will elaborate in a more detailed way.
{ "domain": "physics.stackexchange", "id": 85848, "lm_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, energy, electric-circuits, electricity, poynting-vector", "url": null }
organic-chemistry, equilibrium, carbonyl-compounds Therefore, the overall order of increasing enol content is C > D >> A > B. Unless you've studied this before, you might not know that a "methyl group stabilizes the carbonyl double bond a bit more than it stabilizes the enolic carbon-carbon double bond". So, a general rule that might come in handy in these situations is that the enol content increases with the acidity of the enolic hydrogen. A more acidic α-hydrogen implies a weaker $\ce{C-H}$ bond. Since the position of a keto-enol equilibrium is dependent on the relative stabilities of the keto and enol forms (the compound with the highest bond strengths overall will be more stable and will predominate at equilibrium) a weak $\ce{C-H}$ (lower $\mathrm{p}K_\text{a})$ generally implies a higher enol content. $$ \begin{array}{lr} \hline \text{compound} & \mathrm{p}K_\text{a} \\ \hline \text{acetone} & 19.3 \\ \text{acetaldehyde} & 16.7 \\ \text{2,4-pentanedione} & 13.3 \\ \hline \end{array} $$
{ "domain": "chemistry.stackexchange", "id": 4625, "lm_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, equilibrium, carbonyl-compounds", "url": null }
quantum-mechanics, operators, measurements, quantum-measurements Third, can t' equal to zero, which means instantaneous process? No process can really be instantaneous in physics. Instantaneous process is always an approximation, which may work very well if there is a suitable separation of time-scales.
{ "domain": "physics.stackexchange", "id": 65385, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, operators, measurements, quantum-measurements", "url": null }
javascript, beginner, html, css, dom .a518 { width: 33.333333333333336% } .a519 { width: 50% } .a520 { width: 100% } .s1 { font-size: 1.3px } .s2 { font-size: 2.6px } .s3 { font-size: 3.9000000000000004px } .s4 { font-size: 5.2px } .s5 { font-size: 6.5px } .s6 { font-size: 7.800000000000001px } .s7 { font-size: 9.1px } .s8 { font-size: 10.4px } .s9 { font-size: 11.700000000000001px } .s10 { font-size: 13px } .s11 { font-size: 14.3px } .s12 { font-size: 15.600000000000001px } .s13 { font-size: 16.900000000000002px } .s14 { font-size: 18.2px } .s15 { font-size: 19.5px } .s16 { font-size: 20.8px } .s17 { font-size: 22.1px } .s18 { font-size: 23.400000000000002px }
{ "domain": "codereview.stackexchange", "id": 33871, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, beginner, html, css, dom", "url": null }
python, python-3.x, bioinformatics def gap_fraction(alignment, i): return mean(site == "-" for record in alignment for site in record.seq[i]) This uses a generator expression to flatten the sites. The other improvement is using a set instead of a list for the to be filtered elements. This is needed since you later do if i not in tofilter, which needs to scan through the whole list in the worst case. With a set this is immediate, i.e. it is \$\mathcal{O}(1)\$ instead of \$\mathcal{O}(n)\$. You will only see a real difference if your number of columns to filter gets large (>>100), though. to_filter = {i for i in range(length) if gap_fraction(alignment, i) > 0.9} I also used a set comprehension to make this a lot shorter and followed Python's official style-guide, PEP8, which recommends using lower_case_with_underscores for variables and functions. You should also keep your calling code under a if __name__ == "__main__": guard to allow importing from this script form another script without running the code.
{ "domain": "codereview.stackexchange", "id": 36781, "lm_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, bioinformatics", "url": null }
sampling, downsampling, resampling, decimation To note, but not critical to this question: When our original signal doesn't occupy most of the original first Nyquist zone (out to $f_s/2$) we can (and often do) implement multi-band filters, that concentrate the rejection of the images only where needed minimizing filter resources - however we must also consider the filter's capability to reject images in the subsequent decimation process. In this case after filtering and prior to downsampling to create the decimation process, we will have the resulting spectrum as given below, at the 8x sampling rate. After we downsample by 9 (by selecting every 9th sample), the new sampling rate (and multiples thereof) will be at the red marks indicated by $f_{s2}$ (while $f_{s1}$ refers to the original sampling rate).
{ "domain": "dsp.stackexchange", "id": 11680, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sampling, downsampling, resampling, decimation", "url": null }
cosmology, cosmological-inflation, cosmological-constant Going forward The size of the horizon during this epoch dominated by Eq. $\ref{5}$ is simply $$ r_h^{\rm forward} = \int_{t_i}^{t_{ls}}\frac{{\rm d}ct}{a(t)} = \frac{e^{H\Delta t}-1}{a(t_e)H} $$ Going backward The size of the horizon at the time of last scattering as seen from today is $$ r_h^{\rm backward} = \int_{t_{ls}}^{t_0}\frac{{\rm d}ct}{a(t)} \approx 3t_0 $$ If the universe is to be in thermal equilibrium then $$ r_h^{\rm forward}(t_{ls}) > r_h^{\rm backward}(t_{ls}) $$ which leads to $$ \bbox[yellow,5px,border:2px solid red] { e^{H \Delta t} > 3 H a(t_e)t_0 \sim 10^{25} } $$ And from there you can get number of $e$-foldings of $a$ during the inflationary epoch.
{ "domain": "physics.stackexchange", "id": 39794, "lm_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, cosmological-inflation, cosmological-constant", "url": null }
c#, .net, asynchronous, async-await Title: Asynchronously wait for a task to complete and do some async action while waiting I have a long-running task. My goal is to create a method that will allow me to: Asynchronously wait for this task to complete While waiting on a task, do some async action once in a while. This 'action' basically tells some remote service that task is not dead and still executing. I've written the following code to solve this problem. Please have a look and share your thoughts! public delegate Task AsyncAction(); public static class TaskExtensions { public static async Task<bool> TimeoutAfter(this Task task, TimeSpan timeout) { var timeoutCancellationTokenSource = new CancellationTokenSource();
{ "domain": "codereview.stackexchange", "id": 10804, "lm_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, asynchronous, async-await", "url": null }
ros, installation, ros-electric :~$ rosinstall ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=desktop-full&overlay=no" rosinstall operating on /home/dlr/ros from specifications in rosinstall files http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=desktop-full&overlay=no (Over-)Writing /home/dlr/ros/.rosinstall [ros] Installing https://code.ros.org/svn/ros/stacks/ros/tags/ros-1.6.8 (None) to /home/dlr/ros/ros [ros_comm] Installing https://code.ros.org/svn/ros/stacks/ros_comm/tags/ros_comm-1.6.6 (None) to /home/dlr/ros/ros_comm [common_rosdeps] Installing https://kforge.ros.org/common/rosdepcore (common_rosdeps-1.0.2) to /home/dlr/ros/common_rosdeps [bond_core] Installing https://kforge.ros.org/common/bondcore (bond_core-1.6.1) to /home/dlr/ros/bond_core [common_msgs] Installing https://code.ros.org/svn/ros-pkg/stacks/common_msgs/tags/common_msgs-1.6.0 (None) to /home/dlr/ros/common_msgs
{ "domain": "robotics.stackexchange", "id": 8543, "lm_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, installation, ros-electric", "url": null }
### NBHM 2020 PART A Question 4 Solution $$\int_{-\infty}^{\infty}(1+2x^4)e^{-x^2} dx$$ Evaluate : $$\int_{-\infty}^{\infty}(1+2x^4)e^{-x^2} dx$$ Solution : \int_{-\infty}^{\infty}(1+2x^4)e^{-x^2} dx = \int_{-\infty}^{\inft...
{ "domain": "theindianmathematician.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.98615138856342, "lm_q1q2_score": 0.8702074673357224, "lm_q2_score": 0.8824278680004707, "openwebmath_perplexity": 760.8432127568535, "openwebmath_score": 0.7673551440238953, "tags": null, "url": "https://nbhmcsirgate.theindianmathematician.com/2020/04/csir-june-2011-part-c-question-63.html" }
If the random vector $$(X,Y)$$ in the plane has independent coordinates and a rotation-invariant distribution, then it is Gaussian. • Yes this is a really nice property of Gaussian distributions (and if I am not wrong then the proof follows by analyzing the characteristic function, I think). Feb 3 at 16:44 • Motivated by this answer, I came across a fairly recent paper of Mike Christ which gives a quantitative version of this statement. It is here; arxiv.org/pdf/1506.00155.pdf Feb 10 at 17:09 • Indeed, it's sufficient for $(X,Y)$ to be independent and invariant under rotation by the angle $\pi/4$ only. Feb 17 at 7:12 The Normal Distribution is the limit, in the sense of distributions, of the scaled sum of $$n$$ IID variables. This is the Central Limit Theorem. I posted an outline of a proof of the Central Limit Theorem here:
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.977022634773286, "lm_q1q2_score": 0.828483687862418, "lm_q2_score": 0.8479677526147223, "openwebmath_perplexity": 268.06751297449057, "openwebmath_score": 0.9078235030174255, "tags": null, "url": "https://mathoverflow.net/questions/382855/what-makes-gaussian-distributions-special" }
special-relativity, spacetime, relativity If we take this approach, then we impose contravariance as a requirement for a set of four components to denote a meaningful physical quantity in special relativity, rather than deriving it from the invariant nature of a geometric object. Now we cannot say that the four-momentum is really invariant or frame-independent. But it is contravariant, and that's good enough. The calculus of relativity is formulated in terms of contravariant, invariant, and covariant quantities (see below).
{ "domain": "physics.stackexchange", "id": 11000, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "special-relativity, spacetime, relativity", "url": null }
lagrangian-formalism, conservation-laws, field-theory, noethers-theorem, classical-field-theory $$ \psi\to e^{i\gamma^5 \alpha}\psi, \quad \bar\psi \to \bar\psi e^{i\gamma^5 \alpha}. $$ This means that $m\bar\psi \psi$ is not invariant under the axial transformation
{ "domain": "physics.stackexchange", "id": 93684, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lagrangian-formalism, conservation-laws, field-theory, noethers-theorem, classical-field-theory", "url": null }
# $f_n \to f, x_n \to x \implies f_n(x_n) \to f(x)$ Let $f_n \to f$ uniformly, $f$ be continuous, and $x_n \to z$. Prove that $f_n(x_n) \to f(z)$. My attempt: Pick $\epsilon > 0$. By continuity of $f$, we have $|f(x_n) - f(z)| \to 0$. So, pick $n_0$ such that $\forall n \geq n_0: |f(x_n) - f(z)| < \epsilon/2$. Since $f_n \to f$ uniformly, we can pick $n_1$ such that $\forall n \geq n_1: \forall x: |f_n(x) - f(x)| < \epsilon/2$. Then, for $n \geq \max\{n_0,n_1\}$ $$|f_n(x_n) - f(z)| \leq |f_n(x_n) - f(x_n)| + |f(x_n) - f(z)| < \epsilon/2 + \epsilon/2 = \epsilon$$ Is this correct? • Yes, it is correct! – eddie May 28 '18 at 8:12 • Thanks for the verification. – user370967 May 28 '18 at 8:12 Your attempt is correct. I would like to bring to your attention a partial converse to this statement. I will mention the hypotheses.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9877587268703081, "lm_q1q2_score": 0.8143694648809265, "lm_q2_score": 0.8244619285331332, "openwebmath_perplexity": 211.94929247527685, "openwebmath_score": 0.9575596451759338, "tags": null, "url": "https://math.stackexchange.com/questions/2798924/f-n-to-f-x-n-to-x-implies-f-nx-n-to-fx" }
machine-learning, time-series, feature-extraction Title: Any issue with "overlapping" sliding windows in time-series data analysis? I am developing some classification/regression models form accelerometry time-series data. So far, I have created datapoints by extracting features from non-overlapping sliding windows of the time-series data. I would like to try using overlapping windows as well. However, I was wondering whether it is conceptually sound or there might be some caveats to keep in mind as the data is reused in the overlapping windows. In general I don't see anything wrong with overlapping windows, it might make perfect sense depending on your task. In fact some learning models (e.g. for sequence labeling) do use features based on past data points, which is conceptually similar to having overlaps between them. However you need to be careful about the fact that this makes data points depend on each other, so of course the preprocessing must be done separately for the training and test set.
{ "domain": "datascience.stackexchange", "id": 5739, "lm_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, time-series, feature-extraction", "url": null }
inorganic-chemistry, electronic-configuration, halides, oxidation-state Title: Why BiCl5 isn't stable? I read this in a textbook: $\ce{Bi(V)}$ is very unstable and is a good oxidizing agent.
{ "domain": "chemistry.stackexchange", "id": 11397, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, electronic-configuration, halides, oxidation-state", "url": null }
ros Comment by gvdhoorn on 2017-02-07: I specifically asked whether you added the http:// prefix to the IP, but I think we got that cleared up. In any case: ROS_IP and ROS_HOSTNAME should not include the http:// prefix. Comment by ahendrix on 2017-02-07: @gvdhoorn: ah, yes. The http:// prefix is inappropriate here.
{ "domain": "robotics.stackexchange", "id": 26935, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
javascript, unit-testing, ecmascript-6, event-handling, dom const reused = gen({id: obj.id}); assert.equal(reused.count(), 99); ui.upvote(); assert.equal(reused.count(), 100); }); QUnit.test('all sub-elements (upvote/downvote/count/star) are optional in the HTML markup', assert => { ['upvote', 'downvote', 'count', 'star'].forEach(cls => { const obj0 = gen(); obj0.destroy(); const jqdom = $('#' + obj0.id); jqdom.find('.' + cls).remove(); const obj = create(obj0.id, {}, jqdom); assert.equal(obj.count(), 0); obj.upvote(); assert.equal(obj.count(), 1); assert.equal(obj.upvoted(), true); obj.downvote(); assert.equal(obj.count(), -1); assert.equal(obj.downvoted(), true); assert.equal(obj.upvoted(), false); obj.downvote(); assert.equal(obj.count(), 0); assert.equal(obj.downvoted(), false); obj.star(); assert.equal(obj.starred(), true); obj.star(); assert.equal(obj.starred(), false); }); }
{ "domain": "codereview.stackexchange", "id": 34780, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, unit-testing, ecmascript-6, event-handling, dom", "url": null }
beginner, c, programming-challenge for(int i=0;i<10;i++) { if(msearchaccount()==v[i].ic) v[i].solde=v[i].solde+accountt.solde; } }break; case 7: { printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"); MENU(); }break; default: {printf("enter new number");mmmenuodify();} } } void mmodify() { mmmenuodify(); } //part of create function void mcreate() { int x; printf("\n"); printf("how many costumers you want to add:"); scanf("%d" ,&x); //FILE *pr=fopen("tahiro.txt" ,"w+"); for(int i=0;i<x;i++) { printf("enter the full name:" ); scanf("%s %s" ,&t[i].prenom,&t[i].name);//when you enter the full name you have to make space between the name and family name and in the same family name no spaces printf("enter thier ID:"); scanf("%d" ,&t[i].f);
{ "domain": "codereview.stackexchange", "id": 37438, "lm_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, programming-challenge", "url": null }
# GSEB Solutions Class 12 Maths Chapter 7 Integrals Ex 7.11 Gujarat Board GSEB Textbook Solutions Class 12 Maths Chapter 7 Integrals Ex 7.11 Textbook Questions and Answers. ## Gujarat Board Textbook Solutions Class 11 Maths Chapter 7 Integrals Ex 7.11 By using properties of definite integrals, evaluate the following: Question 1. $$\int_{0}^{\frac{\pi}{2}}$$ cos2x Solution: Question 2. $$\frac{\sqrt{\sin x}}{\sqrt{\sin x}+\sqrt{\cos x}}$$dx Solution: Question 3. $$\int_{0}^{\frac{\pi}{2}} \frac{\sin ^{\frac{3}{2}} x}{\sin ^{\frac{3}{2}} x+\cos ^{\frac{3}{2}} x}$$dx Solution: Question 4. $$\int_{0}^{\frac{\pi}{2}} \frac{\cos ^{5} x}{\sin ^{5} x+\cos ^{5} x}$$ Solution: Question 5. $$\int_{-5}^{5}$$|x + 2|dx Solution: Question 6. $$\int_{2}^{8}$$|x – 5|dx Solution: Question 7. $$\int_{0}^{1}$$x(1 – x)ndx Solution: Question 8. $$\int_{0}^{\frac{\pi}{2}}$$log(1 + tan x)dx Solution: Question 9. $$\int_{0}^{2}$$x$$\sqrt{2-x}$$dx Solution:
{ "domain": "gsebsolutions.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9848109516378093, "lm_q1q2_score": 0.8028498814343565, "lm_q2_score": 0.8152324871074608, "openwebmath_perplexity": 11807.031335431575, "openwebmath_score": 0.9203677773475647, "tags": null, "url": "https://gsebsolutions.com/gseb-solutions-class-12-maths-chapter-7-ex-7-11/" }
special-relativity, coordinate-systems, inertial-frames Now to more directly address your question. Formally one can think of $\rho$ as a function $M\rightarrow \mathbb R$
{ "domain": "physics.stackexchange", "id": 67652, "lm_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, coordinate-systems, inertial-frames", "url": null }
exoplanet, space-telescope, planetary-transits, planetary-science Unfortunately this assumes that the planet is a blackbody with zero heat redistribution over the surface, e.g. by winds or currents in a magma ocean, and no sources of heat on the nightside such as tidally-driven hyperactive volcanism which is something you certainly do not know starting out. Spherical harmonics are a generic set of basis functions over a sphere, so it does make sense as a fit which does not assume any physical processes operating or their relative importance. In fact, this is noted in Louden & Kreidberg (2018) "SPIDERMAN: an open-source code to model phase curves and secondary eclipses" (reference 15), which is referenced when they talk about using a spherical harmonic model. Conveniently, the paper shares the lead author with the LHS 3844 b paper, so presumably this does reflect some of the thought that went into the LHS 3844 analysis. A relevant quote from that paper:
{ "domain": "astronomy.stackexchange", "id": 3910, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "exoplanet, space-telescope, planetary-transits, planetary-science", "url": null }
validation, posix, sh Title: Attempt on basic input validation and functional programming in a POSIX shell In spite of all the POSIX shell disadvantages, I am still sticking with it and I love its portability. Recently, I was searching for a way of code re-use, which turns out to be structured programming and input validation = Yes, in a POSIX shell script. Let me begin with the simpler. is_integer() + is_exit_code() is_integer () { case "${1#[+-]}" in (*[!0123456789]*) return 1 ;; ('') return 1 ;; (*) return 0 ;; esac } is_exit_code () { is_integer "$1" && case "$1" in ([+-]*) return 1 ;; esac && [ "$1" -le 255 ] }
{ "domain": "codereview.stackexchange", "id": 41415, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "validation, posix, sh", "url": null }
may be rigorously applied when noisy measurements of the objective function are all that are available. Approximation Algorithms An approximation algorithm seeks answers that are close to, but not necessarily as good as, the true answer. Approximation Algorithms for Metric Facility Location Problems ∗ Mohammad Mahdian† Yinyu Ye‡ Jiawei Zhang § Abstract In this paper we present a 1. I have my factor of 2 approximation algorithm. Note: In the upcoming example, greedy is only as bad as 2−1/ , but you can also improve earlier analysis to show that greedy always gives 2−1/ approximation. die einen Knoten alle entknoten fest beider von jeder kannte die mitten drin ist und die Behauptung ist dass das nur 2 Approximation. (Francesco Maffioli, Mathematical Methods of Operations Research, Vol. While we still need to know how to solve the quadratic program e ciently, for now we focus on analyzing Algorithm (1). , that the algorithm terminates and produces a solution to the problem. For example,
{ "domain": "intelligentcontainer.de", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9869795118010989, "lm_q1q2_score": 0.8308646683043296, "lm_q2_score": 0.8418256492357358, "openwebmath_perplexity": 972.1502875536687, "openwebmath_score": 0.7901697754859924, "tags": null, "url": "http://jsiv.intelligentcontainer.de/2-approximation-algorithm.html" }
c++, utf-8 U32 NextUTF8Char(const char* str, U32& idx) Why not return a standard std::wchar_t? Or perhaps a char32_t? Similarly, str ought to be a const char8_t* (so that the example code compiles). I'd use a std::size_t for the index (or more likely get rid of idx altogether, and pass a reference to pointer instead). The whole thing seems like a reinventing a lot of work that's already done for you: #include <cwchar> char32_t NextUTF8Char(const char8_t*& str) { static const int max_utf8_len = 5; auto s = reinterpret_cast<const char*>(str); wchar_t c; std::mbstate_t state; auto len = std::mbrtowc(&c, s, max_utf8_len, &state); if (len > max_utf8_len) { return 0; } str += len; return c; }
{ "domain": "codereview.stackexchange", "id": 44997, "lm_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++, utf-8", "url": null }
opencv2, cv-bridge, image-transport In the tutorial the cv::Mat image is converted to a ROS image and encoded with the string "bgr8". I however have a CV_32F at my disposal. Now as far as I know what I have here is a 32bit float at hand while the encodings provided by cv_bridge go as far as 16bit (example: MONO16). My question is basically if it will be a problem to go to "mono8" in this case especially considering that the published imagery is meant just for viewing and no further processing will be done with it? If it is a problem, then how do I covert CV_32F using cv_bridge's available encodings? Thanks!
{ "domain": "robotics.stackexchange", "id": 22348, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "opencv2, cv-bridge, image-transport", "url": null }
quantum-mechanics, electromagnetism, differential-geometry, gauge-theory, topological-phase If the wave function is single-valued, then we should have a well-defined $\psi(\mathbf x_1)$, and we cannot have differing $\psi^+(\mathbf x_1)$ and $\psi^-(\mathbf x_1)$ wave functions. However, despite what the connection-theoretic background would suggest, we did not calculate a parallel transport actually, but a gauge transformation. So the two wave functions need not agree, as they are in different gauges. However, then, why do we compare them? Comparing them and saying they differ would be akin to comparing a vector to itself in two different coordinate systems and saying they differ, cause the components don't agree. So
{ "domain": "physics.stackexchange", "id": 50725, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, electromagnetism, differential-geometry, gauge-theory, topological-phase", "url": null }
graph-theory, co.combinatorics Title: Amplitude of Random Cubic Graphs Consider a connected random cubic graph $G=(V,E)$ of $n =|V|$ vertices, drawn from $G(n, 3$-reg$)$ (as defined here, i.e. $3n$ is even and any two graphs have the same probability). Of course there are $n$ possible Breadth First Searches, one for each starting node $s \in V$. A Breadth First Search $B_G$ starting at node $s \in V$ assigns a level $d(s, v)$ to each node $v \in V$, where $d(s, v)$ is the distance between $s$ and $v$ in $G$. Let us say that such a Breadth First Search $B_G$ also assigns a level $$ L(s, \{u,v\}) = \max\{ d(s,u), d(s,v) \}$$ to each edge $e=\{u,v\} \in E$.
{ "domain": "cstheory.stackexchange", "id": 1241, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "graph-theory, co.combinatorics", "url": null }
Here's how I calculated the electric field for a < r < b, using Gauss' Law: Q(enclosed) = Q + alpha * Integral(R, from a to r) = Q + (1/2)*alpha * (r^2 - a^2). E*A = Q(enclosed)/epsilon ==> E = (Q + (1/2)*alpha * (r^2 - a^2)) / (4*Pi*epsilon*r^2) Is this correct? Ah, I found the mistake I made in calculating the electric fields. Q(enclosed) should be Q + alpha * Integral(4 * r^3 * Pi, from a to r). However, I still don't get the correct answer for the potential at a < r < b. Here's what I did: Integrate((Q + alpha * Pi * (r^4 - a^4)) / (4 * Pi * eps * r^2)), from r to b) + Q / (4 * Pi * eps * r^2) This gives me: Q / (4 * Pi * eps * r) + (alpha * (b^3 - r^3)) / (12 * eps). If I stick in a for r, I should get Q / (4 * Pi * eps * a), which I don't. So it seems that my bounds are still wrong... Any hints? I've tried this problem in so many ways now that my head is burning... Thanks. ehild Homework Helper
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9591542805873231, "lm_q1q2_score": 0.8054344258004087, "lm_q2_score": 0.839733963661418, "openwebmath_perplexity": 515.8778281694625, "openwebmath_score": 0.8874920606613159, "tags": null, "url": "https://www.physicsforums.com/threads/electric-fields-and-potentials-of-a-point-charge-surround-by-a-charged-spherical-shel.468701/" }
dark-matter A galaxy with baryons, but without DM is more spectacular, but was reported recently by van Dokkum et al. (2018) (yes, the same guy). In another answer about DF2 I discuss various processes that might lead to such a galaxy, including misinterpretation of the data.
{ "domain": "astronomy.stackexchange", "id": 2865, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dark-matter", "url": null }
c++, xml main.cpp: #include "XmlWriter.h" int main() { XmlWriter xml; if (xml.open("C:\\Users\\UserNameHere\\Desktop\\test.xml")) { xml.writeOpenTag("testTag"); xml.writeStartElementTag("testEle1"); xml.writeString("This is my first tag string!"); xml.writeEndElementTag(); xml.writeOpenTag("testTag2"); xml.writeStartElementTag("testEle2"); xml.writeAttribute("testAtt=\"TestAttribute\""); xml.writeString("I sometimes amaze myself."); xml.writeEndElementTag(); xml.writeOpenTag("testTag3"); xml.writeStartElementTag("testEle3"); xml.writeAttribute("testAtt2=\"TestAttrib2\""); xml.writeString("Though i'm sure someone can make something even better"); xml.writeEndElementTag(); xml.writeCloseTag(); xml.writeCloseTag(); xml.writeCloseTag();
{ "domain": "codereview.stackexchange", "id": 28984, "lm_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++, xml", "url": null }
human-biology, eyes A person may observe the saccadic masking effect by standing in front of a mirror and looking from one eye to the next (and vice versa). The subject will not experience any movement of the eyes nor any evidence that the optic nerve has momentarily ceased transmitting. Due to saccadic masking, the eye/brain system not only hides the eye movements from the individual but also hides the evidence that anything has been hidden. Of course, a second observer watching the experiment will see the subject's eyes moving back and forth. The function's main purpose is to prevent smearing of the image.
{ "domain": "biology.stackexchange", "id": 754, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "human-biology, eyes", "url": null }
complexity-theory, satisfiability, p-vs-np This is also different from XOR-SAT as it is not linear and so Gaussian elimination is not an option. The answer might be using Schaefer's dichotomy theorem, but I'm not sure if it applies or not. This is similar to this question but the OP was not clear about question and there is also no clear answer, so I'm asking a clear one here. If you are asking about the problem where the input is a system of equations in ANF (algebraic normal form) and the output is whether the system of equations is satisfiable, this problem is NP-complete. There is a reduction from 3SAT. Suppose we have a 3CNF formula $\varphi = C_1 \land \cdots \land C_m$, where $C_i$ is the $i$th clause in $\varphi$, with variables $x_1,\dots,x_n$. We'll create a system of ANF equations that are satisfiable iff $\varphi$ is satisfiable, as follows. First, let's take care of any negations in $\varphi$. For each variable $x_i$, introduce another variable $y_i$, along with the ANF equation $$1 \oplus x_i \oplus y_i = 0.$$
{ "domain": "cs.stackexchange", "id": 20328, "lm_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, satisfiability, p-vs-np", "url": null }
Since $\mathbb{N}^X_\mathrm{fin}$ is a submonoid of $\mathbb{N}^X$, therefore, it can be viewed as a commutative monoid in its own right; its elements are precisely those $\mathbb{N}$-valued multisets in $X$ that are finitely supported. Now it is well known the commutative monoid $\mathbb{N}^X_\mathrm{fin}$ satisfies the universal property of "free (additively denoted) commutative monoid on $X$." In fact, not only is $X$ a basis of $\mathbb{N}^X_\mathrm{fin},$ but in fact, it is the only basis. Hence: Proposition. Every commutative monoid $C$ has at most one basis. (The concept "idempotent commutative monoid" also has this remarkable property.)
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9843363489908259, "lm_q1q2_score": 0.8265806599660777, "lm_q2_score": 0.8397339596505965, "openwebmath_perplexity": 203.84582501835078, "openwebmath_score": 0.9159128069877625, "tags": null, "url": "http://math.stackexchange.com/questions/2879/mapping-natural-numbers-into-prime-exponents-space" }
general-relativity, black-holes, spacetime, anti-de-sitter-spacetime The surfaces of constant $t$ and $r$ are symmetric and as expected; everything looks in order. Special thanks to Yukterez for his hint. [1] M. Socolovsky, Schwarzschild Black Hole in Anti-De Sitter Space, Advances in Applied Clifford Algebras, 28 (2018).
{ "domain": "physics.stackexchange", "id": 98314, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, black-holes, spacetime, anti-de-sitter-spacetime", "url": null }
ros, navigation, footprint, dwa-local-planner Title: dwa_local_planner: in place rotation FIRST goal does not work When running the navigation with dwa_local_planner, and give the first goal as an in place rotation, the robot won't move (except for recovery behaviors), and gives the below output. But, if you give a translation goal first, it moves normally, and from then on, it can rotate in place without a problem. [ERROR] [...]: Footprint spec is empty, maybe missing call to setFootprint? [ WARN] [...]: Invalid Trajectory 0.000000, 0.000000, -0.401014, cost: -9.000000 [ WARN] [...]: Rotation cmd in collision [ INFO] [...]: Error when rotating. I think the error actually comes from line 80 in obstacle_cost_function.cpp at base_local_planner, something about the footprint is not properly initialized: double ObstacleCostFunction::scoreTrajectory(Trajectory &traj) { ... if (footprint_spec_.size() == 0) { // Bug, should never happen ROS_ERROR("Footprint spec is empty, maybe missing call to setFootprint?"); return -9; } ...
{ "domain": "robotics.stackexchange", "id": 21103, "lm_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, navigation, footprint, dwa-local-planner", "url": null }
print "hello world" # I indented these lines # 4 spaces, and now they show # up as a code block. print "hello world" MathAppears as Remember to wrap math in $$...$$ or $...$ to ensure proper formatting. 2 \times 3 $$2 \times 3$$ 2^{34} $$2^{34}$$ a_{i-1} $$a_{i-1}$$ \frac{2}{3} $$\frac{2}{3}$$ \sqrt{2} $$\sqrt{2}$$ \sum_{i=1}^3 $$\sum_{i=1}^3$$ \sin \theta $$\sin \theta$$ \boxed{123} $$\boxed{123}$$ Sort by: $\underbrace{ 6666\ldots6 }_{n \text{ numbers of 6's}} = \dfrac{6}{9}(10^n - 1) = \dfrac{2}{3}(10^n - 1)$ $\underbrace{8888\ldots8 }_{n \text{ numbers of 8's}} = \dfrac{8}{9}(10^n - 1)$ $\underbrace{ 4444\ldots4 }_{2n \text{ numbers of 4's}} = \dfrac{4}{9}(10^{2n} - 1)$
{ "domain": "brilliant.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692325496973, "lm_q1q2_score": 0.8358834774988951, "lm_q2_score": 0.8558511414521923, "openwebmath_perplexity": 7716.535829773786, "openwebmath_score": 0.9995301961898804, "tags": null, "url": "https://brilliant.org/discussions/thread/principle-of-mathematical-induction-2/" }
geology, geophysics, earth-history, core If you get more interested in this I can fully recommend "McSween, Harry Y. (1999). Meteorites and their parent planets (2. ed. ed.). Cambridge [u.a.]: Cambridge University Press. ISBN 978-0521583039." which is very enjoyable to read and because of its descriptive approach not outdated. The newer book is also very good "Huss, Harry Y. McSween, Jr., Gary R. (2010). Cosmochemistry. Cambridge: Cambridge University Press. ISBN 978-0521878623.".
{ "domain": "earthscience.stackexchange", "id": 84, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "geology, geophysics, earth-history, core", "url": null }
If you throw your coin $n$ times you have $2^n$ outcomes, the probability of each of which is $\frac{1}{2^n}$. The larger $n$ is, the better you can divide $2^n$ into three approximately equal parts: Just define $a_n=[2^n/3]$ and $b_n=[2\cdot 2^n/3]$, where $[\cdot]$ denotes rounding off (or on). Since $\frac{a_n}{2^n}\to\frac{1}{3}$ and $\frac{b_n}{2^n}\to\frac{2}{3}$ as $n\to\infty$, each of the three outcomes "the number of Heads is between $0$ and $a_n$", "the number of Heads is between $a_n$ and $b_n$", and "the number of Heads is between $b_n$ and $2^n$" has approximately the probability $\frac{1}{3}$. Alternatively, you could apply your procedure to get four outcomes with the same probability (Heads-Heads, Tails-Tails, Heads-Tails, Tails-Heads) to your problem in the following way: Associate the three outcomes Heads-Heads, Tails-Tails, Heads-Tails with your three possible choices. In the case that Tails-Heads occurs, just repeat the experiment.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399026119353, "lm_q1q2_score": 0.8021087705672685, "lm_q2_score": 0.8267117940706734, "openwebmath_perplexity": 798.5174683652874, "openwebmath_score": 0.7787874937057495, "tags": null, "url": "http://math.stackexchange.com/questions/2356/is-it-possible-to-split-coin-flipping-3-ways/2357" }
algorithm-analysis, probability-theory How many assignments is the algorithm expected to make to second_largest? I can see the asymptotic lower and upper bounds on the problem, but how can I approach this probabilistically and give the expected number of assignments?
{ "domain": "cs.stackexchange", "id": 9644, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm-analysis, probability-theory", "url": null }
object-oriented, vba, collections Changes the Application State to improve performance Retrieves a folder path from a `Application.FileDialog(msoFileDialogFolderPicker) Loops through all the files in a directory Add a KeyValue class to a collection by calling AddItemsToCollection for each file in the directory Prints the code results to the Immediate Window Resets the Application State
{ "domain": "codereview.stackexchange", "id": 28210, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "object-oriented, vba, collections", "url": null }
newtonian-mechanics, newtonian-gravity, simulations, sun, software Title: Would an object falling on the surface of the Sun look like this? I've been playing around with some rustic animation and then I came to simulating gravity over squishy objects, I simulated a squishy ball of unknown "squishiness" (I'm sorry I don't know a lot of things related to physics, or the world in general :P), and on earth the escape velocity is ~9.81m/2² so I tried to create something that would simulate an object falling on earth (with no air resistance), from a height of 4.9M, it took a nice(roughly) 0.5s to hit the ground (I added some bouncing), then I searched for the sun's escape velocity and I found that it was 171ms(probably wrong), but when I did the simple math 4.9m/171m/s² = 0.02s, so the animation looked something like what I made below using jQuery. My question is, would an object falling on the sun look like on my animation (ignoring the fact of the extreme heat and other stuff)? See the animation here <!DOCTYPE html> <html> <head>
{ "domain": "physics.stackexchange", "id": 26521, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, newtonian-gravity, simulations, sun, software", "url": null }
javascript, beginner, jquery, html, css // Functions (JQuery) // Main menu onClicks handler $("#btMenu").click(function() { $("#liMainMenu").toggle("slow"); }); $("#btStarter").click(function() { $("#liStarter").toggle("slow", function() { if ($(this).css("display") == "none") { $("#btStarter").css("background-color", "black"); } else { $("#btStarter").css("background-color", "blue"); } }); }); $("#btMain").click(function() { $("#liMain").toggle("slow", function() { if ($(this).css("display") == "none") { $("#btMain").css("background-color", "black"); } else { $("#btMain").css("background-color", "blue"); } }); }); $("#btDessert").click(function() { $("#liDessert").toggle("slow", function() { if ($(this).css("display") == "none") { $("#btDessert").css("background-color", "black"); } else { $("#btDessert").css("background-color", "blue"); } }); });
{ "domain": "codereview.stackexchange", "id": 20476, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, beginner, jquery, html, css", "url": null }
electrostatics, electric-fields, polarization, dielectric Personally, I think that the whole Maxwellian invocation of averaged fields is a crazy hack that is really bad for the conceptual understanding of the subject. But alas, we have to work with stuff that people have already done a lot of prior work on. You should also read the yellow highlighted part in that document, because he specifically says that the average field is different from the locally felt field at least in the fact that you removed one charge/dipole in the locally felt field, whereas the averaged field contains everything. A dipole in the system you are considering as the locally felt field really should not be feeling the field due to itself!
{ "domain": "physics.stackexchange", "id": 95303, "lm_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, polarization, dielectric", "url": null }
observational-astronomy, history, james-webb-space-telescope Oversubscription rates vary by cycle, science program category and instrument but approx. people ask for four times as much time on Hubble as is available and the selection rate for proposals is about 20%. So 80% of the people who apply with detailed science and observing plans for what they want to do get nothing and no observing time. Given this oversubscription rate, if you propose to randomly point the telescope and have no idea what you're going to see and whether it will produce anything to justify the time spent, your proposal will get a very low grade and zero time awarded.
{ "domain": "astronomy.stackexchange", "id": 6608, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "observational-astronomy, history, james-webb-space-telescope", "url": null }
I'd highlight that this means care is needed to derive the $$\frac{T_1 T_2}{T_1 - T_2}$$ formula - for example, it's not enough to just solve for the times when the pendulums have the same (angular) position, because there are many earlier times where this happens, but requiring that the pendulums are in phase is a much stronger condition. Also, one has to explicitly use the fact that we are interested in the first time they are back in phase, because it's true that the $$0.9$$-second-period pendulum and the $$2$$-second-period pendulum are in phase after $$18$$ seconds - the tricky thing is that there was an earlier time where they were already in phase. Basically, the correct way to derive that formula would be to say we are solving for the earliest time $$t$$ such that the difference between $$t/T_1$$ and $$t/T_2$$ is an integer.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9808759632491111, "lm_q1q2_score": 0.8997601331384014, "lm_q2_score": 0.9173026629768591, "openwebmath_perplexity": 462.6578848021551, "openwebmath_score": 0.7544134855270386, "tags": null, "url": "https://physics.stackexchange.com/questions/701918/does-this-question-have-two-answers-correct" }
recurrence-relation Note that the constant $A$ can be chosen depending on $T(1)$ and such that the $\mathcal{O}(n)$ in your relation is $\leqslant An$.
{ "domain": "cs.stackexchange", "id": 20575, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "recurrence-relation", "url": null }
homework-and-exercises, electromagnetism, magnetic-fields, electric-current Title: Magnetic field at center of rotating charged sphere Let $\Sigma$ be a sphere of radius $R$ charged with uniform surface density $\sigma$. Supposing $\Sigma$ rotates with constant angular velocity $\omega$, calculate the magnetic field at the center of the sphere.
{ "domain": "physics.stackexchange", "id": 45827, "lm_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, electromagnetism, magnetic-fields, electric-current", "url": null }
Analysis Time and space complexity. What is the worst case time complexity of BFS algorithm?. Completeness: BFS is complete, meaning for a given search tree, BFS will come up with a solution if it exists. …Consider an array like the one shown here. Graph search algorithms like breadth. On the other hand, searching is currently one of the most used methods for finding solution for problems in real life, that the blind search algorithms are accurate, but their time complexity is exponential such as breadth-first search (BFS) algorithm. Here's what you'd learn in this lesson: Bianca walks through a method that performs breadth first search on a graph and then reviews the solution's time complexity. The above implementation uses adjacency matrix representation though where BFS takes O(V 2) time, the time complexity of the above implementation is O(EV 3) (Refer CLRS book for proof of time complexity). For example, analyzing networks, mapping routes, and scheduling are graph problems. worst
{ "domain": "solotango.it", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702398991698342, "lm_q1q2_score": 0.9075105082061864, "lm_q2_score": 0.9353465147977104, "openwebmath_perplexity": 1105.8471170780324, "openwebmath_score": 0.5393127202987671, "tags": null, "url": "http://tdgl.solotango.it/bfs-time-complexity.html" }
complexity-theory, reductions One way to think of this is as follows: consider the sequence of functions $\left\{f_{s ,c}\right\}_{c\in\mathbb{N}, s\in\{0,1\}^*}$ where $f_{s, c}(x)=\left(s, x, 1^{|x|^c}\right)$. Since $L'\in P$, there exists a function in this sequence which is a reduction from $L'$ to $L$ (the specific index depends on the machine deciding $L'$, but we don't really care about it).
{ "domain": "cs.stackexchange", "id": 9381, "lm_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, reductions", "url": null }
Eigenvectors are never unique. In particular, for the eigenvalue $2$ you can take, for example, $x_2=-1$ which gives you the answer in the book. • So what you are saying is that both I and the book's answers are correct? So its just a matter of preference? – Jules Manson Jan 23 '16 at 23:24 • Precisely, and in fact you could take for $x_2$ any nonzero real number. – John B Jan 23 '16 at 23:26 • In your original post, you said that the problem was to find an eigenbasis. In other words, since there are three distinct eigenvalues, find one eigenvector for each eigenvalue. Which one you choose out of the infinite number of eigenvalues that correspond to each eigenvalue is "a matter of preference" but it is important that you understand that any multiple of an eigenvector is also an eigenvector. – user247327 Dec 13 '16 at 16:18
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464471055739, "lm_q1q2_score": 0.88289047748551, "lm_q2_score": 0.9046505370289057, "openwebmath_perplexity": 247.0337446583284, "openwebmath_score": 0.9983172416687012, "tags": null, "url": "https://math.stackexchange.com/questions/1624236/finding-eigenvectors-of-a-3x3-matrix-7-12-15/1624242" }
cc.complexity-theory, graph-theory Is there a P/NP-complete dichotomy theorem for natural interesting properties of cubic graphs?
{ "domain": "cstheory.stackexchange", "id": 2463, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cc.complexity-theory, graph-theory", "url": null }
javascript, jquery, plugin I think that you would get a cleaner interface by developing using something called the revealing module pattern, there is an excellent resource on various design patterns by a guy called Addy Osmani at adyosmanio.com and the revealing module pattern specifically here. This (or a flavor of it) is commonly used in jQuery plugin development which you can see on the jQuery advanced plugin development page (see Keep private functions private). By following these principles you can keep the private stuff private and only expose the functions that you want the calling code to have access to. You mentioned specifically showPopup(), hidePopup() and updateColor(newColor) so a quick example of how that might look. ;(function($) { var ColorPickerSliders = function($element, options) { //if you want publicly modifiable configuration options. var defaults = { "opacity": 0, "hsl": 1, ... };
{ "domain": "codereview.stackexchange", "id": 4449, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, plugin", "url": null }
members. If you are consitent about which way you go around the triangle, the orgin can be anywhere, as it will subtract tnegative areas automatically. Moment of Inertia of a Triangular Lamina about its Base. r2 x2 y2 Therefore, I z I. Center of mass, moments of inertia, volume of a body of rotation. Which 'inertia' is meant (bending, twisting, or kinetic) is also usually clear from the context, and from the units : moments of area have units of length to the fourth power [ L 4 ], whereas the mass moment of. 8·10-2 Kg·m2 Submit Figure < 1of1 Incorrect; Try Again: 3 Attempts Remaining Part B What Is The Triangle's. calculate the moment of inertia when the plate is rotating about an axis perpendicular to the plate and passing through the vertex tip. Area Moments of Inertia Parallel Axis Theorem • Moment of inertia IT of a circular area with respect to a tangent to the circle, ( ) 4 4 5 4 2 2 4 2 1 r IT I Ad r r r π π π = = + = + • Moment of inertia of a triangle with respect to a. Once
{ "domain": "ilegnidimarcello.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9881308779050736, "lm_q1q2_score": 0.825567085040988, "lm_q2_score": 0.8354835411997897, "openwebmath_perplexity": 336.1724646115016, "openwebmath_score": 0.6558020114898682, "tags": null, "url": "http://ilegnidimarcello.it/ckaz/moment-of-inertia-of-triangle.html" }
Limit of $\sqrt[2n+1]{n^2+n}$ Prove $a_n=\sqrt[2n+1]{n^2+n}$ tends to $1$ as $n$ tends to infinity. In the textbook, a hint was given: Let $a_n=1+h$, then $n^2+n=(1+h)^{2n+1}\gt \binom{2n+1}{3}(h^3)$ Then the consecutive steps are some algebraic manipulation, I managed to prove that $$\sqrt[3]{\frac{1}{n+1}+\frac{1}{n^2}}\gt \sqrt[2n+1]{n^2+n}-1\gt0$$ So $a_n$ tends to $1$ as $n$ gets sufficiently large. But I don't understand why $a_n$ was set as $1+h$ at the first place, in retrospective, this does make calculations a lot convenient. And how did the author know when to use the binomial coefficient and compare the fourth term, it seems the author just plucked it out of thin air. • Because if $a_n$ tends to $1$ then $h$ tends to $0$, and that's nice. – Vincenzo Oliva Aug 9 '15 at 10:28
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9817357243200244, "lm_q1q2_score": 0.811612497764395, "lm_q2_score": 0.8267117898012104, "openwebmath_perplexity": 153.49979948508727, "openwebmath_score": 0.9607197642326355, "tags": null, "url": "https://math.stackexchange.com/questions/1390632/limit-of-sqrt2n1n2n" }
However we already know: $$\int_1^4 \ln(x)\,dx=4\ln(4)-3 \text{ Therefore: } \int_{\ln(1)}^{\ln(4)}ue^u \, du=4\ln(4)-3$$ which is easier.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9706877726405082, "lm_q1q2_score": 0.8109936477443289, "lm_q2_score": 0.8354835309589074, "openwebmath_perplexity": 351.78818128371137, "openwebmath_score": 0.8933569192886353, "tags": null, "url": "https://math.stackexchange.com/questions/2400159/area-under-the-graph-y-ln-x" }
operating-systems, memory-management, paging Title: Can this question be solved without knowing the Page Table Entry? I'm preparing for the exams and this question came up - Consider a machine with $64MB$ physical memory and a $32$-bit virtual address space. If the page size is $4KB$, what is the approximate size of the page table? (A) 16MB (B) 8MB (C) 2MB (D) 24MB The way I've solved it - Physical Address Space = $64MB = 2^{26}B$ Virtual Address = $32$-bits, $\therefore$ Virtual Address Space = $2^{32}B$ Page Size = $4KB=2^{12}B$ Number of pages =$\,\Large\frac{2^{32}}{2^{12}}$$=2^{20}$ pages. Number of frames =$\,\Large\frac{2^{26}}{2^{12}}$$=2^{14}$ frames. $\therefore$ Page Table Size = $2^{20}\times 14\,bits \approx 2^{20}\times 16\,bits\approx 2^{20}\times 2B= 2MB.$
{ "domain": "cs.stackexchange", "id": 5262, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "operating-systems, memory-management, paging", "url": null }
context-free Title: Is the intersection of any context free language and the set of all palindromes context free? Let $L$ be any context-free language. Is the set of all palindromes that are elements of $L$ also context-free? I know that the intersection of context free languages isn't guaranteed to be context free, so I can't apply that here. I also thought of maybe using the fact that $\{0^{n}1^{n}0^{n}|n ≥ 0\}$ is not context free as all elements in the set are palindromes, but I don't know what context free language to intersect it with. Nice question, and your intuition almost gave you an answer. Simply check the intersection of language $\{0^n 1^n 0^+\,|\,n>0\}$ with the palindrome language :)
{ "domain": "cs.stackexchange", "id": 19798, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "context-free", "url": null }
javascript, html, css, chess </section> <section class="row rank-1"> <div class="square file-a white rook"></div> <div class="square file-b white knight"></div> <div class="square file-c white bishop"></div> <div class="square file-d white queen"></div> <div class="square file-e white king"></div> <div class="square file-f white bishop"></div> <div class="square file-g white knight"></div> <div class="square file-h white rook"></div> </section> <section class="rowFileLegend"> <p class="legend">A</p> <p class="legend">B</p> <p class="legend">C</p> <p class="legend">D</p> <p class="legend">E</p> <p class="legend">F</p> <p class="legend">G</p> <p class="legend">H</p> </section> <nav>
{ "domain": "codereview.stackexchange", "id": 13865, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, html, css, chess", "url": null }
quantum-mechanics, second-quantization I don't find this very convincing either. Is there any way to prove the above transformation relations for the creation operators? This is a messy question, because the Fock states over the different bases are different: that is, the state $$ |n_1,n_2,n_3,\ldots\rangle_\lambda $$ means a state with $n_1$ particles in state $|\lambda_1\rangle$, $n_2$ particles in state $|\lambda_2\rangle$, and so on, and this is pretty messy if you try to expand all of those $|\lambda_j\rangle$ states into the $|i\rangle$ basis. However, the structure is a bit easier to understand if you go back to the initial definition, as $$ |\{n\}\rangle_\lambda = \frac{1}{\sqrt{N!}}\sum_{P\in S_N}(\pm1)^P P |\lambda_1\rangle^{\otimes n_1} |\lambda_2\rangle^{\otimes n_2} |\lambda_3\rangle^{\otimes n_3}\cdots|\lambda_k\rangle^{\otimes n_k}, $$ and to the action of $a_{\lambda_1}^+$ on that basis, $$ a_{\lambda_1}^+ |\{n\}\rangle_\lambda = \frac{1}{\sqrt{(N+1)!}}\sum_{P\in S_{N+1}}(\pm1)^P
{ "domain": "physics.stackexchange", "id": 98217, "lm_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, second-quantization", "url": null }
java, object-oriented, memory-management, simulation import java.util.*; import java.io.*; /** * Creates nodes to be used as data containers in the Memory class */ class Node { boolean segment; // Equals false if this Node represents a hole int location; // Position in memory of first byte int size; // Size that node occupies int timeToDepart; // Only valid when this Node represents a segment Node next; /** * Constructor for generating a segment in memory * * @param locn location of node to be created * @param sz size of node to be created * @param endOfLife the timeOfDay node is to depart * @param nxt specifies the next node to reference in the list */ Node (int locn, int sz, int endOfLife, Node nxt) { segment = true; location = locn; size = sz; timeToDepart = endOfLife; next = nxt; }
{ "domain": "codereview.stackexchange", "id": 12826, "lm_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, object-oriented, memory-management, simulation", "url": null }
python, beginner, parsing, csv On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains
{ "domain": "codereview.stackexchange", "id": 15859, "lm_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, parsing, csv", "url": null }
lowpass-filter, finite-impulse-response The picture shows such a design and the very broad transition band. The red is the desired and blue obtained frequency response. I've weighted the bands accordingly. Also I'm not talking about bandpass, nor lowpass, I design a differentiator - thus the linear slew rate in low frequencies. There are limits to the possible lowpass frequency, correct? How can I make the cutoff even smaller, or even better: why is this degradation happening? I know, that the frequency response in my formulation has the form $$ H(e^{j\omega}) = 2\sum_{k=0}^M j \,h(k)\, \sin(k \omega) $$ where $M$ is $(N-1)/2$ with order $N$ filter. And thus the shape can be better traced by having longer filters. But the gain actually is very small. Also I read, that with a derived then sampled Blackman Window (without control over cutoff frequency) one obtains a cutoff of around $\omega_C \approx 0.005$, while I struggle with $0.1$... I want to know why exactly.
{ "domain": "dsp.stackexchange", "id": 5384, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lowpass-filter, finite-impulse-response", "url": null }
python, networking def deleteDirectory(self, dirpath, share=None): if share!=None: self.shared=share # Check if Path already exists if len(self.conn.listPath(self.shared, dirpath))!=0: return try: self.conn.deleteDirectory(self.shared, dirpath) except: raise ServerException("Deletion of Directory <%s> failed using %s"%(dirpath, self)) if __name__=="__main__": import argparse, getpass import Networking, socket logger=logging.getLogger("ServerAccess") parser=argparse.ArgumentParser(description="Server Access Library") parser.add_argument('--host', type=str, required=True, dest='host') parser.add_argument('-u', '--user', type=str, required=True, dest='user') parser.add_argument('-p', '--password', dest='usePW', default=False, action='store_true') parser.add_argument('-s', '--share', type=str, dest='share', default="")
{ "domain": "codereview.stackexchange", "id": 16782, "lm_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, networking", "url": null }
type-theory, dependent-types, homotopy-type-theory, cubical-type-theory These constructors we've used have meaning to us, and we want the answer to be written in terms of them. So, for instance, suc (suc (suc zero))) is a valid, meaningful result of our computation. Canonicity says essentially that every closed computation of type ℕ we write is able to be reduced to such a meaningful numeral. Or, if we don't want to talk about 'reduction', it is "convertable" or "judgmentally equal" to such a numeral, or similar. But of course, if we're programmers, we probably want that convertability to eventually turn into reduction for at least some stuff. The reason homotopy type theory (at least, at the time of the book) does not have this property is that there was no known computational behavior for univalence; it was just added to the theory as an 'axiom,' and you could then use it in ways where computations would just get stuck. So, in that situation, you can sometimes write closed terms of type ℕ that might look like J (...) (ua ...) ...
{ "domain": "cs.stackexchange", "id": 14503, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "type-theory, dependent-types, homotopy-type-theory, cubical-type-theory", "url": null }
c#, io, networking if(totalBytesRead < expLength) { // should probably throw something here throw new IOException(); } } return response; } I don't like the way I have written this code esp with two exception throwing. Is there a more elegant way to write the code? You should never throw an empty exception. Imagine someone uses your code and receives an empty IOException. What happened? How do you debug this? First, you need a message that explains the situation. Second, you should use this constructor : IOException(String, Exception). This way, the exception you throw will contain the real exception, the one that causes problem. This will help debugging your code. if(totalBytesRead < expLength) { // should probably throw something here throw new IOException(); }
{ "domain": "codereview.stackexchange", "id": 26915, "lm_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#, io, networking", "url": null }
programming-languages, semantics, natural-language-processing, syntax language. So the proper answer to the question is that even model theory has a concept of syntax and semantics, where syntax is a theory, i.e. a formal representation structure such as a universal algebra, and semantics is an interpretation (i.e. a morphism) in some abstract mathematical domain. Hence the "duality syntax/semantic" is already present in model theory. There is nothing new on that side. However, what may make a difference is the understanding of the word language, as it could be interpreted as going beyond what is usually concerned by the syntactic algebras usually addressed by model theory. Actually, the question does not define the word language, and it could be formal languages, programming languages, natural languages, with some unsaid understanding of what is intended. So two possible answers could be:
{ "domain": "cs.stackexchange", "id": 5070, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "programming-languages, semantics, natural-language-processing, syntax", "url": null }
The final step is calculating the probability of $E$ $$P(E) = P(F_1 \cup F_2 \cup F_3) = \sum_{i=1}^3P(F_i) = \frac{3}{8}$$ Note that in this case (and in many other experiments), all the outcomes in the sample space are equally likely to occur. For such experiments, we can simplify the sample-point method as $$P(E) = \frac{\text{# of outcomes in }E}{\text{# of outcomes in }S}$$ ### Powerball example The Powerball is one of the largest lottery games in the US. The system works like this: 1. $5$ numbered white balls are drawn out of $69$ balls without replacement. 2. $1$ numbered red ball is drawn out of $26$ balls. You win the Powerball if you chose exactly those $5+1$ balls, and the order of the white balls doesn’t matter. What is the probability to win a Powerball? It’s reasonable to assume each outcome will be equally likely to occur. Each outcome is a set of $6$ numbers satisfying the above rules.
{ "domain": "y1zhou.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9905874123575265, "lm_q1q2_score": 0.8004612100841885, "lm_q2_score": 0.8080672135527632, "openwebmath_perplexity": 503.3690698767469, "openwebmath_score": 0.9999449253082275, "tags": null, "url": "https://y1zhou.com/courses/mathematical-statistics-basic-concepts/" }
is a factor that can be used to calculate the present value of a series of annuities. Are Variable Annuities Subject to Required Minimum Distributions? A common example is rent, where the renter typically pays the landlord in advance for the month ahead. A mortgage loan dated June 1, … May 21, 2019 May 21, 2019; As we age, there are two issues we fear. you are saving$1,000 each month and there is equal time … So it is trading at a premium. One is maintaining good health. Examples:Home Mortgage payments, car loan payments, pension payments. Mr. X wants to make yearly payments. For anannuity - certain, the payments are made for a fixed (finite) period of time, called the term of the annuity. The ordinary annuity is an annuity, a stream of cash flows that occur after equal interval, in which each periodic cash flow occurs at the end of each period. A Bond will pay 5 million Dollars after 5 Years. In either event, fixed annuity … The formula for an annuity due is as follows: If the annuity
{ "domain": "com.br", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9744347838494567, "lm_q1q2_score": 0.8243157303708168, "lm_q2_score": 0.8459424314825853, "openwebmath_perplexity": 1631.501933402308, "openwebmath_score": 0.42821651697158813, "tags": null, "url": "https://www.clubecorretora.com.br/common-types-zqlnmqc/fefb12-ordinary-annuity-examples" }
By creating a Python script to simulate 100,000 games, the probability of the second player winning hovers around $$0.532$$. Yet, I suspected it to be $$0.495$$ since each players' last number could be any number from $$1$$ to $$100$$ since $$S \leq 100$$ is met to allow them to keep generating numbers. The same goes for player two and $$S \leq 200$$. Since each number seems equally likely, I found: $$P(y > x) = \frac{99 \cdot 100}{2} \cdot \frac{1}{100^2} = 0.495$$ But this is definitely not correct as the simulation shows. Where is the problem in my analysis? I made sure I used a uniform distribution for generating numbers in my simulation.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9895109101320037, "lm_q1q2_score": 0.8224251116668136, "lm_q2_score": 0.8311430457670241, "openwebmath_perplexity": 393.7992695457474, "openwebmath_score": 0.648831844329834, "tags": null, "url": "https://math.stackexchange.com/questions/3235173/what-is-the-probability-that-the-second-player-will-win-in-this-random-game" }
python, beautifulsoup Note: Do not rely on long, terrible, possibly dynamically-generated CSS class names If you want to reuse this class to repeatedly fetch prices, then the members should be the session and the URL, and the data should be restricted to the function Don't write access granted. Other than it being corny, you should only throw an exception if there's a failure, not write to stdout if there's a success in the data retrieval method. Such progress indicators are best left to the calling function above. Just index into the cells. Don't use the modulus.
{ "domain": "codereview.stackexchange", "id": 36314, "lm_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, beautifulsoup", "url": null }
javascript, regex, palindrome, ecmascript-6 Article in question: https://blog.devmastery.com/how-to-win-the-coding-interview-71ae7102d685 My Implementation: Even though the article provides a way to solve it, my implementation is different in a few ways, so I would like your reasoning on it. /* * Reverses a given string of characters * * @param {string} string - the string to reverse * @returns {string} - the reversed string * */ const reverseString = string => string.split('').reverse().join('');
{ "domain": "codereview.stackexchange", "id": 40665, "lm_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, regex, palindrome, ecmascript-6", "url": null }
java, logging static { myMainThread_ = Thread.currentThread(); } This could be written as private static final Thread myMainThread_ = Thread.currentThread(); It's pretty fragile. Your "main thread" is defined as the thread which caused the loading of AppTester. So when I call AppTester.whatever in my main, open a JFrame, and let main exit normally, then your "main thread" is gone, although the relevant thread (AWT) is still running. The proper solution would be to use deamon threads in the scheduler. public static boolean getGenerateLogFiles() { return printToLogFile_; } Decide what's the better name and stick with it. public static void setMyDebugLevel(Rank level) { myRank_ = level; } Again, "level", "debugLevel", or "myRank"? ... skip ... skip ... public static void killApplication(Throwable t, String messsage) {
{ "domain": "codereview.stackexchange", "id": 14932, "lm_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, logging", "url": null }
B-A-B. Similarly, a B move would be replaced with A+B+A, with the corresponding interpretation of angle rotation (I believe it also makes sense to add an extra reorientation rotation at the start of this, but evidently this just gets canceled out.) </p> <p>One could easily find other ways to make the traverse that would also express these fundamental symmetries, and arrive at different systems generating the Sierpinski triangle.</p> http://mathoverflow.net/questions/128472/a-question-on-cofinite-topology/128475#128475 Answer by Joel David Hamkins for A question on cofinite topology. Joel David Hamkins 2013-04-23T13:04:24Z 2013-04-23T13:10:40Z <p>You should mean $\{x\}=\bigcap\xi$, and the answer is clearly yes, since we can take $\xi$ equal to the set of all open sets containing $x$. Any point $y$ other than $x$ is excluded in this intersection by the open set $X-\{y\}$. The cardinality of this $\xi$ is the same as the number of finite subsets of $X$, which is equinumerous with $X$.
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9621075739136381, "lm_q1q2_score": 0.8324386563542616, "lm_q2_score": 0.8652240964782011, "openwebmath_perplexity": 380.9785412055225, "openwebmath_score": 0.8968687653541565, "tags": null, "url": "http://mathoverflow.net/feeds/user/1946" }
quantum-mechanics, quantum-information, quantum-measurements The mathematical description of the two things above seem very similar except that POVMs involve the additional step of picking a specific outcome $i$. I'm not sure how to express this as a channel. Moreover, if I could write the POVM as a channel, then how exactly does Naimark's theorem become a special case of the Stinespring dilation? TL;DR 1) How do I write the POVM above as a quantum channel? 2) If I can do 1), what is the connection between the Stinespring dilation of this channel and Naimark's theorem? I would say it is the opposite: Channels are special cases of measurements (where you forget the outcome). In particular, in the Stinespring you have a partial trace $\mathrm{Tr}_E$, which you can think of as measuring the ancilla system $E$ -- this gives exactly the construction from Naimark's theorem -- and then forgetting the result, that is, summing over all (unnormalized) post-measurement states.
{ "domain": "physics.stackexchange", "id": 60801, "lm_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-measurements", "url": null }