text
stringlengths
1
1.11k
source
dict
the-sun, gas, solar-flare, solar-storm As far I know, too much surprising results aren't expected from this - most likely, the electron neutrino mass of some tenths of eV will be found, or possible the result will be that the experiment is not enough precise to find anything. (In this case, we will still get an "upper limit"). However, there is a little chance that some surprising result will happen. For example, such a neutrino mass could be found, which can be explained only by some hyphotetical effect (like sterile neutrinos, which might also contribute to the solution of the dark matter problem). The idea Go back to the 80ties, where a possible solution to the solar neutrino problem was a different working and internal structure of the Sun, which looks the same for us, but generates lesser neutrinos. By analogy, a similarly different Sun should be expected, which goes into a red giant phase soon. (Or, at least its luminosity will increase enough in the near future to make the Earth inhabitable).
{ "domain": "astronomy.stackexchange", "id": 3468, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "the-sun, gas, solar-flare, solar-storm", "url": null }
energy, electricity Now, the energy density of gasoline is 120 MJ per US gallon (42.4 MJ/kg), so the amount of fuel required to recharge the battery, including all the inefficiencies, is 30 kJ $\div$ 120 MJ/gal = 0.00025 US gallon. So, the “crossover” idle time in this case, above which it is more efficient to stop and restart, is 0.00025 gal $\div$ 0.3 gal/hour $\approxeq$ 8.3 $\times10^{-4}$ hours, or about 3 seconds. Now suppose an air conditioner (PDF) is consuming 1 kW of electrical power.
{ "domain": "physics.stackexchange", "id": 27374, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "energy, electricity", "url": null }
java, beginner, object-oriented, playing-cards if (dealer.getHandSum() == 21) { System.out.println("Blackjack! Dealer won."); losses = losses + 1; gameOver = true; } if (dealer.getHandSum() > 21) { System.out.println("Dealer busted with " + dealer.getHandSum() + " in their hand. You win!"); wins = wins + 1; gameOver = true; } } else { //Stay System.out.println("Dealer chose to stay!"); System.out.println(""); int totalDealerSum = dealer.getHandSum(); int totalPlayerSum = player.getHandSum();
{ "domain": "codereview.stackexchange", "id": 40479, "lm_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, object-oriented, playing-cards", "url": null }
d_P^2(X_1,X_2):=\min\ D_{POPA}^2(\frac{X_1}{\|X_1\|},\frac{X_2}{\|X_2\|})\tag{12} Calculating POPA distance, unlike the FOPA distance, does not involve additional scaling of the the (pre-scaled) unit sized configurations, i.e. in the minimization of . Nevertheless, obtaining POPA distance still entails removing the scale of the configurations. Remark: the two defined distances have different values. ## Mean shape First some motivation from the arithmetic mean of numbers. Every dinosaur knows that the arithmetic mean/average of n real numbers is defined as: . Let’s define a function as . In other words: g(\mu):=\frac{1}{n} \sum_{i=1}^{n} (x_i-\mu) It is now obvious that if we let then . This is what we want out of defining the function. However, zero is not the minimum of as this function is an absolutely decreasing function, hence no local or global minimum (just take the derivative w.r.t ). Let’s define a function as: f(\mu):=\frac{1}{n} \sum_{i=1}^{n} (x_i-\mu)^2
{ "domain": "empty-set.me", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9938070083747649, "lm_q1q2_score": 0.8303093925196413, "lm_q2_score": 0.8354835350552604, "openwebmath_perplexity": 2644.032938553268, "openwebmath_score": 0.7260680198669434, "tags": null, "url": "https://empty-set.me/?author=1&paged=3" }
Two answers for a conditional probability problem Here's a question I'm thinking about: There are three drawers. Drawer A contains 2 black socks, Drawer 2 contains two white socks and the third drawer is mixed. If I pulled a sock from one of the drawers. Given that it is white, what is the probability that the other sock in the drawer is white? So what I'm thinking is that I picked either the second or the third. If I picked the second I know the other one is white, and if I picked the third I know that the other one is black and so the probability is $1\cdot \frac{1}{2} + 0\cdot \frac{1}{2}=\frac{1}{2}$ I saw someone else's solution and he says that after picking one sock we have a new sample space $$\Omega=\{(W_1,W_2),(W_2,W_1),(W_m,B)$$ where $W_1,W_2$ are the two in the second drawer and $W_m$ is the one in the mixed drawer. Anyway he concluded that the probability is $$P(second\, is\, white)=\frac{\{(W_1,W_2),(W_2,W_1)\}}{|\Omega|}=\frac{2}{3}$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9736446448596305, "lm_q1q2_score": 0.8493563433503074, "lm_q2_score": 0.8723473680407889, "openwebmath_perplexity": 432.6403227554114, "openwebmath_score": 0.7804389595985413, "tags": null, "url": "http://math.stackexchange.com/questions/235514/two-answers-for-a-conditional-probability-problem" }
But before I find the explanation, I am also thing that if ##\omega_z## is way smaller than the ##\omega_{x,t}##, can we consider the profile on the z direction is changing slowly in time, so we could consider the solution in z direction is a constant, the effective solution is along x and y direction. I know those two statements are contradictory. But I cannot tell which one (or all) is wrong. and why? Can you point me to one of those "articles"?
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9591542817548989, "lm_q1q2_score": 0.8133319099233319, "lm_q2_score": 0.8479677622198947, "openwebmath_perplexity": 440.65359366962997, "openwebmath_score": 0.8747632503509521, "tags": null, "url": "https://www.physicsforums.com/threads/what-is-the-frequency-of-the-harmonic-potential.791494/" }
definite. com Don't Memorise brings learning to life through its captivating FREE educational videos. ) We can calculate the Inverse of a Matrix by: Step 1: calculating the Matrix of Minors, Step 2: then turn that into the Matrix of Cofactors, Step 3: then the Adjugate, and ; Step 4: multiply that by 1/Determinant. A ij = (-1) ij det(M ij), where M ij is the (i,j) th minor matrix obtained from. The matrix inverse of a positive definite matrix is also positive definite. (x) Diagonal Matrix. Proof: Let A be an n×n matrix. For real asymmetric matrices the vector will be complex only if complex conjugate pairs of eigenvalues are detected. 8 Real symmetric matrices A square matrix A is called symmetric if A = AT, i. This problem remains un-. Similarly. f90 Simple front-end program to DKMXHF which reads in the matrix from a file & writes out the inverse to another file (DKMXHF not included). 2 and Theorem 11. A final reminder: the terms "dot product," "symmetric matrix" and "orthogonal
{ "domain": "cyyy.pw", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9879462179994596, "lm_q1q2_score": 0.8337229788357462, "lm_q2_score": 0.8438951064805861, "openwebmath_perplexity": 424.59843556334897, "openwebmath_score": 0.8222352266311646, "tags": null, "url": "http://xmre.cyyy.pw/real-symmetric-matrix-inverse.html" }
php, unit-conversion /** * @var float */ private $drams; public static function fromPounds ($pounds) { return self::fromOunzes($pounds * self::POUNDS_TO_OUNZES); } public static function fromOunzes ($ounzes) { return self::fromDrams($ounzes * self::OUNZES_TO_DRAMS); } public static function fromDrams ($drams) { return new static($drams); } private function __construct ($drams) { $this->drams = $drams; } public function inPounds () { return $this->inOunzes() / self::POUNDS_TO_OUNZES; } public function inOunzes () { return $this->inDrams() / self::OUNZES_TO_DRAMS; } public function inDrams () { return $this->drams; } } If you still require a very specific function that returns an array of 'lbs', 'oz' and 'dr' like your question says, than this Weight class can be used in conjunction with it as such: function fromDrams ($drams) { $weight = Weight::fromDrams($drams));
{ "domain": "codereview.stackexchange", "id": 19322, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, unit-conversion", "url": null }
an interval and then selects a subinterval in which a root must lie for further processing. Ubuntu and Windows 10 dual boot - Time issue Solution: Query to truncate log files or shrink all MS SQL Databases. The bisection method, which is alternatively called binary chopping, interval halving, or Bolzano’s method, is one type of incremental search method in which the interval is always divided in half. conventional methods like Newton-Raphson method (N-R), Regula Falsi method (R-F) & Bisection method (BIS). BISECTION METHOD. Assumptions We will assume that the function f(x) is continuous. Apply the bisection method for a function using an interval where there are distinct roots. When i widen the interval that includes 2 or more roots it still only displays one root. You begin with two initial approximations p 0 and p 1 which bracket the root and have f p 0 f p 1 < 0. Let a = 0 and b = 1. In case, you are interested to look at the comparison between bisection method (adopted by Mibian
{ "domain": "ebildungsprojekt.de", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9904406020637528, "lm_q1q2_score": 0.8317066244596371, "lm_q2_score": 0.8397339756938818, "openwebmath_perplexity": 442.0704401216738, "openwebmath_score": 0.49852967262268066, "tags": null, "url": "http://pmkq.ebildungsprojekt.de/bisection-method.html" }
Is there any advantage to use $$\mod q$$ over naive method (without using modulo)? If yes, is it security or computational complexity or any other? Is there any advantage to use $$\bmod q$$ over naïve method (without using modulo)? If yes, is it security or computational complexity or any other? Yes; doing things $$\bmod q$$ does have the practical advantage that the shares are bounded length; computing the shares in $$\mathbb{Z}$$ can potentially have us send rather long values (as the values there don't have an upper bound). However there are also security concerns:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9808759587767815, "lm_q1q2_score": 0.8042136662755782, "lm_q2_score": 0.819893340314393, "openwebmath_perplexity": 560.5054784824654, "openwebmath_score": 0.9194777011871338, "tags": null, "url": "https://crypto.stackexchange.com/questions/92225/what-is-the-reason-for-shamir-scheme-to-use-modulo-prime" }
light, mars In many (astrophysical) situations dust tends to be a distribution of sizes with more small than large particles (typically $n\propto r^{-3.5}$), meaning that an ensemble of dust has much more particles that scatter short wavelengths (blue) than long wavelengths (red). Thus, blue light is filtered out and red light light tends to be transmitted, in effect reddening the light. On the other hand, if the dust consists of particles of the same size, then the extinction may rise and fall with wavelength, as seen in the figure. For example, optical light with $\lambda \simeq [0.4\text{–}0.7] \,\mu\mathrm{m}$, scattered by particles of size $0.7\,\mu\mathrm{m}$, is scattered according to the orange region in the figure — i.e. red light is scattered more efficiently than blue light. The exact form depend on the refractive index of the scatterer. Phase function
{ "domain": "astronomy.stackexchange", "id": 904, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "light, mars", "url": null }
performance, object-oriented, vba End Sub Sub Paste() '/Paste Macro ' 2016-05-23 On Error GoTo CleanFail Application.ScreenUpdating = False Application.EnableEvents = False Application.Calculation = xlManual Dim sht1 As Worksheet Dim sht2 As Worksheet Dim LastRow As Long Dim LastRow2 As Long Dim LastColumn As Long Dim StartCell1 As Range Dim StartCell2 As Range Dim rng1 As Range Dim rng2 As Range Set sht1 = GetWSFromCodeName("Sheet10") Debug.Print sht1.Name Set sht2 = GetWSFromCodeName("Sheet8") Debug.Print sht2.Name Set StartCell1 = Range("A2") Set StartCell2 = Range("B2") 'Find Last Row and Column LastRow = sht1.Cells(sht1.Rows.Count, StartCell1.Column).End(xlUp).Row LastColumn = sht1.Cells(StartCell1.Row, sht1.Columns.Count).End(xlToLeft).Column LastRow2 = sht2.Cells(sht2.Rows.Count, StartCell1.Column).End(xlUp).Row 'Select Range And Copy into Final Formula Sheet sht1.Range(StartCell1, sht1.Cells(LastRow, LastColumn)).Copy Destination:=sht2.Cells(LastRow2 + 1, 2)
{ "domain": "codereview.stackexchange", "id": 20111, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, object-oriented, vba", "url": null }
c, linked-list, file, homework long link_owner(void){ FILE *binary_file; puts("Enter the ID of the owner you want to link this car to"); long owner_ID; if(1 != scanf("%li", &owner_ID)){ fprintf(stderr, "Unable to read number"); exit(EXIT_FAILURE); } clear(); while(owner_ID <= 0){ puts("The ID cannot be 0 or less. Please enter a new ID"); if(1 != scanf("%li", &owner_ID)){ fprintf(stderr, "Unable to read number"); exit(EXIT_FAILURE); } clear(); } if((binary_file = fopen(owner_filename, "rb")) == NULL){ perror(owner_filename); exit(EXIT_FAILURE); } struct owner temp; while((fread(&temp, sizeof(temp), 1, binary_file)) != 0){ if(owner_ID == temp.owner_ID){ return owner_ID; } } fclose(binary_file); puts("Owner not found"); return -1; } void delete_car(void){ puts("Enter the ID of the car you want to delete"); long delete_cID;
{ "domain": "codereview.stackexchange", "id": 25892, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c, linked-list, file, homework", "url": null }
And what happens if y = |-2x + 1|? None of this is covered in school. There are really two issues here. I replied: The issues you are noticing are not really related to the absolute value so much as to combining two horizontal transformations. As you note, y = |-x| looks the same as y = |x|. This is because the absolute value function has symmetry about the y-axis, so that reflection over the y-axis has no effect. For your specific case, note that |-x + 1| = |-(x - 1)| = |x - 1| As you say, this is translated to the right rather than to the left. Here, as I have done before, I rewrote the shift-first form to the stretch-first form, which in this case is reflect-first. So we first reflect the graph about the y-axis, which has no effect due to symmetry, and then shift. But this is a special case of something you need to know for all functions. In general, for ANY function f, if you don't take the reflection into account, f(-x + 1) is translated "the wrong way."
{ "domain": "themathdoctors.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9934102273614378, "lm_q1q2_score": 0.8003232513895994, "lm_q2_score": 0.8056321843145404, "openwebmath_perplexity": 591.5794150520877, "openwebmath_score": 0.7341336607933044, "tags": null, "url": "https://www.themathdoctors.org/equivocal-function-transformations/" }
radical sign ; 3 Writing nth roots as powers and powers as nth roots. Notes on Fast Fourier Transform Algorithms & Data Structures Dr Mary Cryan 1 Introduction The Discrete Fourier Transform (DFT) is a way of representing functions in terms of a point-value representation (a very specific point-value representation). What is a function?. 1 Evaluate nth roots and use rational exponents. For example, the sixth root of 729 is 3 as 3 x 3 x 3 x 3 x 3 x 3 is 729. 86 21 Take fourth roots of each side. n th Roots. 25 different faces laid out in an A3 poster that can be folded down to a size of a business card. 23 = 8 53 = 125 1713 = 5000211 4. Since 2 = 8 , we say that 2 is the cube root of 8. Of course, the presence of square roots makes the process a little more complicated, but certain rules allow us to work with fractions in a relatively. 404-405 4-61 every 3rd; 3 Evaluating Nth Roots. Since the nth root of a real or complex number z is z1/n, the nth root of r cis θ is r1/n cis θ/n.
{ "domain": "freunde-des-historischen-schiffsmodellbaus.de", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9843363494503271, "lm_q1q2_score": 0.8552177872568134, "lm_q2_score": 0.8688267864276108, "openwebmath_perplexity": 558.5759163333647, "openwebmath_score": 0.7313296794891357, "tags": null, "url": "http://zjkf.freunde-des-historischen-schiffsmodellbaus.de/how-to-evaluate-nth-roots.html" }
galaxy, gravity, astrophysics, cosmology, n-body-simulations 2.2 The Aquarius simulation suite In Table 1, we provide an overview of the basic numerical parameters of our simulations. This includes a symbolic simulation name, the particle mass in the high-resolution region, the gravitational softening length, the total particle numbers in the high- and low-resolution regions, as well as various characteristic masses and radii for the final halos, and the corresponding particle numbers. Our naming convention is such that we use the tags “Aq-A” to “Aq-F” to refer to simulations of the six Aquarius halos. An additional suffix “1” to “5” denotes the resolution level. “Aq-A-1” is our highest resolution calculation with ∼ 1.5 billion halo particles. We have level 2 simulations of all 6 halos, corresponding to 160 to 224 million particles per halo. We kept the gravitational softening length fixed in comoving coordinates throughout the evolution of all our halos. The dynamics is then governed by a Hamiltonian and the
{ "domain": "astronomy.stackexchange", "id": 6466, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "galaxy, gravity, astrophysics, cosmology, n-body-simulations", "url": null }
beginner, object-oriented, ruby, playing-cards def reset @hand = []; @score = 0; @bet = 0; end def hand(cards) @hand += cards calculate_score end def place_bet amount = 0 while true begin amount = Integer(gets) if amount <= @funds && amount > 0 @bet += amount @funds -= amount break elsif amount > @funds puts "Sadly, you don't have enough funds to place this bet. Please enter a lower bet." else puts "You cannot place a zero or negative bet." end rescue puts "Please enter a valid whole amount." end end end def update_funds(amount) @funds += amount end def calculate_score @score = 0 ace_in_hand = false
{ "domain": "codereview.stackexchange", "id": 22007, "lm_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, object-oriented, ruby, playing-cards", "url": null }
thermodynamics, thermal-radiation, kinetic-theory, infrared-radiation If you mean gases in low pressure as at the top of the atmosphere etc, one has to study them separately according to the boundary conditions. There can be gases with very high temperatures as in the atmosphere of the sun.
{ "domain": "physics.stackexchange", "id": 59503, "lm_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, thermal-radiation, kinetic-theory, infrared-radiation", "url": null }
cc.complexity-theory, algebra, polynomials, automated-theorem-proving Hence, if one uses a SAT-solver to find a solution to Chao and Gao's system of equations for Morley's theorem in $\mathbb{F}_q^n$ for $q$ as the 288-bit prime root||nonce found above at the Bitcoin blockchain of height 520605, or if one uses Huang and Wong's approach, does one then have something close to a probabilistic proof of Morley's theorem, where the probability of being "wrong" is something like $d\times A_F\le 2^{-31}$ or so? Comment: Even though I've rewritten this, I'm accepting DW's answer as helping to crystallize thinking. Heuristically: Yes, I suspect this probably works, if the system of equations is committed to in advance (well before mining works), and if the system of equations is small enough. You'll need the random oracle assumption, ERH, and maybe other heuristic assumptions.
{ "domain": "cstheory.stackexchange", "id": 4288, "lm_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, algebra, polynomials, automated-theorem-proving", "url": null }
energy, electrons, potential-energy This seems like a simple kinematics question and let me describe the dance between extremes my mind suggests for this situation: On the one hand, if I have a field and an object, and the object moves completely from the point where it initially is and where the source of the field is, with no resistance, it will absorb energy all the way along the distance for a fixed quantity of energy (the potential energy), which can be measured as F*d. On the other hand, if along the path energy is taken away from the object, exactly enough to balance the accelerational energy (making for a constant velocity), then if the object starts with zero initial velocity it will constantly absorb energy. If I vary the initial velocity from zero on up, the fixed amount of energy absorbed from points a to b will vary from infinity down to ever smaller quantities.
{ "domain": "physics.stackexchange", "id": 14997, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "energy, electrons, potential-energy", "url": null }
special-relativity, kinematics, inertial-frames, velocity, education I get that many things can be expressed in a more elegant manner using this formulation: Lorentz transformations look more symmetrical and more closely resemble their Euclidian rotation counterparts and the formula for the Doppler shift becomes a simple $e^w$. However, when actually solving problems, I find the extra steps described above to get in the way instead of helping.
{ "domain": "physics.stackexchange", "id": 89614, "lm_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, kinematics, inertial-frames, velocity, education", "url": null }
java, object-oriented, tree, search, generics private MctsTreeNode<StateT, ActionT, AgentT> expandWithoutAction(MctsTreeNode<StateT, ActionT, AgentT> node) { return node.addNewChildWithoutAction(); } private MctsTreeNode<StateT, ActionT, AgentT> expandWithAction(MctsTreeNode<StateT, ActionT, AgentT> node) { ActionT randomUntriedAction = getRandomActionFromNodesUntriedActions(node); return node.addNewChildFromAction(randomUntriedAction); } private ActionT getRandomActionFromNodesUntriedActions(MctsTreeNode<StateT, ActionT, AgentT> node) { List<ActionT> untriedActions = node.getUntriedActionsForCurrentAgent(); Collections.shuffle(untriedActions); return untriedActions.get(0); } private MctsTreeNode<StateT, ActionT, AgentT> getNodesBestChild(MctsTreeNode<StateT, ActionT, AgentT> node) { validateBestChildComputable(node); return getNodesBestChildConfidentlyWithExploration(node, explorationParameter); }
{ "domain": "codereview.stackexchange", "id": 15754, "lm_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, tree, search, generics", "url": null }
polynomials Title: Do you know of a brute-force algorithm for optimizing polynomial expressions? For instance, given the polynomial expression $xy + x + y + 1$ it will output $(x+1)(y+1)$. Thanks! "Brute-force" in the context of factoring polynomials may involve factoring of integers, which is a hard problem. Factoring polynomials is easier, e.g. look up "FACTORING MULTIVARIATE POLYNOMIALS VIA PARTIAL DIFFERENTIAL EQUATIONS" by Gao, and "Factoring Multivariate polynomials over the integers" by Wang and Rothschild.
{ "domain": "cs.stackexchange", "id": 2726, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "polynomials", "url": null }
@whuber: negative $R^2$ is possible in a regression model without an intercept. In a regression model with an intercept, the definition of $R^2$ is based on a decomposition of the total sum of squares, i.e. $\sum_i (Y_i - \bar{Y})^2$, $\bar{Y}$ is the average of $Y$, the dependent variable. (Note that $R^2$ it is not defined as the square of the correlation coefficient because the latter is only defined between two variables, therefore, only in the case with one independent variable (and an intercept), the squared correlation coefficient is equal to the $R^2$). The decomposition of the total sum of squares (TSS) goes as follows: $TSS=\sum_i (Y_i - \bar{Y})^2=\sum_i (Y_i - \hat{Y}_i + \hat{Y}_i - \bar{Y})^2$, where $\hat{Y}_i$ are the predictions of the regression model. It follows that $TSS=\sum_i (Y_i - \hat{Y}_i )^2 + \sum_i (\hat{Y}_i - \bar{Y})^2 +2 \sum_i (Y_i - \hat{Y}_i ) (\hat{Y}_i - \bar{Y})$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9732407152622597, "lm_q1q2_score": 0.8213130713060084, "lm_q2_score": 0.8438951005915208, "openwebmath_perplexity": 193.50211631032633, "openwebmath_score": 0.9940671920776367, "tags": null, "url": "https://stats.stackexchange.com/questions/164586/can-the-coefficient-of-determination-r2-be-more-than-one-what-is-its-upper-b?noredirect=1" }
climate-change, co2, human-influence, fossil-fuel, predictability Fossil fuel made it possible to feed more and more people and allowed higher and higher living standards to be achieved. It isn't realistic that billions of us will vote on parties that will decimate our standard of living. Has it been proved that this will not be necessary if fossil fuels are not to be used anymore? According to the WMO there is a 40% chance of the annual average global temperature temporarily reaching 1.5°C above the pre-industrial level (the tipping point that has to be avoided according to the Paris Agreement) in at least one of the years 2021-25. This anthropogenic global warming is obviously a major threat, but how could the trend be broken without questioning basic advances that have been achieved in the modern epoch?
{ "domain": "earthscience.stackexchange", "id": 2339, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "climate-change, co2, human-influence, fossil-fuel, predictability", "url": null }
java, event-handling // Singleton pattern, as multiple managers is nonsensical. Singleton is rather an antipattern nowadays. You might need multiple instances in unit and integration tests and later you might have separated modules which will require separate event managers. Consider making it non-singleton. Singletons ussually make unit-testing really hard. Calling System.gc() is a code smell. Are you sure that you need that? See also: Why is it a bad practice to call System.gc? /* * This is a basic lock that is used to prevent modifications to the list of listeners. It * releases when told, or when finalized if forgotten. */ I'd put a warning log to the finalize to get a notification if the client is broken.
{ "domain": "codereview.stackexchange", "id": 6566, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, event-handling", "url": null }
phase, equalization, allpass Conclusion: I am rather surprised that the waveform would have that much additional delay due to the variation of the phase from the best linear fit (as an analogy to frequency translation occurring (in the frequency domain) from phase rotation in time, here we clearly see evidence of time translation (in the time domain) from the same phase rotation process apparently occurring in the frequency domain. Given this, the impulse response is being translated further than the original time sample can support, and the solution would therefore require a longer time sample which should then eliminate the aliasing. (Sometimes it is easier to reverse time and frequency to understand what may be occurring; as it may be more intuitive for many to understand how this could occur with frequency domain aliasing from undersampling--- here it is the same thing except instead of increasing the sampling rate we need to increase the time duration).
{ "domain": "dsp.stackexchange", "id": 9859, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "phase, equalization, allpass", "url": null }
ros Title: errors installing groovy on mac osx homebrew (pydot) I am getting the following error while trying to do a fresh install of groovy on my mac (10.7.5) with homebrew: Any suggestions? $ rosdep install --from-paths src --ignore-src --rosdistro groovy -y executing command [sudo pip install -U pydot] Password: Downloading/unpacking pydot Running setup.py egg_info for package pydot Couldn't import dot_parser, loading of dot files will not be possible. Downloading/unpacking pyparsing (from pydot) Running setup.py egg_info for package pyparsing Traceback (most recent call last): File "<string>", line 14, in <module> File "/Users/mike/ros_catkin_ws/build/pyparsing/setup.py", line 9, in <module> from pyparsing import __version__ as pyparsing_version File "pyparsing.py", line 629 nonlocal limit,foundArity ^ SyntaxError: invalid syntax Complete output from command python setup.py egg_info:
{ "domain": "robotics.stackexchange", "id": 13461, "lm_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 }
classical-mechanics, potential, potential-energy, definition As an example, in simple harmonic motion (SHM), a spring is subject to a restoring force $F=-kx$ and this has an associated potential $V=\frac{1}{2}kx^{2}$. The potential well is then a quadratic, with the minimum describing the equilibrium configuration of the spring. The spring then oscillates about the minimum of the potential - compressing as it moves up one side of the potential (hence gaining potential energy and losing kinetic energy), then moving back to the minimum of the potential well (losing potential energy and gaining potential energy) and then stretching as it moves up the other side of the potential (again gaining potential energy and losing kinetic energy). It then repeats this in an oscillatory fashion. Go to the top of a hill and dig a hole and but a ball in it. The ball must rise to exit the hole, before it can fall freely all the way down.
{ "domain": "physics.stackexchange", "id": 35191, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classical-mechanics, potential, potential-energy, definition", "url": null }
formatting, vb6 For the hardcore among you, here is my annotated disassembly for the final code generated by the VB 6 compiler with optimizations enabled. You should be able to see some of what I'm talking about in terms of the rather-optimal bit-twiddling instructions, as well as the less-than-optimal string-manipulation code. But being completely overwhelmed is also normal.
{ "domain": "codereview.stackexchange", "id": 23509, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "formatting, vb6", "url": null }
photons, scattering, shadow Now these are general statements about sunlight, regardless of which specific direction of window you are looking at. If you apply physics to architecture, we do see specific differences for North facing windows and South facing windows. In particular, there are seasonal differences. If you are in the northern hemisphere, the sun is more southern in the sky during the winter, and more northern in the summer. Architects can leverage this to manage heat loads. South facing windows let in more heat from the sun during the winter, and less during the summer. As for the other issues you raise, such as the effects of shadows from low or high windows, that is either trivial (lower windows cast longer shadows), or out of scope of Physics.SE (the artistic nuances of how you want to light a room).
{ "domain": "physics.stackexchange", "id": 98978, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "photons, scattering, shadow", "url": null }
pauli-exclusion-principle Title: Is every electron in the Universe in a different quantum state? Is every electron in the Universe in a different quantum state? Is this what the Pauli Exclusion Principle tells us? The simple answer is yes, but as usual things are rather more complicated than a simple answer would suggest. For example, if you take a free electron then it isn't quantised but has a continuous energy spectrum. This means you can't usefully talk about two free electrons being in the same quantum state. In principle two free electrons described by infinite plane waves (so perfectly defined momentum but completely delocalised) cannot have exactly the same momentum. However this is a physically unrealistic situation, and in practice two free electrons can have arbitrarily similar momenta.
{ "domain": "physics.stackexchange", "id": 23868, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pauli-exclusion-principle", "url": null }
##### 4 Consider the matrix $A = \left[\begin{array}{rr} 0 \amp -1 \\ -4 \amp 0 \\ \end{array}\right] \text{.}$ 1. Describe what happens if we apply the power method and the inverse power method using the initial vector $\xvec_0 = \twovec{1}{0}\text{.}$ 2. Find the eigenvalues and eigenvalues of this matrix and explain this observed behavior. 3. How can we apply the techniques of this section to find the eigenvalues of $A\text{?}$ ##### 5 We have seen that the matrix $A = \left[\begin{array}{rr} 1 \amp 2 \\ 2 \amp 1 \\ \end{array}\right]$ has eigenvalues $\lambda_1 = 3$ and $\lambda_2=-1$ and associated eigenvectors $\vvec_1 = \twovec{1}{1}$ and $\vvec_2=\twovec{-1}{1}\text{.}$ 1. Describe what happens when we apply the power method using the initial vector $\xvec_0 = \twovec{1}{0}\text{.}$ 2. Use your understanding of the eigenvalues and eigenvectors to explain this behavior. 3. How can we modify the power method to give the dominant eigenvalue in this case? ##### 6
{ "domain": "gvsu.edu", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9777138118632621, "lm_q1q2_score": 0.8038656752648967, "lm_q2_score": 0.8221891370573388, "openwebmath_perplexity": 233.23587719888812, "openwebmath_score": 0.9799027442932129, "tags": null, "url": "http://merganser.math.gvsu.edu/david/linear.algebra/ula/ula/sec-power-method.html" }
evolution In conclusion, whilst there are fewer and fewer strong selective pressures forcing extreme evolution, our bodies are designed to evolve slowly unlike viruses like HIV. Our mutation rates are around 1 in 10^9, allowing us to always slowly evolve as there will always be traits which are slightly more advantageous.
{ "domain": "biology.stackexchange", "id": 1040, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "evolution", "url": null }
javascript, sorting, css Any ideas, simplifications are most welcome.
{ "domain": "codereview.stackexchange", "id": 42597, "lm_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, sorting, css", "url": null }
ros, roslaunch, rosdep, osx, roslisp Original comments Comment by demmeln on 2013-12-17: How did populate your workspace with packages? Comment by karthik_ms on 2014-04-14: I have the same problem! Is this issue solved yet? Comment by demmeln on 2014-04-14: It seems os, as the answer by tfoote is marked as accepted. Maybe you want to open a new question giving some more information about your specific issue (in particular tell us what you did before calling rosdep, i.e. how did you populate your workspace with packages). Comment by karthik_ms on 2014-04-15: I have created a new question. Kindly look through it : http://answers.ros.org/question/153156/rosdep-error-while-i-try-to-install-ros-on-os-x-108/ It sounds like you are missing packages from your workspace. If you are missing dependencies rosdep will try to install them as system dependencies. However if there are not rules for the packages as system dependencies they will fail to resolve. In particular I would make sure you have roslaunch in your workspace.
{ "domain": "robotics.stackexchange", "id": 16455, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, roslaunch, rosdep, osx, roslisp", "url": null }
algorithms, maximum-subarray Title: Is there a way to modify Kadane's Algorithm such that we know the resulting subarray? Kadane's Algorithm is an algorithm that solves the maximum subarray problem by clever dynamic programming. Is there a way to further modify the algorithm so that we would get to know the resulting subarray that produces the corresponding maximum sum? PS: I don't know whether I should post this here, or Stack Overflow, or both. Yes, you can. Kadanes's algorithm keeps the value of the best subarray in a variable, let's call it best_sum. Notice the invariant in the algorithm. best_sum will always (after each iteration) contain the value of the maxium subarray of the prefix of the array that you already visited. Additionally you know the best suffix sum of the current prefix, let's call it current_sum, which you use to update best_sum. You just need to do the same thing with the position.
{ "domain": "cs.stackexchange", "id": 14473, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, maximum-subarray", "url": null }
php, mysql, security, pdo INSERT INTO `test`.`user` (`first`, `last`, `email`) VALUES ('james', 'brown', 'james@example.com'); You should always add UNIQUE constraints to usernames and email address to ensure uniqueness in your database.
{ "domain": "codereview.stackexchange", "id": 5913, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, mysql, security, pdo", "url": null }
ros, transforms, transform Title: How to resoleve Exception: Lookup would require extrapolation into the future? I was publishing a frame using launch file. I was getting below errors. tf2.waitForTransform(src_fram, des_frame, rospy.get_rostime(), rospy.Duration(10.0)); Exception: Lookup would require extrapolation into the future. Requested time 1468340743.794792891 but the latest data is at time 2117.120000000, when looking up transform from frame [bed_frame] to frame [wide_stereo_optical_frame]. canTransform returned after 10.0004 timeout was 10. I have used all time combinations such as rspy.Time(), rospy.get_rostime(), and rospy.Time.now(). but no luck. i also used sleep function for 10 seconds before waitForTransform, this is also not worked here is my code def getTransformedPoint(faceCoordinate, src_fram, des_frame): point = PointStamped() point.point.x = faceCoordinate[0]; point.point.y = faceCoordinate[1]; point.point.z = faceCoordinate[2]; point.header.frame_id = src_fram;
{ "domain": "robotics.stackexchange", "id": 25219, "lm_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, transforms, transform", "url": null }
neural-network, waveform-similarity, pattern, hardware The pattern of the eight channels together give information on the postion of the hand on one axis. The neural network is supposed to learn himself how the different channels react, in wich order, so i don't have to tell anything to the programm concerning the physical distance between two electrodes or whatever. The fact is that i would like to learn how to do neural networks but i have no idea how to feed the data ( especially for data over time, which differs from typical image analysis tutorials often seen for neural networks over the internet ), considering that there is 100*8 values to analyse for each frame (100 values for 1 sec frame, for the eight channels ) and i don't know if i should have a network with 800 input nodes.... seems to me like i miss something...? Can i pass a list as one input to a neural network ,hence reducing the amount of input nodes to 8 ?
{ "domain": "dsp.stackexchange", "id": 5781, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-network, waveform-similarity, pattern, hardware", "url": null }
json, clojure You should consider require-ing cheshire.core as just cheshire. That way it is clear wherever you use a JSON-related function in your code, without having to scroll all the way back up to the namespace declaration, what library you are using. Then your to-json function could read like this: (defn to-json [resource] "Serializes to a JSON string." (cheshire/generate-string resource)) (The fact that you're using Cheshire to generate the string is now self-evident.) In the docstring for new-link, it says, "Links are maps of the form {rel href & properties}. I find this a little confusing... are rel and href both keys in the map? Or are the values for rel and href the name of a key and its value, respectively? You might consider rephrasing this as "Links are represented as maps, containing the keys..."
{ "domain": "codereview.stackexchange", "id": 8165, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "json, clojure", "url": null }
quantum-mechanics, wavefunction, probability Title: Calculating One-Dimensional Particle Separation Probabilty Density Question Today I am inquiring how one would calculate the particle separation probability density for 2 particles in a square well, for 2 distinguishable particles. We are given both particles wave functions as $\psi_1(x)$ and $\psi_2(x)$ with the probability separation density as $P(x_1-x_2)$. My biggest issue seems to be that I don't know how to create a wave function that is a difference between the two other wave functions. My attempt at a solution For a conventional wave function, we can calculate the spatial wave function probability density as: $$P(x) = |\psi(x)|^2$$ Our problem wants us to calculate: $$P(x_1-x_2)$$ which I interpret as some function of both particles, $\Psi(x_1,x_2)$, not the difference of the two functions. How can we create such a function? Suppose we have a square well of width $a$. If $s = x_1 - x_2$ is the separation, the density you want is given by
{ "domain": "physics.stackexchange", "id": 65965, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, wavefunction, probability", "url": null }
javascript, simulation, genetic-algorithm The error handling is fine, but you don't need the parentheses after throw. Also, move this check to process_generation; it belongs with the code that uses config.draw_amount and population.length. var temp_drawn = []; var temp_final = {}; for (var i = 0; i < draw_amount; i++){ temp_drawn.push(population[Math.floor(Math.random() * population.length)]); } if (population.length % draw_amount == 0){ temp_drawn.forEach(function(item){ for (var i = 0, multiplier = Math.floor(population.length / draw_amount); i < multiplier; i++){ temp_final[item] = (item in temp_final ? temp_final[item] + 1 : 1); } }); }
{ "domain": "codereview.stackexchange", "id": 16093, "lm_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, simulation, genetic-algorithm", "url": null }
javascript, jquery total_utl = total_utl + 1 spent_points = spent_points + 1 $(this).find('span').text(this.i); $('span.utility').text(total_utl); $('span.spent').text(spent_points); } console.log(this.i); } if(total_off >= 20) { $('table.masteries tr.p20 td:nth-child(2)') .attr("style","background-image:url('./assets/masteries/mastery0.png')"); } if(total_def >= 20) { $('table.masteries tr.p20 td:nth-child(6)') .attr("style","background-image:url('./assets/masteries/mastery0.png')"); } if(total_utl >= 20) { $('table.masteries tr.p20 td:nth-child(10)') .attr("style","background-image:url('./assets/masteries/mastery0.png')"); } }}); $('table.masteries tr.p20 td').on('click', function(){ if(spent_points < max_points) { if(!this.i){
{ "domain": "codereview.stackexchange", "id": 9019, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery", "url": null }
quantum-mechanics, homework-and-exercises, wavefunction $$ e^{i \phi} \sin \theta, \quad e^{-i \phi} \sin \theta \quad \mathrm{and} \quad \cos \theta.$$ Now the spherical harmonics are of the form $e^{i m \phi} P_{\ell}{}^m(\cos \theta)$, where the $P_\ell {}^m$ are associated Legendre polynomials. For even $m$, they are of degree $\ell$ in $\cos \theta$, otherwise they are of degree $\ell-1$ but with an extra factor $\propto \sqrt{1-\cos^2 \theta} = \sin \theta.$ So in this case, it's clear that you don't need to go beyond $\ell=1.$ To finish the calculation, look up the lowest spherical harmonics in your textbook and figure out the coefficients $a_{\ell m}.$
{ "domain": "physics.stackexchange", "id": 8240, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, homework-and-exercises, wavefunction", "url": null }
php, laravel substr($user['USR_ProjectMostRecent'],strpos($user['USR_ProjectMostRecent'],'-')+1,4)) { return false; } /* Should you be returning boolean here in this method or would it be more consistent to throw exceptions like done for your other validation methods in other classes? */ return true; }
{ "domain": "codereview.stackexchange", "id": 21001, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, laravel", "url": null }
spectroscopy, optical-properties The expressions for a, b, B, C, and Q are used in the general anisotropic medium Jones optical calculus and Mueller optical calculus matrices. These two matrices are denoted by J(GAM) and M(GAM), respectively, and are given in the paper by Jensen et al.
{ "domain": "chemistry.stackexchange", "id": 13254, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spectroscopy, optical-properties", "url": null }
algorithms, graphs, shortest-path How exactly is the third case detected? Assume the graph A->B->C->D->{A,B} with two cycles (fro D back to A or B) where the cycle B->C->D->B is the optimal one and yields zero length for some selection of $\mu$ for which the other cycle is positive. Suppose we happen to try this particular value of $\mu$ (let's assume it's during the very first iteration because we got lucky). If I am using vertex A as the fixed point from which I run Bellman-Ford on each iteration, it will complete successfully without detecting a negative cycle. But how would the zero-length cycle be identified?
{ "domain": "cs.stackexchange", "id": 20025, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, graphs, shortest-path", "url": null }
quantum-mechanics, energy, magnetic-fields, schroedinger-equation, linear-algebra $$\tag{2} \psi_{n m}(r, \varphi) = N \, u^{|m|} \, L_n^{|m|}(u^2) \, e^{- u^2 / 2} \, \frac{1}{\sqrt{2 \pi}} \, e^{i m \varphi}. $$ During the solving process, I found the usual Laguerre polynomials equation in the following shape, with $\xi \equiv u^2$: $$\tag{3} \xi \frac{d^2 L}{d \xi^2} + (|m| + 1 - \xi) \frac{d L}{d \xi} + n L = 0, $$ with (this give the formula (1)) $$\tag{4} n = \frac{1}{2} \Bigl( \frac{E - m \hbar \omega}{\hbar |\omega|} - |m| - 1 \Bigr). $$
{ "domain": "physics.stackexchange", "id": 100165, "lm_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, energy, magnetic-fields, schroedinger-equation, linear-algebra", "url": null }
forces, everyday-life, material-science Title: Why does bunched up aluminum foil become so extremely hard to compress? I noticed that whenever I bunch up aluminum foil (into a ball), it becomes extremely hard to compress. If I use another piece of the same amount of aluminum foil, and keep folding it in, I arrive at a much smaller volume. It is full of air and much lighter than the same shape of solid aluminum, though, it is still extremely hard to compress. Question: Why does bunched up aluminum foil become so extremely hard to compress? "If you, the reader, were to rip a page from this journal and crumple it, squeezing it with your hands into a ball as hard as you can, the resulting object is still more than 75% air. What gives this crumpled sheet its surprising strength and how does the ultimate size of the sheet depend on the forces applied?" [emph. added] —Matan et al., "Crumpling a thin sheet" Crumpling produces ridges—corrugations—that are both low in amplitude and wavy:
{ "domain": "physics.stackexchange", "id": 95361, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "forces, everyday-life, material-science", "url": null }
beginner, vba, excel Item Number Bowl 3 Knife 5 Naming Things should sound like what they are. I recommend Joel Spolsky's excellent, classic article on naming (In fact I recommend reading his entire blog, but start there). Names should be descriptive, unambiguous and concise. In that order. You have a "Raw Data" worksheet. Call it rawDataSheet. Better yet, give it a codename of rawDataSheet (see @raystafarian's answer on how to do that) and then you don't even have to declare it. You have a "Summary" sheet. Call it summarySheet. You have a "sum of elements for each tool" variable. Call it toolCount or toolCounter or numTools. You have a target tool name variable. Call it targetTool or currentTool or toolName. You have a current item name variable you're searching through. Call it currentName or elementName or checkName. And you have a column range which contains all said names to check through. dataRange isn't bad but it's quite generic. rawDataColumn would be more descriptive.
{ "domain": "codereview.stackexchange", "id": 20489, "lm_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, vba, excel", "url": null }
9.     Let $\displaystyle \mathrm{f}(x) = \frac{ {\mathrm{e}}^{2x} \ + \ 1 }{ {\mathrm{e}}^{2x} \ – \ 1 }$, for $x \gt 0$. (a)     The equation $x = \mathrm{f}(x)$ has one root, denoted by $a$. Verify by calculation that $a$ lies between 1 and 1.5. $$\tag*{[2]}$$ (b)     Use an iterative formula based on the equation in part (a) to determine $a$ correct to 2 decimal places. Give the result of each iteration to 4 decimal places. $$\tag*{[3]}$$ (c)     Find ${ \mathrm{f} }^{‘}(x)$. Hence find the exact value of $x$ for which ${ \mathrm{f} }^{‘}(x) = −8$. $$\tag*{[6]}$$ 10. The diagram shows the curve $y = \sin 2x \ {\cos}^{2} x$ for $0 \le x \le \frac{1}{ 2} \pi$, and its maximum point $M$. (a)     Using the substitution $u = \sin x$, find the exact area of the region bounded by the curve and the $x$-axis. $$\tag*{[5]}$$ (b)     Find the exact $x$-coordinate of $M$. $$\tag*{[6]}$$
{ "domain": "uptuition.id", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9923043514561086, "lm_q1q2_score": 0.8332716662067108, "lm_q2_score": 0.839733963661418, "openwebmath_perplexity": 419.2791247084966, "openwebmath_score": 0.9526252746582031, "tags": null, "url": "https://pastpapers.uptuition.id/paper-32-feb-mar-2021-pure-math-iii-9709-32-f-m-21/" }
ros, navigation, odroid If thats what u meant by synchronized. Let me know if I am mistaken and also so, what is uC? Thank you very much Comment by ljaniec on 2022-04-15: uC - microcontrollers, but I thought about hardware overall here. In reality you will never have a "pure" zero in something, it will be nearly always some 10e-7 value etc. Usually it is solved by a kind of dead zone around boundary values, e.g. abs(cmdVel.angular.z) < 0.001 should be treated as a zero. Right now I think about the frequency of your cmd_vel commands, maybe they are published less frequently than they should? How is your driver working with rapid changing of PWM values? Comment by 1024son on 2022-04-16: oh I see "u" as in micro. Will try to give an allowance for abs(cmdVel.angular.z). I used rqt_robot_steering rqt_robot_steering and publish different speed to the robot and it does react instantaneously. Will be updating later if I have better result with what I have done. Once again, thank you.
{ "domain": "robotics.stackexchange", "id": 37568, "lm_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, odroid", "url": null }
co.combinatorics, graph-algorithms, clique, independence We gave an algorithm for bipartite graphs with runtime $|\mathcal C| \cdot \log |\mathcal C| \cdot n^2$ http://www.ii.uib.no/~martinv/Papers/BooleanWidth_I.pdf Our method is based on the observation that any element in $C$ can be made by the union of some other element of $C$ and one of the original sets. Hence we will whenever we add an element to $C$ try to expand it by one of the $n$ original sets. For each of these $n \cdot |C|$ sets we need to check if they are still in $C$. We store $C$ as a binary search tree, so each lookup takes $\log |C| \cdot n$ time. Is it possible to find the union closure $\mathcal C$ in $O(|\mathcal C| \cdot n^2)$ time? Or even in time $O(|\mathcal C| \cdot n)$? The complexity of enumerating maximal independent sets in graphs is the same as in bipartite graphs, so bipartiteness does not bring anything new.
{ "domain": "cstheory.stackexchange", "id": 1755, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "co.combinatorics, graph-algorithms, clique, independence", "url": null }
javascript, html, tic-tac-toe, socket.io socket.on('gameEnd', function(data){ game.endGame(data.message); }) socket.on('err', function(data){ game.endGame(data.message); }); })();
{ "domain": "codereview.stackexchange", "id": 24268, "lm_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, tic-tac-toe, socket.io", "url": null }
quantum-mechanics, electromagnetism, visible-light, water, fluid-statics Title: Why do spiders' webs stay wet longer than the environment? I have read this answer: The reason you get droplets is due to a phenomenon called Rayleigh Instability. This causes a smooth film of water on a fibre to break up into droplets. The droplets stick to the fibres of the web due to capillary forces. What makes water-droplet/dew stick to spider's web and what keeps them there? After irrigation, I noticed that the lawn and bushes dry very fast, and the spider's webs stay wet much longer (both when the web has direct sunshine or is in the shades, it dries much slower than the leaves around). I am specifically asking why this happens, why does the water stuck in the spider's web not dry up like water droplets from the grass and leaves dry up. My only thought was that the leaves and grass are green and this might heat up a little on the sunshine and this heat could make the water dry up faster than on the spider's web. Question:
{ "domain": "physics.stackexchange", "id": 81263, "lm_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, visible-light, water, fluid-statics", "url": null }
python, datetime, comparative-review, time def convertTimeString(time): time = time.replace(":", " ").replace(".", " ").split() try: converted = { "minutes": int(time[0]), "seconds": int(time[1]), "milliseconds": int(time[2]) } except IndexError: print("Index error occured when formatting time from scraped data") return converted
{ "domain": "codereview.stackexchange", "id": 45302, "lm_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, datetime, comparative-review, time", "url": null }
java, fluent-interface import org.junit.Test; public class SwitchTests { @Test public void testSwitches() { final String mod = "Mod"; final String notMod = "Admin"; final Switch<String> nonBreakingNameSwitch = createNonBreakingTestSwitch(); final Switch<String> breakingSwitch = createBreakBeforeLastTestSwitch(); nonBreakingNameSwitch.evaluate(mod); System.out.println(); breakingSwitch.evaluate(mod); System.out.println(); nonBreakingNameSwitch.evaluate(notMod); System.out.println(); final Switch<String> extendedSwitch = createNonBreakingExtendedTestSwitch(nonBreakingNameSwitch); System.out.println("===== Extended Switch ====="); extendedSwitch.evaluate(mod); System.out.println(); extendedSwitch.evaluate(notMod); System.out.println(); final Switch<String> extendedSwitchWithoutDefault = createNonBreakingExtendedTestSwitchWithoutDefault(nonBreakingNameSwitch);
{ "domain": "codereview.stackexchange", "id": 32427, "lm_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, fluent-interface", "url": null }
c++, reinventing-the-wheel, memory-management, c++20 To understand what’s happening, remember that the easiest way to distinguish between an lvalue and an rvalue is that if you can take the address of something, it’s an lvalue; if not, it’s an rvalue. Can you take the address of other? Of course: message_combiner(message_combiner&& other) noexcept : message_combiner{} { if (this != &other) // silly because it will never be false... but you can do it, so it illustrates the point *this = other; }
{ "domain": "codereview.stackexchange", "id": 41951, "lm_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++, reinventing-the-wheel, memory-management, c++20", "url": null }
special-relativity, spacetime, coordinate-systems, inertial-frames, observers You are falling into the trap that the railway frame is the "absolute rest" frame that sees reality for what it really is, and the moving frame is wrong. And this is what a "naive" mathematician on the railway would say to the person on the train after they got off and discussed what happened. "No, you were just moving, so you hit one light ray earlier than the other" But according to the person on the train, she is at rest in her own frame. The person on the railway is moving. So she would say to the man on the railway "No, they occurred at different times, but due to how you were moving you moved away from the early source and towards the late source, thus they reached you at the same time." Or using your language I quote above: " It's just that we see it happen at the same time because we moved to receive each light signal at the same time, but the two events still occurred at different times."
{ "domain": "physics.stackexchange", "id": 55636, "lm_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, coordinate-systems, inertial-frames, observers", "url": null }
lo.logic, type-theory, lambda-calculus, typed-lambda-calculus Can anybody explain or give links to some more understandable presentations of the proof? Edit: Let me try to make the question clearer. A context $\Gamma$ has declarations for type variables $\alpha:A$ and object variables. A type valuation is valid, if for all $(\alpha:A) \in \Gamma$ with $\Gamma\vdash A:\square$ then $\xi(\alpha) \in \nu(A)$ is valid. But $\nu(A)$ can be an element of $(SAT)^*$ and not only $SAT$. Therefore no valid term evaluation can be defined for $\rho(\alpha)$. $\rho(\alpha)$ must be a term and not some function of a function space. Edit 2: Example which does not work Let's make the following valid derivation: $$ \begin{array}{llll} [] &\vdash & *:\square &\text{axiom} \\ [\alpha:*] &\vdash& \alpha:* &\text{variable introduction} \\ [\alpha:*] &\vdash& *:\square &\text{weaken} \\ [] &\vdash & (\Pi \alpha:*.*):\square &\text{product formation} \\ [\beta:\Pi \alpha:*.*] &\vdash& \beta:(\Pi \alpha:*.*) &\text{variable introduction} \end{array} $$
{ "domain": "cstheory.stackexchange", "id": 4502, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lo.logic, type-theory, lambda-calculus, typed-lambda-calculus", "url": null }
java, linked-list, collections Node.java: package com.ciaoshen.thinkinjava.newchapter17; import java.util.*; public class Node<T> { private T info = null; private Node<T> next = null;
{ "domain": "codereview.stackexchange", "id": 23931, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, linked-list, collections", "url": null }
c#, .net, task-parallel-library } I saw that you anyway read till end of file, so I think (you need to measure it) that its will be faster if you'll read it all (line by line as you do) and then parallel the work once and avoid construct the parallelism for every chunk. Also if you use Parallel.Foreach, you can avoid the null checking for allFileLines[i]. Consider to use a custom partitioner. You must measure it but take in mind that sometimes it better to have a large amount of data with less loops where a lot of loops with small chunk of data. About the previous comment, if your inside work is short, a partitioner is your way to get a better performance. Again, you need measure it but it might be faster if you collect the strongestPaths in local list (lock free) and then aggregate them into global list with lock when each work is complete. For this you need to use this overload: Parallel.ForEach<TSource, TLocal>( IEnumerable<TSource> source, Func<TLocal> localInit,
{ "domain": "codereview.stackexchange", "id": 19237, "lm_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, task-parallel-library", "url": null }
bigdata, definitions Title: What is "data science"? In recent years, the term "data" seems to have become a term widely used without specific definition. Everyone seems to use the phrase. Even people as technology-impaired as my grandparents use the term and seem to understand words like "data breach." But I don't understand what makes "data science" a new discipline. Data has been the foundation of science for centuries. Without data, there would be no Mendel, no Schrödinger, etc. You can't have science without interpreting and analyzing data. But clearly it means something. Everyone is talking about it. So what exactly do people mean by data when they use terms like "big data" and why has this become a discipline in itself? Also, if it is an emerging discipline, where can I find more serious/in-depth information so I can better educate myself?
{ "domain": "datascience.stackexchange", "id": 162, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bigdata, definitions", "url": null }
reference-request, computational-geometry, randomized-algorithms Title: Is there an O(n log n) algorithm for 4D line simplification? The Ramer-Douglas-Peucker algorithm for line simplification has worst-case $O(n^2)$ runtime. For suitably distributed random inputs, it has expected $O(n \log n)$ runtime complexity. In 2D, there are other algorithms with worst case $O(n \log n)$ runtime complexity, which compute exactly the same result as the Ramer-Douglas-Peucker algorithm. Since these algorithms are based on a "path (convex) hull" datastructure, it is not obvious whether they can be generalized to 4D lines. Is there a (randomized) algorithm which has (expected) $O(n \log n)$ runtime (independent of input) for the case of 4D lines? You may assume Euclidean distances and a global absolute tolerance. The algorithm that works with 4D case is described in the article Near-Linear Time Approximation Algorithms for Curve Simplification by four authors: Pankaj K. Agarwal, Sariel Har-Peled, Nabil H. Mustafa, and Yusu Wang.
{ "domain": "cs.stackexchange", "id": 5068, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reference-request, computational-geometry, randomized-algorithms", "url": null }
Re: Price of a Basic Computer [#permalink]  20 Mar 2012, 09:50 enigma123 wrote:
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 1, "lm_q1q2_score": 0.8244619306896955, "lm_q2_score": 0.8244619306896955, "openwebmath_perplexity": 7267.717855210852, "openwebmath_score": 0.5372782945632935, "tags": null, "url": "http://gmatclub.com/forum/the-total-price-of-a-basic-computer-and-printer-are-129380.html?fl=similar" }
thermodynamics, infrared-radiation A nice description can be found here. A very simple (single layer) example is the radiative emergency blanket - typically a thin sheet of metallized plastic that helps reduce heat losses in cases of exposure. These are sometimes known as "space blankets". Note that the ultimate goal of such insulation is that the outermost layer is at the same temperature as the environment. This means that the rate at which it gets heated (by whatever is inside) must be relatively low compared to the rate at which it loses heat (by radiation, or by convection). This opens up another avenue - make the "blanket" bigger. For the simple case of a small source of heat with a thermal output of $W$, you can see that the temperature of a black body shell of radius R will depend on the size of the shell. Heat that needs to be dissipated is constant, but as the area increases, the temperature needed for thermal dissipation decreases. If you assume radiative losses only, the expression becomes
{ "domain": "physics.stackexchange", "id": 18606, "lm_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, infrared-radiation", "url": null }
\begin{align} \implies p(3,n) &=\left\lfloor \frac{n-1}{2} \right\rfloor+\left\lfloor \frac{n-4}{2} \right\rfloor+...+\left\lfloor \frac{n-1-3i}{2} \right\rfloor+... \\ & =\sum_{0 \le i \le \left\lfloor \frac{n-1}{3}\right\rfloor}\left\lfloor \frac{n-1-3i}{2} \right\rfloor \end{align} Hence, the number of triangles is equal to $$p(3,n)=\sum_{0 \le i \le \left\lfloor \frac{n-1}{3} \right\rfloor}\left\lfloor \frac{n-1-3i}{2} \right\rfloor$$ Remark: The last steps have a lot of calculation, please feel free to correct if you find any mistake.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9884918516137419, "lm_q1q2_score": 0.8362072042941076, "lm_q2_score": 0.8459424353665382, "openwebmath_perplexity": 208.65186931533455, "openwebmath_score": 0.9023088216781616, "tags": null, "url": "https://math.stackexchange.com/questions/4175040/how-many-non-congruent-triangles-can-be-formed-by-the-vertices-of-a-regular-poly" }
c++, beginner, configuration if (!RegisterClass(&wc)) { return 0; } HWND hwnd = CreateWindowEx( 0, CLASS_NAME, WINDOW_NAME, WS_OVERLAPPEDWINDOW&~WS_MAXIMIZEBOX^WS_THICKFRAME, CW_USEDEFAULT, CW_USEDEFAULT, 250, 150, NULL, NULL, hInstance, NULL); CenterWindow(hwnd, WS_OVERLAPPEDWINDOW&~WS_MAXIMIZEBOX^WS_THICKFRAME, 0); if (hwnd == NULL) { return 0; } ShowWindow(hwnd, nCmdShow); UpdateWindow(hwnd); while (GetMessage(&message, NULL, 0, 0)) { if (!IsDialogMessage(hwnd, &message)) { TranslateMessage(&message); DispatchMessage(&message); } } return 0; } LPCSTR GetFortniteConfiguration() { char *path; size_t length; _dupenv_s(&path, &length, "LOCALAPPDATA"); std::string fortnite = "\\FortniteGame\\Saved\\Config\\WindowsClient\\GameUserSettings.ini"; std::string fullpath = path + fortnite; free(path);
{ "domain": "codereview.stackexchange", "id": 32969, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, beginner, configuration", "url": null }
ros-fuerte, ubuntu-precise, ubuntu Originally posted by RigorMortis on ROS Answers with karma: 88 on 2013-06-12 Post score: 1 Original comments Comment by CMC on 2013-06-13: I'm having exactly the same problem, also using Fuerte and Ubuntu 12.04. Comment by Georg Bartels on 2013-06-14: I'm having a very similar problem compiling a newly-created package which just depends on gazebo_worlds. I''m using Fuerte and Ubuntu 12.04. The problem actually boils down to depending on package pcl under fuerte/precise. There is already a bigger question for this: http://answers.ros.org/question/64501/pcl-error-in-ros-fuerte/ You can simulate the problem by creating a new package which just depends on pcl under fuerte/precise: roscreate-pkg my_pkg pcl rosmaking it will break with the same error as above. I also just tried doing the same thing under fuerte/oneiric and now error occured. So, if you happen to have access to such a system and just wanna try the tutorial then that could be a work-around.
{ "domain": "robotics.stackexchange", "id": 14537, "lm_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-fuerte, ubuntu-precise, ubuntu", "url": null }
- 2 years, 2 months ago Ohoo now i understand clearly. Thanks bro... - 2 years, 2 months ago your above expression will be incorrect when $\boxed{2a=d}$ - 2 years, 5 months ago In this case calculate the sum from $$a_2$$ to $$a_n$$, using the given formula and then add $$a_1$$ to both sides. - 2 years, 5 months ago Hey how you have assigned limit of $$x$$ can you please clarify - 2 years, 6 months ago $$x$$ varies from $$a-\frac{d}{2}$$ to $$a+\left(n-\frac{1}{2}\right)d$$. - 2 years, 5 months ago yaa ,I got this but also you can't use this formula for finding sum of similar terms i.e. $$S_n= \frac {1}{2}+ \frac {1}{2}+ \frac {1}{2}+ \frac {1}{2}+.... \frac {1}{2}(n^{th} term)$$ as common difference is $$0$$ so it will be in indeterminate form - 2 years, 5 months ago Thanks for the suggestion, I added this point in the note. - 2 years, 5 months ago I mean to is it original(your own)??? - 2 years, 5 months ago
{ "domain": "brilliant.org", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9748211626883622, "lm_q1q2_score": 0.9008730008948197, "lm_q2_score": 0.9241418173671895, "openwebmath_perplexity": 2927.9678096791167, "openwebmath_score": 0.9984549880027771, "tags": null, "url": "https://brilliant.org/discussions/thread/sum-of-harmonic-series/" }
javascript, mysql, node.js // Get filename from PostSchema db.query("SELECT filename FROM PostSchema WHERE id = ?", req.params.id, (err,post_image_output)=>{ if(err) return res.status(500).end(err.message); if(post_image_output.length > 0){ // Foreach image, delete one by one post_image_output.forEach(function(row){ try { console.log(row.filename); fs.unlinkSync(uploadDir + row.filename); console.log('Successfully deleted files'); deletePostSchemaReords(); } catch (err) { // handle the error } }); } deletePostSchemaReords(); }); } loadData(); }); There are some problems with this implementation:
{ "domain": "codereview.stackexchange", "id": 39150, "lm_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, mysql, node.js", "url": null }
• Now $n_0 = 1$ because $0 \cdot 1 + 0 \cdot 10$ is the only way to write $0$ as a non-negative integer weighted sum of $\{1,10\}$. • And $n_{20} = 3$, depending on whether there are zero, one, or two $10$s in the sum, the rest being made up with $1$s. • And $n_{40} = 5$, for the same reason : zero to four $10$s and the remainder made of $1$s. • Finishing, $n_{60} = 7$, $n_{80} = 9$, and $n_{100} = 11$. Finally, $N = 1 + 3 + 5 + 7 + 9 + 11 = 36$. That the number of ways is controlled by the $10$s and $20$s, with the $1$ making up the rest, is hinted in the snippet of the series in $x$, above. There is only one way to make totals up to $9$ from $\{1,10,20\}$. There are two ways for totals in $[10,19]$, four ways in $[20,29]$, six ways in $[30,31]$, nine ways in $[40,41]$, where the increment in the number of ways in each range of ten totals increases by $1$ each time we pass a multiple of $20$ (counting that we could either include or exclude one more $20$ in our sums).
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464471055738, "lm_q1q2_score": 0.8530525753563435, "lm_q2_score": 0.8740772384450967, "openwebmath_perplexity": 188.54968280008518, "openwebmath_score": 0.9319021701812744, "tags": null, "url": "https://math.stackexchange.com/questions/2482032/number-of-solutions-to-a-10b-20c-100-with-a-b-c-non-negative-integers/2482082" }
electromagnetism, antennas The integral above would be the potential difference between the tips of the dipole, but given that the electric and magnetic fields are time varying, I understand that the scalar potential itself becomes meaningless. Is this expression still usable for EMF anyway? Or does the fact that $\ell \ll \lambda$ make the potential difference still usable--and if so, why? Given that the arms of the dipole are perfect conductors, is the potential difference between the two ends of any arm zero? Should I therefore look at the potential difference between the midpoints of the two arms rather than the tips? I will then get $$\int_{\left(0,-\ell/4\right)}^{\left(0,+\ell/4\right)} \vec{E}\left(t\right)\cdot d\vec{r} = \frac{\ell} 2 \;\left|\vec{E}\left(t\right)\right|$$ Or does the radiation resistance of the arms come into play somehow?
{ "domain": "physics.stackexchange", "id": 9907, "lm_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, antennas", "url": null }
php, object-oriented, html, css, ip-address </body> </html> UserInfo.php <?php class UserInfo{ private static function get_user_agent() { return $_SERVER['HTTP_USER_AGENT']; } public static function get_ip() { $mainIp = ''; if (getenv('HTTP_CLIENT_IP')) $mainIp = getenv('HTTP_CLIENT_IP'); else if(getenv('HTTP_X_FORWARDED_FOR')) $mainIp = getenv('HTTP_X_FORWARDED_FOR'); else if(getenv('HTTP_X_FORWARDED')) $mainIp = getenv('HTTP_X_FORWARDED'); else if(getenv('HTTP_FORWARDED_FOR')) $mainIp = getenv('HTTP_FORWARDED_FOR'); else if(getenv('HTTP_FORWARDED')) $mainIp = getenv('HTTP_FORWARDED'); else if(getenv('REMOTE_ADDR')) $mainIp = getenv('REMOTE_ADDR'); else $mainIp = 'UNKNOWN'; return $mainIp; } public static function get_os() {
{ "domain": "codereview.stackexchange", "id": 38606, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, object-oriented, html, css, ip-address", "url": null }
organic-chemistry, reaction-mechanism, ions References: [1]: L. Kürti, B. Csakó, Strategic Applications of Named Reactions in Organic Synthesis, Elsevier Academic Press, 2005, p. 490. [2]: L. Kürti, B. Csakó, Strategic Applications of Named Reactions in Organic Synthesis, Elsevier Academic Press, 2005, p. 64. [3]: R. West, R. Lowe, H. F. Stewart, A. Wright, J. Am. Chem. Soc., 1971, 93, 282–283. DOI: 10.1021/ja00730a065. [4]: A. B. Smith III, M. Xian, J. Am. Chem. Soc., 2006, 128, 66–67. DOI: 10.1021/ja057059w.
{ "domain": "chemistry.stackexchange", "id": 9285, "lm_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, reaction-mechanism, ions", "url": null }
ros, navigation, move-base What sensor(s) are you using to find the target? Do you have distance and angle to the target from the robot's current pose? Do you need collision avoidance? Comment by mirakim on 2022-12-13: Thank you for the explanation! I use a tracking vision AI to find the target given input video from camera. After the target is detected, it can measure the distance and angle to the target from the robot's current pose by LiDAR sensor. And yes, it need collision avoidance. Based on what you have said, I would not use move_base for this task. The robot movement will be ugly, and it will be constantly starting and stopping as the goal changes its position.
{ "domain": "robotics.stackexchange", "id": 38169, "lm_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, move-base", "url": null }
python, web-scraping, beautifulsoup for i in r: # ... threads = [] for i in range(50): t = threading.Thread(target=dowork, args=(i*100000+1000000,)) First of all, you don't need to compile the regex in every iteration, and not even in every thread. It seems this can be a global constant, compiled only once. The threads run dowork with a different start parameter: 1m, 1.1m, 1.2m, ..., 5.8m, 5.9m. The smaller problem is that dowork only runs until 4m, so threads 30~49 will do nothing. The big problem is that they all run until 4m. I think you really meant this instead: def dowork(start0, maxcnt): counter = 0 while counter < maxcnt: counter += 1 start = str(start0 + counter) # ... This has some other improvements as well:
{ "domain": "codereview.stackexchange", "id": 9414, "lm_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, web-scraping, beautifulsoup", "url": null }
python, python-3.x, tic-tac-toe def find_index(num,board): """Find index of the number""" num_indx = [[indx1, indx2] for indx1, val1 in enumerate(board) for indx2, val2 in enumerate(val1) if val2 == num] return num_indx def remaining_num (board): """Available number list.""" avail_num = [board[i][j] \ for i in range(len(board)) \ for j in range(len(board)) \ if board[i][j] not in ('X', 'O')] return avail_num
{ "domain": "codereview.stackexchange", "id": 41506, "lm_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, tic-tac-toe", "url": null }
of any number would always be positive irrespective of whether the … The ABSOLUTE function in Excel returns the absolute value of a number. The absolute value of the difference between the actual and nominal resistance should not exceed the stated variability, so, with the resistance$\,R\,$in ohms. Type in any equation to get the solution, steps and graph This website … See. Access these online resources for additional instruction and practice with absolute value. Step 1: Find zeroes of the given absolute value function. Knowing this, we can use absolute value functions to solve some kinds of real-world problems. Knowing this, we can use absolute value functions to … Others use it to mean all functions that include an absolute value expression. The absolute value function is commonly thought of as providing the distance the number is from zero on a number line. The function outputs 0 when$\,x=\frac{3}{2}\,$or$\,x=-2. Use a graphing utility to
{ "domain": "genesisconsortiumllc.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9697854103128328, "lm_q1q2_score": 0.808146028566973, "lm_q2_score": 0.8333245891029457, "openwebmath_perplexity": 451.748810600166, "openwebmath_score": 0.7222049832344055, "tags": null, "url": "https://genesisconsortiumllc.com/ft-lbs-btc/absolute-value-function-c44a3b" }
## positive definite matrix inverse What Is The Best Fertilizer For Honeysuckle, Terraria Magma Skull, Bananas Extinct 1930, Teak Wood Main Door Price In Coimbatore, Gin Marinade Pork, San Francisco District Attorney's Office Directory, Facebook L6 Tpm Salary, Costco Baguette Ingredients, What Case Established Preferred Position, 21st Century Learning Pdf,
{ "domain": "blog-immo.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9546474246069458, "lm_q1q2_score": 0.8056222806701274, "lm_q2_score": 0.8438950966654772, "openwebmath_perplexity": 421.42968971301434, "openwebmath_score": 0.777326226234436, "tags": null, "url": "http://www.blog-immo.net/j6hz0/ic623.php?c60b73=positive-definite-matrix-inverse" }
neuroscience, brain The human brain has a mass of ~1.5kg, and volume ~1200cc (a little bigger for men, a little smaller for women). So is heavier than water by a good margin. While it has Cerebrospinal fluid, that only occupies the subarachnoid space (the space below the skull and above the cortex, contained between two layers: pia matter and arachnoid membrane) and the ventricular system (several spaces inside the brain, remnants of the embryological development of the brain). Neuron density may vary widely, depending mainly on the particular characteristics of neuron cell types and their interconnections. But besides neurons, there's a lot of infrastructure inside the brain. For example:
{ "domain": "biology.stackexchange", "id": 11828, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neuroscience, brain", "url": null }
homework-and-exercises, angular-momentum, momentum, rotational-dynamics \begin{equation} \left(\hat{F}\,\vec{i}+\hat{N}\,\vec{j}\right) = m\left( \left( -l\frac{\sqrt{3}}{2}\vec{i} + \frac{l}{2}\vec{j} \right) \times \dot\theta\vec{k} + \dot x\vec{i} \right) + m\left( l\vec{j} \times \dot\theta\vec{k} + \dot x\vec{i} \right) + m\dot x\vec{i} \end{equation} where $\vec{i}$, $\vec{j}$ and $\vec{k}$ are unit vectors of the frame and the $\times$ operator denotes the cross product between vectors. On the right hand side of the above equation, the first term corresponds to the linear momentum of particle $C$, the middle one corresponds to the linear momentum of particle $A$ and the last term is the linear momentum of particle $B$ which is only subject to a sliding motion. By developing the above equation, the $\hat{F}$ and $\hat{N}$ components of the applied linear impulse vector $\hat{\mathbf{J}}$ are identified as the horizontal linear impulse applied on particle $A$: \begin{equation} \hat{F} = 3m\dot x + \frac{3}{2}m l \dot\theta \end{equation}
{ "domain": "physics.stackexchange", "id": 29337, "lm_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, angular-momentum, momentum, rotational-dynamics", "url": null }
The GRMS value is then equal to the square root of the area. 1, 0. What is the approximation? (A) π/4 (0 + π /4 + π/2 + 3π/4) (B) π/4 (0 + 1/2 + √3/2 + 1) (C) π/4 (0 + √2/2 + 1 + √2/2) ( Problem 709 Locate the centroid of the area bounded by the x-axis and the sine curve y = a \sin \dfrac{\pi x}{L} from x = 0 to x = L. help_outline. For example, the fundamental frequency is 1. I am aware I can translate the curve down 30 units and calculate the bounded area, but I need 30 centimeters of thickness at every point of the curve perpendicular to the curve, diagram. 13. It ranges from -1 to 1; half this distance is called the amplitude. example, we will find the area under the curve y = sin(x) from x = 0 to x =. If you are integrating from 0 to 2*pi and getting a result of 0, then half of the area is positive and half of the area is negative; they are, in a sense, canceling each other out. maths sir steve help me reiny. Example 7. 15. You could count them - but a more accurate approach would
{ "domain": "popping1204.site", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9825575173068325, "lm_q1q2_score": 0.8250869244446827, "lm_q2_score": 0.8397339696776499, "openwebmath_perplexity": 349.75428318802983, "openwebmath_score": 0.8734630346298218, "tags": null, "url": "https://dtawsw.popping1204.site/area-under-sine-curve.html" }
thermodynamics, radiation, convection The amount of heat held by each, assuming a uniform heat density, is proportional to the volume of the object. Both convection and radiation are proportional to the surface area of the object, (which you have defined in your question). So at the initial instant when the two objects are intially at the same temperature the difference in heat loss will be proportional to the surface area of the object - so the object with the largest area will lose more heat. Given my earlier assumption that the objects are geometrically similar then this means the larger object loses heat faster (but as the amout of heat held is proportional to its volume it holds more heat). The heat loss in both results in a reduction of temperature - as the heat loss is proportional to the area and the amount of heat held by the object is proportional to the volume, the heat density of the larger object reduces more slowly than the heat density of the smaller object. So it loses temperature more slowly.
{ "domain": "physics.stackexchange", "id": 60331, "lm_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, radiation, convection", "url": null }
turing-machines, computation-models, nondeterminism Title: How do nondeterministic Turing machines compute general function problems? (Hope this hasn't been asked before, but I didn't find anything.) In my understanding, nondeterminism applies to decision problems only, due to the requirement of the existence of an accepting path. In Wikipedia, the class $NP$-easy is defined to be solvable in deterministic poltime, with access to an oracle for a decision problem in NP. So this seems to back my assumption.
{ "domain": "cs.stackexchange", "id": 6853, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "turing-machines, computation-models, nondeterminism", "url": null }
rotation between two curves around the x-axis. Rather than plotting a single points on each iteration of the for loop, we plot the collection of points (that make up the ellipse) once we have iterated over the 1000 angles from zero to 2pi. The following applies a rotation of 45 degrees around the y-axis: rotate(hMesh, [0 1 0], 45);. The curve when rotated about either axis forms the surface called the ellipsoid (q. Textbook solution for Single Variable Calculus: Early Transcendentals 8th Edition James Stewart Chapter 10. 1, then the equation of the ellipse is (15. xcos a − ysin a 2 2 5 + xsin. Please visit math dictionary to view the specific definition for each first order differential equation. Rotation of axes formulas; elimination of the xy-term by rotation of axes; displaying the graph of Ax 2 + Bxy +Cy 2 + Dx + Ey + F on a graphing utility; classification of a conic by using its discriminant. Figure 2: Left: hyperboloid of one sheet. In other words, we want to apply the
{ "domain": "rsalavis.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9848109538667758, "lm_q1q2_score": 0.8028498766201418, "lm_q2_score": 0.815232480373843, "openwebmath_perplexity": 546.9529436440415, "openwebmath_score": 0.7337966561317444, "tags": null, "url": "http://scjo.rsalavis.it/equation-of-a-rotated-ellipse.html" }
hvac, heat-exchanger, refrigeration My limited understanding of heat exchangers is that they operate at a colder temperature that the set point of what they are cooling. I think that a conventional air cooler would have constant problems with ice forming on the heat exchanger, since even a few degrees colder than the room will be below freezing. I inquired with a company called 'Cool Bot' that has a controller that uses a conventional air conditioner to cool a well insulated room. They agreed that my application would not be suitable due to ice formation. The second thought is to use a freezer. Chill brine or antifreeze to some cold temperature, and run it through flexible pipe laid directly on the floor. If the floor had a liner so that in effect it was a 3" deep pond, then the seedling boxes can rest on pallets above the pond with the same fan circulating air against the pond.
{ "domain": "engineering.stackexchange", "id": 4473, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "hvac, heat-exchanger, refrigeration", "url": null }
ds.algorithms, graph-algorithms, lower-bounds, parameterized-complexity, fine-grained Indeed, it follows from an earlier paper of Marx: Can You Beat Treewidth? Theory of Computing 6(1): 85-112 (2010) that a $f(k)n^{o(k/\log k)}$ time algorithm would violate the ETH. Here $n$ is the number of vertices in $H$ and $k$ is the number of vertices in $G$. This holds even when $G$ has max degree $3$ (but the degree of $H$ is unbounded).
{ "domain": "cstheory.stackexchange", "id": 3888, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ds.algorithms, graph-algorithms, lower-bounds, parameterized-complexity, fine-grained", "url": null }
rostest, pr2 A core test which includes the nodes you're testing, and your test nodes A simulation rostest file which sets up the simulation by including the appropriate PR2 gazebo launch files, and then includes your core test file (#1) An optional PR2 rostest file which includes the PR2 launch file (the one normally run by robot start), and your core test file (#1) Your simulation test is then simply invoking rostest #2 If you want to run your tests on a real robot, you have a few choices: Start the robot normally, and use roslaunch to run your core test file (#1). This will run all of the regular nodes in that file, but not the test nodes Stop the robot, and use rostest to run your PR2 rostest file (#3). This file will then start all of the PR2 processes, and along with your nodes and tests, run them, and produce a test result. Originally posted by ahendrix with karma: 47576 on 2014-07-11 This answer was ACCEPTED on the original site Post score: 2
{ "domain": "robotics.stackexchange", "id": 18584, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rostest, pr2", "url": null }
ros-kinetic, ubuntu, ubuntu-xenial From the Twist message, v = msg.linear.x and z = msg.angular.z. For a differential drive robot: v = (v_r + v_l) / 2 z = (v_r - v_l) / l Combining and simplifying we get: 2*v + l*z = 2*v_r v_r = v + l*z/2 v_l = v_r - l*z = v - l*z/2 If the motor gives ticks_per_rev ticks per revolution, and the wheel diameter is d (in m), then: wheel_circumference = pi * d wheel_rotations_per_meter = 1 / (pi * d) ticks_per_meter = wheel_rotations_per_meter * ticks_per_rev ticks_per_second_l = v_l * ticks_per_meter ticks_per_second_r = v_r * ticks_per_meter A couple more complexities:
{ "domain": "robotics.stackexchange", "id": 32644, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros-kinetic, ubuntu, ubuntu-xenial", "url": null }
c#, programming-challenge, queue, circular-list Assert.AreEqual(2, Q.Dequeue()); Assert.AreEqual(3, Q.Front); Assert.AreEqual(3, Q.Rear); Assert.AreEqual(3, Q.Dequeue()); } [TestMethod] public void QueueOverflowTest() { CyclicQueue Q = new CyclicQueue(5); Q.Enqueue(1); Q.Enqueue(2); Q.Enqueue(3); Q.Enqueue(4); Q.Enqueue(5); Assert.AreEqual(1, Q.Dequeue()); Q.Enqueue(6); Assert.AreEqual(2, Q.Front); Assert.AreEqual(6, Q.Rear); } }
{ "domain": "codereview.stackexchange", "id": 34421, "lm_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#, programming-challenge, queue, circular-list", "url": null }
rotational-dynamics, rigid-body-dynamics Title: -Rewritten question- Why do drop spindles spin faster when they have a top whorl? New version of this question So, I've tried putting two bounties on this question in hopes that somebody understands what I am asking, in hopes for a satisfactory answer. I'm also going to include some background information to specify some qualities of these spindles: So historically, most cultures used bottom-whorl spindles because of their stability. Top-whorl spindles are require the whorl to be perfectly balanced, otherwise the spindle would wobble. Today, top-whorl spindles are far more common because technology has made making them easier. What I don't understand is that many people say top-whorls spin faster than bottom-whorls, making them better for short staple-length fibres like cotton. I'm trying to figure out why. Here's an image of a top and bottom-whorl respectively, as well as two abstracted versions:
{ "domain": "physics.stackexchange", "id": 62403, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rotational-dynamics, rigid-body-dynamics", "url": null }
python, text-mining, random-forest, sampling Title: How to Choose a Sample for Multiply Classifiers I've got a dataset of 1.5 million and am looking to train 7 different classifiers -- for each classifier I have up to 10 classes to predict. The total sample has 20K text features (more if I include bigrams). Like most distributions of text features, only 20% of them account for 80% of occurrences in the sample. I am going to manually label 10K for each prediction category, and use that to predict against the remaining 1.5 million as well as new documents that come through. My question is, how would I choose the subsample based on the features and distribution. Should I just choose a random sample (ie try to match the distribution)? Or should I try to find the 10K that maximizes the number of features represented in the sample? Whats the benefit and drawback of each?
{ "domain": "datascience.stackexchange", "id": 1645, "lm_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, text-mining, random-forest, sampling", "url": null }
c#, reinventing-the-wheel, csv, generics, serialization //Checks if the property is of an acceptable type and outputs a ValidType. Only gets sent properties that exist in the collumn names private bool CheckForValidProperty(PropertyInfo property, out ValidType validType) { if (property.PropertyType.IsGenericType) { Type interfaceType = property.PropertyType.GetInterface(typeof(ICollection<>).Name); if (interfaceType != null) { if (interfaceType.Name == typeof(ICollection<>).Name) { if (property.PropertyType.GenericTypeArguments[0].IsPrimitive || property.PropertyType.GenericTypeArguments[0] == typeof(string)) { validType = new ValidType(true, property); return true; } } } } else if (property.PropertyType.IsPrimitive || property.PropertyType == typeof(string)) {
{ "domain": "codereview.stackexchange", "id": 18174, "lm_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#, reinventing-the-wheel, csv, generics, serialization", "url": null }
javascript, inheritance Which works just fine, and doesn't require some temp constructor/object at any point. Just try it with this simple example: function Animal(){}; function Cow(){}; Cow.extends(Animal); function Bird(){}; function Chicken(){}; Bird.extends(Animal); Chicken.extends(Bird); var dinner = new Chicken(); console.log(dinner instanceof Animal);//true -- sorry vegetarians console.log(dinner instanceof Cow);//false -- no beef tonight console.log(dinner instanceof Bird);//true -- mmm, poultry console.log(dinner instanceof Chicken);//true -- roasted, probably
{ "domain": "codereview.stackexchange", "id": 5700, "lm_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, inheritance", "url": null }
general-relativity, fluid-dynamics, metric-tensor, stress-energy-momentum-tensor, linear-algebra A tangent vector $v$ is said to be null with respect to the metric tensor $g$ if $g(v,v)=0$. Remember that a metric tensor is an object $g$ which eats two vectors and spits out a number. In terms of components, the condition is that $g_{ab}v^av^b=0$, or written out in full glory, $\sum_{a,b=0}^3g_{ab}v^av^b=0$. In your case, you're being told to consider the standard Lorentzian metric whose components are \begin{align} [g_{ab}]&= \begin{pmatrix} -1&0&0&0\\ 0&1&0&0\\ 0&0&1&0\\ 0&0&0&1 \end{pmatrix} \end{align} (or perhaps there's an overall minus sign; I didn't really check). You're also told to consider the vector $k$ whose components are $k^0=1,k^1=1,k^2=k^3=0$. The claim is that this vecotr $k$ is indeed null with respect to $g$. Why? A very trivial calculation: \begin{align} g(k,k)&=\sum_{a,b=0}^3g_{ab}k^ak^b=g_{00}k^0k^0+g_{11}k^1k^1=(-1)(1)(1)+(1)(1)(1)=0. \end{align} (the second equality is because all other terms of the summation are zero).
{ "domain": "physics.stackexchange", "id": 86999, "lm_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, fluid-dynamics, metric-tensor, stress-energy-momentum-tensor, linear-algebra", "url": null }
javascript, beginner, jquery, twitter-bootstrap markTime() - Gets the current time and marks it as start or end of shift depending on user session state. Utility Functions: militaryToStandard(time) - Converts military time to standard time. dowToWord(dow) - Turns time.getDay() to word. time.getDay() returns day of the week as int. padZero(number) - As the function names says gives padding zeroes for number less than 9 (1 digit numbers). constructTime(withDOW) - Constructs date in a clear format. (MM / DD / YYYY [DAY_OF_THE_WEEK]). Takes a param that either adds in Day of the Week or not.
{ "domain": "codereview.stackexchange", "id": 26277, "lm_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, twitter-bootstrap", "url": null }
• @saulspatz: Well, I didn't make any effort to turn those parts into rigorous arguments since the limit agreed with the limit from the exact calculation -- but if I had to turn them into rigorous arguments, I think I'd argue that these results are exact conditional on not rolling any equal numbers before the game ends; the probability of rolling equal numbers before the game ends goes to zero as $n\to\infty$; and the expectations conditional on rolling equal numbers before the game ends are finite -- I think that should be enough? – joriki Aug 15 '18 at 18:40 • That makes sense, thanks. I guess I understood it in the sense you originally intended, but I thought I was missing something. – saulspatz Aug 15 '18 at 18:55 • Turns out that you and I interpreted the rules differently. See my edited answer. – saulspatz Aug 16 '18 at 10:29
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787872422174, "lm_q1q2_score": 0.8429645558695267, "lm_q2_score": 0.8539127529517043, "openwebmath_perplexity": 259.7367063629853, "openwebmath_score": 0.8452918529510498, "tags": null, "url": "https://math.stackexchange.com/questions/2882717/interview-question-on-probability-a-and-b-toss-a-dice-with-1-to-n-faces-in-an-a/2883203" }
python, optimization, matrix, computational-geometry def make_rotation_transformation(angle, origin=(0, 0)): cos_theta, sin_theta = cos(angle), sin(angle) x0, y0 = origin def xform(point): x, y = point[0] - x0, point[1] - y0 return (x * cos_theta - y * sin_theta + x0, x * sin_theta + y * cos_theta + y0) return xform def rotate(self, angle, anchor=(0, 0)): xform = make_rotation_transformation(angle, anchor) self._offsets = [xform(v) for v in self._offsets]
{ "domain": "codereview.stackexchange", "id": 7031, "lm_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, optimization, matrix, computational-geometry", "url": null }