text
stringlengths
1
1.11k
source
dict
notation, chemical-formula Given this, the formula for polystyrene could be given as: $$\ce{CH3–(C8H8)_{n}\! -CH3}$$ But some might prefer to instead give it, more informatively, as the following, in which case the nested enclosing glphys make an appearance: $$\ce{CH3–[CH2-CH(C6H5)]_n –CH3}$$ [See William Reusch's polymers website (MSU), Section 2. Writing Formulas for Polymeric Macromolecules , which provides many such examples.] Using parentheses inside square brackets is also the convention given here for complex ions: Wikipedia: Chemical formula Since you're trying to write a program, you might find something here to be of use: Stack Overflow: Can nested parentheticals be parsed in chemical formulae?
{ "domain": "chemistry.stackexchange", "id": 16181, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "notation, chemical-formula", "url": null }
• indeed Beautiful ! – Shubham Sharma Jul 9 '15 at 11:09 • Thanks! I'll admit that it wasn't obvious to me -- at first I was trying to be "creative" by turning this into a continuous equation, via converting differences into derivatives and seeing if I knew the solution to the (delay-?)differential equation. But as soon as I subtracted $K(n-1)$ from both sides to turn the differences into derivatives, I saw there was a much easier way to solve this, hence this answer. :) – Mehrdad Jul 9 '15 at 11:12 • @MichaelGaluza: Dude, my solution is quadratic... – Mehrdad Jul 9 '15 at 15:42 • @ShubhamSharma: Michael is totally wrong, but do you really need me to do the last step for you? No, this shouldn't lead you to another recurrence. It just simplifies to $K(0) + n(K(1) - K(0)) - n + C\sum_{k=1}^{n} k$ and $\sum_{k=1}^{n} k$ is just $n(n+1)/2$. This is the right answer to your question. – Mehrdad Jul 9 '15 at 15:46
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9843363522073338, "lm_q1q2_score": 0.8424453978477751, "lm_q2_score": 0.855851148805615, "openwebmath_perplexity": 632.1250963909799, "openwebmath_score": 0.9844675660133362, "tags": null, "url": "https://math.stackexchange.com/questions/1354828/how-to-solve-this-recurrence-kn-2kn-1-kn-2c/1354874" }
Thus the total number of even four-digit numbers is $108+48$. Remark: We try to explain "why split" further, by giving a wrong argument that tries to capture the specialness of $0$, but fails. The first (rightmost) digit can be chosen in $5$ ways. The last can be chosen in $3$ ways, and the rest can be chosen in $4\cdot 3$ ways, for a total of $180$. What's wrong with this? Certainly it is true that there are $5$ choices for first digit. It is also true that there are $3$ choices for the last digit. But it is not true that for every one of the $5$ choices of first digit, there are $3$ choices of last digit. If we choose an odd first digit, then yes, there are $3$ choices for the last. But if we choose an even first digit, there are $2$ choices for the last. So the number of ways to choose first and last is not $5\cdot 3$. In fact it is $3\cdot 3+2\cdot 2$. -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357555117624, "lm_q1q2_score": 0.800434642811514, "lm_q2_score": 0.8175744739711883, "openwebmath_perplexity": 165.63725987670665, "openwebmath_score": 0.903095543384552, "tags": null, "url": "http://math.stackexchange.com/questions/102929/splitting-counting-problem" }
performance, beginner, vba Second, get input. Dim userInput As String userInput = InputBox("Enter 1 for Test Requirements Matrix, 2 for Test Status, or 3 for Test Steps") Third, validate Input. Input must be a number. And it must be 1, 2 or 3. If the input is invalid, let's prompt the user to try again. Public Function TypenumFromUser() As Long '/ User must input a table type as a number '/ Current options are 1, 2 or 3 '/ If the input is invalid, prompt the user to try again GetNewInput: Dim userInput As String userInput = InputBox("Enter 1 for Test Requirements Matrix, 2 for Test Status, or 3 for Test Steps") Dim intCheck As Long On Error GoTo BadUserInput intCheck = CLng(userInput) On Error GoTo 0 Dim isValidInput As Boolean isValidInput = False If IsWholeNumber(intCheck) Then If intCheck >= 1 And intCheck <= 3 Then isValidInput = True End If End If
{ "domain": "codereview.stackexchange", "id": 20972, "lm_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, beginner, vba", "url": null }
computability, lambda-calculus, turing-machines which should return true if its argument ignores its argument and always returns true, should return false if its argument returns false on any inputs, and goes into a loop if its argument goes into a loop on any inputs. We can define this function pretty easily, as follows: isAlwaysTrue p = p (λ(). true) ∧ p (λ(). false) ∧ p (λ(). ⊥) where ⊥ is the looping computation and ∧ is the and operator on booleans. This works because there are only three inhabitants of unit → bool in PCF, and so we can exhaustively enumerate them. However, in a TM+Goedel-encoding style model, p could test how long its argument takes to return an answer, and return different answers based on that. So the implementation of isAlwaysTrue with TMs would fail to meet the spec.
{ "domain": "cstheory.stackexchange", "id": 5042, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computability, lambda-calculus, turing-machines", "url": null }
c++, beginner, object-oriented Event::~Event() = default; Calendar.h #include "Event.h" #include <vector> class Calendar { private: std::vector<Event> calendar; public: bool display_events() const; bool add_event(std::string event_type, std::string event_priority, std::string event_date, std::string event_time); const std::vector<Event> &getCalendar() const; bool is_event_valid(const std::string& event_date, const std::string& event_time); ~Calendar(); }; Calendar.cpp #include "Calendar.h" #include <iostream> #include <utility> const std::vector<Event> &Calendar::getCalendar() const { return calendar; } bool Calendar::display_events() const { if (!getCalendar().empty()) { for (const auto &event : calendar) { event.display_event(); } return true; } else { std::cout << "Your calendar is empty \n"; return false; } }
{ "domain": "codereview.stackexchange", "id": 39695, "lm_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, object-oriented", "url": null }
quantum-mechanics, wavefunction, symmetry, identical-particles Title: What exactly does an exchange of particle labels for identical particle wave functions mean *physically*? We know that the wavefunction of identical particles behaves as follows: $$\Psi(1,2)=\begin{cases}-\Psi(2,1) & \text{for fermions} \\ +\Psi(2,1) & \text{for bosons} \end{cases}$$ Now, what exactly does exchanging particle labels mean physically? The above relation, as far as I know comes due to the observables remaining the same for two identical particle system under the exchange of particle labels and thus- $$\Psi(1,2)=e^{i\delta}\Psi(2,1)$$ or $$\Psi(1,2)=e^{2i\delta}\Psi(1,2)$$giving us $\exp(i\delta)=\pm1$ which respectively accounts for bosonic and fermionic wavefunctions. Yes the phase argument is a bit too simple.
{ "domain": "physics.stackexchange", "id": 77672, "lm_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, symmetry, identical-particles", "url": null }
soft-question, lambda-calculus, turing-machines, functional-programming, np I've been mulling on this question purely from a point of self inquiry as part of learning the lambda calculus model of computation. I understand that it's "non-intuitive" and that's why Godel favored the Turing model. However, I just wish to know what are the known theoretical limitations of this functional style of computation and how much of a hindrance would it be for analyzing the NP class of problems? You may wish to look at cost semantics for functional languages. These are various computational complexity measures for functional languages that do not pass through any kind of Turing machine, RAM machine, etc. A good place to start looking is this Lambda the Ultimate post, which has some good further references. Section 7.4 of Bob Harper's Practical Foundations for Programming Languages explains the costs semantics. The paper On the relative usefulness of fireballs by Accattoli and Coen shows that $\lambda$-calculus has at most linear blowup with respect to RAM machine model.
{ "domain": "cstheory.stackexchange", "id": 3823, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "soft-question, lambda-calculus, turing-machines, functional-programming, np", "url": null }
php $data = [ 'service_id' => $service_id, 'comms_matrix_id' => $comms_matrix_id, "exemption_type_id" => $exemption_type_id, "market_id" => $market_id, "service_domain_id" => $service_domain_id, "demand_ref" => $demand_ref, "name" => $name, "description" => $description, "requestor" => $requestor, "business_priority_id" => $business_priority_id, "exemption_status_id" => $exemption_status_id, "expiry_date" => $expiry_date, "hits" => 0, "designdoc" => $designdoc, "known_contact" => $known_contact ];
{ "domain": "codereview.stackexchange", "id": 36453, "lm_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", "url": null }
ros, windows10 Originally posted by Lila on ROS Answers with karma: 11 on 2021-07-09 Post score: 1 Original comments Comment by gvdhoorn on 2021-07-09: I would really recommend to not use -r in these command lines. It's just going to give the impression rosdep actually did something useful, while in reality it just ran into errors and gave up. Then it merrily prints: Continuing to install resolvable dependencies... #All required rosdeps installed successfully and if you don't pay attention, it's almost as-if things are ok .. There is no package manager on Windows. Unfortunately that means that rosdep cannot work there either as it relies on using a package manager to install the dependencies. The Windows installation instructions don't use rosdep they will be used by Linux and other platforms. Originally posted by tfoote with karma: 58457 on 2022-09-19 This answer was ACCEPTED on the original site Post score: 1
{ "domain": "robotics.stackexchange", "id": 36675, "lm_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, windows10", "url": null }
work: Tokuchan ( talk ) This is a retouched picture , which means that it has been digitally altered from its original version. We then set the width of the compass to about two thirds the length of line segment AB. The main way Bisection fails is if the root is a double root; i. xl xu Bisection algorithm. The red curve shows the function f and the blue lines are the secants. One of your comments says you are creating an object to round values to 6 places, but you are not creating an object there. This Demonstration shows the steps of the bisection root-finding method for a set of functions. Let a = 0 and b = 1. It is a bit difficult to apply bisection method to a non-deterministic function. Bisection method is a closed bracket method and requires two initial guesses. In this paper, we have presented a new method for computing the best-fitted rectangle for closed regions using their boundary points. The theory is kept to a minimum commensurate with comprehensive coverage of the subject
{ "domain": "zite.pw", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9845754474655618, "lm_q1q2_score": 0.8588918084029662, "lm_q2_score": 0.8723473763375643, "openwebmath_perplexity": 521.1656787315939, "openwebmath_score": 0.6526755094528198, "tags": null, "url": "http://hons.zite.pw/bisection-method.html" }
dobsonian-telescope, collimation Preparing our laser collimation setup First thing to know is that any laser collimator will likely have the beam strong enough to cause damage to your eyes if pointed directly in them, or damage strong light sensitive equipment, like for example digital cameras, so be careful with it and take precautions. Carefully read instructions on how to handle and use it, before you do so. This is how a laser collimator might look like: Next thing to do is make it functional by inserting batteries or plugging its power adapter and testing it actually works by turning it on with the switch, if it has it (probably does). Once you'll establish your laser collimator is turned on and functioning by observing (usually ruby red) light beam spot it makes on any neutral surface, turn it back off and attach any adapters on it you might need to help you attach it to your telescope's focuser. This is how your telescope's OTA (Optical Tube Assembly) might look like:
{ "domain": "astronomy.stackexchange", "id": 30, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dobsonian-telescope, collimation", "url": null }
cheminformatics, machine-learning As to your specific points about chirality and aromaticity, etc. All of this information can be attached to a graph via parameters belonging to each node, although I would personally avoid giving information that isn't strictly necessary. That is, there is nothing special about a bond which is in an aromatic ring. You need to provide enough data that the model can learn about this on its own. If you tell it that bonds in aromatic rings are special enough to get another parameter, this is probably going to bias the model in some unforeseen way. Chirality is easily handled by a simple parameter attached to each node.
{ "domain": "chemistry.stackexchange", "id": 13303, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cheminformatics, machine-learning", "url": null }
javascript, stackexchange, userscript }, angular: { expr: /[Aa]ngular[Jj][Ss]/g, replacement: "AngularJS", reason: "'AngularJS is the proper capitalization" }, thanks: { expr: /(thanks|please\s+help|cheers|regards|thx|thank\s+you|my\s+first\s+question).*$/gmi, replacement: "", reason: "'$1' is unnecessary noise" }, commas: { expr: /,([^\s])/g, replacement: ", $1", reason: "punctuation & spacing" }, php: { expr: /(^|\s)[Pp]hp(\s|$)/gm, replacement: "$1PHP$2", reason: "PHP: PHP: Hypertext Preprocessor" }, hello: { expr: /(?:^|\s)(hi\s+guys|good\s(?:evening|morning|day|afternoon))(?:\.|!)/gmi, replacement: "", reason: "Greetings like '$1' are unnecessary noise" }, edit: { expr: /(?:^\**)(edit|update):?(?:\**):?/gmi,
{ "domain": "codereview.stackexchange", "id": 10442, "lm_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, stackexchange, userscript", "url": null }
fluid-dynamics, everyday-life, air, aerodynamics, flow I know that my ears became warmer due to the lessening in air flow directly by it, but my question is how does the hood help limit this air flow? Is it because there can only be so much air in the hood, thus more cannot come in until some has escaped, thus preventing some from entering it in the first place? I know the hood doesn't just make it more aerodynamic in the conventional sense because it catches more air. A diagram of the behavior and reason why I hear the wind less would be appreciated.
{ "domain": "physics.stackexchange", "id": 35682, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-dynamics, everyday-life, air, aerodynamics, flow", "url": null }
classical-mechanics, noethers-theorem, classical-field-theory Title: Goldstein's derivation of Noether's theorem This is a followup to my previoucs question: Translation invariance Noether's equation In Goldstein's derivation of the Noether's theorem in chapter 13, we have the infinitesimal transformation $$x'^\mu \rightarrow x^{\mu} + \delta x^{\mu}$$ $$\eta_\rho'(x'^\mu)=\eta_\rho(x^\mu)+\delta\eta_\rho(x^\mu).$$ The Lagrangian becomes $$\tag{13.129} \mathcal{L}(\eta_\rho(x^\mu),\eta_{\rho,\nu}(x^\mu),x^\mu)\rightarrow \mathcal{L}'(\eta'_\rho(x'^\mu),\eta'_{\rho,\nu}(x'^\mu),x'^\mu)$$ My question is: are the two sides of 13.129 just equal? If that is the case then, in $$\tag{13.133} \int_{\Omega}\mathcal{L}(\eta_\rho(x^\mu),\eta_{\rho,\nu}(x^\mu),x^\mu)d^4x=\int_{\Omega'}\mathcal{L}'(\eta'_\rho(x'^\mu),\eta'_{\rho,\nu}(x'^\mu),x'^\mu)d^4x'$$
{ "domain": "physics.stackexchange", "id": 89796, "lm_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, noethers-theorem, classical-field-theory", "url": null }
## Section5.5Improper integrals Note: 2–3 lectures (optional section, can safely be skipped, requires the optional Section 3.5) Often it is necessary to integrate over the entire real line, or an unbounded interval of the form $$[a,\infty)$$ or $$(-\infty,b]\text{.}$$ We may also wish to integrate unbounded functions defined on a open bounded interval $$(a,b)\text{.}$$ For such intervals or functions, the Riemann integral is not defined, but we will write down the integral anyway in the spirit of Lemma 5.2.8. These integrals are called improper integrals and are limits of integrals rather than integrals themselves. ### Definition5.5.1. Suppose $$f \colon [a,b) \to \R$$ is a function (not necessarily bounded) that is Riemann integrable on $$[a,c]$$ for all $$c < b\text{.}$$ We define \begin{equation*} \int_a^b f := \lim_{c \to b^-} \int_a^{c} f \end{equation*} if the limit exists.
{ "domain": "jirka.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9890130576932457, "lm_q1q2_score": 0.8039363959969898, "lm_q2_score": 0.8128673223709251, "openwebmath_perplexity": 429.3657042297469, "openwebmath_score": 0.9996519088745117, "tags": null, "url": "https://www.jirka.org/ra/html/sec_impropriemann.html" }
system-identification so the whole idea of a good driving function is one that does not exceed limits of linearity in the device, yet delivers a lot of energy to reduce measurement and numerical error. a measure of efficacy for a driving signal is crest factor, which is the ratio of the maximum signal amplitude to the r.m.s. amplitude. the lower the crest factor, the better. it means more energy driving the device under test while remaining within maximum limits.
{ "domain": "dsp.stackexchange", "id": 1466, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "system-identification", "url": null }
fluid-dynamics, conservation-laws, vortex Title: Conserved quantities of $N$-vortices In my notes we are given that for $N$-vortices with location ${(x_i,y_i)}^N_{i=1}$ and stegnth ${\Gamma _i}$. We have the conserved quanitites of energy, momentum and angular momentum. How does one prove these to be true. (i am looking for method that doesn't use Hamiltonian if possible) I assume the following is known. Velocity of i-th vortex is given by $$ \bar{v}_i=\sum_{j\neq i} \Gamma_j \frac{[\hat{\omega}\times \bar{r}_{ij}]}{r^2_{ij}},\quad (1) $$ where $\hat{\omega}$ is a unit vector directed out of the plane and $\bar{r}_{ij}=\bar{r}_{j}-\bar{r}_{i}$ is a vector, connecting i-th and j-th votices and $\Gamma_j$ is the borticity of the j-th vortex. Interaction energy of i-th and j-th vortices is $$ U_{ij}=-\frac{1}{4\pi}\Gamma_i\Gamma_j \ln(r_{ij}). $$ Here are the rough sketches of the proofs of the conservation laws. Energy conservation. Taking time derivative from the sum of all interaction energies, we obtain $$
{ "domain": "physics.stackexchange", "id": 77989, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fluid-dynamics, conservation-laws, vortex", "url": null }
beginner, c, numerical-methods The memory allocation function calloc(size_t count, size_t size) was written with arrays in mind. In addition to being slightly more readable, calloc() sets all of the values to zero when the array is allocated, which means the values in the array are initialized. real* coeffs = calloc(capacity, sizeof(*coeffs));
{ "domain": "codereview.stackexchange", "id": 38082, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, c, numerical-methods", "url": null }
fft, statistics, frequency-response where $\langle$angle brackets$\rangle$ represent averages taken over data segments, and a windowing function is applied to each data segment before taking the Fourier transform ($\mathcal{F}$). A more typical implementation will compute the cross spectral density of x and y divided by the power spectral density of x: $$\frac{\langle \mathcal{F}[y] \cdot \mathcal{F}[x]^* \rangle}{\langle|\mathcal{F}[x]|^2\rangle} = \frac{\langle \mathcal{F}[y] \cdot \mathcal{F}[x]^* \rangle}{\langle\mathcal{F}[x]\cdot\mathcal{F}[x]^*\rangle}$$ Where $\cdot$ represents a pointwise product, and $*$ the complex conjugate. I believe this is to reduce the effect of data segments where bins of $\mathcal{F}[x]$ are excessively small. Incoherent estimation Your employer has suggested that you estimate the transfer function using $$\frac{|\langle \mathcal{F}[y]|\rangle}{\langle |\mathcal{F}[x]|\rangle}$$ This will work, but has two big disadvantages:
{ "domain": "dsp.stackexchange", "id": 280, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fft, statistics, frequency-response", "url": null }
machine-learning, neural-network, scikit-learn, mlp, dropout # Backward propagate last = self.n_layers_ - 2 # The calculation of delta[last] here works with following # combinations of output activation and loss function: # sigmoid and binary cross entropy, softmax and categorical cross # entropy, and identity with squared loss deltas[last] = activations[-1] - y # Compute gradient for the last layer self._compute_loss_grad( last, n_samples, activations, deltas, coef_grads, intercept_grads )
{ "domain": "datascience.stackexchange", "id": 11368, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, neural-network, scikit-learn, mlp, dropout", "url": null }
machine-learning, computer-vision, python-3.x, opencv, matrix https://towardsdatascience.com/a-hands-on-application-of-homography-ipm-18d9e47c152f cv2.warpPerspective() transforms the image itsef. For the problem above we don't need these two functions since we already have the extrinsics, the intrinsecs and the coordinates of the points in the image. Considering the presented above, I wrote a function to transform into BEV a list o points list_x_y given the intrinsics and the extrinsics: def compute_point_perspective_transformation(intrinsics, extrinsics, point_x_y): """Auxiliary function to project a specific point to BEV Parameters ---------- intrinsics (array) : The camera intrinsics matrix extrinsics (array) : The camera extrinsics matrix point_x_y (tuple[x,y]) : The coordinates of the point to be projected to BEV Returns ---------- tuple[x,y] : the projection of the point """
{ "domain": "datascience.stackexchange", "id": 8832, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, computer-vision, python-3.x, opencv, matrix", "url": null }
organic-chemistry, hydrocarbons, aromaticity The anion system has 4n electrons (whereas it should have had 4n+2 electrons in it π system) The anion system has an sp3 carbon and is hence non-planar (where it should have been planar) Due to these two issues (second issue mainly), there is no ring current in the complete ring and so no conditions need to be considered whether the compound is antiaromatic or aromatic in nature. Cyclopentadienyl anion also has an sp3 carbon as an anion. However the anion formed is aromatic if planar and so this overcomes the ring strain and so retains aromaticity.
{ "domain": "chemistry.stackexchange", "id": 15535, "lm_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, hydrocarbons, aromaticity", "url": null }
snp, igv Title: IGV jump to rsID location Is it possible to load a list of rsID identifiers (e.g. rs66823261) to IGV to then be able to jump to the location of each of them when copy+pasting the rsID on the locus text box? For human and other genomes, there is currently the feature of typing in a gene name, then jumping to the gene location. I wonder if there is a way of achieving the same for rsIDs. EDIT: thanks for the answers so far. I downloaded the Infinium GSA bed file from Illumina's website (https://support.illumina.com/downloads/infinium-global-screening-array-v1-0-support-files.html), loaded on an IGV session, which asked to create an index. I did a liftover of the file to hg38 and sorted with bedtools sort. Then I went to the text box, introduced one of the rs ids: rs6569648
{ "domain": "bioinformatics.stackexchange", "id": 270, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "snp, igv", "url": null }
# Number of ways, powers of $2$ sum up specific values Given the set $B=\{2^0,2^1, 2^2,...2^{n-1} \}$. Now you pick $n$ elements of $B$ with repetitions and sum the picked elements, e.g. • picking every element once this sums up to $s_{1,1,...,1}=\sum_{k=0}^{n-1} 2^k= 2^{n}-1$. • Another example would be picking $n$ times the $k$th element resulting in $s_{0,...n,...,0}=n2^k$. I want to count the number of occurrences of all possible sums I can construct in this way, by using generating functions but I can't figure out how this works in this case. Any help appreciated...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9901401423688665, "lm_q1q2_score": 0.8024876997515036, "lm_q2_score": 0.8104789063814616, "openwebmath_perplexity": 281.4387569584399, "openwebmath_score": 0.88144451379776, "tags": null, "url": "https://math.stackexchange.com/questions/603527/number-of-ways-powers-of-2-sum-up-specific-values" }
SOLUTION: (C) Lorentz transformation $\displaystyle t' = \gamma (t - \frac{v}{c^2}x)$ suggests that for the observer $O'$ moving at constant speed $v$ parallel to $x$-axis the event (flash of light) that occurs at $(t_0, x_0) = (0, 10)$ for the observer $O$ is at time $\displaystyle t' = \gamma(0 -\frac{v}{c^2}x_0)$ (we assume $O'$ is moving in the positive direction of $x$ and at a zero time according to both observers the origins of their reference frames coincide, therefore $t'$ is negative; this means that $(0, 10)$ event (as observed by $O'$) occurs $|t'|$ seconds before the other). Let $\displaystyle \alpha = \frac{ct'}{x_0} = \frac{3 \cdot 10^{8} \cdot 13 \cdot 10^{-9}}{10} = 0.39$, then, using units in which $c = 1$, one has $\displaystyle \alpha = \gamma v = \frac{v}{\sqrt{1 - v^2}}$ or $\displaystyle \alpha^2 = \frac{v^2}{1-v^2}$ $\implies$ $\displaystyle \displaystyle v = \frac{\alpha}{\sqrt{\alpha^2 +1}} \approx \alpha = 0.39$ (for such an approximation the calculation
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.986777179803135, "lm_q1q2_score": 0.8090520315808108, "lm_q2_score": 0.8198933337131076, "openwebmath_perplexity": 252.16609511028813, "openwebmath_score": 0.5848482251167297, "tags": null, "url": "https://physicsworks.wordpress.com/2011/10/10/94/" }
asymptotics, landau-notation Title: Difference of Big-Oh terms -- what is the result? I'd like to double-check my understanding of Big-Oh. The definition is that $f(n) = O(g(n))$ if $|f(x)| ≤ M\,|g(x)|$ for a natural number $M$ and for sufficiently large values of $x$. Now, if $g(n) = O(n^2) - O(n^2)$, may we conclude that $g(n) = 0$? If not, what can we say about $g(n)$? We have $g(x) = f(x) - h(x)$ for some functions $f,h\in O(x^2)$. Since the functions are measuring the running time of some algorithm, I'll assume explicitly that $f(x)\geq 0$ and $h(x)\geq 0$, for all $x$. So there are constants $c_1$ and $c_2$ such that, for all large enough $x$, $f(x)\leq c_1x^2$ and $h(x)\leq c_2x^2$. We have $g(x) = f(x) - h(x)$. Since $h(x)\geq 0$ for all $x$, we certainly know that $g(x)\leq f(x)$, since $g(x)$ is "$f(x)$ minus something non-negative." So, in particular, we have $g(x)\leq c_1x^2$ for all large enough $x$, i.e., $g(x) = O(x^2)$.
{ "domain": "cs.stackexchange", "id": 8694, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "asymptotics, landau-notation", "url": null }
star, stellar-evolution, star-formation random, it is extremely likely that the M star is much older than the O star, and you can know that purely from the spectral type and luminosity class. But if you want to know the age of the M star, or the O star, in years within their evolutionary stages, then it gets more difficult because there is rather little main-sequence evolution in the spectrum. There is some evolution though, especially late in the main sequence, so you could tell its age if there is evidence of main-sequence evolution in the spectrum (for one thing, the luminosity rises with age, within a spectral type, but that's pretty hard to tell from the spectrum). If the star is both low-mass and early in its main-sequence evolution, the best way to tell its age is to look at the rotational broadening of its lines, as low-mass stars spin down rapidly as they age (due to strong magnetic fields and weak winds).
{ "domain": "astronomy.stackexchange", "id": 1982, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "star, stellar-evolution, star-formation", "url": null }
c++, game-of-life, sdl void render(const Gamestate&, const InputHandler&) const; }; #endif graphics.cpp #include "graphics.h" #include <cmath> Graphics::Graphics() { SDL_Init(SDL_INIT_VIDEO); window = SDL_CreateWindow("dungeon", 0, 0, WINDOW_SIZE_X, WINDOW_SIZE_Y, SDL_WINDOW_SHOWN); renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND); } Graphics::~Graphics() { SDL_DestroyRenderer(renderer); SDL_DestroyWindow(window); SDL_Quit(); }
{ "domain": "codereview.stackexchange", "id": 20438, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, game-of-life, sdl", "url": null }
performance, sql, sql-server AND u.codi_fons = 1) GROUP BY f.codi_arxiu, f.nom_arxiu, f.codi_grup, f.codi_fons_refe, f.codi_fons, f.nom_fons, f.any_ini, f.any_fi, f.cronologia UNION SELECT f.codi_arxiu, f.nom_arxiu, f.codi_grup, f.codi_fons_refe, f.codi_fons, f.nom_fons, f.any_ini, f.any_fi, f.cronologia, SUM (CASE WHEN u.num_imatges > 0 THEN 1 ELSE 0 END) AS num_uni_imatges, 0 AS unitats_text, COUNT (u.nt1_unitat) AS unitats_notext FROM ianc_fons f JOIN ianci_unicats u ON ( f.codi_arxiu = u.nt1_codi_arxiu AND f.codi_fons = u.nt1_codi_fons ) WHERE 1 = 1
{ "domain": "codereview.stackexchange", "id": 405, "lm_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, sql, sql-server", "url": null }
in. Product presentation and graph of the parabola. State the vertex, State the y-intercept, Indicate if there is a maximum or minimum value and give the value. This video illustrates how to find some extra points to complete your table of values when graphing a quadratic equation. To find the x-intercept let y = 0 and solve for x. Find more Mathematics widgets in Wolfram|Alpha. To find the y-intercept let x = 0 and solve for y. This lesson is designed for the learner to work between the three forms of a quadratic function: general, vertex, and factored. Graphing Quadratic functions in vertex or intercept form completing the square tutorial five consective intergers have a sum of zero write a equation you would use to find these intergers. of the axis of symmetry and. Quadratic Equations and Models. The mouth of the cup keeps getting larger to infinity. Parabola Calculator Portable is quite simple to use and does not require lots of resources to run. The parabola equation in vertex
{ "domain": "psychotherapie-im-schloss.de", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9822877012965885, "lm_q1q2_score": 0.8206852011205793, "lm_q2_score": 0.8354835350552603, "openwebmath_perplexity": 483.2046075812748, "openwebmath_score": 0.43395131826400757, "tags": null, "url": "http://yiob.psychotherapie-im-schloss.de/parabola-vertex-calculator.html" }
thermodynamics, energy, temperature, states-of-matter But we can't ignore the chemical properties of the substances (interactions between molecules) if we're to be realistic. I'm guessing that in most solids kinetic energy is transferred by electrons more than anything. In metals the atoms also vibrate but what can we say about the storage of heat energy in a macromolecular structure like silicon dioxide? It's an interesting question but all I can say is that it is true for ideal gases of any kind. That is, if two samples of ideal gases are taken with the same number of moles, they both have the same energy. I cannot answer you're question for liquids and solids, but there is probably no simple description of how it works.
{ "domain": "physics.stackexchange", "id": 39126, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, energy, temperature, states-of-matter", "url": null }
javascript, node.js, express.js // write head then pipe response res.writeHead(200, headers); stream.pipe(res); }); }); } }; Personally, I would use an array with named properties instead of an Object for my routes, but key/value is OK. Something like this would allow you to just do a routes.forEach() and have direct access without having to use Object.keys: staticize(app, [ { url: '/foo', path: '../test/foo/bar.txt' }, { url: '/foo/more', path: '../test/foo-extra/bar.txt' } ]); module.exports = function(app, routes) { // Use a forEach here instead of a loop routes.forEach(function(route){ app.get(route.url, function(req, res) { // Save the route since we use it three times in here var path = route.path; // create a readable stream var stream = fs.createReadStream(path, {encoding: 'utf8'});
{ "domain": "codereview.stackexchange", "id": 10183, "lm_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, node.js, express.js", "url": null }
c++, multithreading, thread-safety, reinventing-the-wheel, c++14 auto times = std::vector<std::chrono::nanoseconds>{}; times.reserve(10000); for (int j = 0; j < 10000; ++j) { cout_flag.test_and_set(std::memory_order_acquire); std::cout << "round " << j << std::endl; for (unsigned u = 0; u < 3; ++u) { results1.push(pool1.run(lambda1)); results2.push(pool2.run(lambda2)); } int i = 0; auto start = std::chrono::steady_clock::now(); cout_flag.clear(std::memory_order_release); // main loop while (i++ < 100) { auto & future1 = results1.front(); future1.get(); results1.pop(); results1.push(pool1.run(lambda1)); auto & future2 = results2.front(); future2.get(); results2.pop(); results2.push(pool2.run(lambda2)); }
{ "domain": "codereview.stackexchange", "id": 8129, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, multithreading, thread-safety, reinventing-the-wheel, c++14", "url": null }
optics, electromagnetic-radiation, experimental-physics To sum up my question, can the radiation output of a nuclear device be used, even in principle, as the power source for a laser beam (the laser beam being tuned to whatever frequency is deemed most efficient for deflection purposes.) Project Excalibur The idea of a nuclear pumped X-ray laser was one which was investigated in detail in the Reagan "Star Wars" program of the 1980s, backed by one Edward Teller. Tests were carried out by surrounding the nuke with bundles of rods to create a one-pass laser. Apparently it was nowhere near efficient enough to be used in a military context. [That latter fact was reported at the time but is not mentioned in the wiki article]
{ "domain": "physics.stackexchange", "id": 20593, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, electromagnetic-radiation, experimental-physics", "url": null }
To begin the exercise, we set our variables (H=height for dropped roll, h=height for unrolled roll, r = inner diameter, R = outer diameter), then identified the time it takes for the dropped roll to hit the ground using standard kinematics: $t_{drop} = \sqrt {{{2H} \over g}}$ Next, we did the same thing for the unrolling toilet paper roll: $t_{unroll} = \sqrt {{{2h} \over a}}$ Of course, if we want them to hit at the same time, the times must be equal, therefore we can show: ${H \over h} = {g \over a}$ Obviously, what we really need to focus our efforts on is finding the linear acceleration of the unrolling roll. To save ourselves some time, we started by looking up the moment of inertia for a cylinder: $I = {\textstyle{1 \over 2}}M({r^2} + {R^2})$ Using the parallel-axis theorem to account for the unrolled roll rotating about its outer radius we find: $I = {\textstyle{1 \over 2}}M({r^2} + {R^2}) + M{R^2} = {\textstyle{1 \over 2}}M({r^2} + 3{R^2})$
{ "domain": "aplusphysics.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9854964169008471, "lm_q1q2_score": 0.8034087016215247, "lm_q2_score": 0.8152324938410784, "openwebmath_perplexity": 1608.4413137553308, "openwebmath_score": 0.5128610730171204, "tags": null, "url": "https://aplusphysics.com/community/index.php?/blogs/entry/70-unrolling-toilet-paper/" }
c++, linked-list, iterator constexpr forward_iterator(Node* forw_iter = nullptr) : m_iterator{ forw_iter } {}
{ "domain": "codereview.stackexchange", "id": 40611, "lm_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, iterator", "url": null }
and its main diagonal contains variances (i.e., the covariance … As these terms suggest, covariance and correlation measure a certain kind of dependence between the variables. While growth is in percentage(A) and a company’s new product line growth in percentage (B). Is covariance linear? The covariance of two related variables each multiplied by a third independent variable Hot Network Questions You are simply seeing light touching your eyes (masturbation addiction) Here we will do another example of the Covariance in Excel. Since $$1 + \rho < 1 - \rho$$, the variance about the $$\rho = -1$$ line is less than that about the $$\rho = 1$$ line. In fact, it is the same thing exactly. Calculate the Covariance. Hands-on Example. The covariance between $X$ and $Y$ is defined as \begin{align}%\label{} \nonumber \textrm{Cov}(X,Y)&=E\big[(X-EX)(Y-EY)\big]=E[XY]-(EX)(EY). XY = Cov(X;Y) Each of the examples in figure 3 can simply be considered to be a linearly transformed instance of figure 6:
{ "domain": "cyrilsancereau.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9532750400464604, "lm_q1q2_score": 0.8427325919024881, "lm_q2_score": 0.8840392924390585, "openwebmath_perplexity": 683.3606059656761, "openwebmath_score": 0.4935759902000427, "tags": null, "url": "http://www.cyrilsancereau.com/dw10h9h5/t9pmf5.php?id=covariance-of-a-line-026b59" }
quantum-mechanics, operators, schroedinger-equation, hamiltonian, time-evolution Title: How do we perform the time derivative of the perturbation series for the time-evolution operator? The following image is from Greiner's book, Field Quantisation, where he carried out the derivative in question. The only way I could make sense of it, was that the derivative acts only on the last integral of element $dt_n$ because the latter is essentially the only variable and all others depend on it (?); it gives the delta function $\delta(t-t_n)$; and that obtains $\hat H_1(t)$. When I isolate the corresponding integral however, it doesn't pan out. Furthermore, I still can't make sense of the $n$ and change of the sum range that the author claims comes from the symmetry of the integrand. How so ? Hint: The Schrödinger equation (8.43) can be proven by using the group property $$U(t_3,t_1)~=~U(t_3,t_2)U(t_2,t_1)$$ of the time-evolution operator $U$, and Taylor expansion of $U(t+\delta t,t)$. For more details, see my Phys.SE answer here.
{ "domain": "physics.stackexchange", "id": 72529, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, operators, schroedinger-equation, hamiltonian, time-evolution", "url": null }
bacteriology, taxonomy Textbookofbacteriology.net. (2017). Online Textbook of Bacteriology. [online] Available at: http://textbookofbacteriology.net/index.html [Accessed 3 May 2017]. Lactic Acid Bacteria: Microbiological and Functional Aspects, Fourth Edition En.wikipedia.org. (2017). Lactobacillales. [online] Available at: https://en.wikipedia.org/wiki/Lactobacillales [Accessed 3 May 2017].
{ "domain": "biology.stackexchange", "id": 7077, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "bacteriology, taxonomy", "url": null }
satisfiability Title: How to reduce UNSAT problems so that less than $7/8+\epsilon$ of clauses are unsatisfied? In this question I ask about what use is a solver that can find an assignment that satisfies, say, 90% of the clauses of a known satisfiable 3SAT problem in polynomial time. The answer seems to be: given a problem ϕ that may or may not be satisfiable, you perform a reduction on an input formula ϕ to another formula ϕ′ such that ϕ′ is 90% satisfied iff ϕ is SAT and run my hypothetical algorithm on ϕ′, which will tell you if ϕ is SAT or not. My question is a follow-up: what is the reduction from ϕ to ϕ'? The reference is Håstad's classic paper, Some optimal inapproximability results. It relies on the PCP theorem and on Raz's parallel repetition theorem. The proof is not particularly easy, and even the reduction itself is not so simple to state (if you take into account the PCP component).
{ "domain": "cs.stackexchange", "id": 8650, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "satisfiability", "url": null }
algorithms, algorithm-analysis, optimization, time-complexity, quicksort I assumed that the sublist is split into 1:1 by each step. As a result, I got $c_1nlog$($n\over k$) + $c_2nk$, but I am definitely not sure of my answer since I don't know if my assumption is correct. In the textbook, the average case of a non-optimized QuickSort was supposed to be calculated by assuming the partition could be the first element, second element, third element, ... , last element and then dividing the whole sum by n. I would appreciate some help! Thanks. The height of tree is not $log(\frac{k}{n})$ which is negative because $k<n$. We stop expanding the tree when we reach $k$, therefore we reduce the height of the original tree by $log(k)$. So the height is $log(n)-log(k)=log(\frac{n}{k})$ and the average running time will be: $$c_1nlog(\frac{n}{k})+c_2nk=c_1nlogn-c_1nlogk+c_2nk$$ As noted in comments, since $k$ is constant, that is equivalent to $\theta(nlogn)$.
{ "domain": "cs.stackexchange", "id": 19740, "lm_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, algorithm-analysis, optimization, time-complexity, quicksort", "url": null }
ros, calibration, stereo, camera1394 and I'm trying to calibrate the stereo pair, however running something like: rosrun camera_calibration cameracalibrator.py --approximate=0.1 --size 7x6 --square 0.035 right:=/stereo/right/image_raw left:=/stereo/left/image_raw left_camera:=/stereo/left right_camera:=/stereo/right and I get: Waiting for service /stereo/left/set_camera_info ... OK Waiting for service /stereo/right/set_camera_info ... OK and the calibration window doesn't get displayed. I've try to increase the value of approximate, without any results. However running the calibration node for each left and right camera works and I was able to calibrate the left and right camera. Stere_image_proc is running and I can display the /stereo/left/image_rect_color and /stereo/right/image_rect_color but I am unable to get the pointcloud or the disparity map. Running stereo_view gives me the following warning:
{ "domain": "robotics.stackexchange", "id": 8516, "lm_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, calibration, stereo, camera1394", "url": null }
quantum-field-theory, quantum-electrodynamics, hilbert-space I recommend Weinberg's QFT book, vol 2, sec 15.7 for BRST introduction. Even if you don't need non-Abelian gauge, the cited section of Weinberg is not difficult at all. (There you encounter the structure constant $C^{\alpha\beta\gamma}$. You can safely think of it as the Levi-Civita symbol $\epsilon^{ijk}$, and $t_{\alpha}$ as Pauli matrices.) Or rather, you'll be stricken to find how easy it is in the functional quantization, compared to Nakanishi's machinery, (Fourier expansion of the field and heavy use of $\delta(x)$ and its derivative.) - BRST wins also in pragmatism. As a free material, see for example Sredinicki's QFT book, sec 74, but prerequisites sections may be a bit more cumbersome than Weinberg. Peskin & Schroeder doesn't help.
{ "domain": "physics.stackexchange", "id": 14536, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, quantum-electrodynamics, hilbert-space", "url": null }
rate-equation $$A = P \cdot \sigma \bar{c}_\text{rel}N_A.$$ which is decidedly not of the form $A = PZ$. (In fact, it is pretty much $PZ$ but divided through by $N_\mathrm{A}$ and the concentrations of the reacting species.) We might like to think of this as being $A = PZ'$, where $Z'$ is some kind of scaled collision density where the concentration factors (and $N_\mathrm{A}$) are removed from the equation, and that would be fine; but it's not right to say $A = PZ$.
{ "domain": "chemistry.stackexchange", "id": 16402, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rate-equation", "url": null }
quantum-field-theory Is quantum mechanics only applied to particle having mass? but non-relativistic quantum mechanics will fail even for particles with mass if those particles are travelling at speeds near $c$. For example the Schrodinger equation is unable to describe what happens when particles collide in the LHC. It isn't a question of whether the particles are massive or not, but whether they are relativistic or not.
{ "domain": "physics.stackexchange", "id": 41464, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory", "url": null }
machine-learning, neural-network Title: Model the predictive relationship between images Hello fellow machine learners, We have numerous pairs of 64 x 64 (or other dimensionality) images (maps). In each pair, the first image demonstrates a physical parameter, e.g. wind speed, at each pixel; the second shows another physical or financial parameter, e.g. temperature or insurance loss, at each pixel. We want to model the predictive relationship from the first image to the second. Our previous models typically consisted of characterizing the field using domain-specific knowledge for dimension reduction. Now my colleague wants to explore the possibility of using statistical learning methods alone.
{ "domain": "datascience.stackexchange", "id": 8988, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, neural-network", "url": null }
c++, c++11, socket, state static const int NO_FILE = -2; private std::atomic<int> filedescriptor; }; Some of Socket's methods implemented: Socket::Socket(int filedescriptor_) : filedescriptor { filedescriptor_ } { // intentionally left blank } Socket::Socket(Socket&& other) : filedescriptor { other.filedescriptor.exchange(NO_FILE) } { // intentionally left blank } Socket::~Socket() { if (filedescriptor >= 0) { close(filedescriptor); // handle error } } UnconnectedSocket represents opened sockets that are not yet connected to an other socket or bound to an address: class UnconnectedSocket: public Socket { public: UnconnectedSocket(); UnconnectedSocket(UnconnectedSocket&& other); UnconnectedSocket& operator=(UnconnectedSocket&& other); virtual ~UnconnectedSocket(); private: UnconnectedSocket(const UnconnectedSocket&) = delete; UnconnectedSocket& operator=(UnconnectedSocket&) = delete; };
{ "domain": "codereview.stackexchange", "id": 14142, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++11, socket, state", "url": null }
quantum-field-theory, spacetime, renormalization, effective-field-theory Generically, the effective Lagrangian contains all possible couplings of the fields to each other that aren't forbidden by a symmetry of the Lagrangian we started with, and so the "adjustable parameters" that the post you link talks about become a list of coupling constants - e.g. for $\phi^4$ theory, we get a coupling $\lambda_{2n}(\Lambda')$ for each even number of fields. The choice of $\lambda_{2n}(\Lambda')$ that produces the same scattering amplitudes as our original theory are the correct choice (because a theory whose scattering amplitudes differed would obviously be a different theory), so the "quantity invariant under renormalization" is "just" the S-matrix, not some high-level observable property. There are interesting observations to make that of all the possible $\lambda_{2n}(\Lambda')$, only a few - namely the "renormalizable" and "super-renormalizable" - are relevant at $\Lambda'\ll \Lambda$ (but this is another technical argument I don't want to add here), so if we
{ "domain": "physics.stackexchange", "id": 86248, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-field-theory, spacetime, renormalization, effective-field-theory", "url": null }
c#, math-expression-eval Define constants for your operators, possible make them an enum since they form a logical grouping. It will also make it easier to find places where you use the constants. Otherwise you have to do a text search for + and will end up finding places where that is used in the code and not as a parsing operator. Another benefit of defining constants is to avoid magic numbers. This is not something you are doing here, but is related to the same idea. It is a good practice to get into for values that contain a special meaning.
{ "domain": "codereview.stackexchange", "id": 4341, "lm_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#, math-expression-eval", "url": null }
general-relativity, gravity, metric-tensor, degrees-of-freedom \begin{equation} g_{\mu \nu} = g_{\alpha \beta} \frac{\partial x^{\alpha} }{\partial x^{\mu}} \frac{\partial x^{\beta}}{\partial x^{\nu}} \end{equation} you might end up with some off-diagonal elements in one coordinate basis which might not have existed before. These extra non-zero components are therefore unphysical/not true degrees of freedom, and you get one such contribution for each spacetime dimension. In total, there are four further not independent components. Finally, notice that any metric satisfies the Bianchi identities: \begin{equation} R_{\mu \nu \rho \sigma \, ; \lambda} + R_{\mu \nu \lambda \rho \, ; \sigma} + R_{\mu \nu \sigma \lambda \, ; \rho} = 0 \end{equation} where the semicolon indicates the covariant derivative: \begin{equation} R_{\mu \nu \rho \sigma \, ; \lambda} = \nabla _{\lambda}R_{\mu \nu \rho \sigma} \end{equation} In the contracted form, one may rewrite them as: \begin{equation} R^{\mu \nu}{}_{;\mu} - \frac{1}{2} g^{\mu\nu} \, R _{;\mu} = 0
{ "domain": "physics.stackexchange", "id": 89820, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, gravity, metric-tensor, degrees-of-freedom", "url": null }
= 4 −1. ( e.g represents a self-adjoint operator [ 1 ] over a real matrix... A matrix has distinct eigenvalues, then the inverse matrix will simplify the because. … properties of symmetric matrices we have to find the determinant of a matrix. And therefore all its elements outside the main diagonal are equal to its conjugate transpose the corresponding for. Not be diagonalizable by a real symmetric matrix has only real values ( i.e., they can not be numbers... Naturally in a variety of applications, and the determinant of a matrix a! Matrices we have to find the transposed form of the square matrix 2 symmetric matrix properties are given below it. Because in linear algebra, a diagonal matrix is invertible, then the inverse of a symmetric matrix then a. In nature of ATA is always a symmetric matrix may not be diagonalizable by similarity ; every real symmetric Recall... Says that any symmetric matrix numbers X and y, if X = y, then may! ), its eigenvalues and eigenvectors when the
{ "domain": "1818lc.se", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.975946443607529, "lm_q1q2_score": 0.8235964260317209, "lm_q2_score": 0.8438951045175643, "openwebmath_perplexity": 628.8097926999568, "openwebmath_score": 0.8918614983558655, "tags": null, "url": "https://1818lc.se/ockmw/09624e-properties-of-symmetric-matrix" }
python Best individual in generation 22 meets fitness threshold - complexity: (2, 8) Number of evaluations: 3450 Best genome: Nodes: NodeGene(id=0, type=INPUT, bias=0.0, response=4.924273, activation=sigmoid) NodeGene(id=1, type=INPUT, bias=0.0, response=4.924273, activation=sigmoid) NodeGene(id=2, type=OUTPUT, bias=0.0, response=4.921960812206318, activation=sigmoid) NodeGene(id=3, type=HIDDEN, bias=-2.340619398413843, response=4.930091408143276, activation=sigmoid) NodeGene(id=4, type=HIDDEN, bias=0.4674809078722945, response=4.918937894580367, activation=sigmoid) Connections: ConnectionGene(in=0, out=2, weight=1.0534262789427578, enabled=True, innov=0) ConnectionGene(in=1, out=2, weight=-1.6479324848766828, enabled=True, innov=1) ConnectionGene(in=0, out=3, weight=-3.5479647367966765, enabled=True, innov=2) ConnectionGene(in=3, out=2, weight=5.970619032226201, enabled=True, innov=3)
{ "domain": "datascience.stackexchange", "id": 1517, "lm_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", "url": null }
java, object-oriented, playing-cards return card; } @Override public Card[] dealCards(int n) { if(deck.size() < n) { throw new IllegalStateException("Not enough cards left in deck"); } Card[] cardsToDeal = new Card[n]; for(int i = 0; i < n; i++) { int index = rand.nextInt(deck.size()); Card card = deck.get(index); deck.remove(index); cardsToDeal[i] = card; dealtCards.add(card); } return cardsToDeal; } @Override public void shuffle() { Collections.shuffle(deck); } } Dealer.java package com.tn.blackjack; import com.tn.deck.AbstractHand; public class Dealer extends AbstractHand<Card> { private CardDeck deck; Dealer() { this.deck = new CardDeck(Suit.getSuits(), Rank.getRanks()); }
{ "domain": "codereview.stackexchange", "id": 25539, "lm_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, playing-cards", "url": null }
reference-request, type-theory, dependent-type, calculus-of-constructions, fixed-points Edit, attempting to clear up some confusion: We can not have fix. Is it possible to calculate result of fix of each datatype metatheortically? If so can we add this through modalities? Does the following hold metatheoretically: If MLTT + universes derives, |- T : (Set -> Set), can we always derive some |- TFixP : Set, such that TFixP , T |- T TFixP ≅ TFixP? I suspect no, but failing to construct a countexample. Is there some? For example for id, the fixed point can be constructed by saying data FixId = FixIdC (id FixId) or equivalently data FixId = FixIdC FixId, we are free to say this. It defines an empty type, but defining an empty type is fine.
{ "domain": "cstheory.stackexchange", "id": 5341, "lm_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, type-theory, dependent-type, calculus-of-constructions, fixed-points", "url": null }
java, web-scraping, memory-optimization public static void main(String[] args) throws Exception { System.out.println("Running web crawler: " + new Date()); WebCrawler webCrawler = new WebCrawler(); webCrawler.createFiles(); try (Scanner in = new Scanner(new File ("seeds.txt"))) { while (in.hasNext()) { webCrawler.enque(new LinkNode (in.nextLine().trim())); } } catch (IOException e) { e.printStackTrace(); return; } webCrawler.processQueue(); webCrawler.out.close(); webCrawler.err.close(); }
{ "domain": "codereview.stackexchange", "id": 14250, "lm_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, web-scraping, memory-optimization", "url": null }
the proposed multinomial family of probabilistic models, and a comparison of their properties against the existing ones. In order to have a better understanding of probabilistic models, the knowledge about basic concepts of probability such as random variables and probability distributions will be beneficial. Classification predictive modeling problems … It allows for incorporating domain knowledge in the models and makes the machine learning system more interpretable. This concept is also known as the ‘Large Margin Intuition’. To answer this question, it is helpful to first take a look at what happens in typical machine learning procedures (even non-Bayesian ones). – Sometimes the two tasks are interleaved - Signup and get free access to 100+ Tutorials and Practice Problems Start Now. The team is now looking into expanding this model into other important areas of the business within the next 6 to 12 months. Also, probabilistic outcomes would be useful for numerous techniques related
{ "domain": "blackoxo.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9678992905050947, "lm_q1q2_score": 0.808663928738389, "lm_q2_score": 0.8354835432479661, "openwebmath_perplexity": 801.563465804044, "openwebmath_score": 0.5255371332168579, "tags": null, "url": "https://blackoxo.com/iw4tard/f703c2-probabilistic-models-machine-learning" }
javascript, performance, dynamic-programming The last two aren't really interesting, since they're just subsequences of the first. Now, this really isn't a problem for arrays as short as what you've got here. Still, it's a fun exercise, so I tried my hand at it. There's probably an even more elegant solution than what I'm proposing here, though. Algorithms aren't my strong suit, I'm afraid. But here's what I came up with: Start a sequence with the first element of the input array Iterate through the array If a value is greater than the sequence's maximum, append it to sequence If it's less and it's the first such value we've found, recurse with a subset of the input array, starting at the current index. Store the result. Return whichever sequence - the current one, or the "fork" - is longer Kinda hard to explain, actually. Hope the code below will help illustrate: function findLongestIncreasingSequence(array) { var sequence = [], fork = null; // Always add the first value to the sequence sequence.push(array[0]);
{ "domain": "codereview.stackexchange", "id": 23067, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, performance, dynamic-programming", "url": null }
ros determine what sort of sensors and devices you need to plug in, and make sure the board you pick supports them search the internet for other people doing similar projects, and look at which computers they're using look at the ROS installation instructions and search the internet for guides on installing ROS on each board that you're considering. skim through each guide to get a sense of how well polished it is and how complex it is. Poorly-polished or complex guides indicate that it will take more work to get ROS running on that particular board. Originally posted by ahendrix with karma: 47576 on 2015-01-08 This answer was ACCEPTED on the original site Post score: 1 Original comments Comment by A.M Dynamics on 2015-01-08: Dear @ahendrix I want to prepare a minimum ROS-based core system for Robotic purposes. Except some standard sensors such as encoders, IMU etc., it would be great if the board could support cameras like Kinect.
{ "domain": "robotics.stackexchange", "id": 20508, "lm_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 }
reference-request, approximation-hardness, graph-colouring Title: Reference Request: Asymptotic hardness of $hk$ coloring $k$-colorable graphs I heard of a result in approximate graph coloring, but cannot find the source. The result is: For every constant $h$ there exists a sufficiently large $k$ such that coloring a $k$-colorable graph with $hk$ colors is NP-hard. Could someone please point me to the relevant paper? Here are the references: S. Khanna, N. Linial, and S. Safra, On the hardness of approximating the chromatic number, Combinatoria, 20 (2000), pp. 393–415. C. Lund and M. Yannakakis, On the hardness of approximating minimization problems, J. ACM, 41 (1994), pp. 960–981.
{ "domain": "cstheory.stackexchange", "id": 2191, "lm_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, approximation-hardness, graph-colouring", "url": null }
eigen, ros-electric Is EIGEN_INCLUDE_DIRS also set? You are using include_directories(EIGEN_INCLUDE_DIRS). This is listed in the tutorial and I have that running successfully, too. Comment by boFFeL on 2012-11-08: It's also set to /usr/include/eigen3. Hmm :-( The problem is that you are missing the dependency on eigen in manifest.xml. You actually do not need FindEigen.cmake. The simplest (however incompatible to fuerte) way in electric is to use the ROS package eigen. It is a very simple dummy package that only exports the correct compiler/linker flags for linking against eigen. If you want to use it, just add <depend package="eigen" />
{ "domain": "robotics.stackexchange", "id": 11657, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "eigen, ros-electric", "url": null }
ros, dynamixel, dynamixel-motor Originally posted by llSourcell on ROS Answers with karma: 236 on 2013-11-26 Post score: 3 You generally get what you pay for. With Dynamixels, you are making a trade-off of getting a fully functional and tested actuator out of the box, versus spending a lot of time rigging up your own actuators, and probably dealing with numerous engineering efforts. If you are making a million robot arms, it probably makes sense to spend significant engineering effort to design custom actuators. If you are making only one, why not leverage the engineering effort that Robotis has already put into Dynamixels.
{ "domain": "robotics.stackexchange", "id": 16273, "lm_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, dynamixel, dynamixel-motor", "url": null }
data-structures, heaps How did I do? Also, help with 3-4 would be much appreciated! I think you are right in 1,2,5. I didnt really understand your proof for 5, since it should be different from 1. Also, the proof for 1 can be greatly simplified: $A[i]\le A[2i],A[2i+1]$ is the definition of the minimality property in the heap, and you can directly show that using the fact your list is ordered. About 3, try to create a big heap such that the left subheap has large values but the right subheap has small values About 4, it doesn't really matter if its $2\log(n) -1$ or $2(\log(n)-1)$. Think of the series as a path from the root to some leaf. It should help you figure that out :) I hope i managed to help you!
{ "domain": "cs.stackexchange", "id": 18555, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "data-structures, heaps", "url": null }
vba, excel, error-handling, logging msg = "Contact your system administrator." msg = msg & vbCrLf & "Module: " & module msg = msg & vbCrLf & "Procedure: " & procedure msg = msg & IIf(line = 0, "", vbCrLf & "Error Line: " & line) msg = msg & vbCrLf & "Error #: " & number msg = msg & vbCrLf & "Error Description: " & description If createLog Then Log module, procedure, number, description End If MsgBox msg, vbCritical, title End Sub
{ "domain": "codereview.stackexchange", "id": 32331, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vba, excel, error-handling, logging", "url": null }
magnetic-fields, electric-circuits If this is the case, you will find using Ampere's law that $$B = \frac{\mu_0}{g} (N i - H l_c)$$ with $l_c$ mean core length. If moreover $\vec H = \vec B / \mu$, then $$B \left( 1 + \frac{l_c}{g \mu_r} \right)=\frac{\mu_0 N i}{g}$$ Notice again that this value is the same in the air gap and inside the core (solenoid included)! For most ferromagnetic materials, $\mu_r$ is of the order of $10^3-10^5$ (https://en.wikipedia.org/wiki/Permeability_(electromagnetism)), so we can approximate the previous relation neglecting the term $\frac{l_c}{g \mu_r}$: $$ B \simeq \frac{\mu_0 N i}{g} > \frac{\mu_0 N i}{l_c}$$ since of course $g < l_c$. So the field is indeed stronger than the field inside an empty solenoid of length $l_c$ with the same number of turns $N$.
{ "domain": "physics.stackexchange", "id": 30567, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "magnetic-fields, electric-circuits", "url": null }
$\displaystyle \tau \equiv 0 \oplus \tau\downharpoonright_{\ell^2(G)}.$ We now make a key definition of a Kazhdan constant, which is analogous to the expansion constant of a Cayley graph. Definition 4 (Kazhdan constant) Let ${\rho: G \rightarrow U(H)}$ be a unitary representation of a locally compact group ${G}$, and let ${S}$ be a compact subset of ${G}$. The Kazhdan constant ${Kaz(G,S,\rho)}$ of ${S}$ and ${\rho}$ is then the supremum of all the constants ${\epsilon \geq 0}$ for which one has the bound $\displaystyle \sup_{s \in S} \| \rho(s) v - v \|_H \geq \epsilon \|v\|_H$ for all ${v \in H}$. Thus, for instance, ${Kaz(G,S,\rho)}$ vanishes whenever the representation ${\rho}$ contains non-trivial invariant vectors. The Kazhdan constant ${Kaz(G,S)}$ of ${S}$ is defined as $\displaystyle Kaz(G,S) := \inf_\rho Kaz(G,S,\rho),$
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9940889309686339, "lm_q1q2_score": 0.8032906701740407, "lm_q2_score": 0.8080672112416737, "openwebmath_perplexity": 84.97322490766847, "openwebmath_score": 0.9605917930603027, "tags": null, "url": "https://terrytao.wordpress.com/2011/12/06/254b-notes-2-cayley-graphs-and-kazhdans-property-t/" }
ros, ubuntu, ros-fuerte, ubuntu-precise, overlay I'd rather use apt to uninstall rosinstall, vcstools, and instead of messing with the system manually. It seems if I installed using apt, then I should be able to uninstall using apt, right?! Can anyone tell me how to uninstall rosinstall, vcstools and rospkg using apt under Ubuntu Precise? (I never touched easy_install or pip)
{ "domain": "robotics.stackexchange", "id": 11079, "lm_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, ubuntu, ros-fuerte, ubuntu-precise, overlay", "url": null }
• I think the argument would work with minor changes. We have $A$ and the partitions $\{P_n\}$. For each $\epsilon>0$ and each sequence of tags $\{t_j\}$ for each $P_n$, $n\geq1$, there exists a number $N=N(\epsilon,\{t_j\})$ such that, for all $n\geq N$, $A-\epsilon/4<S(P_n,f,\{t_j\})<A+\epsilon/4$. Take $\alpha_j$ and $\beta_j$ as you did. For the sequence of tags $\{\alpha_j\}$, there is a number $N_1(\epsilon,\{\alpha_j\})$; for the sequence of tags $\{\beta_j\}$, there is a number $N_2(\epsilon,\{\alpha_j\})$. Take $N_0=\max\{N_1,N_2\}$. Then $U(P_{N_0},f)-L(P_{N_0},f)<\epsilon$. – user39756 Feb 5 '18 at 19:28
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9852713878802045, "lm_q1q2_score": 0.8451343694917774, "lm_q2_score": 0.8577681031721325, "openwebmath_perplexity": 74.27353249495317, "openwebmath_score": 0.9599655866622925, "tags": null, "url": "https://math.stackexchange.com/questions/2634314/two-equivalent-definitions-riemann-integral" }
pendulum :- the Physical pendulum, using. Determine the efiect of parameters on the solutions of difierential. [email protected] where, θ(t) is the history of oscillation, θ 0 is the initial angle, &omega=(g/l) 1/2 is the natural frequency of the motion. These force. This is just the. This motion is also known as simple harmonic motion. For the driven-damped harmonic oscillator, the resonance is set when the applied frequency is equal to the natural frequency. The coding style reflects something of a compromise between efficiency on the one hand, and brevity and intelligibility on the other. Making Loops Go Faster – Tricks to increase computation speed including preallocating arrays and using built-in Matlab functions. Begin the analysis with Newton's second law of motion. Can anyone please read the details below and explain to me what exactly has to be done and whats's the mechanism of the figure below. The author employs MATLAB to reinforce concepts and solve problems that require
{ "domain": "yedy.pw", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9817357259231532, "lm_q1q2_score": 0.809403734138827, "lm_q2_score": 0.824461932846258, "openwebmath_perplexity": 797.8372050585724, "openwebmath_score": 0.5793882012367249, "tags": null, "url": "http://hlyf.yedy.pw/simple-harmonic-motion-matlab.html" }
c# But you need to make sure of a few things: The implementations in your base class must work for all children, now and in the future. So if you want to add an Employer class you don't want to have to change the base class methods. If you do so you have to test your other class implementations to make sure they still work. That being said, minor modifications often aren't too much of a big deal. If your classes have a small amount in common but large differences you could end up only partially being able to rely on a consistent interface. So you lose the flexibility of just operating on Person objects. If your language supports it traits might be a better way to go here. Also if you find yourself in this situation your classes might be getting too big. Try breaking them down. (Nobody likes a god object!) But broadly speaking; Yes, go for it!
{ "domain": "codereview.stackexchange", "id": 6139, "lm_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#", "url": null }
lasers $R$: reflectance of material $I_0$: intensity of laser beam on the surface $\alpha$: absorption coefficient (NOT the same as absorptance) $z$: thickness of the material When you plug the thickness of the plexiglas plate in as $z$, you get the intensity of the laser beam after it passes through the plate. Note that the equation considers intensity instead of power, so you need to find the beam diameter on the surface of your plexiglas plate. Further, you need to find the absorption coefficient of the material for the given wavelength. The absorption coefficient (or attenuation coefficient) is not a dimensionless number like the absorptance, but has the dimension $m^{-1}$, so they should not be mixed up.
{ "domain": "engineering.stackexchange", "id": 2421, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lasers", "url": null }
objective-c, error-handling, cocoa Now you can iterate over all errors and examine them along with the object the error occurred on. [errors enumerateObjectsUsingBlock:^(NSDictionary *errorDict, NSUInteger idx, BOOL *stop) { NSError *error = errorDict[@"error"]; id object = errorDict[@"object"]; if(…){ //add an appropriate test } }]; you can't add the errors into an array upfront, as NSError *error1; will result into a nil-object for the variable error1. NS(Mutable)Arrays can't handle nil objects. Same for dictionaries. On the other hand my solution allows adding the errors, as it only add them once an existing objects is assigned to the variable error.
{ "domain": "codereview.stackexchange", "id": 2815, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "objective-c, error-handling, cocoa", "url": null }
photography, terminology, python, astropy, image-processing That is good, because the purpose of the twilight flats is to calibrate out the broad band sensitivity of each pixel by dividing by the flat field (hence referred to as a multiplicative correction, and you would normally multiply by a "balance frame" constructed by dividing a smoothed version of the median twilight flat by the unsmoothed version). The twilight flats can also be used to calibrate any large spatial scale sensitivity variations caused for example by vignetting. Twilight flats that do show evidence of strong fringing in broadband filters should not be used to remove pixel to pixel sensitivity variations. In those cases one usually resorts to "dome flats".
{ "domain": "astronomy.stackexchange", "id": 4500, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "photography, terminology, python, astropy, image-processing", "url": null }
java, random By re-instantiating the Random class every time this method is called, you are re-seeding the random number generator. Rather than doing this, you should set a Random instance to a field of this RussianRoulette class, instantiate it once, and then simple call nextInt on that field. That way, you aren't constantly re-seeding the random number generator. This seems a little fishy to me: display.setText(" You're alive!"); And display = new JTextField(" Click Gun To Play!", 15); Why are you putting all those spaces before to message? I'm no detective, but it seems to me that you are using these spaces as a quick and dirty way to position text. This makes your code quite ugly in these sections, and it would be a lot more cleaner and structured if you correctly positioned the text boxes in the right place in the first part.
{ "domain": "codereview.stackexchange", "id": 14870, "lm_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, random", "url": null }
optics, attenuation This similar question, for sound attenuation, confirms that the phenomenon are independant Am I on the right track? Or, more importantly, is there an existing model already? A simplification would also be useful as this is only for a high-school level 'extended essay' Thank you A pencil of radiation with intensity $I$ is travelling along direction $\hat{n}$ confined to solid angle $d\Omega$.
{ "domain": "physics.stackexchange", "id": 60435, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, attenuation", "url": null }
machine-learning, predictive-modeling, time-series, cross-validation Is this approach reasonable or not? If so, should I get rid of the month variable? Note that in a., for instance, I am testing with some data that belongs to different months that the one used for training. I mean, for the training I used data from June to December 2015, but I am testing for January 2016. Seasonality can be something I am missing. How to validate such models in general? One such way to handle a time series cross-validation is to take a look at the below Python code from here: def performTimeSeriesCV(X_train, y_train, number_folds, algorithm, parameters): """ Given X_train and y_train (the test set is excluded from the Cross Validation), number of folds, the ML algorithm to implement and the parameters to test, the function acts based on the following logic: it splits X_train and y_train in a number of folds equal to number_folds. Then train on one fold and tests accuracy on the consecutive as follows: - Train on fold 1, test on 2 - Train on fold 1-2, test on 3
{ "domain": "datascience.stackexchange", "id": 1295, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, predictive-modeling, time-series, cross-validation", "url": null }
integral on the inside of the form ∬shadow∫top bottomf (x,y,z). Neither its author nor Zweig Media Inc. A special case of a triple integral is the volume under the graph of a function f(x,y) and above a region R = [a,b] × [c,d] is the integral R b a R d c f(x,y) dxdy. Volume on a region in space Remark: The volume of a bounded, closed region D ∈ R3 is V = ZZZ D dv. Is there a graphing tool for triple integrals online? I am currently studying triple integrals, and I want to double check that I am sketching the graphs triple integrals correctly. Find materials for this course in the pages linked along the left. Being able to express an area as an integral and also calculating the area that an integral represents are both useful skills. An improper integral of type 2 is an integral whose integrand has a discontinuity in the interval of integration $[a,b]$. I am rather new to Mathematica, and am quite confused on two problems I have ran into dealing with plotting two triple integrals, one
{ "domain": "slowscape.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9822877038891779, "lm_q1q2_score": 0.8076262646235371, "lm_q2_score": 0.822189121808099, "openwebmath_perplexity": 479.3420013305369, "openwebmath_score": 0.8485875129699707, "tags": null, "url": "http://lucc.slowscape.it/triple-integral-grapher.html" }
For the marginal of $X$ you need $$\int_0^\infty f_{X,Y}(x,y)\, dy = \int_{|x|}^\infty \frac 1 8 (y^2-x^2)e^{-y} \, dy.$$ The point is that the density is nonzero only when either $y>x$ and $y>-x$. That is the same as $y>|x|$. Let $u=y-x$, so that $du=dy$, and then $y+x= u+2x.$ Then $$y^2-x^2 = (y-x)(y+x) = u(u+2x).$$ If $x\ge0$ then $y$ goes from $x$ to $\infty$, so $u$ goes from $0$ to $\infty$, and you get $$\int_0^\infty \frac 1 8 u(u+2x)\, e^{-(u+x)} \,du.$$ Note that $x$ does not change as $u$ goes from $0$ to $\infty$, so this becomes $$\frac 1 8e^{-x} \left( \int_0^\infty u^2 e^{-u} \, du + 2x \int_0^\infty e^{-u} \,du \right)$$ and this comes to $$\frac 1 8 e^{-x}(2+2x) = \frac 1 4 e^{-x} (1+x).$$ But what if $x<0$? In that case $\displaystyle \int_{|x|}^\infty \cdots \,dy$ is $\displaystyle \int_{-x}^\infty \cdots \,dy,$ and that becomes $\displaystyle \int_{-2x}^\infty \cdots \, du.$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692277960746, "lm_q1q2_score": 0.8432480084160237, "lm_q2_score": 0.8633916011860785, "openwebmath_perplexity": 271.0133068627802, "openwebmath_score": 0.9707071185112, "tags": null, "url": "https://math.stackexchange.com/questions/2083841/problem-with-joint-probability-function" }
cosmology, space-expansion The nature of the dark energy is currently unknown. See Dark Energy and the Accelerating Universe for details.
{ "domain": "physics.stackexchange", "id": 51694, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, space-expansion", "url": null }
The expressions on the right in $$f(x) = \frac{x-2}{(x-2)(x+2)}$$ and $$g(x) = \frac{1}{x+2}$$ define the same function where both make sense. That function has an unremovable singularity at $x=-2$. The domain of $g$ contains the point $x=2$; the domain of $f$ does not, so strictly speaking they are not the same function. But the limit of $f$ at $x=2$ does exist, and has value $g(2) = 1/4$. That's exactly what we mean when we say the singularity is removable. • So a removable discontinuity is an undefined point that has a defined limit, whereas a nonremovable discontinuity has a limit that does not exist or is infinity? – user525966 Jan 29 '18 at 14:52 • @user525966 Yes. – Ethan Bolker Jan 29 '18 at 15:33
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399060540358, "lm_q1q2_score": 0.8513629880791487, "lm_q2_score": 0.8774767794716264, "openwebmath_perplexity": 239.22173322849565, "openwebmath_score": 0.945873498916626, "tags": null, "url": "https://math.stackexchange.com/questions/2626576/how-do-we-define-the-domain-of-a-function-with-removable-and-nonremovable-discon" }
general-relativity, wormholes How much shorter will the travel be? I'm interested in Earth proper time, because if the reduction is only in the spaceship proper time, the we can achieve the same result "simply" by traveling closer to the speed of light. Does the amount of reduction in time depend on the distance between the endpoints? If so, it seems unpractical to travel to near stars through wormholes, if the spacetime geometry of our galaxy doesn't help somehow (local curvature should be higher than global curvature). Before we get into the issue of travel time we need to point out the science fiction idea of wormholes is rather different to general relativity. There are several kinds of wormhole metrics known in GR, but they just connect two asymptotically flat regions of spacetime. If we use a rubber sheet model it would look something like this:
{ "domain": "physics.stackexchange", "id": 36563, "lm_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, wormholes", "url": null }
c++, recursion, template, c++20, constrained-templates template<std::size_t unwrap_level, class Container> using recursive_array_unwrap_type_t = typename recursive_array_unwrap_type<unwrap_level, Container>::type; // https://codereview.stackexchange.com/a/253039/231235 template<std::size_t dim, class T, template<class...> class Container = std::vector> constexpr auto n_dim_container_generator(T input, std::size_t times) { if constexpr (dim == 0) { return input; } else { return Container(times, n_dim_container_generator<dim - 1, T, Container>(input, times)); } } template<std::size_t dim, std::size_t times, class T> constexpr auto n_dim_array_generator(T input) { if constexpr (dim == 0) { return input; } else { std::array<decltype(n_dim_array_generator<dim - 1, times>(input)), times> output; for (size_t i = 0; i < times; i++) { output[i] = n_dim_array_generator<dim - 1, times>(input); } return output; } }
{ "domain": "codereview.stackexchange", "id": 45381, "lm_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++, recursion, template, c++20, constrained-templates", "url": null }
of the of. Mn ) =-A^ ( nm ) antisymmetric part of the canonical curvature tensor as symmetric or anti-symmetric a tensor... Form used is symmetric and anti-symmetric components tensor is a tensor is a order. Definition if φ ∈ S2 ( V ), thenacanonical algebraic curvature tensor is the minimal number of … a! Means that the product of an antisymmetric rank-2 tensor, which satisfies A^ ( mn ) =-A^ nm! Symmetric if aij = aji... Spinor indices and antisymmetric tensor ( 5 ) ( 6 ) the! Commutative ring with identity will be discussed very briefly, symmetric tensors tensor... Geodesic in. Antisymmetric tensor starter ognik ; Start date Apr 7, 2015 is 1 more vedios aij is symmetric anti-symmetric... That are summed order generalization of a differential you get something called a quadratic differential * I have some., symmetric tensors, including any type of tensor, either symbolic or explicit including. Form used is symmetric or anti-symmetric ) whether the form that is necessary to it. Being
{ "domain": "renejoosten.eu", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9755769099458927, "lm_q1q2_score": 0.8493345847325123, "lm_q2_score": 0.8705972600147106, "openwebmath_perplexity": 751.4578331262557, "openwebmath_score": 0.9270966649055481, "tags": null, "url": "http://loza.renejoosten.eu/7yfhgle/852a33-product-of-symmetric-and-antisymmetric-tensor" }
# One urn with white balls, another with 10 black and 30 white. Probability of drawing black after seeing white. This is a problem from Y.A. Rozanov book "Probability theory: A concise course", and seems to be simple, yet the answer given disagrees with what I arrived at. Text verbatim (ex. 15) is following ## Exercise 15/p36 One urn contains only white balls, while another urn contains 30 white and 10 black balls. An urn is selected at random and then a ball is drawn (at random) from the urn. The ball turns out to be white and is then put back into the urn. What is the probability that another ball drawn from the same urn will be black? The answer given is $$P = \frac{3}{28}$$ If the above is correct, my solution must be flawed somehow: Let $$P(x_k)$$ be the probability that ball $$x$$ is drawn in $$k-th$$ draw. Then we seek the probability $$P(b_2|w_1)$$. Given that urns were selected at random, and we don't which one we ended up with
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9896718490038141, "lm_q1q2_score": 0.8372054083942331, "lm_q2_score": 0.8459424295406088, "openwebmath_perplexity": 235.22436626519428, "openwebmath_score": 0.7907375693321228, "tags": null, "url": "https://math.stackexchange.com/questions/3034747/one-urn-with-white-balls-another-with-10-black-and-30-white-probability-of-dra" }
cosmology, astronomy, dark-energy, beyond-the-standard-model Future probes may be able to meaningfully constrain $w_a$, and if it turns out to be different than $0$, then that'll rule out $\Lambda$CDM and open up a whole new ball game. Remember, $\Lambda$CDM corresponds to a static $w_a = 0$. It'll be hard, since we'll need to go to much higher redshifts while maintaining similar levels of accuracy in our measurements, if not improvements because given its current properties (and whatever its evolution) Dark Energy is weaker in the past ($\Omega \propto a^{-3(1+w)}$, so while a $w \approx -1$ Dark Energy maintains a similar density, matter density, which corresponds to $w = 0$, increases as you look back in time). Being able to better constrain this evolution is the name of the game if you're interested in ruling out the current standard model. The classification of possible explanations that your review suggests is indeed the best way to broadly categorize the proposed solutions.
{ "domain": "physics.stackexchange", "id": 15032, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cosmology, astronomy, dark-energy, beyond-the-standard-model", "url": null }
astrophysics, orbital-resonance Tidal dissipation in the planet and the ensuing deceleration of its spin inevitably carry the planet through a sequence of the spin-orbit resonances. The question then becomes in which of these resonances the planet should eventually get trapped... the international team revisited the problem of tidal evolution of Mercury's spin and found that the 3:2 resonance is indeed the most probable end-state. The frequency-dependent tidal torque acts as an efficient trap for the planet trying to traverse a resonance. The efficiency of the trap strongly depends on the value of orbital eccentricity, as well as on the temperature and viscosity of Mercury's mantle. Note: Forces causing migration of planetary orbits include (but are not limited to): Loss of planetary angular momentum due to gaseous drag in the early proto-planetary circumstellar accretion disk. Tidal forces resulting in exchanges of angular momentum. Collisions. Various n-body gravitational interactions. The Yarkovsky effect.
{ "domain": "astronomy.stackexchange", "id": 5300, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "astrophysics, orbital-resonance", "url": null }
java, algorithm, tree, pathfinding, breadth-first-search final Map<N, N> parentMap = new HashMap<>(); parentMap.put(source, null); previousReachedNodes = 0; reachedNodes = 0; for (int depth = 0;; ++depth) { final N found = dls(source, depth, parentMap, goalNodePredicate); if (found != null) { return tracebackPath(found, parentMap); } if (reachedNodes == previousReachedNodes) { // We have reached all the nodes of the tree and we did not find // any goal node. return new ArrayList<>(0); } previousReachedNodes = reachedNodes; reachedNodes = 0; } } private N dls(final N node, final int depth, final Map<N, N> parentMap, final Predicate<N> goalNodePredicate) { ++reachedNodes;
{ "domain": "codereview.stackexchange", "id": 13497, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, algorithm, tree, pathfinding, breadth-first-search", "url": null }
python, performance, array, numpy, hash-map I suspect 2 problems in this code, but I don't know how to solve them: I am retrieving values from this scales dict millions of times, and it's said calling values from "non-static" data structures like dict() is slow. So how can I make this small dictionary "static" instead? (This dictionary is only created once, while the rna_sequence and protein_sequence will be different each time I call the function.) I am building the matrix at first with pythons tools, and later I convert it into the (faster) NumPy array. Possibly it is faster to directly create it with NumPy, but I am not sure if this is possible.
{ "domain": "codereview.stackexchange", "id": 36645, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, array, numpy, hash-map", "url": null }
inorganic-chemistry amine ($\text{TIMEN}^{\text{Mes}}$), which have the chemical formula $\ce{(TIMEN^{\text{Mes}})FeNO(CH3CN)^q}$ with varying charge states $q$. Initially the complex is formed with $q=+3$. When this tri-cation is reduced -- by zinc, with one electron, by magnesium, with two electrons, or by sodium amalgam, with three electrons -- the nitrisyl group in the resulting reduced species is identified as antiferromagnetically coupled $\ce{NO^-}$, with the iron oxidation state being decreased from +3 to +2 to +1 as the number of accepted electrons increases. Thus the sodium-reduced species, with three added electrons, is found to indeed contain iron(I), bonded to $\ce{NO^-}$ rather than $\ce{NO^+}$. As an aside, and consistent with the addendum, it takes a reducing agent as strong as magnesium even to reach iron(II). Reference 1.
{ "domain": "chemistry.stackexchange", "id": 14433, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry", "url": null }
electrochemistry, safety After disconnection, there is ongoing small temporary compensating current. It is not good to combine lower capacity high performance cells with low resistance with high capacity low performance cells, especially for high loads. As it significantly raises the internal voltage disbalance and after load compensation Cells under charging It is generally adviced against parallel charging, as it affects charge stop detection and can cause overcharging of some cells. That affects serial charging as well. Non rechargable cells Parallel connection is not generally good for different . As there can occur small balancing load after disconnection of the powered device. OTOH, if the identical cells ( like in the serial section) are used in parallel connection all their lifetime, it is not a big deal, as these currents are minimal and short time.
{ "domain": "chemistry.stackexchange", "id": 11862, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrochemistry, safety", "url": null }
statistical-mechanics, mathematical-physics For starting, consider a spherical cavity with its oscillation modes (Spherical Bessel functions and Spherical Harmonics). Let's suppose that this cavity can communicate with a square cavity, with its proper oscillation modes (plane waves). It's axiomatic within quantum statistics that a wavefunction with defined energy corresponds to a single state (apart from spin-degeneracy considerations).However, it's not clear (for me), how this counting is maintained when a particle passes from a system to another. In other words, if we take somehow a boson from the Cartesian Box and throw it in the Spherical Box, could it be that the boson "pulverizes" into X bosons, X being different from 1? The problem should be possible to solve, because Spherical Waves and Plane Waves are both complete basis for functions over $R^3$. However, things seem not to be so straightforward, since Spherical Waves can be adequately normalized, while Plane Waves gives infinity after a volume integration.
{ "domain": "physics.stackexchange", "id": 35892, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics, mathematical-physics", "url": null }
forces, electrostatics, newtonian-gravity, electric-fields, coulombs-law Title: Why are fields described as force divided by mass or charge? I have read that application of force on a body from a distance, like gravitational or electrostatic force is a two-step process, first, the field is created by the body, then, the application of force on the second body by the field. I want to know why the expression for gravitational field is given as F/m or why the expression for electric field is given as F/q? Answering my question for anyone who benefits from this. This is what I understood of everything I read about it . Electric field is simply like a constant of force applied by a particle at a particular point in space, a ratio which is made independent of the test charge by dividing the force formulae by the mass/charge of the test particle, since the magnitude of force contains the charge as a multiplication term and is directly proportional to it. Although it's an entirely new physical entity that exists whether or not the test particle is present.
{ "domain": "physics.stackexchange", "id": 89083, "lm_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, electrostatics, newtonian-gravity, electric-fields, coulombs-law", "url": null }
python, beginner, python-3.x, battleship print_board(board) destroyer -= 1 ship_len -= 1 else: if guess_row < 1 or guess_row > lines + 1 or guess_col < 1 or guess_col > lines + 1: print('Oops, that\'s not even in the ocean.') elif board[guess_row - 1][guess_col - 1] != 'O': print('You guessed that one already.') else: print('You missed!') board[guess_row - 1][guess_col - 1] = 'M' turns -= 1 if turns > 1 or turns == 0: print('You have {} guesses remaining.'.format(turns)) else: print('You have 1 guess remaining.') print()
{ "domain": "codereview.stackexchange", "id": 41198, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-3.x, battleship", "url": null }
space-telescope, sky-survey, infrared, james-webb-space-telescope The second figure shows longer-wavelength maps from DIRBE: 4.9, 12, 25, and 60 microns. Here, you can see the growing dominance of thermal zodiacal dust emission, which is strongest in the 12 and 25 microns wavebands. At 4.9 microns, the Galactic emission is still mostly from stars, though there is a contribution from hot interstellar dust. At longer wavelengths, the Galactic emission is thermal mission from the interstellar dust; and in fact this dominates over the zodiacal emission in the 60 micron waveband. (This is because the Galactic dust is generally cooler than the zodiacal dust.)
{ "domain": "astronomy.stackexchange", "id": 6217, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "space-telescope, sky-survey, infrared, james-webb-space-telescope", "url": null }
supernova, stellar-evolution, metallicity Iron has the highest nuclear binding energy per nucleon of all the elements (not completely true, but sufficiently accurate in an astronomical context). So, fusion of light elements into iron or something lighter is an exothermic process - you gain energy doing it, allowing the star to function. This is what happens in the last stages of a type II supernova. The core of a massive star in its last moments of life is hot and dense enough to fuse silicon into iron. Just before the supernova explosion, there is an iron ball of about 1.4 solar masses at the centre. The progenitor of a supernova type Ia is a binary system where a "normal" star loses mass to a compact stellar remnant (a white dwarf). Once the white dwarf has accreted enough mass to be above a limit of 1.4 solar massses, fusion starts again, completely disintegrating the compact object. Explosion A SN Ia completely destroys the white dwarf progenitor in a runaway fusion process.
{ "domain": "astronomy.stackexchange", "id": 2305, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "supernova, stellar-evolution, metallicity", "url": null }
$\displaystyle \tfrac{e^{-(1-\epsilon)t} - e^{-t}}{\epsilon}$ is nothing else that the (negative) difference quotient for the derivative of the function ${f(a) = e^{-at}}$ at ${a=1}$. Hence $\displaystyle \tfrac{e^{-(1-\epsilon)t} - e^{-t}}{\epsilon} \stackrel{\epsilon\rightarrow 0}{\longrightarrow} -f'(1) = te^{-t}$ and we get $\displaystyle \exp(A_{\epsilon}t) \stackrel{\epsilon\rightarrow 0}{\longrightarrow} \begin{bmatrix} e^{-t} & te^{-t}\\ 0 & e^{-t} \end{bmatrix} = \exp(At)$ as expected. It turns out that a fairly big $\epsilon$ is already enough to get a quite good approximation and even the correct asymptotics: The blue curve it first component of the exact solution (initialized with the second standard basis vector), the red one corresponds $\epsilon = 0.1$ and the yellow on (pretty close to the blue on) is for $\epsilon = 0.01$. to  \$\e I remember from my introductory class in linear algebra that my instructor said
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9923043514561086, "lm_q1q2_score": 0.8112827015449927, "lm_q2_score": 0.8175744673038221, "openwebmath_perplexity": 281.9628098179786, "openwebmath_score": 0.896605372428894, "tags": null, "url": "https://regularize.wordpress.com/tag/linear-algebra/" }
cell-biology, dna, abiogenesis Title: Can stand-alone DNA (no nucleus, no membranes, organelles...etc.) create cells? I have been searching for an answer to the following question as part of my research but can't find a direct/complete answer yet. Can stand-alone DNA (no nucleus, no membranes, organelles...etc.) create cells? From what I have learned about the biology of the cell, it seems to me that it is virtually impossible, but I will like an answer from an expert on the subject matter. Regards, Alfredo Archilla DNA absolutely not, RNA maybe... DNA can't even replicate itself without help RNA on the other hand makes almost everything. It makes proteins, it makes DNA and we know it can at least bind and alter phospholipids. It can also make more of itself. keep in mind the simplest living cells (prokaryotes) do not have nuclei nor most of the things we call organelles either.
{ "domain": "biology.stackexchange", "id": 12132, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cell-biology, dna, abiogenesis", "url": null }
data-structures, time-complexity, asymptotics, amortized-analysis InsertAfter(NULL, a) $\implies$ [a] InsertAfter(NULL, b) $\implies$ [b, a] InsertAfter(b, c) $\implies$ [b, c, a] InsertAfter(a, d) $\implies$ [b, c, a, d] Delete(c) $\implies$ [b, a, d] After these five updates, GetElement(2) should return d, and GetElement(3) should return an error. NO. Fredman and Saks proved that any data structure that supports these operations requires at least $\Omega(\log n/\log\log n)$ amortized time per operation. (This is reference [1] in the paper by Dietz that you mention in your first comment.) The lower bound holds in the very powerful cell probe model of computation, which only considers the number of distinct memory addresses accessed by the update and query algorithms. Without some additional assumptions about the update and query operations, Dietz's data structure is the best possible (at least up to constant factors).
{ "domain": "cs.stackexchange", "id": 882, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "data-structures, time-complexity, asymptotics, amortized-analysis", "url": null }
c, tower-of-hanoi Compacting the else clause else { // make only valid move not involving the smallest disk // find disk at the top of each rod for ( i = 1; i <= 3; ++i ) topDisk[i] = numberOfDisks + 1; for ( i = numberOfDisks; i >= 1; --i ) topDisk[rod[i]] = i; // find which disk to move switch ( rod[1] ) { case 1: rodFrom = 2; rodTo = 3; break; case 2: rodFrom = 1; rodTo = 3; break; case 3: rodFrom = 1; rodTo = 2; break; default: printf ("error"); break; } if ( topDisk[rodFrom] > topDisk[rodTo] ) { // swap values temp = rodFrom; rodFrom = rodTo; rodTo = temp; }
{ "domain": "codereview.stackexchange", "id": 43941, "lm_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, tower-of-hanoi", "url": null }