text
stringlengths
1
1.11k
source
dict
waves, frequency, interference, superposition, models No. Superposition just means that you can add the effect two waves. That's completely independent of the wave length. What you probably mean is "complexity of the interference pattern" of two waves. This depends on wave length, size and distance of sources, the size reflection or diffracting objects and distance, but the exact relationships are complicated. Things tend to be the easiest to calculate if the wavelength is either very large or very small compared to all the other stuff.
{ "domain": "physics.stackexchange", "id": 86679, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "waves, frequency, interference, superposition, models", "url": null }
c++, c++11, graphics std::string ResourceManager::textureRootDir = std::string("assets/images/"); } Don't Repeat Yourself Consider ShaderImp, MeshImp, TextureImp. They all have the exact same structure: they befriend ResourceManager, hold onto some std::unique_ptr, which is exposable, and are privately constructible. When you see that kind of repetition in class definitions, that calls for a class template: template <typename T> class GenericImp { public: friend class ResourceManager; friend typename std::unique_ptr<T>::deleter_type;
{ "domain": "codereview.stackexchange", "id": 15949, "lm_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, graphics", "url": null }
quantum-mechanics, wavefunction, hydrogen Title: Hydrogen wave function stationary state An electron in a hydrogen atom at an instant $t=0$ have the following wave function: $$\Psi(r,\theta,\phi,t=0)=\frac{1}{2}R_{1,0}(r)Y_0^0(\theta,\phi)+\frac{i}{\sqrt{2}}R_{2,1}(r)Y_1^0(\theta,\phi)+\frac{1}{2}R_{3,2}(r)Y_2^1(\theta,\phi)$$ Is $\Psi(r,\theta,\phi)$ an stationary state? Why? It will stationary just because does not depend on time, or will be necesary another condition? Get the wave function at arbitrary time t. Then calculate Magnitude of w.f by multiplying by its cc. If it does not depend on time it is a stationary state.
{ "domain": "physics.stackexchange", "id": 45856, "lm_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, hydrogen", "url": null }
recurrence-relation n^3 \frac{1}{1 - \frac{1}{2}} + n^2 = 2n^3 + n^2 $$ And thus $T(n) = O(n^3)$ instead of $\Theta(n^3)$ since we proved only an upper limit. My question is thus, why can't I solve the summation as I did instead of extending it to infinity? Yes, you could solve the summation in exact formula. Yes, you could obtain $T(n)=\Theta(n^3)$, a tighter asymptotic bound. Your professor would and should not forbid you to do that.
{ "domain": "cs.stackexchange", "id": 14406, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "recurrence-relation", "url": null }
complexity-theory, graphs, np-complete To sum up : are NP-complete problems (and i'm particularly interested in NP-complete graph problems) useful in the reality ? PS : sorry if the title may seem offensive, it is not, i know a lot of searchers study things which does not have much applications in reality, i want to know if it is the case for np-complete problems No one are offended by that question, and it's an important question to ask. When working in graph theory, we don't believe that proving hardness results for independent set on $\{K_4, K_5, P_3\}$-minor-free graphs are "important". However, it is interesting to see why a certain forbidden minor puts a problem from being, e.g. polynomial time solvable, to NP-complete. It is then important that that is the focus. Here is an interesting problem:
{ "domain": "cs.stackexchange", "id": 16465, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, graphs, np-complete", "url": null }
$$Z(B_1^2 B_2) = 1/4\,{a_{{1}}}^{4}+1/2\,{a_{{1}}}^{2}a_{{2}}+1/4\,{a_{{2}}}^{2}.$$ Continuing with the example we get $$Z(B_1^2 B_2; A_1+A_2) = 1/4\, \left( A_{{1}}+A_{{2}} \right) ^{4} +1/2\, \left( A_{{1}}+A_{{2}} \right) ^{2} \left( {A_{{1}}}^{2}+{A_{{2}}}^{2} \right) \\ +1/4\, \left( {A_{{1}}}^{2}+{A_{{2}}}^{2} \right) ^{2} \\ = {A_{{1}}}^{4}+2\,{A_{{1}}}^{3}A_{{2}} +3\,{A_{{1}}}^{2}{A_{{2}}}^{2}+2\,A_{{1}}{A_{{2}} }^{3}+{A_{{2}}}^{4}$$ and we confirm the value $$3$$ obtained by OP. This algorithm will make it possible to compute cycle indices not obtainable by enumeration. As an extra example we find the following excerpt from the cycle index for $$[2,2,2,3,5,5]:$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.983596967003007, "lm_q1q2_score": 0.8280171572852281, "lm_q2_score": 0.8418256512199033, "openwebmath_perplexity": 600.3642210983606, "openwebmath_score": 0.684150218963623, "tags": null, "url": "https://math.stackexchange.com/questions/2856255/partitioning-a-multiset-into-multisets-of-fixed-sizes" }
c#, algorithm, palindrome Title: Return the largest palindrome from the string Here is the question: find the largest palindrome from a string. Ex: ABCBAHELLOHOWRACECARAREYOUILOVEUEVOLIIAMAIDOINGGOOD Result: ILOVEUEVOLI I am not sure of the efficiency of the algorithm. static void Main(string[] args) { var str = "ABCBAHELLOHOWRACECARAREYOUILOVEUEVOLIIAMAIDOINGGOOD"; var longestPalindrome = GetLongestPalindrome(str); Console.WriteLine(longestPalindrome); Console.Read(); }
{ "domain": "codereview.stackexchange", "id": 13277, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, algorithm, palindrome", "url": null }
java, beginner, game, javafx winNote.setText("X Wins!"); } else if (t13.text.getText().equals("O") && t23.text.getText().equals("O") && t33.text.getText().equals("O")) { winNote.setText("O Wins!"); } // BELOW ARE CHECKS FOR DIAGONALS else if (t11.text.getText().equals("X") && t22.text.getText().equals("X") && t33.text.getText().equals("X")) { winNote.setText("X Wins!"); } else if (t11.text.getText().equals("O") && t22.text.getText().equals("O") && t33.text.getText().equals("O")) { winNote.setText("O Wins!"); } else if (t13.text.getText().equals("X") && t22.text.getText().equals("X") && t31.text.getText().equals("X")) { winNote.setText("X Wins!"); } else if (t13.text.getText().equals("O") && t22.text.getText().equals("O") && t31.text.getText().equals("O")) { winNote.setText("O Wins!"); } // ENDS THE GAME IF SOMEONE WINS if (winNote.getText().equals("X Wins!") || winNote.getText().equals("O Wins!"))
{ "domain": "codereview.stackexchange", "id": 25291, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, game, javafx", "url": null }
nlp, word2vec, mathematics Title: word2vec - log in the objective softmax function I'm reading a TensorFlow tutorial on Word2Vec models and got confused with the objective function. The base softmax function is the following: $P(w_t|h) = softmax(score(w_t, h) = \frac{exp[score(w_t, h)]}{\Sigma_v exp[score(w',h)]}$, where $score$ computes the compatibility of word $w_t$ with the context $h$ (a dot product is commonly used). We train this model by maximizing its log-likelihood on the training set, i.e. by maximizing $ J_{ML} = \log P(w_t|h) = score(w_t,h) - \log \bigl(\Sigma_v exp[score(w',h)\bigr)$ But why $\log$ disappeared from the $score(w_t,h)$ term? No, the logartihm doesn't disappear. From the equation , When you want to calculate , it essentially means calculating , Now , So , as .
{ "domain": "datascience.stackexchange", "id": 3665, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nlp, word2vec, mathematics", "url": null }
inorganic-chemistry, acid-base, ph Title: Should nitric acid be classified as a strong acid? Does it completely dissociate in water? By definition, a strong acid must completely ionize in aqueous solution. However, in order to completely dissociate in water, strong acids must be more acidic than a hydronium ion and hence have a pKa < -1.74. I have always thought of nitric acid as a strong acid, however, nitric acid has a pKa value of -1.5, which technically should indicate that it is less acidic than the hydronium ion and hence cannot completely dissociate in water like a strong acid does, right?
{ "domain": "chemistry.stackexchange", "id": 17107, "lm_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, acid-base, ph", "url": null }
c++, template-meta-programming, markov-chain Sample main() #include <iostream> #include <array> #include <cstdlib> #include <ctime> #include <string> #include "MarkovChain.hpp" #include "MarkovChain.cpp" int main(int argc, const char * argv[]) { srand (static_cast <unsigned> (time(0))); MarkovChain<std::string> chain;
{ "domain": "codereview.stackexchange", "id": 23353, "lm_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++, template-meta-programming, markov-chain", "url": null }
correctness-proof, first-order-logic, proof-assistants Title: Mechanically proving element non-membership I'm facing a (possibly simple) problem while proving a theorem. I need to show that under several (true) assumptions, some element is not in a set. Such assumptions are all met and there is are lemmata that can be employed to reach the conclusion. The problem comes from the fact that the lemma for doing so must be applied an arbitrary number of times. Lemma 1: $\forall x:\big(x\in X \iff P(x) \big)$ Lemma 2: $\forall x,y : (P(x) \land Q(y) \land x\neq y) \Rightarrow qq \neq x $ Lemma 3: $\forall x : P(x) \Rightarrow Q(x)$ Assumption: $\vert X\vert=k \land k\ge 2 %\big(\forall x\in X.P(x)\big)$ Desired result: $qq\not\in X$ What i tried so far: Proof: Intuitively, it is easy to see that $qq\not\in X$ because I can choose two elements $a$ and $b$ of $X$ (they are distinct by definition), plug them in lemma 2, and get that $qq\neq a$. If we apply this idea $k$ times we get that $qq$ is not an element of $X$, hence it is not in $X$. $\Box$
{ "domain": "cs.stackexchange", "id": 18876, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "correctness-proof, first-order-logic, proof-assistants", "url": null }
electromagnetism, electromagnetic-radiation For the magnitude of the electric field \begin{equation} \Vert\mathbf{E}\Vert =\dfrac{\vert q \vert}{4\pi \epsilon_{0}}\dfrac{(1\boldsymbol{-}\beta^2)}{\left(1\!\boldsymbol{-}\!\beta^{2}\sin^{2}\!\phi\right)^{\frac32}r^{2}} \tag{05}\label{eq05} \end{equation} Without loss of generality let the charge be positive ($\;q>0\;$) and instantly at the origin $\;\rm O$, see Figure-02. Then \begin{equation} r^{2} = x^{2}+y^{2}\,,\quad \sin^{2}\!\phi = \dfrac{y^2}{x^{2}+y^{2}} \tag{06}\label{eq06} \end{equation} so \begin{equation} \Vert\mathbf{E}\Vert =\dfrac{q}{4\pi \epsilon_{0}}\left(1\boldsymbol{-}\beta^2\right)\left(x^{2}\!\boldsymbol{+}y^{2}\right)^{\boldsymbol{\frac12}}\left[x^{2}\!\boldsymbol{+}\left(1\!\boldsymbol{-}\beta^{2}\right)y^{2}\right]^{\boldsymbol{-\frac32}} \tag{07}\label{eq07} \end{equation}
{ "domain": "physics.stackexchange", "id": 97405, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, electromagnetic-radiation", "url": null }
c#, console, autocomplete // Alter the Builder var key = keyInput.KeyChar; builder.Append(key); // Print Reuslts Console.Write(key); } } We can abstract out the calculation, and then the printing. After some work this was the result. It’s starting to look pretty similar: private void HandleKeyInput(StringBuilder builder, ConsoleKeyInfo keyInput) { if (keyInput.Key == ConsoleKey.Backspace && builder.ToString().Length > 0) { Program.KeyInput backSpaceKey = new Program.KeyInput.BackspaceInput(builder, keywords); backSpaceKey.AlterBuilder(); backSpaceKey.PrintResult(); } else { KeyInput input = new KeyInput.StandardKeyInput(builder, keywords, keyInput.KeyChar); input.AlterBuilder(); input.PrintResult(); } }
{ "domain": "codereview.stackexchange", "id": 29388, "lm_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#, console, autocomplete", "url": null }
homework-and-exercises, electrostatics Title: Why are potential differences equal across two capacitors in parallel, but charge on each capacitor is not? Two or more capacitors are said to be connected in parallel if each one of them is connected across the same two points. In a parallel combination of capacitors potential difference across each capacitor is same but each capacitor will store different charge. Why is this true? Why is the potential difference across each capacitor in parallel the same and why will each capacitor store different charge? Also, in series, why are Potential difference across each capacitor different, while charge is the same? Why are potential differences equal across two capacitors in series, but charge on each capacitor is not? This is based on a false premise. There is no rule that says that "potential differences are equal across two capacitors in series".
{ "domain": "physics.stackexchange", "id": 26213, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, electrostatics", "url": null }
algorithms, graphs, parameterized-complexity, vertex-cover Title: FPT algorithm for 1-BDD Given a graph $G = (V,E)$ and an integer $k$, the 1-BDD problem asks if there exists a subset $D$ of at most $k$ vertices such that the degree of any vertex in $G[V \setminus D]$ is at most one. Is there any FPT algorithm for the above problem running in time $O^*(2^k)$? Let $v$ be an arbitrary vertex in your graph, of degree $d$. In any solution $D$, either $v \in D$, or at least $d-1$ of its neighbors are in $D$. In this case, we have one branch with parameter $k-1$, and $d$ branches with parameter $k-(d-1)$ (which is progress as long as $d \geq 2$).
{ "domain": "cs.stackexchange", "id": 18079, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, graphs, parameterized-complexity, vertex-cover", "url": null }
quantum-mechanics, nuclear-physics, symmetry, quantum-spin, magnetic-moment $$\left\langle \mu \right\rangle = 0.88\mu_{_N}$$ where $g_i$ represent the respective gyromagnetic moments $g_p=5.538$ and $g_n=-3.826$ and $\mu_{_N}$ is the nuclear magneton. I know that the observed value for $\left\langle \mu \right\rangle$ is $0.86 \mu_{_N}$. How do we explain this discrepancy? Can we conclude anything about the symmetry of the nuclear potential? You have assumed an $s$-wave deuteron, and you’ve come within 2% of the correct magnetic moment. You’re probably aware that the deuteron has nonzero electric quadrupole moment, and therefore has a non-negligible $d$-wave part of its wavefunction. Most sources say that the deuteron is about 4% $d$-wave.
{ "domain": "physics.stackexchange", "id": 80023, "lm_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, nuclear-physics, symmetry, quantum-spin, magnetic-moment", "url": null }
immunology, hematology, classification I don't see any source where a "granulocyte progenitor cell" becomes a monocyte, only that a "granulocyte/monocyte progenitor cell" does; the "granulocyte/monocyte" label seems most clearly interpreted as "granulocyte and monocyte" progenitors, so I see nothing conflicting with these cells giving rise to both granulocytes and monocytes. I also do not see evidence that there is a stage of differentiation in which a particular cell will possibly become a monocyte or neutrophil, yet will not become eosinophil nor basophil; every textbook-style reference I find shares the pattern from the Wikipedia image above or discusses a stage of differentiation in which a cell is either fated to become a monocyte or any of the granulocytes. Given the complexity of differentiation, it's certainly possible some paper has made that claim, but I see no evidence for it.
{ "domain": "biology.stackexchange", "id": 11559, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "immunology, hematology, classification", "url": null }
arithmetic, binary Title: Calculating direct sum of 2 binary numbers If we have say,key=‘0110‘ and =‘1100‘, how will ⊕key mod 2 be calculated and what will be the answer equal to? The operation $\oplus$ is the same as bitwise XOR. The same symbol is used for direct sum, but there is otherwise absolutely no relation.
{ "domain": "cs.stackexchange", "id": 16033, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "arithmetic, binary", "url": null }
Finally we subtract b/(2a) from both sides and simplify to get the two solutions: x_(1,2)=(-b+-sqrt(b^2 - 4a c))/(2a) To see an example of dynamic ASCIIMathJax, try the Calculator. #### Here are a few more examples:
{ "domain": "chapman.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9748211582993982, "lm_q1q2_score": 0.801487364803806, "lm_q2_score": 0.822189134878876, "openwebmath_perplexity": 12075.135180354031, "openwebmath_score": 0.8946064114570618, "tags": null, "url": "http://math.chapman.edu/~jipsen/mathml/asciimathjax.html" }
Hence, $F'(0^+)=0$ where the derivative is the right-sided derivative. And we are done! An idea for you: since $\;\arcsin t^2\;$ is continuous on the integration interval whatever $\;x\;$ is, there exists a differentiable $\;G\;$ s.t. $$F(x):=\int_{\sqrt x}^1\arcsin t^2\;dt=\left.G(t)\right|_{\sqrt x}^1=G(1)-G(\sqrt x)\implies F'(x)=$$ $$=-G'(\sqrt x)\cdot\frac1{2\sqrt x}=-\frac{\arcsin x}{2\sqrt x}$$ and among other things, $\;F(0)=G(1)-G(0)\;$ , and now: $$F'(0)=\lim_{x\to0}\frac{F(x)-F(0)}x=\lim_{x\to0}\frac{G(1)-G(\sqrt x)-G(1)+G(0)}x=$$ $$=-\lim_{x\to0}\frac{G(\sqrt x)-G(0)}x=-\left.G'(\sqrt x)\right|_{x=0}=-G'(0)=-\arcsin 0=0$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846659768267, "lm_q1q2_score": 0.825654022270535, "lm_q2_score": 0.8438950966654774, "openwebmath_perplexity": 1148.5013911717444, "openwebmath_score": 0.9574785828590393, "tags": null, "url": "https://math.stackexchange.com/questions/2805733/is-fx-int-sqrt-x1-arcsint2-dt-differentiable" }
vba, excel Title: VBA userform loop to gather numbers from cells on an Excel sheet I am working on a userform and have everything working the way it should but it's taking a little longer than I would like. It's looping through 42 labels for each For statement and there are six of them. In an effort to learn how to code a little more efficient, could someone please review my code and show me some faster ways to get the job done? Private Sub Find() Application.ScreenUpdating = False Dim i As Integer, k As Integer k = 1 i = 1 For i = i To 42 C1 = "C1_" & i Me.Controls(C1) = Sheet14.Range("I" & k).Value If Me.Controls(C1) = "0" Then Me.Controls(C1).ForeColor = &H8000000F End If k = k + 1 Next k = 1 i = 1 For i = i To 42 C2 = "C2_" & i Me.Controls(C2) = Sheet14.Range("J" & k).Value If Me.Controls(C2) = "0" Then Me.Controls(C2).ForeColor = &H8000000F End If k = k + 1 Next ' k = 1 i = 1
{ "domain": "codereview.stackexchange", "id": 29558, "lm_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", "url": null }
python, web-scraping, modules for link in links: with session.get(link.url) as resp: resp.raise_for_status() doc = BeautifulSoup(resp.text, 'html.parser') category = doc.select_one('#_top td a[href="#"]').text if category != category_filter: continue content = doc.select_one('span.ny_font_content') dl_tag = content.find( 'a', { 'href': re.compile("/?(lunwen/|articles/up/).+") } ) yield Article.from_link(link, download=dl_tag['href']) def get_page(session: Session, query: str, page: int) -> Tuple[List[Link], int]: with session.get( urljoin(BASE_URL, '/Web/Search'), params={ 's': query, 'page': page, }, ) as resp: resp.raise_for_status() doc = BeautifulSoup(resp.text, 'html.parser') table = doc.select_one('#tab table') heads = [h.text for h in table.select('tr.cap td')] links = []
{ "domain": "codereview.stackexchange", "id": 41678, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, web-scraping, modules", "url": null }
complexity-theory, np-hard, partitions Given $S$, the closed-form solution for $\beta_1$ is $\beta_1=\frac{\sum_{i\in S}x_iy_i}{\sum_{i\in S}x_i^2}$ (same for $\beta_2$ with $\bar{S}$) and by using these values and developping the objective function, we obtain the problem described above. This problem can be solved in polynomial time in the manner alluded to by Yves Daoust in a comment. Specifically, I'll show that there exists an optimal solution in which every input point "above" some line through the origin can be placed in one part, and every other point in the other. This enables a simple algorithm involving $n-1$ steps, in each of which we guess the location of the threshold line to be between the $i$-th and $(i+1)$-th points taken in increasing order of angle from the $x$ axis, form the two parts accordingly, and optimise each part separately using least squares as usual; the solution with the lowest sum of costs is overall optimal. A slight wrinkle is that points on the $y$ axis can be assigned to either part
{ "domain": "cs.stackexchange", "id": 21265, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "complexity-theory, np-hard, partitions", "url": null }
resonance, lewis-structure, ozone All of these structures contribute to the "real" structure of ozone - however, some resonance structures contribute more and some resonance structures contribute less. Here is a link to a nice set of rules (see page 2, the "Resonance Contributor Preference Rule" section) that describes how to weight the contribution of various resonance structures. The most important rule is that each atom in the resonance structure should have an octet of electrons. Only the structures labeled I and II in your "three-form structure" row meet this requirement, so they are the two most important resonance structures for ozone - but all of the others do contribute, just to a lesser extent.
{ "domain": "chemistry.stackexchange", "id": 5304, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "resonance, lewis-structure, ozone", "url": null }
java, algorithm, sorting, reinventing-the-wheel, quick-sort while (index < toIndex - rightPartitionLength) { int current = array[index]; if (current > pivot) { ++rightPartitionLength; int tmp = array[toIndex - rightPartitionLength]; array[toIndex - rightPartitionLength] = current; array[index] = tmp; } else if (current < pivot) { int tmp = array[fromIndex + leftPartitionLength]; array[fromIndex + leftPartitionLength] = current; array[index] = tmp; ++index; ++leftPartitionLength; } else { ++index; } } sort(array, fromIndex, fromIndex + leftPartitionLength); sort(array, toIndex - rightPartitionLength, toIndex); } private static final int SIZE = 500_000; private static final int FROM = 100; private static final int TO = SIZE - 100;
{ "domain": "codereview.stackexchange", "id": 18182, "lm_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, sorting, reinventing-the-wheel, quick-sort", "url": null }
aerodynamics, power, lift The reason is that lift comes from momentum, which is mass times velocity of the air that is pushed down. However, the power it takes to move this air is proportional to the square of velocity. Therefore you want to push a lot of air a little, instead of a little air a lot. Both produce the same lift, but the former takes less power. Rotors spread out will push more air, which therefore doesn't need to be pushed as fast, which saves power.
{ "domain": "physics.stackexchange", "id": 21277, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "aerodynamics, power, lift", "url": null }
graphs, time-complexity, enumeration If the algorithm stores that all paths in full detail before outputting anything or if the space used by output is counted towards usages, then the space-complexity is $O(n4^{n/5}$). However, if the space used by output is not counted towards space-complexity, the space-complexity can be reduced to $O(n)$ if we use a depth-first search such as the following code in Python, assuming the adjacency list of the SPG is given in the input. def list_paths(g, path): children = g[path[-1]] if len(children) == 0: print(path) else: for node in children: path.append(node) list_paths(g, path) path.pop()
{ "domain": "cs.stackexchange", "id": 14233, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "graphs, time-complexity, enumeration", "url": null }
ros, ros-hydro, multi-machine, ros-indigo Originally posted by Stefan Kohlbrecher with karma: 24361 on 2014-07-04 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by ahendrix on 2014-07-05: The Diagnostic message changed between Hydro and Indigo, so exchanging diagnostic information between machines running different distros will not work. Comment by Yeti2 on 2014-07-07: Thanks for the answers. Now the listener and talker are running with differen versions. The probelm was a network configuration problem.
{ "domain": "robotics.stackexchange", "id": 18517, "lm_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, ros-hydro, multi-machine, ros-indigo", "url": null }
gazebo, navigation, lidar, odometry, ros-kinetic <xacro:property name="pi" value="3.141592653589794" /> <xacro:property name="base_len" value="0.89" /> <xacro:property name="base_wid" value="0.80" /> <xacro:property name="base_height" value="0.20" /> <xacro:property name="caster_length" value="0.10" /> <xacro:property name="caster_radius" value="0.15" /> <xacro:property name="wheel_length" value="0.10" /> <xacro:property name="wheel_radius" value="0.15" /> <xacro:property name="update_rate" value="50"/> <xacro:property name="hokuyo_size" value="0.05"/> <xacro:macro name="default_inertial" params="mass"> <inertial> <mass value="${mass}" /> <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0" /> </inertial> </xacro:macro> <material name="white"> <color rgba="1 1 1 1.5"/> </material>
{ "domain": "robotics.stackexchange", "id": 30154, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo, navigation, lidar, odometry, ros-kinetic", "url": null }
EDIT: The way to calculate the number of onto maps written in my notes is as follows: $|A_1 \cup A_2 \cup A_3| = C(3,1) * 2^5 - C(3,2) * 1^5 + C(3,3) * 0^5$ If someone could explain to me how this is derived, that would be incredibly helpful. Thanks for any help ahead of time. • In your question, what is $A_i$? – user122283 Mar 13 '14 at 0:45 • @SanathDevalapurkar See edit of #1 – user134788 Mar 13 '14 at 0:47 • What do you mean by $f(i) \neq a,b,c$ respectively for $i=1,2,..5$? $f(1)\neq a$, $f(2)\neq b,f(3)\neq c$ - what about $f(4),f(5)$? – user122283 Mar 13 '14 at 0:57 • @SanathDevalapurkar I've added a couple things. I'm not sure what it means! That's what I have written in my notes, I was hoping someone could explain it to me... – user134788 Mar 13 '14 at 1:12
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9805806501150427, "lm_q1q2_score": 0.8275072005922294, "lm_q2_score": 0.8438950947024555, "openwebmath_perplexity": 298.3721208062319, "openwebmath_score": 0.7930665016174316, "tags": null, "url": "https://math.stackexchange.com/questions/710197/finding-the-number-of-onto-maps-from-a-1-2-3-4-5-to-b-a-b-c" }
proposition 4. If $$a = bq + r$$, then $$\gcd(a, b) = \gcd(b, r)$$. proof: Since $$a = bq + r$$ is a linear combination of $$b$$ and $$r$$, any common divisor of $$b$$ and $$r$$ must also be a divisor of $$a$$. Additionally, since $$r = a - bq$$ is a linear combination of $$a$$ and $$b$$, any common divisor of $$a$$ and $$b$$ must also be a divisor of $$r$$. Taken together, the set of common divisors of $$a, b$$ must be equal to the set of common divisors of $$b, r$$. Therefore, $$\gcd(a, b)$$ must be equal to $$\gcd(b, r)$$. This proposition combined with the division algorithm gives an efficient method for computing the greatest common divisor. Each time we use the division algorithm, this proposition will give a smaller pair of numbers for computing the greatest common divisor, since the division algorithm guarantees that the remainder is smaller than the divisor in absolute value.
{ "domain": "itscomputers.lol", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9955316154683626, "lm_q1q2_score": 0.8274291790377407, "lm_q2_score": 0.8311430457670241, "openwebmath_perplexity": 273.3204162622009, "openwebmath_score": 0.8666674494743347, "tags": null, "url": "https://number-theory.itscomputers.lol/sections/greatest_common_divisor.html" }
assembly, quick-sort Title: Quicksort implementation in TASM assembly Is this assembly (TASM) implementation of quicksort efficient, and does this code follow common best practices? IDEAL MODEL small STACK 100h DATASEG ; -------------------------- ; Your variables here ; -------------------------- arr db 3,1,2 var db ? CODESEG proc Swap ;swap two values ;1,2 values to be swaped push bp mov bp,sp push di push bx push ax push cx xor ax,ax xor cx,cx mov bx,[bp+6];value to be swapped mov di,[bp+4]; mov ah,[bx] mov ch,[di] mov [bx],ch mov [di], ah pop cx pop ax pop bx pop di pop bp ret endp Swap proc Split ;sorting the array by valus greater then the pivot and values lower then the pivot ;1. start of the array ;2.end of the array ;3. pivot push bp mov bp,sp push ax push bx push cx push dx push di mov bx,[bp+8];start of the array(offset) mov di,[bp+6]; end of the array(offset) mov ax,[bp+4];pivot push di ;offset to be swapped add ax,bx push ax ;offset to be swapped call Swap mov ax,bx mov cx,di sub cx,bx inc cx
{ "domain": "codereview.stackexchange", "id": 25385, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "assembly, quick-sort", "url": null }
c++, logging, memory-optimization Why does it need the "global log level" to be configurable at all? Surely for each given log message in your current codebase, you can just look at it and ask, "Will this message be helpful during the mission?" If it is, then it should be logged during the mission. If it is not, then it should not be logged during the mission (and since that's the only time this code will run, the message can be entirely removed from the codebase). OTOH, if it's not intuitively obvious which messages will be useful during the mission, then what you need is a runtime-configurable log level. "Oh shoot, something's going wrong. Quick, bump up the log level and let's see if the debug messages can give us a clue!" If the compiler has completely removed all the code that was involved with printing those debug messages, then you're screwed.
{ "domain": "codereview.stackexchange", "id": 35704, "lm_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++, logging, memory-optimization", "url": null }
thermodynamics, potential-energy, molecular-dynamics Title: Why is a particles potential energy minimal (not zero) when the forces acting on it equal zero? I have the two following graphs representing a particles potential energy in function of its distance to another particle and another one which represents the attraction and repulsion forces between two particles with respect to their intermolecular distance.
{ "domain": "physics.stackexchange", "id": 33079, "lm_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, potential-energy, molecular-dynamics", "url": null }
# Math Help - a question on properties of circle 1. ## a question on properties of circle Referring to the attached pic, work out the length of OC - do not use trigonometric ratios stuff if possible. 2. Draw a tangent to the circle from C, say CT is the tangent and OT is the radius (so the lines CT and OT are perpendicular). There's a theorem which says that $CA\times CB = CT^2$, from which you can find CT. Then use Pythagoras. 3. Originally Posted by Opalg Draw a tangent to the circle from C, say CT is the tangent and OT is the radius (so the lines CT and OT are perpendicular). There's a theorem which says that $CA\times CB = CT^2$, from which you can find CT. Then use Pythagoras. produce 2 similar triangles?
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9884918499186287, "lm_q1q2_score": 0.8258686732417528, "lm_q2_score": 0.8354835432479663, "openwebmath_perplexity": 975.5962545158297, "openwebmath_score": 0.7673600912094116, "tags": null, "url": "http://mathhelpforum.com/geometry/111634-question-properties-circle.html" }
Question 1: What general principles do you apply in a situation like this? Can they be stated as theorems, or do they only exist at the level of intuition? Question 2: Do you know of any examples where there are two different ways to extend a sequence to zero, both of which are reasonable from the perspective of some principle? Feel free to answer at any level of sophistication. - My own thought tend to revolve around some subset of the following: --Find a combinatorial definition for the sequence, and see if it makes sense when you extend slightly further.
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9711290963960277, "lm_q1q2_score": 0.8050065958927765, "lm_q2_score": 0.8289388083214156, "openwebmath_perplexity": 350.29677328080635, "openwebmath_score": 0.7638905048370361, "tags": null, "url": "http://mathoverflow.net/questions/1176/given-a-sequence-defined-on-the-positive-integers-how-should-it-be-extended-to/1180" }
performance, beginner, sql, sqlite COALESCE( (SELECT "NOM_VALIDE" FROM TAXREF_MAMMIFERES WHERE "NOM_VALIDE_SIMPLE" = ESPECES_ATTRIBUTS.NOM_SIMPLE), CASE WHEN (SELECT COUNT(*) FROM TAXREF_MAMMIFERES WHERE "LB_NOM" = ESPECES_ATTRIBUTS.NOM_SIMPLE) = 1 THEN (SELECT "NOM_VALIDE" FROM TAXREF_MAMMIFERES WHERE "LB_NOM" = ESPECES_ATTRIBUTS.NOM_SIMPLE) WHEN (SELECT COUNT(*) FROM TAXREF_MAMMIFERES WHERE "LB_NOM" = ESPECES_ATTRIBUTS.NOM_SIMPLE) = 0 THEN 'Absent' ELSE '(Synonymes)' END) WHEN ESPECES_ATTRIBUTS.COMPART = 'Poissons' THEN COALESCE( (SELECT "NOM_VALIDE" FROM TAXREF_POISSONS WHERE "NOM_VALIDE_SIMPLE" = ESPECES_ATTRIBUTS.NOM_SIMPLE), CASE
{ "domain": "codereview.stackexchange", "id": 45541, "lm_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, sql, sqlite", "url": null }
c++, monads In order to create an error state, one has to repeat the entire type… like, all of it, with the expected value type, and all of the error types (here there is just one, but the whole point of composite_expected is that there can be several). If you imagine this function could return one of several error types, then it would look like this: auto func(/* ... */) -> composite_expected<T, ErrT1, ErrT2, ErrT3> { /* ... */ else if (/* error type 1 */) return composite_expected<T, ErrT1, ErrT2, ErrT3>::fromErr(0, /* args */); else if (/* error type 2 */) return composite_expected<T, ErrT1, ErrT2, ErrT3>::fromErr(1, /* args */); else if (/* error type 3 */) return composite_expected<T, ErrT1, ErrT2, ErrT3>::fromErr(2, /* args */); }
{ "domain": "codereview.stackexchange", "id": 43610, "lm_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++, monads", "url": null }
reference-request, terminology It sounds strange I know, but are there any existing methods for this, or terminology at least? Example: As an example let's say you calculated a function $f(x) = x * 8$ for $x=5$ in a specific way that gave you a resulting bit string. When an operation was done on the bit string, which was a function of the inputs (say, XOR against a number which was the function of the inputs for example), that the value came out to be 40. But then, you say "OK but what would it be for $f(6)$?". Since 6 is different than 5, the XOR constant changes, but you can use that new XOR constant against the result you already got from the previous calculations, to get the new correct answer of 48. The decoding process is the same regardless of the algorithm/function being evaluated. It is a function of the inputs, and has nothing to do with the details of the function itself (so isn't iterative computation).
{ "domain": "cstheory.stackexchange", "id": 3396, "lm_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, terminology", "url": null }
ros-melodic Title: Difference between Empty and None in Service messages I have created a client for the service /static_map. The static_map service uses the service message of type empty request and some response type.(by empty request,I mean no data type was mentioned in request) In the client that I created: #!/usr/bin/env python import rospy from std_msgs.msg import Empty from nav_msgs.srv import GetMap,GetMapRequest rospy.init_node("my_caller") rospy.wait_for_service("/static_map") my_connector=rospy.ServiceProxy("/static_map",GetMap) my_call=GetMapRequest() result=my_connector(my_call) print(result) The above code works perfectly but when I replace the line my_call=GetMapRequest() to my_call=Empty(), I get an error. So is empty data type not equal to the blank data type of the service request?
{ "domain": "robotics.stackexchange", "id": 34303, "lm_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-melodic", "url": null }
calibration, libuvc-camera, realsense, ptam, camera Title: Intel RealSense R200 Camera Calibration I've been trying to calibrate the Intel RealSense camera using various ROS tools for some time. I'm running Ubuntu 14.04 LTS with ROS Indigo. The nodelet I've been using is: http://wiki.ros.org/RealSense_R200 Has anyone been able to get this camera calibrated within ROS? I'm going to post basically everything I've tried since it might be helpful for others, but this is going to be very long and verbose. Here's what I've tried: PTAM (http://wiki.ros.org/ethzasl_ptam/Tutorials/camera_calibration). Result: I can launch the camera calibration tool, but the output is distorted and the nodelet crashes shortly after launching. See: And the following terminal output: Welcome to CameraCalibrator -------------------------------------- Parallel tracking and mapping for Small AR workspaces Copyright (C) Isis Innovation Limited 2008 Gui is on
{ "domain": "robotics.stackexchange", "id": 23351, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "calibration, libuvc-camera, realsense, ptam, camera", "url": null }
- Jens, this answer seems largely unrelated to the question as it stands. As I have previously suggested perhaps you should edit the question to match this more interesting answer. –  Mr.Wizard Aug 3 '13 at 18:51 @Mr.Wizard Thanks for the suggestion - I'll try to modify the question such that both Kuba's and my answers fit in... –  Jens Aug 3 '13 at 18:55 This looks great particularly because you made a function that specifically makes a nice looking prism given a 2D polygon. Which is exactly what I was looking for. Thanks! –  David Aug 3 '13 at 21:19 @David Great - I admit I went off on a lengthy exploration that may not apply to your case, but it was interesting to me too. When you're happy with an answer, it's common to accept it by clicking the check mark next to it. –  Jens Aug 3 '13 at 21:51 Maybe something like this:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9504109784205503, "lm_q1q2_score": 0.8257425177806719, "lm_q2_score": 0.8688267881258485, "openwebmath_perplexity": 2225.7701295063675, "openwebmath_score": 0.3523695766925812, "tags": null, "url": "http://mathematica.stackexchange.com/questions/29721/how-to-plot-prism-in-graphics3d" }
# What is common notation for "disjoint union of copies of $\mathbb{R}$"? I'm looking at a question out of Lee's Smooth Manifolds: Show that a disjoint union of uncountably many copies of $\Bbb{R}$ is locally Euclidian and Hausdorff but not second countable. My question is not about the problem itself, but rather what a common notation would be to denote this space. It just felt awkward going to write a solution to the problem, and writing the space as $M=\sqcup_{i\in I}M_i$ with $M_i\cong\Bbb{R}$. On the other hand, I could have gone with $\sqcup_{i\in I}\Bbb{R}$, but if I choose points $x,y\in M$ that doesn't give me a way to effectively describe which copies of $\Bbb{R}$ $x$ and $y$ lie in, respectively. There's a possibility this question will get closed as off-topic, but I figured I'd try anyways. I know in the end it's down to personal preference, but surely there's some sort of standard.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9796676502191265, "lm_q1q2_score": 0.8032229735133576, "lm_q2_score": 0.8198933315126791, "openwebmath_perplexity": 126.73026592279567, "openwebmath_score": 0.8647006750106812, "tags": null, "url": "https://math.stackexchange.com/questions/1840997/what-is-common-notation-for-disjoint-union-of-copies-of-mathbbr" }
neural-network, scikit-learn, accuracy Title: Why is my training accuracy 0.0? The Sizes of both the true label and predicted label are same still, the training accuracy is 0.0 import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.metrics import accuracy_score Data Preprocessing train=pd.read_csv(r'C:\Users\yashd\Downloads\Datasets\titanic\train.csv') train=train.dropna() y_train=np.array(train['Survived']) train=train.drop('Survived',axis=1) #removing the label from the data train=train.drop('PassengerId',axis=1) #removing irrelevant features from the training data train=train.drop('Cabin',axis=1) train=train.drop('Name',axis=1) train=train.drop('Ticket',axis=1) train['Sex']=np.where(train['Sex']=='male',1,0) #assigning a value of 1 to male and 0 to female train['Embarked']=np.where(train['Embarked']=='S',1,np.where(train['Embarked']=='Q',2,3)) train['Fare']=(train['Fare']-train['Fare'].mean())/train['Fare'].var() train['Age']=(train['Age']-train['Age'].mean())/train['Age'].var()
{ "domain": "datascience.stackexchange", "id": 7434, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-network, scikit-learn, accuracy", "url": null }
matlab, digital-communications, finite-impulse-response, bpsk, fading-channel This is not a flaw with the code provided by dsplog.com but a clarification on its purpose. The phase and amplitude changes from sample to sample, and is then corrected (together with the modifying the AWGN that is added) instantly. This allows us to simulate the BER temporarily over $N$ samples, just the same as if we ran $N$ receivers simultaneously to determine the average bit error rate across all of them on one single symbol (ergodic process, meaning we can simulate one changing experiment in time or simulate multiple experiments in parallel, it will be the same result).
{ "domain": "dsp.stackexchange", "id": 12136, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "matlab, digital-communications, finite-impulse-response, bpsk, fading-channel", "url": null }
beginner, php, html, mysql, css if ($_SERVER["REQUEST_METHOD"] == "POST") { $conn = openConnection(); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $return = false; if (!isValidUsername($_POST["username"])) { displayError("usernameError1"); $return = true; } if (!isValidPassword($_POST["password"])) { displayError("passwordError1"); $return = true; } if ($return) { displayUsername($_POST["username"]); closeConnection($conn); return; }
{ "domain": "codereview.stackexchange", "id": 36558, "lm_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, php, html, mysql, css", "url": null }
general-relativity and use it, involving, if I understand it correctly, purely the time direction, to illustrate the deflection by the Sun of say, a photon from a distant object Light curves because the speed of light varies with position. Search the Einstein digital papers for Einstein saying that. Also see Shapiro's 4th test of General Relativity: "the speed of a light wave depends on the strength of the gravitational potential along its path". You can liken this variable coordinate speed of light to a "tilt" in your time dimension, or "spacetime tilt", see this article for a mention of tilted light cones. But as far as I know the spatial element to the Shapiro delay contributes only a tenth of the total. As far as I know light is deflected twice as much as matter because of the wave nature of matter. and they state that, without also allowing for the curvature of space near a massive object, we will measure only half of the actual deflection observed.
{ "domain": "physics.stackexchange", "id": 22116, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity", "url": null }
c++, optimization, graph Each bridge can support a certain maximum weight. This maximum weight is an integer from 0 to 100,000. You have been given a list of cities where there are customers who are eager to view one of your trucks. These cities are called destination cities. Since you must decide which truck you will drive through these cities, you will have to answer the following problem: what is the maximum weight that can be driven through these destination cities? You are to write a program to solve this problem. Input The first line of input will contain three positive integers: c, r and d specifying the number of cities (in total), number of roads between cities and number of destination cities, respectively. The cities are numbered from 1 to c. There are at most 10,000 cities and at most 100,000 roads.
{ "domain": "codereview.stackexchange", "id": 4693, "lm_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++, optimization, graph", "url": null }
• 12th January 2021 Previous Post
{ "domain": "iita.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9504109784205502, "lm_q1q2_score": 0.8290885345070689, "lm_q2_score": 0.8723473879530492, "openwebmath_perplexity": 1179.9577146280094, "openwebmath_score": 0.773389995098114, "tags": null, "url": "http://bulletin.iita.org/stephanie-tsicos-orlwmt/s0qho.php?a53d6b=tangent-graph-period" }
c++, c++11, binary-search-tree /** DOCUMENTATION: * PRIVATE: @name bool ShelterBST::testDeleteNode() * @brief Private function to test deleteNode() method of ShelterBST class. * @return Returns a boolean value indicating whether the test has passed or not. */ bool ShelterBST::testDeleteNode() { //?6 TreeNode* root = nullptr; root = insert(root, new Pet("cat", 1)); root = insert(root, new Pet("dog", 2)); root = insert(root, new Pet("fish", 3)); root = deleteNode(root, "dog"); if (search(root, "dog") != nullptr) { std::cout << "\n*** TEST6 [Expected [nullptr] but got [" << search(root, "dog") << "]]\n ***"; return false; } root = deleteNode(root, "cat"); if (search(root, "cat") != nullptr) { std::cout << "\n*** TEST6 [Expected [nullptr] but got [" << search(root, "cat") << "]]\n ***"; return false; }
{ "domain": "codereview.stackexchange", "id": 44746, "lm_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, binary-search-tree", "url": null }
quantum-state, gate-synthesis Title: What is the complexity of splitting a state into a superposition of $n$ computational basis states? $\newcommand{\bra}[1]{\left<#1\right|}\newcommand{\ket}[1]{\left|#1\right>}\newcommand{\bk}[2]{\left<#1\middle|#2\right>}\newcommand{\bke}[3]{\left<#1\middle|#2\middle|#3\right>}$ I'm looking for (unitary$^1$) transformations$^2$, to create a superposition of any $n$ computational basis states with equal coefficients. I'm further interested in the complexity of these implementations and/or a gate count. Building up on this question, on how to create superpositions of 3 states, I wonder how it scales to split up into any number of $n$ computational basis states. For simplicity let's always start with $\ket{00...0}$. Here are my thoughts:
{ "domain": "quantumcomputing.stackexchange", "id": 1482, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-state, gate-synthesis", "url": null }
c#, image, winforms, graphics, genetic-algorithm parent1 = scoredIndex[temp1]; parent2 = scoredIndex[temp2]; cut = r.Next(0, pool[0].Genomestring.Length - 1); head1 = pool[parent1].Genomestring.Substring(0, cut); head2 = pool[parent2].Genomestring.Substring(0, cut); tail1 = pool[parent1].Genomestring.Substring(cut); tail2 = pool[parent2].Genomestring.Substring(cut); child1 = head1 + tail2; child2 = head2 + tail1; pool[scoredIndex[numberOfGenomes - 1]].Genomestring = child1; pool[scoredIndex[numberOfGenomes - 2]].Genomestring = child2; } public void SelectOneAndMutate() { var randomGenome = r.Next(0, numberOfGenomes); pool[randomGenome].MutateGenome(); } }
{ "domain": "codereview.stackexchange", "id": 33349, "lm_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#, image, winforms, graphics, genetic-algorithm", "url": null }
quantum-mechanics, quantum-spin, coherence \otimes \hat 1 \otimes \hat 1$ which gives a $q=m = 2$ and $q= - m = -2$ coherence; or a $\hat \sigma^z \otimes \hat \sigma^z \otimes \hat 1 \otimes \hat 1$ term which gives $q=0$ (writing the other possible terms shows that they also give $q=1$ and $q=-1$).
{ "domain": "physics.stackexchange", "id": 48353, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, quantum-spin, coherence", "url": null }
archaea It's not obvious to me where I can find archaea in this photo, although the website seems to indicate it's clear. Question: Where in this photo can I find archaea? It's probably the yellow bacterial mats, which are rich in life. The mats are a stratified ecology which varies with distance from the surface, so they are rich in many species of algea, procarote and eukariote. In Yellowstone, the bacterial mats can range in color including brown, green, yellow and orange. They are different to precipitated minerals. You can say "The photographer contains archaea"! So, no need to search very far. Here is a pic of an bacterial mat habitat: https://www.sciencedirect.com/science/article/pii/S0717345817300738 You can see in some videos. Ideally we would have a a biology video demonstrating the stuff at Yellowstone to show if it's squishy, slimy, spongey, has growth rings, colord layers, cross sections... although it's only tourist videos for the moment.
{ "domain": "biology.stackexchange", "id": 10170, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "archaea", "url": null }
algorithm-analysis, amortized-analysis Title: If x operations cost O(x) amortized then how much xy operations cost? True or False? Say some data structure can perform $x$ operations in amortized $O(x)$ time. Then for a big enough $y$ it can perform $xy$ operations in worst case $O(xy)$ time. My attempt: $x$ operations in $O(x)$ amortized means $O(1)$ expected time for $1$ operation. Then for $xy$ operations it'd be $O(xy)$ amortized (and I think $O(x^2y)$ worst case). Therefore, the statement is incorrect. But the answers sheet says i'm wrong. Why? Amortized is not just probabilistic, it means that for some big enough $y$, $xy$ operations can't take a long time and will guaranteed to be $O(x)$ in average in worst case (and therefore $O(xy)$ for all $xy$ operations), even through some of operations may take even $O(xy)$ time itself. https://stackoverflow.com/questions/200384/constant-amortized-time
{ "domain": "cs.stackexchange", "id": 3161, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm-analysis, amortized-analysis", "url": null }
# Math Help - Double derivative of x^2/(1 + x) 1. ## Double derivative of x^2/(1 + x) $y=x^2/(1+x)$ Find the derivative of F"(1), By the " it means to find the double derivative, but I have no idea what to do, could anybody help me? thanks 2. Originally Posted by timmehk $y=x^2/(1+x)$ Find the derivative of F"(1), By the " it means to find the double derivative, but I have no idea what to do, could anybody help me? thanks start by finding the first derivative ... can you do that? 3. Ok I get $1/(1+x)^2$ for the first derviative, but how do I solve for the second derivative? How can I use the quotient rule if I don't have an x in the numerator? Or, do I use the chain rule and disregard the fact that its division. 4. Just in case a picture helps... ... shows the first derivative, where ... is the product rule, straight lines differentiating downwards. But, ... the chain rule, is involved - it hardly leaves a trace in this instance, but we can zoom in on it...
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9820137910906878, "lm_q1q2_score": 0.8161939333123363, "lm_q2_score": 0.831143045767024, "openwebmath_perplexity": 441.1597080081336, "openwebmath_score": 0.9095134139060974, "tags": null, "url": "http://mathhelpforum.com/calculus/144388-double-derivative-x-2-1-x.html" }
javascript, ajax html += '</div>'; html += '<div class="member-info">'; html += `<h3 class="member-name truncate-text-item">${doctor.name}</h3>`; html += `<p class="member-job truncate-text-item">${doctor.job}</p>`; html += '</div>'; html += '</div>'; } }) html += '</div>'; html += '</div>';
{ "domain": "codereview.stackexchange", "id": 40282, "lm_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, ajax", "url": null }
astrophysics, acoustics, sun, estimation Title: How loud is the sun? The sun is a continuous explosion. The reason we cannot hear the sun is because of the vacuum separating us. If that space was to be filled with air, would the sun be audible? Setting aside your hypothetical premises, as well as the complications of MHD, there is a way to shed some light on your question. Here’s a sketchy answer: The Sun is a boiling cauldron of turbulent convection. The kinetic energy of fluid motions can be characterized statistically by the well-validated Kolmogorov spectrum. Kolmogorov’s arguments apply straightforwardly to incompressible fluids, but sound waves involve compression. Unless the ratio of length to time scales in turbulent motions were to approach the speed of sound, little energy would couple into compression modes. The cauldron would simmer quietly.
{ "domain": "physics.stackexchange", "id": 49927, "lm_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, acoustics, sun, estimation", "url": null }
evolution, species, speciation As for "goal", that's just the physical fact of the world that some arrangements of matter have different effects from other arrangements of matter; meaning that if some arrangements of matter will lead organisms to reproduce better, the optimizing process of evolution will predictably lead to organisms having that arrangement of matter. So we can talk about, say, eyes being "designed" by evolution "for seeing"; the difference between that and a rock "being designed" "for having its shape" is that "seeing" (i.e. that organisms ancestors surviving and reproducing based on how well they interpreted light signals) had a causal influence on the organism's eye's structure.
{ "domain": "biology.stackexchange", "id": 7049, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "evolution, species, speciation", "url": null }
climate-change Title: Equations for Global Temperature Models I'm a volunteer for 350, a grassroots organization that is fighting against climate change through education and advocacy. We're all volunteers, not climate scientists, and I'm looking for some knowledge about the equations that climate scientists use to predict global temperatures with respect to time. I'm aware that most climate models rely on the Navier-Stokes partial differential equations (Climate Models), but I don't have enough knowledge, nor have I easily found a source online that discusses the resulting approximate solution equations that scientists use to make their predictions. I've only seen graphs.
{ "domain": "earthscience.stackexchange", "id": 1495, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "climate-change", "url": null }
quantum-mechanics, hilbert-space, quantum-information, probability, quantum-measurements Bell nonlocality Bell scenarios are another prominent case study of conditional probabilities in QM. Here, you think of Alice and Bob as having access to black boxes, the inner workings of which are unknown to them. They can only push buttons that sit on these boxes and observe what happens when they do. If they do this systematically and compare their results, as you might know, they can find some rather interesting results, such as types of correlations that cannot be explained classically. Discord Another interesting example that highlights how conditional probabilities can be tricky in quantum mechanics is quantum discord. The quantum discord of a bipartite state is defined as the difference between two expressions for the mutual information. Classically, given random variables $A$ and $B$, you can write their mutual information in the following two equivalent ways: $$I(A:B)=H(A)+H(B)-H(A,B), \\ J(A:B)=H(A)-H(A|B).$$
{ "domain": "physics.stackexchange", "id": 61966, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, hilbert-space, quantum-information, probability, quantum-measurements", "url": null }
timer, typescript, promise add: (req: () => Promise<string>) => Promise<string> = req => { let executor; const requestPromise: Promise<string> = new Promise((resolve, _reject) => { let localExecutor = () => { resolve(req()); }; executor = localExecutor; }); this.stack.push(executor); return requestPromise; }; pullAndExecute = () => { const op: () => Promise<string> = this.stack.shift(); // if (op) console.log("throttle found:", op); if (op) op(); }; interval = setInterval(this.pullAndExecute, this.spacing); stop = () => clearInterval(this.interval); } const throttle = new RequestThrottle();
{ "domain": "codereview.stackexchange", "id": 35057, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "timer, typescript, promise", "url": null }
c#, server, tcp, client I've noticed that from time to time I miss out some messages (especially long ones). What do you think I can improve here? dead code should be removed the indention is horrible byte[] StreamMessage = new byte[9632*2]; try { socket = peerListener.AcceptSocket(); Thread.Sleep(500); MessageLength = socket.Receive(StreamMessage, 0, StreamMessage.Length, SocketFlags.None); } should be look like byte[] StreamMessage = new byte[9632*2]; try { socket = peerListener.AcceptSocket(); Thread.Sleep(500); MessageLength = socket.Receive(StreamMessage, 0, StreamMessage.Length, SocketFlags.None); } you should enclose IDisposable's like Stream, StreamWriter in using blocks. internal void SendMessageViaStreamWriter(object message) { string messageOut = (string)message + "\n"; using (StreamWriter sw = new StreamWriter(peerClient.GetStream())) { sw.Write(messageOut); sw.Flush(); } }
{ "domain": "codereview.stackexchange", "id": 11115, "lm_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#, server, tcp, client", "url": null }
$$f(\pi/2)=3, \quad f(3\pi/2)=3, \quad f(\pi/3)=\frac{13}{4}, \quad f(5\pi/3)=\frac{13}{4}.$$ So $f_{\text{max}}=\frac{13}{4}$ and $f_{\text{min}}=3.$ But the minimum should be $1$. • You're missing $\pi$ as a root – iamwhoiam Sep 2 '17 at 10:17 • Are we interested in all solutions or just solutions in the interval $[0, 2\pi)$? – N. F. Taussig Sep 2 '17 at 10:51 • The derivative is not equal to zero when $x = \frac{\pi}{2}$ or when $x = \frac{3\pi}{2}$. You want $\sin x = 0$, not $\cos x = 0$. – N. F. Taussig Sep 2 '17 at 10:55 Credit to @iamwhoiam for suggesting this solution. There's nothing wrong with your method - you just missed a root. When you find the roots of the first derivative, either $2 \cos x - 1$ or $\sin x$ should equal $0$, so we have: First case: $2 \cos x - 1 = 0$, $\cos x = \frac{1}{2}$. Since $\cos(x)$ is an even function, $\cos(x) = \cos(-x)$. Since we know that one solution is $x = \frac{\pi}{3}$, $x$ can also be $\frac{5\pi}{3}$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924818279464, "lm_q1q2_score": 0.8162150994144802, "lm_q2_score": 0.839733963661418, "openwebmath_perplexity": 197.35137082181728, "openwebmath_score": 0.8877440094947815, "tags": null, "url": "https://math.stackexchange.com/questions/2414124/max-and-min-of-fx-sin2x-cosx2" }
c#, asp.net-mvc, typescript, checkers-draughts When the board state changes, the FEN textbox below the board will be updated. When the Copy button next to the FEN textbox is clicked, the FEN value will be selected, copied to the clipboard, and "Copied!" will be shown beneath the textbox for 5 seconds. Selected board and template pieces are shown with a golden border. I am aware that I am violating several accessibility guidelines at the moment. I am in the process of correcting this, and will post a follow-up question later specifically focusing on accessibility across the whole website. First, the MVC View files: BoardEditor.cshtml @using CheckersWebsite.Enums @using CheckersWebsite.Facade @using CheckersWebsite.ViewModels @using CheckersWebsite.Resources
{ "domain": "codereview.stackexchange", "id": 30488, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, asp.net-mvc, typescript, checkers-draughts", "url": null }
newtonian-mechanics, forces, acceleration, vectors, notation $$\vec F=m\vec a\quad \Leftrightarrow\quad \left(\begin{matrix}F_x\\F_y\\F_z\end{matrix}\right) =m\left(\begin{matrix}a_x\\a_y\\a_z\end{matrix}\right)$$ The equations along each dimension are easily extracted: $$\vec F=m\vec a\quad \Leftrightarrow\quad \left(\begin{matrix}F_x\\F_y\\F_z\end{matrix}\right) =m\left(\begin{matrix}a_x\\a_y\\a_z\end{matrix}\right)\quad\Leftrightarrow\quad \begin{cases} F_x=&ma_x\\F_y=&ma_y\\F_z=&ma_z\end{cases} $$ And here you have the scalar versions of the vector equation. Were the x-axis placed along the vectors themselves, the x-components would happen to equal the vector's lengths / magnitudes (with signs), which is the case you described.
{ "domain": "physics.stackexchange", "id": 48253, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces, acceleration, vectors, notation", "url": null }
machine-learning, predictive-modeling, ranking However, I am having difficulty figuring out how to include this in my row data that I can train (after all, correctly formatting data is 99% of proper machine learning), and I am hoping that someone here might have thought along the same lines in the past and might be able to shed some light.
{ "domain": "datascience.stackexchange", "id": 244, "lm_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, ranking", "url": null }
php, codeigniter On a different note however. The functions you have parameters being passed to. Maybe this is me being a stickler. But you may want to error check those before setting up and running your query. Error check in this sense to me means make sure they aren't null, empty, make sure they are set, and depending on what you might be wanting to pass such as specifically an integer or maybe a value that resembles a string that is email address format. I only say this cause why bother running the query or even attempting if the criteria doesn't fit the need.
{ "domain": "codereview.stackexchange", "id": 1533, "lm_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, codeigniter", "url": null }
mechanical-engineering The ratio/amount of soil components (again, clay, silt, and sand) is unknown. Installing opening/closing dividers will have to be at fixed positions and as the soil components are unknown, dividing along these fixed positions will cause some remixing of the soil. I am hesitant to introduce moving parts on a spinning part spinning at 2,500 RPM (the inner drum of the centrifuge). This seems like an unnecessary safety risk that I would like to avoid, if possible. Here is a diagram of a simple example of what the inner drum looks like:
{ "domain": "engineering.stackexchange", "id": 4708, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering", "url": null }
feature-selection, data-cleaning Title: How do you calculate sample difference in terms of sensor signals? A paper I read called Preprocessing Techniques for Context Recognition from Accelerometer Data refers to sample difference as the delta value between signals in a pairwise arrangement of samples that allows a basic comparison between the intensity of user activity. How would you do the pairwise arrangement? Would it require you to have different files of data representing different classes? For example, I have a CSV: 1495573445.162, 0, 0.021973, 0.012283, -0.995468, 1 1495573445.172, 0, 0.021072, 0.013779, -0.994308, 1 1495573445.182, 0, 0.020157, 0.015717, -0.995575, 1 1495573445.192, 0, 0.017883, 0.012756, -0.993927, 1
{ "domain": "datascience.stackexchange", "id": 1758, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "feature-selection, data-cleaning", "url": null }
php, laravel, jwt if(filter_var($email['email'],FILTER_VALIDATE_EMAIL) === false) $email =''; $error = 1; try { // verify the $email and create a token for the user
{ "domain": "codereview.stackexchange", "id": 20543, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, laravel, jwt", "url": null }
computability, loops Now for the quest of making a program that computes BLUEDIAG. My plan of attack is to make three programs. Program 1 takes as input a natural number and as output the code of the Nth blueprogram. Program 2 takes as in put the code of a blueprogram B and a number M and outputs the same number this program B would produce when given the input M Program 3 takes as input a number K and outputs the number K + 1. I convinced myself that program 1 can be written in Bloop: we can show that the Nth blue program has no more than N + 100 characters, so we can just loop through the huge but bounded list of gibberish strings of at most N + 100 characters and count how many of those are bloop programs. I also convinced myself that program 3 is in bloop. So this isolates the problem of needing unbounded loops to program 2.
{ "domain": "cs.stackexchange", "id": 19235, "lm_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, loops", "url": null }
9. ## Re: Probability with a "known" Originally Posted by Wilmer Thanks, Slip.... Once more: it's not the probability of "at least 1 red apple", but the probability of "at least 1 apple" (red or green); ******************** here's my initial post: A box contains 4 red apples, 4 green apples and 8 peaches. 3 are picked at random. It is known that at least 1 of the 3 is an apple. ******************** What is probability that at least 2 are red apples? I see. Sorry about that. Ok, so again, if at least two of the chosen fruit are red apples, then you are guaranteed that at least one of the chosen fruit is an apple (red or green), so $P(A\text{ and }B)$ is still $P\left(\text{at least }2\text{ are red apples}\right) = \dfrac{19}{140}$ as we calculated before.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.992062004490436, "lm_q1q2_score": 0.8064147807187074, "lm_q2_score": 0.8128673178375734, "openwebmath_perplexity": 777.3827612388857, "openwebmath_score": 0.7933079600334167, "tags": null, "url": "http://mathhelpforum.com/statistics/223410-probability-known.html" }
This relation is transitive. 3 doesn't play any role here since you don't require a transitive relation to be full. Observe that the transitivity here means: $$(1,2)\wedge(2,1)\in R\Rightarrow(1,1)\in R \\(2,1)\wedge(1,2)\in R\Rightarrow(2,2)\in R$$ and these are found in the relation so it's transitive. In fact that's equivalence relation on $\{1,2\}$ (since it's also reflexive and symmetric there). EDIT: We can justify my remark by definitions ($T$ is the set on which the relation $R$ is defined): • Reflexivity means $\forall x\in T,(x,x)\in R$ - In our case $(1,1),(2,2)\in R$ • Symmetry means $xRy\Leftrightarrow yRx$. It doesn't mean that the relation is full. In our case $(1,2)\in R\wedge (2,1)\in R$. Trivially $(1,1),(2,2)\in R$. So for these reasons it's an eqivalence relation on $T=\{1,2\}$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9752018376422668, "lm_q1q2_score": 0.8105322296544575, "lm_q2_score": 0.8311430499496095, "openwebmath_perplexity": 404.5236177031171, "openwebmath_score": 0.8467601537704468, "tags": null, "url": "https://math.stackexchange.com/questions/1112351/is-this-relation-transitive-r-1-2-1-1-2-1-2-2-over-a-1-2-3" }
homework-and-exercises, newtonian-mechanics, angular-momentum, reference-frames In fact, my understanding is that the angular momentum with relation to $O$ would be conserved: indeed, when we pull the string upwards, we're only creating a tension force $\mathbf{F}$ in the direction of the string. Therefore the vector $\mathbf{r}$ connecting $O$ to $m$, and the vector $\mathbf{F}$, are parallel. That means the torque $\mathbf{\tau} = \mathbf{r} \times \mathbf{F}$ applied to $m$ with relation to $O$ would be zero, so angular momentum must be conserved. What part of that reasoning is flawed? Why is the momentum with relation to the center of the dashed circle (around which $m$ rotates) conserved instead? The answer is very simple, but only after realising one thing. The key is that you are not taking the weight into account. The mass does have a weight downwards. Now, the point is that the tension force is such that the resultant force points to the centre of the dashed circle.
{ "domain": "physics.stackexchange", "id": 42829, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, angular-momentum, reference-frames", "url": null }
satellite Title: Polar satellites for Global Navigation Systems Why do we need 7 polar satellites for a navigation system like the Indian Regional Navigation Satellite System (IRNSS)? IRNSS is intended to serve an area spanning 100 degrees in longitude by 80 degrees in latitude. Anywhere in that service area, at any time, a receiver needs to compare distances to four of the satellites. To determine latitude, the satellites can't all be above the equator, so some of the orbits are inclined 29$^\circ$. Those satellites oscillate north-south in pairs. Polar orbits aren't needed; global systems serve the poles with orbits inclined only 55$^\circ$.
{ "domain": "astronomy.stackexchange", "id": 1538, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "satellite", "url": null }
homework-and-exercises, newtonian-mechanics, forces, friction, calculus I have seen this previous question: Rope wrapped around a cylinder and followed up the Wikipedia article on the Capstan equation. However there are still several things I am stuck on. My initial attempt Before I tried to find help on this question, I thought that I could just say that the total 'downwards' force, which is $F+F'$, $F'$ being the applied force, can be thought of as being distributed over the tops of the rope on the cylinder. This would give me that the maximum normal force of any point is $(F+F')/n$ So that $Maximum frictional force, F_r=\mu \frac{F+F'}{n}$ Following this through so that for slipping I have $F'-F>F_r$ I get that $F'>\frac{1+\mu}{1-\mu}F$ I think my approach here is wrong because: -I got a too large value for the maximum frictional force as I overestimated the maximum normal force by thinking that the normal force acts only at the bits of rope passing over the top of the cylinder. After looking at the Capstan equation
{ "domain": "physics.stackexchange", "id": 36203, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, forces, friction, calculus", "url": null }
general-relativity, gravitational-waves, ligo I'm sure you know the basics, but to be semi-complete on the why. The detections are based on very small deformations of space where orthogonal directions from the waves are alternately compressed and expanded, what is called a quadrupole mode. The two orthogonal legs of the interferometer will then involve light which travels less or more in one leg that the other, and will add vectorially at the detector, and due to the phase changes the resulting amplitude and intensity will change. These are converted into electrical signals and processed. Thus, anything that could possibly also move the detectors or mirrors along the two legs can cause a false a alarm (nothing else can change enough the distance along the two legs, only gravitation can), and any un-correlated movement in just one leg still represents noise. The signal processing is pretty interesting but that's not the question. And they needed to eliminate random fluctuations as well as non-random signals that are not due to
{ "domain": "physics.stackexchange", "id": 35865, "lm_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, gravitational-waves, ligo", "url": null }
gauge-theory, notation, differentiation, commutator, yang-mills Title: Notation and concepts of Yang Mills Theory I am studying loop quantum gravity using the book by Pullin and Gambini. I am having some trouble understanding and getting past the chapter on Yang Mills theory, mainly because I am confused about some of the notation and concepts. I am hoping someone can shed some light on this for me. First of all, the Yang Mills covariant derivative is defined and written as: $$ D_{\mu} \equiv \partial_{\mu} - ig/2\sigma^iA^i_{\mu} $$ I understand that the superscripted indices, $i$, on $\sigma^i$ and $A^i_{\mu}$ are internal indices of the theory that run from 1 to 3. But is the $i$ in front of the coupling parameter, $g$, meant to indicate this internal index as well, or is this the imaginary unit? I am guessing the second, but the notation is a little ambiguous to me so I would like to have some clarification.
{ "domain": "physics.stackexchange", "id": 55056, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gauge-theory, notation, differentiation, commutator, yang-mills", "url": null }
satisfiability, sat-solvers function DPLL(Φ) if Φ is a consistent set of literals then return true; if Φ contains an empty clause then return false; for every unit clause {l} in Φ Φ ← unit-propagate(l, Φ); for every literal l that occurs pure in Φ Φ ← pure-literal-assign(l, Φ); l ← choose-literal(Φ); return DPLL(Φ ∧ {l}) or DPLL(Φ ∧ {not(l)});
{ "domain": "cs.stackexchange", "id": 11837, "lm_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, sat-solvers", "url": null }
java, http private int contentLength() throws IOException{ String str; int postDataI = -1; while((str = readRequest()) != null) { if(str.isEmpty()) break; final String contentHeader = "Content-Length: "; if(str.contains(contentHeader)){ postDataI = Integer.parseInt(str.substring(contentHeader.length())); } } return postDataI; } private String userName(int postDataI) throws IOException{ String USER_DATA = null; char [] charArray = new char[postDataI]; in.read(charArray); USER_DATA = new String(charArray); return USER_DATA; } private String modifyUserName(String USER_DATA){ USER_DATA = USER_DATA.replaceAll("\\+"," "); USER_DATA = USER_DATA.substring(USER_DATA.indexOf("=") + 1); return USER_DATA; } @Override public void run() { try{ String message = readRequest();
{ "domain": "codereview.stackexchange", "id": 32519, "lm_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, http", "url": null }
electricity, electric-circuits It is the emf that 'drives' this current round the closed path. Now, once again consider the first circuit. Clearly, the emf is driving the electrons clockwise but it is also clear that, for there to be a current through the resistor, there must be a potential difference (Ohm's law). Thus, the electron density is slightly greater on the conductor connected to the more negative terminal of the resistor than on the conductor connected to the more positive terminal. There's much more to emf than what I've outlined here and the Wikipedia article (and links and reference therein) I linked above gives much more detail.
{ "domain": "physics.stackexchange", "id": 26190, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electricity, electric-circuits", "url": null }
beginner, go, quick-sort Title: Quicksort implementation in Go Learning Go and trying to get a grip of the various concepts it uses. Following is my implementation of Quicksort (choosing last element as pivot). It takes the length of the array and the subsequent array to be sorted as user input. package main import "fmt" func main() { var n int fmt.Print("Enter Size: ") fmt.Scan(&n) var slice = make([]int, n) for i := 0; i < n; i++ { fmt.Print("arr[",i,"]: ") fmt.Scan(&slice[i]) } fmt.Print("Array: ", slice, "\n") quickSort(slice, 0, n - 1) fmt.Print("Sorted Array: ", slice) } func quickSort(a []int, low int, high int) { if(low < high) { p := partition(a, low, high) quickSort(a, low, p - 1) quickSort(a, p + 1, high) } }
{ "domain": "codereview.stackexchange", "id": 20727, "lm_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, go, quick-sort", "url": null }
matrix… Define scalar matrix. import java. When a square matrix is multiplied by an identity matrix of same size, the matrix remains the same. Write a Program in Java to input a 2-D square matrix and check whether it is a Scalar Matrix or not. Takes a single argument. An identity matrix is a matrix that does not change any vector when we multiply that vector by that matrix. 2. Returns a scalar equal to the numerically largest element in the argument M. MMIN(M). Solution : The product of any matrix by the scalar 0 is the null matrix i.e., 0.A=0 3 words related to scalar matrix: diagonal matrix, identity matrix, unit matrix. Example sentences with "scalar matrix", translation memory. Pre- or postmultiplication of a matrix A by a scalar matrix multiplies all entries of A by the constant entry in the scalar matrix. 6) Scalar Matrix. Example 2 - STATING AND. A symmetric matrix is a matrix where aij = aji. Scalar Matrix : A square matrix is said to be scalar matrix if all the main diagonal
{ "domain": "yf-sensei.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399060540359, "lm_q1q2_score": 0.8955694397613148, "lm_q2_score": 0.9230391722430736, "openwebmath_perplexity": 769.3692635243086, "openwebmath_score": 0.715437114238739, "tags": null, "url": "http://yf-sensei.com/sd2n0z/e3b785-diagonal-matrix-and-scalar-matrix" }
php, mysql, security Title: Sanitisation function: any holes? I've come up with this small function to make user submitted strings safe for MySQL. I'd be grateful if someone could point out any security holes in this. I've tested it out, and it happily replaces quotes and the like. The only issue I can see is the lack of escaping ampersands, but this shouldn't matter right? $keywords = array("delete from", "drop table", ";", "="); $safeKeywords = array("delete&nbsp;from", "drop&nbsp;table", "&#59;", "&#61;"); function dbSanitise($field) { global $keywords, $safeKeywords; $sanitised = str_ireplace($keywords, $safeKeywords, $field); $sanitised = htmlentities($sanitised, ENT_QUOTES); $sanitised = mysql_real_escape_string($sanitised); return $sanitised; }
{ "domain": "codereview.stackexchange", "id": 428, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, mysql, security", "url": null }
general-relativity, gravity, newtonian-gravity, approximations Is it a postulate? No. In the standard formulation of GR, the main postulate is the Einstein field equations. From it, we can prove Birkhoff's theorem, which says that the Schwarzschild metric is the external field of a static, spherically symmetric source. The weak-field limit of the Schwarzschild metric corresponds to a $1/r^2$ field.
{ "domain": "physics.stackexchange", "id": 15081, "lm_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, newtonian-gravity, approximations", "url": null }
Originally Posted by Random Variable It's easy to prove. Let $\lambda_{1}$ be an eigenvalue of $AB$ then $ABx=\lambda_{1} x$ $BABx = \lambda_{1} B x$ which means that $\lambda_{1}$ is an eigenvalue of $BA$ with associated eigenvector $Bx$ $BABx=\lambda Bx$ doesn't necessarily imply that $\lambda$ is an eigenvalue of $BA$ because we might have $Bx=0.$ • May 15th 2010, 07:39 AM Random Variable Quote: Originally Posted by NonCommAlg $BABx=\lambda Bx$ doesn't necessarily imply that $\lambda$ is an eigenvalue of $BA$ because we might have $Bx=0.$ Deal with the case of $A$ or $B$ being zero matrices separately. If $A$ or $B$ are zero matrices, then $AB=BA=0$, and the only eigenvalue of a zero matrix is $\lambda = 0$ • May 15th 2010, 02:54 PM HallsofIvy Quote: Originally Posted by Random Variable Deal with the case of $A$ or $B$ being zero matrices separately. If $A$ or $B$ are zero matrices, then $AB=BA=0$, and the only eigenvalue of a zero matrix is $\lambda = 0$
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924818279465, "lm_q1q2_score": 0.8668336383640791, "lm_q2_score": 0.8918110526265555, "openwebmath_perplexity": 586.8895505468747, "openwebmath_score": 0.9639359712600708, "tags": null, "url": "http://mathhelpforum.com/advanced-algebra/144749-eigenvalues-ab-ba-print.html" }
newtonian-mechanics, fluid-dynamics, acceleration, drag Title: Why does a small thermocol ball fall slower than a metal ball of the same volume and surface area (air resistance equal)? Suppose a thermocol ball and a metal ball of same volume and surface area (but different masses, obviously) are dropped from the same height from rest. The acceleration due to gravity is 'g' and the air resistance is also same in both the cases, then why is it that the metal ball reaches the ground first? Let $R$ be the resistive force. Applying Newton's second law $mg-R = ma$ where $a$ is the acceleration of the ball. Thus $a= g-\frac Rm$.
{ "domain": "physics.stackexchange", "id": 91784, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, fluid-dynamics, acceleration, drag", "url": null }
java, beginner, role-playing-game player.takeDamage(damageTaken); enemy.takeDamage(damageDealt); if (damageDealt > 0) { System.out.println("\t> You strike the " + enemy.getName() + " for " + damageDealt + " damage!"); } else if (damageDealt < 1) { System.out.println("\t> You attempt to hit the " + enemy.getName() + " but miss!"); } if (damageTaken > 0) { System.out.println("\t> The " + enemy.getName() + " retaliates! You take " + damageTaken + " damage!"); } else if (damageTaken < 1) { System.out.println("\t> The " + enemy.getName() + " retaliates but misses!"); } if (player.getHealth() < 1) { System.out.println("\t ##################" + "\n\t # You Have Died! #" + "\n\t ##################"); state.updateGameState(GameState.FINISHED); }
{ "domain": "codereview.stackexchange", "id": 32677, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, role-playing-game", "url": null }
One way that does not use the harmonic series is by using the identity $$\sum^{2n}_{i=1} \frac{(-1)^{i-1}}{i}=\sum^n_{i=1}\frac{1}{n+i},$$ which you can find here, for example, and use the power series representation of $\ln(1+x)$ at $x=1$. • Since the radius of convergence of $\ln(1+x)$ is exactly $1$, there is the (small) technicality of invoking Abel's Theorem, isn't there? – Clement C. Feb 24 '16 at 18:18 • Yes, you are right. – detnvvp Feb 24 '16 at 18:22 Here is one approach. Write the sum of interest as \begin{align} \sum_{k=n+1}^{2n}\frac1k&=\sum_{k=1}^n\left(\frac{1}{2k-1}-\frac1{2k}\right)\\\\ &=\sum_{k=1}^n\left(\int_0^1 (x^{2k-2}-x^{2k-1})\,dx\right)\\\\ &=\int_0^1 \sum_{k=1}^n \left(x^{2k-2}-x^{2k-1}\right)\,dx\\\\ &=\int_0^1\frac{1-x^{2n}}{1+x}\,dx \end{align} Using the Dominated Convergence Theorem, we have
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.989181549593039, "lm_q1q2_score": 0.8285582112952656, "lm_q2_score": 0.837619961306541, "openwebmath_perplexity": 663.9001396219654, "openwebmath_score": 0.9906830191612244, "tags": null, "url": "https://math.stackexchange.com/questions/1670508/solve-lim-n-to-infty-left-frac1n1-frac1n2-cdots-frac1nn" }
javascript, performance, algorithm, strings, edit-distance happens. He managed to tell the cabbie where to go and when they pulled up to the apartment he apparently paid the man, I mean the money disappeared, and then he got out of the car but he stumbled a little getting out, dropped some money on the ground, and when he picked up the money it was covered in blood. He looked at his hand, still standing in the middle of Cambridge Street, and the pinky finger on his guitar hand was bleeding, brown stains on his jeans. He couldn't move the finger. How the fuck did that happen he thought as he followed Luke inside, Luke taking care of everything all of a sudden. (Alison was in Providence, waiting for her boyfriend to get home from his classes at Johnson-Wales, one of the premiere culinary academies in the nation, drinking a Miller High-Life and listening to music, increasingly annoyed.) They went in the back door and Eric leaned against the white frame, leaving a streak of blood, Linda suddenly awake in a bathrobe and asking them both what
{ "domain": "codereview.stackexchange", "id": 20769, "lm_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, algorithm, strings, edit-distance", "url": null }
rviz, hector-slam, ros-kinetic Title: RVIZ is unable to show the map from hector_slam I do not have any errors. I am able to see the laserscan and it is able to detect and show the movement of the sensor. However, I am unable to see the map. I have put in the respective topics and fixed frames as many tutorials have mentioned. Can anyone help me check if anything is wrong? Thank you. view_sick.launch file: <launch> <include file="$(find sick_tim)/launch/sick_tim551_2050001.launch" /> <node name="rviz" pkg="rviz" type="rviz" args="-d $(find sick_tim)/ rviz/sick.rviz"/> </launch> hector_mapping_demo.launch file: <launch> <node pkg="hector
{ "domain": "robotics.stackexchange", "id": 31940, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rviz, hector-slam, ros-kinetic", "url": null }
c#, .net, sql-server string scmd = "select qrefno from tblQ where Qused Not In ('','null','0')"; string[] temp_qref_array = new string[qrefnocnt]; smc = new SqlCommand(scmd, con); int i = 0; if (dr != null) { if (dr.IsClosed) { dr = smc.ExecuteReader(); } else { dr.Close(); dr = smc.ExecuteReader(); } } else dr = smc.ExecuteReader(); while ( dr.Read()) temp_qref_array[i++] = dr["qrefno"].ToString(); con.Close(); scmd = ""; for (i = 0; i < temp_qref_array.Length - 1; i++) { scmd = scmd + "'" + temp_qref_array[i] + "',"; } scmd = scmd + "'" + temp_qref_array[i] + "'";
{ "domain": "codereview.stackexchange", "id": 12564, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, .net, sql-server", "url": null }
Unit 7 Vectors Unit 8 Statistics Final Review Contact & Tutoring/extra help. , Nov 14th QUIZ Sec 4. 6 Part II Combining Transformations Practice Solutions; 6. 5-1 Fundamental Identities. 3 in text Assignment Packet p. T HE ANGLES in theoretical work will be in radian measure. Learn how to solve trigonometric equations and how to use trigonometric identities to solve various problems. Algebra II Module 2 Module 2 builds on students’ previous work with units and with functions from Algebra I, and with trigonometric ratios and circles from high school Geometry. Solving second degree trig functions can be accomplished by factoring polynomials into products of binomials. The trig identity tests from Friday will not count UNLESS they improve a student's average. 2 Basic Concepts. These trigonometry identities are true for all values of the variables. 1 Angles; 7. If y = f(x) and x = g(y) are two functions such that f (g(y)) = y and g (f(y)) = x, then f and y are said to be inverse of each
{ "domain": "salesianipinerolo.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429116504951, "lm_q1q2_score": 0.8250915995526686, "lm_q2_score": 0.8376199552262967, "openwebmath_perplexity": 1644.3225169787613, "openwebmath_score": 0.6696335077285767, "tags": null, "url": "http://salesianipinerolo.it/syvr/trig-identities-test.html" }
2.3. tensor product of graphs, 2.4. strong product of graphs, 2.5. lexicograp… Tree Diagrams in Math: Definition & Examples, Quiz & Worksheet - Graphing in Discrete Math, Over 83,000 lessons in all major subjects, {{courseNav.course.mDynamicIntFields.lessonCount}}, Indiana Core Assessments Mathematics: Test Prep & Study Guide, Biological and Biomedical If the vertex-set of a graph G can be split into two disjoint sets, $V_1$ and $V_2$, in such a way that each edge in the graph joins a vertex in $V_1$ to a vertex in $V_2$, and there are no edges in G that connect two vertices in $V_1$ or two vertices in $V_2$, then the graph $G$ is called a bipartite graph. © copyright 2003-2021 Study.com. She represents the cities as points, and she puts lines between them representing the route to get from one to the other. It decreases. Services. Though there are a lot of different types of graphs in discrete mathematics, there are some that are extremely common. just create an account. You'll also
{ "domain": "redwoodcc.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9752018390836985, "lm_q1q2_score": 0.8040167784445855, "lm_q2_score": 0.8244619177503205, "openwebmath_perplexity": 982.2762278091589, "openwebmath_score": 0.3724142909049988, "tags": null, "url": "http://redwoodcc.com/how-does-waz/types-of-graphs-in-discrete-mathematics-20c9e6" }
scikit-learn, pickle dataframe = pd.read_csv("emails.csv") x = dataframe["text"] y = dataframe["spam"] x_train,y_train = x[0:5724],y[0:5724] cv = CountVectorizer() features = cv.fit_transform(x_train) tuned_parameters = {'kernel': ['rbf','linear'], 'gamma': [1e-3, 1e-4], 'C': [1, 10, 100, 1000]} model = GridSearchCV(svm.SVC(), tuned_parameters) file = open("finalized_model.sav",'rb') model = pickle.load(file) file.close() X = pd.read_csv("ExampleSingleEmail.csv") model(cv.transform(X)) Most sklearn model instances are fitted using the fit method. Same goes here - https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html. Change the last line to model.fit(cv.transform(X)) and it should work.
{ "domain": "datascience.stackexchange", "id": 6292, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "scikit-learn, pickle", "url": null }
newtonian-mechanics, forces, energy-conservation, work Title: Energy loss caused by a negative work Let's supposed a box is sliding on a friction-less surface, so it has some KE at this point, and let's imagine an external force is being applied on the opposite direction of the displacement of the box, the work of the external force is negative, so it will start reducing the KE of the box, and eventually it will stop it... The question here: since energy can neither be destroyed nor created, Where has the initial KE gone? or is it that the negative work can cancel energy? or is it that the KE was converted to another type of energy? Here kinetic energy is converted/transfered. The entity that does the negative work receives the Kinetic energy of the box. However we cannot determine in which form it receives the energy. In case there is friction some of the kinetic energy will be converted to thermal energy.
{ "domain": "physics.stackexchange", "id": 77792, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces, energy-conservation, work", "url": null }
rna-seq, deseq2, edger, design Title: rna seq matrix design hybrids I am struggling to get my head around the correct design to use for my experiment. I have RNAseq of 2 pure species (s1, s2) and of the hybrid (h). I aligned all three genotypes to the s1 genomes. I am interested in the comparison of hybrids vs s1 (maternal genome). But I want to remove a potential bias from reads from s2 chromosome being harder to align to s1. (The hybrid genome is composed of both s1 and s2.) I would like to correct my DE test by removing potential effect s2 vs s1. (I aligned s2 to s1 and got the count.) But my issue is, I fail to have a full rank design. I do not have any strong feelings about the library (deseq2, edgeR...). Following the tutorial below is the condition matrix, as you can see if I want to make the contrast ~ s2 + condition. The matrix is not full rank. I believe I could write my design as ~s2 + h - s1 ?? But I don't know how to use deseq2 for this approach.
{ "domain": "bioinformatics.stackexchange", "id": 2672, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rna-seq, deseq2, edger, design", "url": null }
catkin Originally posted by 130s on ROS Answers with karma: 10937 on 2021-08-20 Post score: 0 Looks like similar / the same background as https://answers.ros.org/question/384705. In my case, the issue went away after either: switching the Docker image to ros:noetic-ros-core. installing build-essential. Originally posted by 130s with karma: 10937 on 2021-08-20 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 36824, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "catkin", "url": null }