qid
int64
1
4.65M
metadata
listlengths
3
3
prompt
stringlengths
31
25.8k
chosen
stringlengths
17
28.2k
rejected
stringlengths
19
40.5k
domain
stringclasses
28 values
24,444
[ "https://dba.stackexchange.com/questions/24444", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/10282/" ]
I am tasked with making large PostgreSQL imports to master instance, and then replicate it across the nodes as read-only data. Still, the CMS system has to be able to write data and replicate across all of them. I can use the latest version of PostgreSQL server. There are just few tables in single database. I havent...
It appears that you don't need to worry too much. Install XE first. You don't get to choose the database name (XE) or the port (1521). Next, install 11g to the default app folder. Modify the TNSNAMES.ora files for both databases so they know about each other. Test connections and create database links and you are go...
Could you write a script on the 8i database that exports the data to a flat file? Then copy those flat files to the 11g database to import them?
https://dba.stackexchange.com
102,966
[ "https://dba.stackexchange.com/questions/102966", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/67641/" ]
I run a pool league and have kept stats in Excel. I want to automate via a website and MySQL will be my primary data analysis tool, though my knowledge there is only at the beginning of a long journey. I have 2 tables (only showing relevant tables and relevant fields) <pre><code>users: -------------------- id ...
John, If you have a table of users, and a table of matches, you should probably have a reference table between the two of them, that has a many-to-many relationship. <pre><code>users: -------------------- id (PK) Int display_name VarChar(250) matches: --------------------- matchId (PK) Int ... ... -- Oth...
Try this one <pre><code>select u.id, u.display_name, (select count(winner_id) from match_results where winner_id=u.id) as w, (select count(loser_id) from match_results where loser_id=u.id) as l from users u </code></pre> By the above query your current problem will be solved. If you need to retrieve more column tha...
https://dba.stackexchange.com
47,584
[ "https://chemistry.stackexchange.com/questions/47584", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/27435/" ]
Can anyone tell me whether $\ce{[Cu(NH3)4]^2+}$ and $\ce{[Fe(SCN)6]^3-}$ obey the 18-electron rule, and if not, why? I found $\ce{[Cu(NH3)4]^2+}$ and $\ce{[Fe(SCN)6]^3-}$ have 17 electrons, was I wrong?
<blockquote> I found $\ce{[Cu(NH3)4]^2+}$ and $\ce{[Fe(SCN)6]^3-}$ have 17 electrons, was I wrong? </blockquote> You are correct for the iron(III) complex, which has an uneven electron count and is a $\mathrm{d^5}$ system. You are almost correct for copper(II), but that complex is actually $\ce{[Cu(NH3)4(H2O)2]^2+}$...
Only for some complexing agents do we typically expect the 18-electron rule to hold. The best candidates are very "soft-base" ligands with strong pi-electron interactions, like CO. Ammonia and thiocyanate do not do this.
https://chemistry.stackexchange.com
131,588
[ "https://physics.stackexchange.com/questions/131588", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/46708/" ]
In antenna technology we distinguish between nearfield and widefield. In the nearfield the electric and the magnetic fields are shifted by 90°. If you look closer you can see that there are two possibilities of this shift, 90° and -90°. To explain it you have to remember what this 90° means. Let (in vacuum) the coord...
Yes, all radio waves have inthe nearfield the same sequence of the E and the B field. It's the right hand grip rule (conventional direction of current) because there is no principal difference to a straight wire.
You're asking a classical electromagnetism question. You don't benefit from thinking about photons. If the antenna's electromagnetic field (calculated from Maxwell's equations) is right-circularly-polarized at a certain point, then you can say that every photon is right-circularly-polarized. If the field is linearly p...
https://physics.stackexchange.com
63,303
[ "https://security.stackexchange.com/questions/63303", "https://security.stackexchange.com", "https://security.stackexchange.com/users/52066/" ]
I'm currently following a small game to get more familar with linux and security and got the following task: <blockquote> The password for the next level is stored in /etc/bandit_pass/bandit14 and can only be read by user bandit14. For this level, you don’t get the next password, but you get a private SSH key that c...
Now as I understand this a game, certain liberties might have been take. I could be wrong is it possible that the game did the following: <ol> <li>Installed the public key in authorized_keys </li> <li>The private key isn't encrypted, not requiring a password </li> <li>Restricted access by IP, so only local clients co...
Hopefully you must have solved that task by now, if not then try : ssh bandit14@localhost -i privatekey_file
https://security.stackexchange.com
243,167
[ "https://mathoverflow.net/questions/243167", "https://mathoverflow.net", "https://mathoverflow.net/users/51336/" ]
A "cloven fibration" is a fibration for which we have an explicit choice of cartesian liftings; this is often phrased as, "We can pick a lifting without using the axiom of choice". Firstly, I'm a bit perplexed by this language, since the intensional character of the formal proof of a statement ought not to factor in t...
The Elephant defines a cloven fibration as a fibration equipped with a cleavage (B1.3), where a cleavage is a particular map lifting arrows from the base category. This doesn't require talking about (the axiom of) Choice, though you could also describe it as a choice of liftings. However, it is an instance of a commo...
If the axiom of choice holds then every fibration is cloven, and I would not be surprised if the converse holds. So this talk about not using the axiom of choice is best understood as closet-constructivism. Regarding extensional type theory, I would advise being very careful about doing mathematics in it. If your theo...
https://mathoverflow.net
50,999
[ "https://cstheory.stackexchange.com/questions/50999", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/2406/" ]
Since the P vs. NP problem is still an open problem, 2-SAT and Clique might both be in P if P = NP. Is there any known complexity measure whatsoever that is already mathematically proven to distinguish 2-SAT from Clique?
2-SAT is NL-complete so separating 2-SAT from Clique would separate NP from NL, also a major open problem.
I think there is at least one model of computation where 2-SAT is easy and Clique is provably hard: resolution refutation complexity (i.e. how hard is to deduce contradiction from the initial clauses using resolution inference rule). If you think about decision problem instead of refutation, you may ask &quot;how hard ...
https://cstheory.stackexchange.com
405,660
[ "https://stats.stackexchange.com/questions/405660", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/95651/" ]
I have a large training dataset that I used to fit a model. Before fitting the model I applied PCA. Now the model is fit and ready to be deployed to production, where it will make predictions one observation at a time. My question is, what is the appropriate way to transform the incoming <em>n</em> variables to the PCA...
You should calculate the <em>eigenvectors</em> corresponding the the <span class="math-container">$m$</span> Principal Components that you chose to keep based on the training dataset. And then use those eigenvectors to transform your new sample (in production) onto the new subspace. For example, let's assume you chose...
You used <code>fit_transform()</code> function which fits then transforms the training data. Instead, you can just do <code>fit()</code> to fit the <code>pca</code> object to train data, then apply <code>transform()</code> to a <em>new</em> input data. Obviously, make sure that the new dataframe has the same exact stru...
https://stats.stackexchange.com
556,585
[ "https://physics.stackexchange.com/questions/556585", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/266021/" ]
Wolfgang Demtröder writes this in his book on Experimental Physics, <blockquote> The future destiny of a microparticle is no longer completely determined by its past. First of all, we only know its initial state (location and momentum) within limits set by the uncertainty relations. Furthermore, the final state of ...
The other answers have already pointed out the problems with your question, so I won't rehash those explanations here, but there is something that I believe should be said here about a matter that is often made unclear in treatments of quantum field theory in the path integral formalism by the copious use of Wick rotat...
No. If the classical path was assumed to be the only path, there would be no quantum theory. It would just be classical. And clearly from the need for and success of a quantum theory that explains things outside the domain of the classical one, we know the world to be following quantum rules. In Feynman’s highly read...
https://physics.stackexchange.com
306,531
[ "https://electronics.stackexchange.com/questions/306531", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/121453/" ]
I'm trying to generate a system including HPS (Hard Processor System) of the Cyclone V SoC in Quartus Prime Qsys. At the &quot;Generate HDL&quot; stage I got the following errors. I'm not expecting all the error codes to be analyzed, but I put them here because someone might have ecnountered similar errors and solved t...
Although you are correct that the emitter resistor will bypass some of the signal current the more important factor is that it affects the biasing of the transistor. For an amplifier to become an oscillator one of the requirements is that there is feedback and that the overall loop gain is more than unity to account f...
Old style sine wave oscillator is an amp with a feedback circuit that results infinite total amplification at the certain frequency(see NOTE 1). Colpitts oscillator was one such construction that could provide reasonable operation with low gain triode tubes. It's advantage over other common circuits was no need of mult...
https://electronics.stackexchange.com
242,319
[ "https://dba.stackexchange.com/questions/242319", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/161430/" ]
I have the following tables: <pre><code>Customer (ID, Name, CountryID) Country (ID, Name, Code) </code></pre> From the web application, user selects the number of <code>Customers</code> and the <code>Countries</code> then based on these parameters the system shows the result. For example, user selects the number o...
Test <pre class="lang-sql prettyprint-override"><code>WITH cte1 AS ( SELECT 'US' country, 10 cnt UNION ALL SELECT 'UK', 2 -- UNION ALL -- ... ), cte2 AS ( SELECT customer.*, country.name country, ROW_NUMBER() OVER (PARTITION BY countr...
One of the best options will be through UNION ALL: <pre><code>SELECT TOP(2) c.ID AS [CustomerID], c.[Name] AS [CustomerName], cc.Code AS [Country] FROM Customer AS c INNER JOIN Country AS cc ON c.CountryID=cc.ID WHERE cc.Code='US' UNION ALL SELECT TOP(2) c.ID AS [CustomerID], c.[Name] AS [CustomerName], cc.Code AS [Co...
https://dba.stackexchange.com
209,038
[ "https://physics.stackexchange.com/questions/209038", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/93783/" ]
In all the books I've read this picture is presented only briefly, by essentially saying that in the HP the whole time dependence is assigned to the operators (representing observables), whereas the state vectors do not depend on time, and remain unchanged no matter what. Then, the derivation of Heisenberg eq of motion...
This is clearly a philosophical question, so I will allow myself to express my personal opinion (and not just mine, to be honest). Heisenberg picture is actually much more convenient for the purposes of describing measurements than Schrodinger picture. This is because it provides a nice separation between measurements...
In asking your question, you actually put your finger on the very incompleteness of Quantum Theory that so bothered Einstein. Analogous to a &quot;code smell&quot;, you can think of it as a &quot;theory smell&quot;, except that Einstein was never able to pin down the source of the odor. Your observation does: the Heise...
https://physics.stackexchange.com
14,548
[ "https://stats.stackexchange.com/questions/14548", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/5905/" ]
I have data on a dependent variable y and an explanatory one, x, and want to find out if there is a non-linear relationship between theses by running regressions where the data is divided in quartiles from the lowest to the highest value of x. So for example, what is the slope of x when x lies in the first quartile, sa...
This is a highly problematic statistical practice. Besides greatly reducing power, it actually assumes a very strange relationship between X and Y. Suppose that X was linearly related to Y and that X did not have a uniform distribution. The the proposed approach would come up with a nonlinear relationship. It does ...
Assuming you work with Stata 11 or above, so that you can easily use factor variables, you probably would want to do something like <pre><code> sysuse auto, clear xtile qprice = price , nq(4) reg mpg c.price##i.qprice testparm i(2/4).qprice#c.price i(2/4).qprice </code></pre> If this solution is unclea...
https://stats.stackexchange.com
2,512,548
[ "https://math.stackexchange.com/questions/2512548", "https://math.stackexchange.com", "https://math.stackexchange.com/users/501145/" ]
Now I learn the Atiyah-Singer index theorem. When I read an article on wikipedia of the index theorem, I saw an fact "Index of elliptic differential operators vanish in odd dimensional manifolds". I tried to prove it but failed. Please tell me why index of elliptic differential operators vanish in odd dimensional mani...
This is proved in <em>Spin Geometry</em> by Lawson and Michelsohn, Theorem $13.12$ of chapter III. The idea is that the diffeomorphism $c : TX \to TX$ given by $c(v) = -v$ acts on two of the three terms in (their formulation of) the formula for the topological index. One of the terms doesn't change, and the other is n...
I think this is just a consequence of the definition and does not require a technical proposition or theorem: In fact the index is <span class="math-container">$\int_{M} ch(D)Todd(M)$</span> but the differental forms in the integral are even degree forms since they correspond to characteristic c...
https://math.stackexchange.com
12,554
[ "https://astronomy.stackexchange.com/questions/12554", "https://astronomy.stackexchange.com", "https://astronomy.stackexchange.com/users/9510/" ]
They actually do, but let's set Relativity aside for a moment. And the whole barycenter thing too. Here's the scenario: Somewhere in the backwaters of a galaxy there is this huge planet. It is NOT a failed star. It could be considered a gas giant, except most of the gas is nitrogen, with traces of oxygen. The planet h...
I think the answer is no. A star is much more massive than the most massive planet you could imagine. Take Jupiter as an example : it is a massive planet, with a gravitational pull so intense it makes the Sun move. Not that much, but it actually does. However, the Sun is not in the slightest orbiting any planet. Fo...
<blockquote> And the whole barycenter thing too. </blockquote> You're throwing out the definition of orbit at this point, and moving into a different realm. If you throw out barycenter, you have to leave me with my frames of reference. A star can definitely orbit a planet, if one such as this did in fact exist. You...
https://astronomy.stackexchange.com
44,844
[ "https://mathoverflow.net/questions/44844", "https://mathoverflow.net", "https://mathoverflow.net/users/2784/" ]
I've stumbled across the family of polynomials $ f_p(x) = x^{p-1} + 2 x^{p-2} + \cdots + (p-1) x + p $, where $p$ is an odd prime. It's not too hard to show that $f_p(x)$ is irreducible over $\mathbb{Q}$ -- look at the Newton polygon of $f_p(x+1)$ over $\mathbb{Q}_p$ and you see that it factors as the product of an ir...
Let $\alpha$ be a root of a polynomial $f(x) \in \mathbf{Q}[x]$ of degree $n$, let $K = \mathbf{Q}(\alpha)$, $L$ be the Galois closure of $K$, and $G = \mathrm{Gal}(L/\mathbf{Q}) \subset S_n$. How does one prove that a permutation group contains $A_n$? Following Jordan, the usual method is to show that it is suffici...
The discriminant of this polynomial is $(-1)^{\binom{p}{2}} 2 p^{p-3} (p+1)^{p-2}$. Thus, whenever $p$ is of the form $2k^2-1$ with $k$ odd, the discriminant will be a perfect square and the Galois group will be a subgroup of the alternating group. That explains all the counterexamples we have found. We now verify that...
https://mathoverflow.net
72,752
[ "https://stats.stackexchange.com/questions/72752", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/30438/" ]
Let $U,V,W$ are independent random variables with $\mathrm{Uniform}(0,1)$ distribution. I am trying to find the probability that $Ux^{2}+Vx+W$ has real roots, that is, $P(V^{2}-4UW&gt; 0)$ I have solved this question using double integral but how to do this using triple integral. My Approach: I started with cdf: $P(V^{...
Here is a solution without multiple integrals calculation (because I don't like multiple integrals). Actually it only uses three elementary simple integrals. $$ P(V^{2}-4UW \leq 0) = E\bigl[P(V^{2}-4UW \leq 0 \mid U,W)\bigr] = E\bigl[f(U,W)\bigr]$$ where $f(u,w)=P(V^{2}-4uw \leq 0)= \min\bigl\{1, 2\sqrt{uw}\bigr\}$. ...
By drawing the regions and taking integrals we get: $P(V^{2} - UW \geq 0) = P(V^{2} \leq UW, 0\leq U,V,W \leq 1)$ $=P(0 \leq V \leq 2\sqrt{UW},0\leq U,V,W \leq 1)$ $=P(0 \leq V \leq min(1,2\sqrt{UW}),0\leq U,V,W \leq 1)$ $=\int_0^\frac{1}{4}\int_0^1\int_0^{2\sqrt{uw}}dudvdw + \int_\frac{1}{4}^1\int_0^{\frac{1}{4u}}\i...
https://stats.stackexchange.com
568,634
[ "https://physics.stackexchange.com/questions/568634", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/257479/" ]
I will first explain how I interpret the vector addition of velocities. Let's assume that a particle moves with a velocity of <span class="math-container">$x$</span> horizontally and simultaneously also moves with a velocity of <span class="math-container">$y$</span> vertically. Now, the resultant velocity will be the ...
I am not really sure what it is you do not understand or what exactly are you visualizing in your intepretation. But let me just leave this here for you, might be it will help. You can do more or less the same with acceleration. The problem is however that acceleration can make the motion curved and real distance canno...
Starting with the general case <span class="math-container">$$x_R=\sqrt{x^2(t)+y^2(t)}\tag 1$$</span> <span class="math-container">$\Rightarrow$</span> <span class="math-container">$$v_R=\dot{x}_R={\frac {x \left( t \right) {\frac {d}{dt}}x \left( t \right) +y \left( t \right) {\frac {d}{dt}}y \left( t \right) }{\sqrt...
https://physics.stackexchange.com
39,366
[ "https://electronics.stackexchange.com/questions/39366", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/8713/" ]
What's the best way to find out how much plastic I got in a container? <br> Characteristics: <ul> <li>It's slimey<br></li> <li>It's liquid<br></li> <li>It's sticky<br></li> <li>Its electrical resistance is very very high<br></li> <li>It's very warm(250 degrees celsius) <br></li> <li>Sometimes it will be see-through ...
You could try to measure the <strong>weight</strong> of the container, using rather simple pressure sensors for example.
If you know the cylinders volume, then you can use this to calculate the amount dispensed, and also weight if you know the weight/volume relationship of the plastic. I don't know what type of "cylinder" it is or how the plastic gets in and out of it, but I imagine some hacking with a stepper motor and rotary encoder...
https://electronics.stackexchange.com
524,688
[ "https://physics.stackexchange.com/questions/524688", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/130509/" ]
I'm wondering if the car braking time formula is valid only for uniformly accelerated motion. <span class="math-container">$$ T = \frac{v} {\mu_s \, g} $$</span> with <span class="math-container">$ v $</span> average speed, <span class="math-container">$ \mu_s $</span> static friction coefficient between the wheel an...
While the derivation you've used assumes uniform acceleration, it is also possible to show that the <span class="math-container">$T$</span> you have found is a <em>lower bound</em> on the stopping time of the car, even without assuming uniform acceleration. Roughly speaking, even if the acceleration varies with time, ...
Yes, your equation is only valid for uniformly accelerated motion. This is because you substituted <span class="math-container">$a$</span> as <span class="math-container">$\frac vT$</span> in your derivation and that is only valid during constant acceleration.
https://physics.stackexchange.com
308,830
[ "https://math.stackexchange.com/questions/308830", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Let $f = (f_1, \cdots, f_m)$ be a function from $\mathbb{R}^n \to \mathbb{R}^m$. Prove that $f$ is linear if and only if for each $i$, $f_i$ is of the form $$f_i (x_1, \cdots, x_n) = a_1x_1 + \cdots, a_nx_n$$ for some $a_1, \cdots, a_n \in \mathbb{R}$. It is the forward direction that troubles me. The reverse one s...
Let's denote by $(e_1,\ldots,e_n)$ and $(e'_1,\ldots,e'_m)$ the canonical bases of $\mathbb{R}^n$ and $\mathbb{R}^m$ respectively then $\displaystyle(x_1,\ldots,x_n)=\sum_{i=1}^nx_ie_i$ and $\displaystyle f=\sum_{j=1}^m f_j e'_j$, and consequently $$f(x_1,\ldots,x_n)=\sum_{j=1}^mf_j(x_1,\ldots,x_n)e'_i=\sum_{j=1}^mf_j...
<strong>Hint:</strong> It suffices to consider each $f_i$ separately. Consider the action on the basis vectors $(1,0,0\dots)$, $(0,1,0,\dots)$, $\dots$. Note that by linearity, the action of the function on these vectors determines the entire function. (To get you started, if $f((1,0,0,\dots)=a_1$, then linearity impli...
https://math.stackexchange.com
498,221
[ "https://physics.stackexchange.com/questions/498221", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/189721/" ]
Assume we have an empty room with two doors on the opposite sides of it. If we open one of the doors, the door on the opposite side automatically closes "harder", and if we close one of the doors the other door opens. Why does this happen?
If a door opens outward, pulling it open creates a slight lowering of air pressure inside the room just for a moment. If the door on the other side opens inward, then the slightly greater air pressure on the outside of that door will push it open. The reverse is true when you close that door by pushing it inwards. Th...
Assalamu Alaikum. This is air pressure So, basically air pressure is a force extracted into a surface by the weight of the air. In a specific room if you open your window you will realised that door is closing by it self. But it is because of air pressure. It pushes the door slightly. Mostly depend on the air pressure ...
https://physics.stackexchange.com
430,737
[ "https://physics.stackexchange.com/questions/430737", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/180165/" ]
Why does current follow the path of least resistance? Will all current pass through a wire with <span class="math-container">$0$</span> resistance in a junction leaving other resistive wires with no current?
<blockquote> Why does current follow the path of least resistance? </blockquote> Current <em>doesn't</em> follow the path of least resistance. Please forget that you ever heard that and if you hear someone else say that, respond with something like this: If there are two parallel connected resistors with resistanc...
Yes. Think of it like a pipe system with water. If the pipe splits in two, one having a "squeezed" constriction and the other being much wider, then most water will go through the wide one. Infinite resistance corresponds to fully closing the constriction (no water passes), and 0 resistance corresponds to having the ...
https://physics.stackexchange.com
5,525
[ "https://stats.stackexchange.com/questions/5525", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/632/" ]
Is there a way to get the number of parameters of a linear model like that? <pre><code>model &lt;- lm(Y~X1+X2) </code></pre> I would like to get the number 3 somehow (intercept + X1 + X2). I looked for something like this in the structures that <code>lm</code>, <code>summary(model)</code> and <code>anova(model)</code...
Try something like: <pre><code>&gt; x &lt;- replicate(2, rnorm(100)) &gt; y &lt;- 1.2*x[,1]+rnorm(100) &gt; summary(lm.fit &lt;- lm(y~x)) &gt; length(lm.fit$coefficients) [1] 3 &gt; # or &gt; length(coef(lm.fit)) [1] 3 </code></pre> You can have a better idea of what an R object includes with <pre><code>&gt; str(lm....
A more general approach is to use the <code>logLik()</code> function. It returns an object with the attribute <code>df</code> that gives the fitted models degrees of freedom. The benefit of this approach is that it works with many other model classes (including <code>glm</code>). In the case of ordinary linear regre...
https://stats.stackexchange.com
132,899
[ "https://security.stackexchange.com/questions/132899", "https://security.stackexchange.com", "https://security.stackexchange.com/users/120484/" ]
My school has recently asked us to submit our MAC address to the school along with our designated name to be used to connect to the Wi-Fi. Previously this wasn't needed. I would like to ask about what kind of information that they can collect from this? Would they be able to track our browsing history or more? What i...
I think you should ask why they want to use the MAC address, not necessarily for privacy reasons; "why do you need the MAC Address?" I think it's a reasonable question to ask them. Firstly, they will have MAC addresses of all the individuals who connect to the WiFi. Any device connecting to the WiFi will reveal their ...
For a school, having all student device MAC addresses (unique hardware identifier) is a way to filter out a lot of unwanted traffic from the LAN. Even if outside devices from non-students spoof a legitimate, student-registered MAC, the packets being sent over the network can still be captured, opened, and the user agen...
https://security.stackexchange.com
682,280
[ "https://physics.stackexchange.com/questions/682280", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/75502/" ]
Imagine I have 2 springs of the same length and material, thickness of wire is the same too. Spring A has twice as much windings and spring B has bigger windings about double the diameter of A. I am wondering which spring is stronger, I think should be more windings but that's just my intuition.
The (k) value for a spring will depend on the flexibility of the material. It should increase with a larger diameter wire. The (k) should be inversely proportional to the number of turns, but the dependence on the diameter of each loop would be more difficult to predict.
Rather non-intuitively a coil spring when 'stretched' puts the 'wire' of the coils into torsion. When the same spring is 'wound up' (twisted) then the wire is bent. In both cases the deflection depends on the length of the wire and hence on the diameter of the coil. However - if you look at the deflection of a beam wit...
https://physics.stackexchange.com
1,221,639
[ "https://math.stackexchange.com/questions/1221639", "https://math.stackexchange.com", "https://math.stackexchange.com/users/214744/" ]
Consider two random variables <span class="math-container">$X$</span> and <span class="math-container">$Y$</span>. If X and Y are independent random variables, then it can be shown that: <span class="math-container">$$E(XY) = E(X)E(Y).$$</span> Let <span class="math-container">$X$</span> be the random variable that tak...
$P(X=-1) = P(X=0) = P(X=1) =\frac{1}{3}$ $Y = X^2$ so $P(Y=1) = \frac{2}{3}$ and $P(Y=0) = \frac{1}{3}$ . $Y$ equals zero iff $X$ equals 0. But $Y$ equals 1 if $X$ is $1$ or $-1$. $$E[X] = -1.\frac{1}{3} + 0.\frac{1}{3} + 1.\frac{1}{3} = 0$$ $$E[Y] = 1.\frac{2}{3} + 0.\frac{1}{3} = \frac{2}{3}$$ $$E[XY] = E[X^3] = ...
<strong>Hint</strong>: By the definition of independence, two discrete random variables $X$ and $Y$ are independent if the joint probability mass function $P(X = x \text{ and } Y = y )$ satisfies $$ P(X = x \text{ and } Y = y ) = P(X = x) \cdot P(Y = y) $$ for all $x$ and $y$. What are the possible values $x$ for t...
https://math.stackexchange.com
23,794
[ "https://mathoverflow.net/questions/23794", "https://mathoverflow.net", "https://mathoverflow.net/users/1261/" ]
[Edit: For a category $C$ let $C^\wedge$ denote the category of presheaves on $C$.] Let $f:C\to D$ be a functor. Precomposition with $f^{op}$ induces a functor $f^\wedge:D^\wedge \to C^\wedge$. This functor has both a left- and a right adjoint, called <em>left-</em> and <em>right kan extension</em>: $f_\wedge \dashv...
For all $Z \in C^\wedge, Y \in D^\wedge$, we have $C^\wedge(f^\wedge Y,Z)=D^\wedge(Y,f_+ Z)$. If we put $Y = D(-,d), Z = C(-,c)$, we get $(f_+ C(-,c))(d) = C^\wedge(f^\wedge D(-,d),C(-,c)) = C^\wedge(D(f-,d),C(-,c))$ There seems to be no connection between $f_+ C(-,c)$ and $D(-,fc)$ (only when $f$ is an equivalence)....
As Martin stated, the answer is no in general. However, the answer is yes if f is full and faithful and everything in $D$ can be written as a colimit of something in $C$ (i.e. you want that $D \to Set^{C^{op}}$ via $d \mapsto Hom(f(blank),d)$ to be fully faithful as well). In this case, $f_+$ (which is classicaly deno...
https://mathoverflow.net
12,522
[ "https://robotics.stackexchange.com/questions/12522", "https://robotics.stackexchange.com", "https://robotics.stackexchange.com/users/10691/" ]
Let's say I have multiple (8 bit) sensors which are sending signals to two microcontrollers simultaneously. In this case, I am looking to harness the parallel processing capability of the two microcontrollers to process the signals at the same time. However, I am curious whether I can substitute the above setup by usi...
Your question is really missing critical informations about your setup, so answer cannot catch all possibilities. But if we assume the typical Arduino setup, than the sensors would not use 8 wires, but some serial protocol (Serial, I2C,...). Especially if you mentioned multiple of them. Also usually processor asks s...
It really depends on the problem, ideally two 8 bit processors work in parallel while one 16 bit processor works by itself. What if the problem is add three 3bit numbers (a+b+c). Can two 8 bit processors take advantage or maybe the single 16 bit? Now if we add three 8bit numbers the single 16 bit processor will be quic...
https://robotics.stackexchange.com
370,078
[ "https://softwareengineering.stackexchange.com/questions/370078", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/120232/" ]
I'm in a funny situation. We have a development model that works for an in-house software suite which is focused on responsiveness to the customer. To give you a sense of the environment, when we were using SCRUM, we would often intentionally commit to only 50% of our maximum workload, with a full expectation that th...
If you think you can't test without requirements then you don't understand the purpose of tests. <blockquote> I'm in a funny situation. </blockquote> No you aren't. This is typical of many shops that use TDD. <blockquote> To give you a sense of the environment, when we were using SCRUM, we would often intentiona...
<blockquote> I find myself regularly faced with situations that do not have testable requirements until the majority of the work is completed. </blockquote> I would argue that it is impossible to finish <em>any</em> portion of a piece of work if you do not have testable requirements for it, because there is a litera...
https://softwareengineering.stackexchange.com
2,959,489
[ "https://math.stackexchange.com/questions/2959489", "https://math.stackexchange.com", "https://math.stackexchange.com/users/602311/" ]
<blockquote> If <span class="math-container">$|f(z)-w|&lt;|w|/2$</span> how do you conclude <span class="math-container">$|f(z)|&gt;|w|/2$</span>? </blockquote> <span class="math-container">$z$</span> and non-zero <span class="math-container">$w$</span> are complex numbers. <span class="math-container">$f$</span> is a ...
You can prove it using reverse triangle inequality. You have <span class="math-container">$$\frac{|w|}{2} &gt; |w - f(z)| \ge ||w| - |f(z)|| \ge |w| - |f(z)|,$$</span> which, when rearranged, implies <span class="math-container">$$|f(z)| &gt; |w| - \frac{|w|}{2} = \frac{|w|}{2}.$$</span> This works wherever the triangl...
Because<span class="math-container">\begin{align}\bigl\lvert f(z)\bigr\rvert&amp;=\bigl\lvert f(z)-w+w\bigr\rvert\\&amp;\geqslant\left\lvert\bigl\lvert f(z)-w)\bigr\rvert-w\right\rvert\\&amp;=\lvert w\rvert-\bigl\lvert f(z)-w\bigr\rvert\\&amp;&gt;\dfrac{\lvert w\rvert}2.\end{align}</span>
https://math.stackexchange.com
6,499
[ "https://electronics.stackexchange.com/questions/6499", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1225/" ]
The comparators on my MCU, a dsPIC33FJ128GP802, give the common-mode input range as AVdd-1.15V. AVdd is 3.3V, so does this mean the comparators can't compare voltages in the range of 2.15V to 3.3V?
Yes, that is what it means.
In terms of actual behavior, one may imagine each input of a comparator has having up to five operational regions, which I'll call "way too high", "slightly too high", "good", "slightly too low", and "way too low". If either input is "way too high" or "way too low" there's no guarantee as to what the comparator will d...
https://electronics.stackexchange.com
494,885
[ "https://physics.stackexchange.com/questions/494885", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/237428/" ]
The equation for gravitational potential energy is: <span class="math-container">$$V(r) ={GMm\over r}$$</span> In the reference frame where <span class="math-container">$M$</span> is stationary. I am wondering for mass <span class="math-container">$m$</span> here do we need to consider its relativistic mass? And what...
The answer is a big NO. I will show this with one (very naive) counter example. Assume that we should use relativistic mass in <span class="math-container">$v=-\frac{GMm}{r}$</span>. Let's say S is inertial observer who moves in <span class="math-container">$z$</span> direction with veloctiy <span class="math-containe...
General relativity does not describe gravity using a scalar potential as in Newtonian gravity. GR's closest equivalent to the Newtonian potential is actually the metric. No, you don't get a description of the sources of the gravitational field in GR by considering relativistic mass rather than mass. The source of the ...
https://physics.stackexchange.com
868,517
[ "https://math.stackexchange.com/questions/868517", "https://math.stackexchange.com", "https://math.stackexchange.com/users/164586/" ]
Suppose the total cost in dollars of manufacturing q units of a certain commodity is $C(q)=3q^2+5q+10$. If the current level of production is 40 units, estimate how the total cost will change if 40.5 units are produced.
We have to stress that critical points are not counted. Also, note than a critical point is an inflection point iff it is in between one maximum point and one minimum point. Than we have: <ol> <li>The minimum number of inflection points is 0, because the critical points may not be of the form max-min.</li> <li>Only on...
I'm not altogether clear on the question. First, I assume you are asking about inflection points between two <strong>adjacent</strong> critical points - otherwise a polynomial can have as many critical points as you like, and as many inflection points as you like between the first and the last critical point. Second ...
https://math.stackexchange.com
21,867
[ "https://biology.stackexchange.com/questions/21867", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/9648/" ]
Can someone tell me the fundamental reason why K+ has low concentration outside of the cell and more inside of the cell?
<strong>Why</strong> nature has done it this way around is difficult to explain. What is certain, however, is that the <em>membrane potential</em> which results from the imbalance of these ions across the membrane is used for a variety of purposes, such as transport of other ions and molecules, action potential generat...
Your question isn't all that precise but I think looking at individual ionic equilibrium potentials begins to give us some understanding. Looking at the equilibrium potentials(EK for potassium and ENA for sodium) for these two ions and their channels you have that EK = -90mV and ENA = +60mV in a typical neuron. This m...
https://biology.stackexchange.com
223,637
[ "https://softwareengineering.stackexchange.com/questions/223637", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/114220/" ]
<h2>Background:</h2> I have a CSV file, which I need to ready and validate each element in each row and create a collection of a class, having valid data. i.e CSV File looks like: <pre><code> EmpID,FirstName,LastName,Salary 1,James,Help,100000 2,Jane,Scott,1000 3,Mary,Fraze,10000 </code></pre> Class...
If I needed to input data and capture errors, I would probably do something more like: <pre><code>public class Employee { public int EmpID { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string Salary { get; set; } } public class ErrorEmployee : Employee...
This is quite simple problem so there is not much you can do wrong in this. Your approach looks fine. Only thing I noticed might be bad is fact you are querying DB for each row. It would be better if you queried the DB just once with all the IDs. But assuming only 100 rows are possible, then this should not be a probl...
https://softwareengineering.stackexchange.com
143,386
[ "https://softwareengineering.stackexchange.com/questions/143386", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/51432/" ]
I have lots of code like this in my constructors:- <pre><code>function __construct($params) { $this-&gt;property = isset($params['property']) ? $params['property'] : default_val; } </code></pre> Is it better to do this rather than specify the default value in the property definition? i.e. <code>public $property...
I've had this kind of philosophical debate with myself before. Here's where I stand most of the time although I realize this is an opinion-based answer: One thing I see that might help answer the question is the passing of $params which may or may not have attributes/array members that are set. Over the years I've co...
Although I tend to avoid passing arrays to a constructor, sometimes I find it necessary to process an incoming array value (such as for a class that reads values from a configuration file). In a case like this, I will take advantage of PHP's array functions to ensure that I am working with exactly what I think I'm wor...
https://softwareengineering.stackexchange.com
138,008
[ "https://electronics.stackexchange.com/questions/138008", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/58008/" ]
I need to protect hard disk (sata) for read-only, like SD-card have write protect. Cable sata have channel A &amp; B. Can i cut A or B??? Or any other way? Help me please! Thank everyone
SD card read-only switch is a software protection, not hardware protection (i.e. some devices simply ignore the switch or may use it for different purposes). SATA signals can't be cut because the device would not work at all. Answering to your question: you can not make your hard drive read-only just by cutting SATA ...
A lot more information is needed, like what operating system is accessing the drive. Assuming Unix, it is very easy to mount a drive read-only: <pre><code>mount -r /dev/diskXsY /path/to/mount/point </code></pre> Making the actual drive completely read-only would require hardware support from the manufacturer and wil...
https://electronics.stackexchange.com
140,845
[ "https://chemistry.stackexchange.com/questions/140845", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/78416/" ]
From Costanzo's Physiology: <blockquote> Osmosis of water is <em>not</em> diffusion of water: Osmosis occurs because of a pressure difference, whereas diffusion occurs because of a concentration (or activity) difference of water. </blockquote> Also from Costanzo, describing two solutions 1, and 2 , seprated by a semip...
Osmotic pressure <ul> <li>is consequence of non zero net water diffusion,</li> <li>which is consequence of non equal water activities on both sides of semipermeable membrane,</li> <li>which is consequence of the fact dissolved solutes decrease activity of water.</li> </ul> Osmotic pressure of a free solution is formall...
In addition to Poutnik's answer, I would like to add some comments on the question: The first statement 'Osmosis of water is not diffusion of water:....' is incorrect. The cause of osmosis is simply diffusion: the solvent is able to diffuse through the semi-permeable membrane the solute is not. It is wrong to assume th...
https://chemistry.stackexchange.com
76,612
[ "https://chemistry.stackexchange.com/questions/76612", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/46787/" ]
I only have superficial knowledge of chemistry, and today I found out about <em>bond length</em> for the first time. For example, on Wikipedia it says that all C-C bonds of benzene have a length of 140 picometres (both C-C and C=C, I think). But is this exactly true for <strong>all benzene molecules</strong>? Or does...
The atoms within a molecule are not stationary, but are constantly vibrating, twisting, etc. Thus, the value given for a bond length between two atoms must be an average. Specifically, the average distance from the nucleus of one atom to the nucleus of the other is what constitutes the definition of bond length.
In a simple molecule such as oxygen, the bond length measured will alway be the same as the interaction between any two oxygen atoms is the same since one oxygen atom is indistinguishable from another. Thus by extrapolation in any molecule the same bond has the same length. Now by length we usually assume equilibrium...
https://chemistry.stackexchange.com
98,028
[ "https://electronics.stackexchange.com/questions/98028", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/2574/" ]
In RTOS, when a Higher Priority task becomes <em>Ready to Run</em>, it stops or preempts currently running (Lower Priority) task and start executing itself. Before switching tasks, RTOS saves required data related to lower priority task (Context Switching) Coming to my question, Like tasks, Interrupts also have prior...
This is basically <strong>entirely</strong> platform <em>and</em> compiler dependent. Some MCUs/CPUs have hardware for saving some or part of the stack, some do not. Additionally, Stack saving/loading is compiler-determined on some platforms. At least on atmel's xmega MCUs, context saving is up to the code, rather th...
Assuming that the CPU supports nested interrupts, and nested interrupts are enabled, and the higher priority interrupt is enabled, when the higher priority interrupt fires then CPU behaviour will be exactly as you would expect: CPU context will be pushed onto the stack and the execution point will jump to the new inter...
https://electronics.stackexchange.com
165,145
[ "https://electronics.stackexchange.com/questions/165145", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/72466/" ]
I am learning about electronics and micro controllers. I started with the basics and have came to the chapter in my book about currents etc. Now, I am a little confused with voltage and amperage. Am I correct in thinking the amount of amps is the amount of power, and the amount of voltage is the speed at which the powe...
12V battery level indicator circuit with LED bar /dot display LM3914. On the Internet. ttp://www.circuitstoday.com/12v-battery-level-indicator-circuit-led-bargraph In the circuit diagram LEDs D1 toD10 displays the level of the battery in either dot or bargraph mode. Resistor R4 connected between pins 6,7 and groun...
Absolutely you can use any LED output pin to drive a shut off circuit, or function as needed to control your project. The IC will probably require some kind of pre-driver since it appears to only sink current not supply it. Have not checked specs. --*///*--
https://electronics.stackexchange.com
136,776
[ "https://softwareengineering.stackexchange.com/questions/136776", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/35414/" ]
We're in a bad situation of having very little documentation on customization our past workers made to a business critical system. Lots of changes were done to Crystal Reports, database entities, and proprietary configuration/programming files for our ERP software. The current documentation generally reads something l...
<strong>I think this is a futile exercise.</strong> If it works it works, if it doesn't work, you have to fix it. The best way to document old stuff is as you work on it, document what you are doing and explain the business logic (which I assume was not documented). This will be a big help for any new developer. Spea...
Do you have source control? Can you work out what has changed from that? If so, then you may be able to map that to business changes, whether new features or bug fixes. Is it possible to resurrect an old developers mailbox? (not sure if this is viable with privacy concerns or not). There may be lots of information t...
https://softwareengineering.stackexchange.com
100,297
[ "https://physics.stackexchange.com/questions/100297", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/5523/" ]
I was kind of puzzled yesterday when thinking about this. <ol> <li>If we observe an object moving away from us with 10m/s we would say the object is moving away from us really slowly</li> <li>But if we (humans, making an observation) would be the size of a proton, previously mentioned 10m/s would appear enormously fas...
If I understand you correctly, your two points about apparent slowness of speeds is related to scale, and disappears when you quantify it using a common unit. ie: We think of 10m/s as relatively slow because the average human is 1.8 metres in height, and we can imagine that 10 metres per second, or 36 kilometer/hour a...
The important thing is that <em>all</em> speeds seem to change: If you would look at the universe, in this case the two protons, from the perception of a man shrunk to the size of a proton, not only would the particles appear much faster, but so would the speed of light. So if you shrunk yourself to a trillionth of w...
https://physics.stackexchange.com
5,815
[ "https://chemistry.stackexchange.com/questions/5815", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/2108/" ]
I am not from chemistry background. Could you tell me in simple words what the activity of hydrogen $a_{\ce{H+}}$ is? It arises in the context that the negative logarithm of the activity of hydrogen gives the pH: $\text{pH} = -\log_{10} a_{\ce{H+}}$.
Building on @Philipp and @chipbuster's answers- <h2>What is Activity?</h2> When we have dilute solutions or small quantities of a gas or other substance, the substance behaves as if the particles are just points, rather than having a size. In these settings, we often use a simplified set of equations. For example, with...
The activity is some sort of dimensionless measure for the concentration. In thermodynamics, a lot of important equations are derived for the so-called ideal gas, which is a model system where the particles are treated as if they had no own size (point particles) and don't interact with one another (apart from elastic ...
https://chemistry.stackexchange.com
269,322
[ "https://electronics.stackexchange.com/questions/269322", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/116755/" ]
Can oxides build up enough to force contacts to disconnect?
There's no question that pins can oxidize and that the build-up, perhaps combined with minor movements, can lead to an eventual increase in resistance, leading to possible additional heating at the connector, leading to more oxidation, etc. I've seen it happen, on occasion. Faster, when the humidity is high. If the al...
It depends on the connector. So-called gas-tight connectors should remain free from oxidation indefinitely. Turned-pin IC connectors are a typical example.
https://electronics.stackexchange.com
29,561
[ "https://physics.stackexchange.com/questions/29561", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/9672/" ]
I was told that the faster two objects move against each other, the less the friction between them would be… compared to if they were moving slower. So does friction decrease when the body is moving faster or does it remain the same. Does the speed affect friction in any way?
Friction is not a fundamental force itself, rather it is a macroscopic collective effect of the interactions between atoms and molecules of the two surfaces, dominantly electromagnetic interactions. Yet in reality, it can depend on a large number of other factors such as the relative speeds of two surfaces, the way the...
Friction is quite a complex problem, and velocity-independent dynamic friction $$F_\text{df} \ne f(v)$$ is an approximation. In general dynamic friction could increase or decrease with larger velocities, I don't think there is a rule of thumb. However, it is changing continuously and change is rather small. Howev...
https://physics.stackexchange.com
230,228
[ "https://physics.stackexchange.com/questions/230228", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/42047/" ]
I understand that the LHC found the Higgs boson by pumping so much energy into a tiny space (via near light speed proton-proton collisions) that a Higgs boson appeared momentarily, then instantly decayed. They detected the products of the decay, and deduced that a Higgs boson must have been there. That's fine. What I...
<blockquote> Isn't the universe full of Higgs bosons, making up the Higgs field? </blockquote> No. In particle physics, it is understood that the underlying (more fundamental) object is the field, not the particles. Particles are excitations of the fields that can be measured, and always carry certain properties li...
Ad 1) Yes and no. There are certainly Higgsbosons in the Universe. Everything we can create at the LHC is created in other events too. Cosmic rays can have more energy than the LHC beam, so there will be Higgs bosons for sure, just as an example. The problem is to bring such a sophisticated detector in place, in additi...
https://physics.stackexchange.com
101,778
[ "https://electronics.stackexchange.com/questions/101778", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/18789/" ]
<img src="https://i.stack.imgur.com/yPX8Q.jpg" alt="enter image description here">I have looked at the spec sheets of this chip and it states that MAX Voltage on any pin with respect to VSS (except VDD, MCLR. and RA4) = -0.3V to (VDD + 0.3V). They also state that MAX Input clamp current, IIK (VI &lt; 0 or VI > VDD) ± ...
The clamp current rating is a guarantee that the chip will not be damaged by latchup. It is <em>not</em> a guarantee of proper operation. You should not exceed the rails by more than a few hundred mV in normal operation. In particular, operation of ADCs and analog functions can easily be affected. If that is what you...
You shouldn't use the input protection circuits as the normal means of limiting input voltage on a pin. They are there only as an emergency protective device. I haven't looked at the PIC datasheet, but from other IC specs, I think that the MAX values you mention will be found in a table headed "Absolute Maximum Ratin...
https://electronics.stackexchange.com
441,804
[ "https://electronics.stackexchange.com/questions/441804", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/152484/" ]
I am designing a 4 layer board in which I HAVE to use blind and buried vias. This is a very dense board with <strong>(SOLID COPPER ON LAYER 4, No exceptions )</strong> I am planning to use 1.) 1-2 microvia and 2-3 Buried vias. 2.) 1-2 and 2-3 Stacked microvias. , So Can you suggest whether I could go with the first...
You state this is dense board so I don't recommend using stack microvias. Since I have experience that once the vias are not align when lamination, then the board will have unexpected problem. Consider the yield rate, I guess the Manufacturer will provide the higher cost to you. Option 1 is better choice I think. Reme...
I would like to suggest that your proposal to use these blind and buried vias makes for a much more expensive board. You really should look at using more than 4 layers to be able to achieve your layout whether that be 6 or 8 layers. In all likelihood the cost for such board will be cheaper than your 4 layer board with ...
https://electronics.stackexchange.com
168,353
[ "https://dba.stackexchange.com/questions/168353", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/116211/" ]
I've a requirement for configuring data guard, but I haven't done it in the past. I'm using Oracle 11g database in Windows platform. On reading several blogs and tutorials in Internet, I managed to learn about data guard and configured primary and standby databases in two separate remote servers.I'm still not getting a...
As a first note, you should never quote table names or any identifiers in PostgreSQL. This is a bad practice. <pre><code>SELECT *, CASE WHEN "partic-acum" &gt; 95 THEN 'C' WHEN "partic-acum" &gt; 80 THEN 'B' ELSE 'A' END AS clasif FROM ( SELECT codigo, descripcion, costo, neto, ...
Try this <pre><code>With CTE_preselect AS ( SELECT codigo, descripcion, cantidad, costo, neto, (SELECT sum(neto) FROM "abc-ventas") as total, (round(neto /(SELECT sum(neto) FROM "abc-ventas"),4)*100) AS participacion FROM "abc-ventas") SELECT codigo, descripcion, cantidad, costo, neto, PARTICIPACION, CASE WHEN P...
https://dba.stackexchange.com
153,178
[ "https://mathoverflow.net/questions/153178", "https://mathoverflow.net", "https://mathoverflow.net/users/4423/" ]
Assume that we are working in a set theory T, formalized in the language of ZFC, whose axioms---in addition to those of ZFC---include also the negation of "V=OD". For any set X, let CARD(X) denote the cardinal number of X, let ORDEF(X) denote the set of ordinal definable elements of X and let P(X) denote the the set ...
$ \newcommand\N{\mathbb{N}} \newcommand\R{\mathbb{R}} \newcommand\ZFC{\text{ZFC}} \newcommand\HOD{\text{HOD}} \newcommand\OD{\text{OD}} $For your initial remark, yes, it is relatively consistent with ZFC that there are only countably many ordinal-definable subsets of $\N$. To see this, suppose that $V$ is any model of ...
A marginal comment. ORDEF(P(N)) can be countable while ORDEF(P(R)) cannot since for any countable ordinal $\alpha$ there is a non-empty OD set of all reals which code $\alpha$. Is there an UNcountable set $X$ such that ORDEF(X) is countable (or just empty?)
https://mathoverflow.net
79,378
[ "https://security.stackexchange.com/questions/79378", "https://security.stackexchange.com", "https://security.stackexchange.com/users/56920/" ]
I may not understand how DDoS attacks work at this point, but Im just wondering if this would work for a game server? <strong>IF each time a new connection is attempted and the packet or connection type is not similar to that of a normal player, then block the connection?</strong> I dont see any reason for the serve...
A DDoS attack does not necessarily saturate the network capacity, any resource which can be exhausted to result in the application being unable to serve requests can be used to achieve a DoS. As you say: <blockquote> The only downside I see is that the CPU would be put under a lot of stress with large attacks. </bl...
DDOS attacks are not just against the Server resources they are against bandwidth too. The most recent attacks had bandwidth consumption of up to 1 Tbps. Blocking IP's is not going to help as the firewall still has to drop large amount of packets/connections from multiple sources and within a short amount of time the ...
https://security.stackexchange.com
58,598
[ "https://dsp.stackexchange.com/questions/58598", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/43448/" ]
I‘m a high school student and I haven’t studied physics or anything. Why does the DFT depend on an integer, say <span class="math-container">$k$</span> or <span class="math-container">$n$</span> (it’s usually expressed like <span class="math-container">$F(n)=...$</span> or <span class="math-container">$F(k)$</span> or...
Let us assume that you have a finite length discrete signal <span class="math-container">$x$</span>, denoted by its samples <span class="math-container">$x_n$</span>, <span class="math-container">$0\le n&lt;N$</span>; <span class="math-container">$x$</span> does not depend on <span class="math-container">$n$</span>, bu...
Ah okay thank you. I think what irritated me was that I didn’t consider that the sampled function is a periodic or periodically continued function so that the Fourier transform delivers amplitude values for the base frequency and multiples of it only (so the Fourier transform is discrete), which are indexed as n*(base ...
https://dsp.stackexchange.com
68,346
[ "https://cs.stackexchange.com/questions/68346", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/64275/" ]
An array or vector is just a sequence of values. They can surely be implemented with a linked list. This is just a bunch of nodes with pointers to the next node. Stacks and queues are two abstract data types commonly taught in Intro CS courses. Somewhere in the class, students often have to implement stacks and queu...
Well, that is basically what all data structures boil down to. Data with connections. The nodes are all artificial - they don't actually exist physically. This is where the binary part comes in. You should create a few data structures in C++ and check out where your objects land in memory. It can be very interesting...
Let's make an analogy with mathematics. Consider the following sentence: "$f:\mathbb{R} \rightarrow \mathbb{R}$ is a continuous function". Functions are really defined in terms of relations, which are defined in terms of sets. The set of real numbers is the unique complete totally ordered field: all of these concepts h...
https://cs.stackexchange.com
410,796
[ "https://softwareengineering.stackexchange.com/questions/410796", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/366880/" ]
I am trying to understand how MVVM works. Here are two examples (in Andrdoid) on how I understand it should work, please tell me if I understood correctly. I currently want to make a list of radiobutton "Sex" with currently two possible values (Male, female). I expect it to change to "Gender" and three possible values...
<h2>White-box testing</h2> This is why I usually implement an <code>IClock</code> interface in my logic, instead of directly depending on system time (e.g. <code>DateTime.Now</code>). <pre><code>public interface IClock { DateTime GetTime(); } </code></pre> Your logic should depend on this clock: <pre><code>publ...
The answer is to avoid using statics ie DateTime.Now in your code. Always pass in properties like time. This allows you to pass in arbitrary dates, in the future or past for testing or other edge case requirements like import/export. eg <pre><code>public AddPost(Post p) { //archive if older that 2 weeks if(p...
https://softwareengineering.stackexchange.com
14,801
[ "https://mathoverflow.net/questions/14801", "https://mathoverflow.net", "https://mathoverflow.net/users/3513/" ]
Suppose $G$ is a simple (linear) algebraic group over an algebraically closed field of characteristic zero, that $n$ is a positive natural number, and that $g\in G$. Can we always find an $h\in G$ such that $h^n=g$? (It appears to be possible to check this for the classical algebraic groups by direct computations in e...
A semisimple element lies in a maximal torus, so you can extract any root from it inside this torus.
As Pavel says, any semisimple element lies in a maximal torus, where you can take any root. On the other hand, if $g$ is unipotent, then it is in the image of the exponential map, so you can make sense of $g^\lambda$ for any $\lambda \in \mathbb C$, so counterexamples must have nontrivial semisimple and unipotent parts...
https://mathoverflow.net
325,103
[ "https://stats.stackexchange.com/questions/325103", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/183193/" ]
I am taking an advanced linear algebra course and am once again confused by a lot of the concepts. I understand that the definition of a basis is a set of vectors that spans the vector space and is linearly independent. Can anyone provide any intuition on why this matters? I can visualize (kind of) what it means for ...
Perhaps a little motivation might help. Suppose you have a dataset with $10$ features. Visualizing them is a bit challenging. However, if you are told that actually <strong>all</strong> data set live in a $2$ dimensional subspace and it is not a straight line. It would be great if you can visualize this data set by p...
Let $\{ \boldsymbol{x}_1, ..., \boldsymbol{x}_n \}$ be a set of vectors with $\boldsymbol{x}_i \in \mathbb{R}^m$, and suppose that they are not linearly independent. This means that any of these vectors can be written as a linear combination of the others. Without loss of generality, let us suppose that: $$\boldsymb...
https://stats.stackexchange.com
67,999
[ "https://mathoverflow.net/questions/67999", "https://mathoverflow.net", "https://mathoverflow.net/users/15777/" ]
I hope that somebody can help me with the following problem: Let $A$ be a positive operator on $\mathbf{B}(\mathcal{H})$, ( $\mathcal{H}$ is a Hilbert space) with its spectral measure $E$. Show that for every Borel set $\mathbf{B}$ from the domain of $E(\cdot)$ the following equality holds $$f(\| AE(\mathbf{B})\|) = \...
The $L^2$ view usually helps, but I don't think it makes things simpler in this case. Note that since $E(B)$ is a spectral projection of $A$, you have $f(A)\,E(B)=f(A\,E(B))$ (easy to see since the relation holds for any monomial). Then the question reduces to whether $\|f(A)\|=f(\|A\|)$ for a positive operator. Sin...
Following above steps for an arbitrary $\mathbf{B}$ we get that $$ f \left(\| M_{\phi}E(\mathbf{B})\| \right)= f \left( \sup_{x \in \mathbf{B}} \ \phi(x) \right) = \sup_{x \in \mathbf{B}} \ f(\phi(x)) = \| f(M_{\phi})E(\mathbf{B})\|.$$ Since unitary operators preserve the norm the above equality is true for an arbitra...
https://mathoverflow.net
3,787,231
[ "https://math.stackexchange.com/questions/3787231", "https://math.stackexchange.com", "https://math.stackexchange.com/users/516079/" ]
So, my professor is reviewing Ring Theory, and he has decided to let <span class="math-container">$D$</span> be a square-free integer. Then, letting <span class="math-container">$$ \omega = \begin{cases} \sqrt{D} &amp; \text{if } D \equiv 2,3 \pmod{4} \\ \frac{1+\sqrt{D}}{2} &amp; \text{if } D \equiv 1 \pmod{4} \end{...
We have <span class="math-container">$$ \omega^2 = \frac{1 + 2\sqrt D + D}{4}\\ = \frac{2+2\sqrt D + D - 1}{4}\\ = \omega + \frac{D-1}4 $$</span> where the final fraction is an integer as long as <span class="math-container">$D \equiv_4 1$</span>.
It isn't too hard to show that <span class="math-container">$$(a+b\omega)(c+d\omega)=\frac{1}{4}(2a+b+b\sqrt{D})(d+2c+d\sqrt{D})$$</span>
https://math.stackexchange.com
4,536,525
[ "https://math.stackexchange.com/questions/4536525", "https://math.stackexchange.com", "https://math.stackexchange.com/users/950756/" ]
Suppose I have a series given by <span class="math-container">$\sum_{n=1}^{\infty}\frac{1}{q+n},$</span> where <span class="math-container">$q \in \mathbb{C}.$</span> How does one go about determining the convergence/divergence of this series? <em>Idea:</em> I thought to take the real part of the series. It would be ro...
You have <span class="math-container">$$ \frac1{a+ib+n}=\frac{a+n-ib}{(a+n)^2+b^2}=\frac{a+n}{(a+n)^2+b^2}+i\,\frac{b}{(a+n)^2+b^2}. $$</span> Then <span class="math-container">$$ \sum_n\frac1{a+ib+n}=\sum_n\frac{a}{(a+n)^2+b^2}+i\,\sum_n\frac{b}{(a+n)^2+b^2}+\sum_n\frac{n}{(a+n)^2+b^2}. $$</span> For any <span class="...
<span class="math-container">$\frac1{q+n}-\frac1n=-\frac q{n(q+n)}$</span> and <span class="math-container">$\frac{|q|}{n|q+n|}\sim\frac1{n^2}$</span> hence <span class="math-container">$\sum_{n=1}^{\infty}\frac{1}{q+n}$</span> is divergent, as sum of a divergent (harmonic) series and a (absolutely) convergent one.
https://math.stackexchange.com
196,303
[ "https://security.stackexchange.com/questions/196303", "https://security.stackexchange.com", "https://security.stackexchange.com/users/189683/" ]
We have an NIPS blocking attacks based on bad behaviors (rules checking the data in the network packets). Should I block the IP that the NIPS linked to attack attempts? It feels like the NIPS is already blocking the attack. At the same time, what is the risk of an IP being reused multiple times with different attacks?...
<strong>Consideration #1</strong> Performance. With properly sized devices (IPS and firewalls), firewalls are generally more efficient at blocking traffic. <strong>Consideration #2</strong> Ensuring the block is at the network perimeter. You'll want to block traffic as close to the network edge as possible to reduce...
Yes, you should. But you should also ask yourself for how long you will block any address which got onto your blacklist. Reasonable values might range from minutes to weeks, depending indeed on the subject of availability as mentioned on the comment by @Philipp. Of course, by blocking an IP you run the risk of blocki...
https://security.stackexchange.com
134,920
[ "https://softwareengineering.stackexchange.com/questions/134920", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/38443/" ]
While some platform in some languages already address this issue, I would like to keep this semi-language agnostic and to focus on patterns associated with this issue. I have a data model that contains FirstName, MiddleName, and LastName (to keep things simple). First and Last names are required and may have other ru...
This is a common problem in data validation; When entering new data into the system, before any information is entered by the user, the default working state of the object (mostly nulls) is an invalid state for virtually all other processes of your system. Validation is always context-dependent. If you have, for instan...
I would do both field and model level validation. On the UI side, check that the required fields are populated and display an error if not. Simplistic -- and intentionally so. Then inside the model, create a #validate function. This checks the state of the object and returns true if the model is valid, false if not....
https://softwareengineering.stackexchange.com
153,159
[ "https://electronics.stackexchange.com/questions/153159", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/66266/" ]
OK, so if you directly connect the two terminals of a battery, there is very little resistance in the circuit and you will drain the battery very quickly. However if you have a very simple circuit, for example a light bulb connected to the battery, the battery will drain slowly based on the watts used by the light bulb...
You are correct. If the light bulb only has a small resistance the battery will be drained fast. That is true for any circuit, be it simple or be it complex. It's a matter of total resistance.
You may be a little confused by the resistance of a light bulb. Typically, a "cold" (that is, not glowing) bulb filament will have a resistance about 1/10 its resistance when hot. So an operating (glowing) bulb will discharge a battery much less quickly than you might think if you just go by what a meter says the resis...
https://electronics.stackexchange.com
3,456,610
[ "https://math.stackexchange.com/questions/3456610", "https://math.stackexchange.com", "https://math.stackexchange.com/users/354073/" ]
If <span class="math-container">$y=x^{n-1}\ln (x)$</span>, then prove that <span class="math-container">$xy_{n}=(n-1)!$</span> My Attempt: <span class="math-container">$$y=x^{n-1}\ln (x)$$</span> Differentiating both sides with respect to <span class="math-container">$x$</span>, <span class="math-container">$$y_{1}= x...
<span class="math-container">$$y=x^{n-1}\ln (x)$$</span> <span class="math-container">$$\implies y_1=(n-1)x^{n-2} \ln (x)+x^{n-2}$$</span> <span class="math-container">$$\implies xy_1-(n-1)y=x^{n-1}$$</span> Now differentiating <span class="math-container">$(n-1)$</span> times with the help of Leibnitz's Formula we hav...
You can proceed by induction. Note that if <span class="math-container">$y = x^n \ln x$</span> then <span class="math-container">$$y_1 = x^{n - 1} +n x^{n - 1} \ln x.$$</span> Taking derivative <span class="math-container">$n$</span> times and using the hypothesis give us <span class="math-container">$$y_{n + 1} = 0 ...
https://math.stackexchange.com
47,105
[ "https://physics.stackexchange.com/questions/47105", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/16995/" ]
Given a light pulse in vacuum containing a single photon with an energy $E=h\nu$, what is the peak value of the electric / magnetic field?
The electric and magnetic fields of a single photon in a box are in fact very important and interesting. If you fix the size of the box, then yes, you can define the peak magnetic or electric field value. It's a concept that comes up in cavity QED, and was important to Serge Haroche's Nobel Prize this year (along with ...
This is a reasonable question to ask, but the answer is probably not what you're expecting: the electric and magnetic fields don't have well-defined values in a state with a fixed number of photons. The electric and magnetic field operators do not commute with the number operator which counts photons. (They can't, b...
https://physics.stackexchange.com
597,334
[ "https://electronics.stackexchange.com/questions/597334", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/207787/" ]
Why is the electric field the greatest on the drain side of the channel?
<blockquote> How is it possible so much difference from one measurement tool to another? </blockquote> The meter is trying to measure RMS (or something close to it), it could also have some issues with clipping the signal (since your range of the DMM is not shown). Another problem that could be throwing the meter off i...
You are reading mostly 50Hz mains hum, which will be different when measured with a battery powered multimeter vs a grounded oscilloscope. If you connect both at the same time they will be more congruent most likely (keeping in mind that peak-to-peak is almost 3x RMS (what the meter reads in). Whatever is going on seem...
https://electronics.stackexchange.com
56,031
[ "https://softwareengineering.stackexchange.com/questions/56031", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/13618/" ]
For version control comments what do other users do/recommend - past or present tense? I.e. <ul> <li><strong>Changed</strong> x to be y.</li> <li>or </li> <li><strong>Changing</strong> x to be y. </li> </ul>
Comments should be read in context, so: <h1>Present</h1> For source comments above a method, or before some behaviour occurs: <pre><code>// This function does X function doX() { ... } </code></pre> <h1>Past</h1> For source comments after some behaviour occurred <pre><code>function doX() { widget.doY() // ...
<strong>Past</strong> - Since anyone who reads it in the future will refer to the act of the change as have happened in the past. Wording something as "Changing" implies that you are currently in the process of making the change and that the code may not be finished. <strong>note:</strong> Personally, I only put in c...
https://softwareengineering.stackexchange.com
513,197
[ "https://electronics.stackexchange.com/questions/513197", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/57933/" ]
When a bench power supply is rated for 0-30V, 0-5A, does that mean that it can supply more than 5A at voltages below 30V while keeping the max power constant, or is there a hard cap on the current?
The supply can deliver up to 5 amps at up to 30 volts. The voltage and current ratings are both maximums, and are independent of each other - you can't expect to get 10 amps at 15 volts.
Depends on the power supply, but generally a bench power supply is rated at max everything, so that would be 5 A at 30 VDC, aka 150 W.
https://electronics.stackexchange.com
152,982
[ "https://softwareengineering.stackexchange.com/questions/152982", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/56858/" ]
I have a large (at least for me - approximately 10k lines) project that is written in C#. I have a treeview object on the left of my form and i have many nodes on my treeview. When i click a node, i bring up a panel on the right side of form. Since i only do GUI item operations (filling textboxes, clicking buttons, sho...
GUI classes can quickly grow into a ball of mud if they're not managed carefully. Simple refactoring will do the trick. Some tips: <ol> <li>Push everything that's not directly related to the GUI into separate classes.</li> <li>Refactor as much of the remaining code as possible out of the event handlers into their ow...
This is something that you will only learn by writing more and more code. A 10k line file is gigantic, and you probably have a lot of code that can be split out. The problem is that if you didn't initially approach the problem with plans to separate concerns, things may be so intermingled now that it would require es...
https://softwareengineering.stackexchange.com
105,959
[ "https://stats.stackexchange.com/questions/105959", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/41450/" ]
I have a fairly large dataset with a few fields containing time-related data. This data comes in various shapes and sizes, but most of it can be parsed and rephrased in more appropriate formats for human-reading. Formats range from <code>2010-01-01</code> to less obvious like <code>2008-52</code> (the second number is...
What you suggest -- <code>now</code> -- is an absolute baseline date. You could also use a base date that repeats on a regular basis. For example, if you're looking at US shopping patterns, the number of days before Christmas would be useful. Or if you were looking at international soccer, perhaps the number of days b...
It depends on what aspects of your data (you think) matter. Absolute baselines are often a very reasonable choice: for example, people's ages (<code>now</code> minus thier date of birth) are reasonable proxies for all sorts of things, including spending habits, musical tastes, and health status. I would imagine that t...
https://stats.stackexchange.com
228,317
[ "https://dba.stackexchange.com/questions/228317", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/171183/" ]
I'm learning <code>SQL</code> from a book and I'm trying to do some exercices on <code>join queries</code>. The only problem that I'm facing is that all of my join queries are not working while they seem well. These are the tables: <pre><code> students(student_id,student_names,student_age) courses_students(cou...
For the first question "which courses have more than 5 students enrolled?" try the following query <pre><code>select a.course_id,b.course_name,count(a.student_id) as student_count from courses_students a join courses b on a.course_id=b.course_id group by a.course_id having student_count&gt;5; </code></pre> For the ...
I would start with: <pre><code>SELECT course_id FROM courses_students GROUP BY course_id HAVING COUNT(student_id) &gt; 5 </code></pre> The result of this query is a new relation (table, derived table), which you can use as any other table. Let's call this corses_5_students <pre><code>SELECT c.* FROM courses as c JOI...
https://dba.stackexchange.com
103,023
[ "https://security.stackexchange.com/questions/103023", "https://security.stackexchange.com", "https://security.stackexchange.com/users/59298/" ]
I've read about corporate MITM 'attacks' where they replace the root CA on company hardware in order to monitor traffic over SSL that takes place on their network, but is it possible for them to do the same on my personal phone if I connect to the wifi? I would think that since they do not have administrator access t...
First, it is not about replacing the CA's but about adding another CA, i.e. the proxy CA used for intercepting the SSL connections. They will not be able to add the CA to your private phone just when you connect to the Wifi. But, as long as you don't have the proxy CA installed SSL connections will simply not work for...
To add to Steffan's excellent answer, simply connecting the phone to the WiFi cannot, by itself, add a certificate (CA or otherwise). However, if you enable your employer's mobile device management (<em>MDM</em>) on your phone - which may be required in order to do things like access your company email account or conne...
https://security.stackexchange.com
11,112
[ "https://electronics.stackexchange.com/questions/11112", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1623/" ]
When pulling something up or down why is a resistor used and it not just connected straight to the +V or 0V rail?
It limits current to protect the switch (transistor, etc.) and allows signal sources with limited driving capability to change that node's voltage. Rails generally have high drive capability, or low resistance. Think voltage divider, including source impedance of signal and rail, then let the rail impedance be 0-ohms f...
Another point not mentioned is that if it's necessary to alter the board, it's possible to pull off the resistor and replace it with a wire connecting one of the resistor pads to something else. By comparison, trying to rework a surface-mount pin which connects to a power ground plane using a via which is under the ch...
https://electronics.stackexchange.com
4,358
[ "https://dba.stackexchange.com/questions/4358", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/2498/" ]
Below is the Slow Query Log when my .NET application was running. Please let me know how to improve the performance of the queries: <pre><code>TCP Port: 3306, Named Pipe: (null) Time Id Command Argument # Time: 110805 13:25:39 # User@Host: root[root] @ localhost [127.0.0.1] # Query_time: 0.015625 L...
One area that stands out is the way you are accessing the BillDetails table. All queries appear to be using MONTH and YEAR operators on BillDate. For example: <pre><code>SELECT SUM(GROSSAMOUNT) FROM BILLDETAILS WHERE MONTH(BILLDATE) = 8 AND YEAR(BILLDATE) = 2011; </code></pre> This approach requires accessing every r...
First off, most of these seem to be 'slow' because they're not using indexes. You need to analyze how you're accessing the data in your tables to determine proper indexes. But a few pointers from this file: <pre><code>SELECT * FROM REMARKSETTINGS; </code></pre> and <pre><code>SELECT * FROM BILLINGSETTINGS; </code><...
https://dba.stackexchange.com
117,019
[ "https://mathoverflow.net/questions/117019", "https://mathoverflow.net", "https://mathoverflow.net/users/17822/" ]
I start with a noncompact connected semisimple Lie group with finite center $G$ and fix a maximal compact subgroup $K$ of $G$. I am considering these compact groups $K$. If $\mathbb T$ is the maximal torus in $K$, I take the quotient $K/\mathbb T$. I read that they are Kahler manifold. I am interested to know if ther...
This particular question is easy to answer. Many related questions about the relationships between various cardinals associated with Boolean algebra (or Boolean rings), such as: cardinality, number of ultrafilters, density, cellularity, distributivity etc, can be found in <ul> <li>Monk, J. Donald: <em>Cardinal invar...
This is false. We might as well count the number of ultrafilters, since an ultrafilter is the complement of a maximal ideal. Let $X$ be a set of cardinality $c$. If $B$ is the set of subsets $S \subseteq X$ such that $S$ or its complement is finite, then $B$ is a Boolean algebra under the usual set-theoretic operatio...
https://mathoverflow.net
120,728
[ "https://softwareengineering.stackexchange.com/questions/120728", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/39810/" ]
We are developing a system for the retail market and of its features will enable clients (actually consumer clubs) to go through all transactions made by end-clients. One of the ways to get this information will be via an API. The idea is that there will be requests for reports with a start date and an end date, and ...
If you make a business rule such that 1 customer may ask for at most 3 reports a day and the total duration of dates in between is not greater than 30, then you could design a table that the system checks before a report request is processed. A better approach to study the reporting requirement a bit further and consi...
Limit the API access to the most recent: day, week, month, whatever volume you can handle. Anything older could be provided in prebuilt compressed files from an ftp archive site. The limitation of course is changing the format of the archived files. Do they just need the data to pull into their own analysis and report...
https://softwareengineering.stackexchange.com
73,868
[ "https://math.stackexchange.com/questions/73868", "https://math.stackexchange.com", "https://math.stackexchange.com/users/130/" ]
I would like to see a nice, non-calculus proof that $|x| + |y| \le \sqrt{2} |z|$, where $z$ is the complex number $x + iy$. The more elementary the better, avoiding even trig if possible. Thank you.
Let $a, b \in \mathbb{R}$. Your inequality follows from: $$\begin{align} (|a|-|b|)^2 \geq 0 &amp;\Longrightarrow a^2 + b^2 \geq 2|a||b| \\ &amp;\Longrightarrow 2(a^2 + b^2) \geq (|a|+|b|)^2 \\ &amp;\Longrightarrow \sqrt{2} \sqrt{a^2 + b^2} \geq |a| + |b| \end{align}$$
(This is pretty similar to DJC's answer) Squares of real numbers are non-negative: $$\begin{align} ( |x| + |y| )^2 &amp; \leq ( |x|+|y| )^2 + (|x|-|y|)^2 \\ &amp; = (|x|^2 + |y|^2 + 2|xy|) + (|x|^2 + |y|^2 - 2|xy|) \\ &amp;= 2|x|^2 + 2|y|^2 \\ &amp;= 2|z|^2 \end{align}$$ Taking square roots: $$|x|+|y| \leq \...
https://math.stackexchange.com
98,273
[ "https://electronics.stackexchange.com/questions/98273", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/35113/" ]
I have just begun in the world of microcontrollers, and the first microcontroller. I chose to work with was the PIC from Microchip. The PIC I am using is the PIC16F877A. I am using MPLAB IDE and HI-TECH C. I am trying to make an extremely simple program that turns on an LED. This is the code I am using: <pre><code>...
Interlaced scan composite video signal isn't easily convertable to similar progressive-scan signal. You need to store the whole frame into some kind of memory and resend it at different speed using progressive scan. The simpliest way you will need a DAC-ADC pair with Fq about 6.5 MHz, an SRAM or ADRAM unit capable of r...
Conceptually, there is no reason why an LCD or other such display should interpret a non-interlaced signal as interlaced, rather than simply doubling every scan line [upon receipt of two or more "even" fields, start assuming that each "odd" field matches the even one until an "odd" field is received; do the reverse upo...
https://electronics.stackexchange.com
7,859
[ "https://mathoverflow.net/questions/7859", "https://mathoverflow.net", "https://mathoverflow.net/users/1445/" ]
I have a friend with dyscalculia and was teaching her some some mathematics (namely, solving a linear equation, simplifying certain expressions, and what (affine linear) functions are). She understood solving equations of the form $ax + b = 0$ by first adding $-b$ to both sides and then diving by $a$. Dealing with neg...
It would help to know a little more about the nature of your friend's dyscalclia. The sense of the integer line comes from the inferior parietal cortex (and causes difficulty with problems like "what number is halfway between 7 and 11?") while rote memory-type problems ("what is 4 times 7?") are associated with the bas...
You could think of integers as pairs of natural numbers $(a,b)$ modulo the equivalence $$(a,b) \sim (c,d)\quad \mathrm{if}\quad a+d = b+c.$$ (In other words, you think of $(a,b)$ secretely as $a-b$.) Addition is just entrywise addition of natural numbers: $$(a,b)+(c,d) = (a+c,b+d).$$ Negative numbers are numbers of t...
https://mathoverflow.net
174,618
[ "https://security.stackexchange.com/questions/174618", "https://security.stackexchange.com", "https://security.stackexchange.com/users/164691/" ]
if I connect through the tunnel to my friend's friend work LAN, will use only his LAN (IP) and will not have my own internet at all, force entry connection and getting their internet to host my internet, is it possible to trace my physical location (address)? The only address government will be able to find is that, th...
<blockquote> if Alice gives Bob her private key and vice versa, they can identify them self </blockquote> I think you've misunderstood something. For identification Alice does not give Bob her private key to identity herself. Instead Bob issues a challenge (i.e. some random message) and Alice <strong>signs</strong>...
In the real world you have a double wrapped message. <ol> <li>Alice encrypts the plaintext with Bob's public key so only Bob can read it.</li> <li>Then Alice encrypts the cryptotext with her private key to generate cryptotext2.</li> <li>Bob then uses Alice's public key to decrypt the cryptotext2.</li> <li>Bob then us...
https://security.stackexchange.com
205,260
[ "https://physics.stackexchange.com/questions/205260", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/72262/" ]
In my textbook, they say the following statements before doing a proof for the Lorentz transformation: <blockquote> We know that the Galilean transformation $x' = x - vt$ is incorrect, but what is the correct transformation? We require a linear transformation so that each event in system $K$ corresponds to one,...
That textbook is in general incorrect. (As I recall, right before that text they also give a B.S. reason why $y' = y$ and $z' = z.$ The simplest reason for the latter is to attach a paintbrush to a train at a height of $2 \text{ m}$ and let it paint the walls of the train station as it drives through, then send a train...
Yes. You can use any coordinate system. And then the transformation between two coordinate systems can be rather complex. In general relativity in fact, there aren't global inertial frames, so you are forced to either use general coordinate systems or else to use frames locally and patch the results together. The for...
https://physics.stackexchange.com
606,794
[ "https://math.stackexchange.com/questions/606794", "https://math.stackexchange.com", "https://math.stackexchange.com/users/42043/" ]
<blockquote> How many times are the hands of a clock at right angle in a day? </blockquote> Initially, I worked this out to be <span class="math-container">$2$</span> times every hour. The answer came to <span class="math-container">$48$</span>.<br> However, in the cases of <span class="math-container">$3$</span> o...
Yes, but a more “mathematical” approach might be this: In a 12 hour period, the minute hand makes 12 revolutions while the hour hand makes one. If you switch to a rotating coordinate system in which the hour hand stands still, then the minute hand makes only 11 revolutions, and so it is at right angles with the hour ha...
More mathematically, it can be done as : The minute hand moves 360 degrees in 60 minutes. This means that the angle of the minute hand is given by 6t, where t is number of minutes past midnight. The hour hand moves 30 degrees in 60 minutes. This means that the angle of the hours hand is given by 0.5t. The hands sta...
https://math.stackexchange.com
114,299
[ "https://chemistry.stackexchange.com/questions/114299", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/78400/" ]
I know that in order to increase the rate of solvation, you need to increase how often solute and solvent particles come into contact. You can do it by: <ol> <li>agitating the mixture</li> <li>increasing the surface area of the solute</li> <li>heating up the solvent</li> </ol> But my question is: Does adding more so...
If the answers are to be exclusive, then obvious choice is agitating the mixture. If the answers are not to be exclusive, then agitating the mixture + increased surface by adding more solute increases <span class="math-container">$\frac{\mathrm{d}c}{\mathrm{d}t}$</span> Adding more solute does not increase rate of s...
<blockquote> But my question is: Does adding more solute (like adding more salt to water) increase the rate of solvation since the contact surface area is larger? </blockquote> Not really. If I get the point, you would like to know if x + y grams of a substance dissolve faster (as dn/dt) than an amount x. No. Ignor...
https://chemistry.stackexchange.com
137,982
[ "https://mathoverflow.net/questions/137982", "https://mathoverflow.net", "https://mathoverflow.net/users/1832/" ]
Let <span class="math-container">$G$</span> be a reductive p-adic group, <span class="math-container">$\pi$</span> a complex smooth representation of <span class="math-container">$G$</span>. Then it is known that if <span class="math-container">$\pi$</span> is irreducible, then it is admissible. I need help to find a ...
Suppose $[F : R] = n$ is finite. I first claim that the integral domain $R$ is a subfield of $F$. For if $0 \neq \theta \in R$, then we have inclusions of $R$-modules $$R \subset R \cdot \theta^{-1} \subset R \cdot \theta^{-2} \subset \ldots$$ where in each case $R \cdot \theta^{-j-1}/R \cdot \theta^{-j} \cong R\cd...
Related result (W. R. Scott, &#8220;On the multiplicative group of a division ring&#8221; <i>Proc. Amer. Math.Soc.</i> <b>8</b> (1957) no. 2, 303&ndash;305): given a division ring $F$ (commutative or otherwise) and a division ring $R \subsetneqq F$, we have $$[F^{\ast} : R^{\ast}] = |F|$$ where $R^{\ast}$ and $F^{\ast}...
https://mathoverflow.net
94,912
[ "https://softwareengineering.stackexchange.com/questions/94912", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/7041/" ]
You know what they're asking for. You know what they really want. However, technically the way they wrote it is with a litmus test of requirements that don't match what they want because they don't understand what they're asking for. Should it be a part of our job to match the spirit of the requirements, or match ridi...
It is better to explain what the customer will get if you follow their requirements as they are written, and suggest that the requirements be rewritten to clarify the customer's true intent. But generally speaking it is the Project Manager's job to interpret the requirements in a way that will adequately fulfill the ...
Yes...it IS your job to go back and get clarifications. We, as developers, need to be just as involved with gathering and understanding requirements as any BA or business user. If you suspect they want something different than what is on paper - talk to them. Face to Face if possible - always better than email or ...
https://softwareengineering.stackexchange.com
87,191
[ "https://mathoverflow.net/questions/87191", "https://mathoverflow.net", "https://mathoverflow.net/users/14744/" ]
I want to know if connected reductive groups over non archimedean local fields have a dense countable subset. I was thinking that this should be true because if $G(\mathbb{F})$ is such group where $\mathbb{F}$ is a non archimedian local field then there exist an embedding of $G(\mathbb{F})$ into some matrix group GL$_...
The rational Eilenberg-Mac Lane spectrum $H\mathbb{Q}$ is $p$-local for every prime $p$, but certainly $[H\mathbb{Q}, H\mathbb{Q}]_*\neq 0$. If you replace "$p$-local" and "$q$-local" with "$p$-complete" and "$q$-complete", then your conclusion does hold.
Responding to your comment on Charles's answer: [I wish I could delete my comment to Charles's answer. My comment seems to have exploded and taken your comment down with it.] Both localization of a spectrum at a prime and completion of spectra at a prime are examples of Bousfield localization. The one is (a little ci...
https://mathoverflow.net
213,674
[ "https://electronics.stackexchange.com/questions/213674", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/89774/" ]
This is the equation for which I have to make a state-space model. $$m\ddot y(t)+b\dot y(t)+k_1y(t)+k_2y(t)^3=u(t)$$ For my A matrix I have $$\begin{bmatrix} 0 &amp; 1 \\ ? &amp; \frac{-b}{m}\\ \end{bmatrix} $$ where $$ \begin{align} &amp;x' = Ax + Bu\\ &amp;x_1=y \\ &amp;x_2=x_1' \end{align}$$ Where I put the que...
This is a non-linear differential equation, so linearize via the Jacobian. [Also note that derivatives are wrt time, so you can't differentiate the cubed term to get a squared term]
A physical system is in <strong>state-space representation</strong> when we have a mathematical model of it as a set of input, output and state variables related by first-order differential equations only. The system $$ m\ddot{y} + b\dot{y} + k_1y+k_2y^3 = u$$ is not, since there's a second derivative. But, by intro...
https://electronics.stackexchange.com
304,076
[ "https://electronics.stackexchange.com/questions/304076", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/148442/" ]
I'm planning to use the Atmel ATSAMC21J18A microcontroller in an automation project which has a built-in CAN controller. The CAN bus network may contain 32 devices, each generating data packets in 1 second intervals. There will be 16 such CAN bus networks connected to a single gateway node which has an NXP LPC1768 MCU ...
<ol> <li>An external CAN controller is similar to the internal CAN controller, but connected over a slower bus (higher latency, slower bit rate). There is no reason to use an external when you have a capable CAN controller on-chip (SAM C21): <ul> <li>Support for CAN-FD</li> <li>Up to 64 dedicated receive buffers and u...
<blockquote> What are the factors and parameters that should be considered when deciding whether to use the built-in CAN controller or an external CAN controller? </blockquote> Mostly these are a thing of the past, since there are plenty of MCUs with built-in controllers nowadays. The only reason why you would use a...
https://electronics.stackexchange.com
980,263
[ "https://math.stackexchange.com/questions/980263", "https://math.stackexchange.com", "https://math.stackexchange.com/users/81560/" ]
This is my <strong>very first</strong> trigonometric substitution integral, so please bear with me here. I would mostly like verification that my methods are sound. $$\int\limits_{\sqrt{2}}^{2}\dfrac{1}{t^3\sqrt{t^2-1}}\text{ d}t\text{.}$$ Because of the $\sqrt{t^2-1} = \sqrt{t^2-1^2}$ in the integrand, I set $t = 1\s...
Your working looks alright.<span class="math-container">$$\sin \theta= \sin (\pi - \theta)$$</span> Is another identity.
There are no issues with your solution. You can easily find $\sin \frac{2\pi}{3}$ using $\sin x = \sin (\pi - x)$ for $x = \frac{\pi}{3}$.
https://math.stackexchange.com
174,600
[ "https://stats.stackexchange.com/questions/174600", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/90655/" ]
I've reed the following part of a sketch of the proof that the maximum likelihood estimator is asymptotically normal: "Sketch of the second part of the proof. Recall that we may write the likelihood equation as $$\sum_{i=0}^n U_i(\hat\theta)=0$$ where $ U_i(\phi)$ denotes the derivative of $ \log\! f(Y_i;\phi) $ wi...
You should convince yourself that $f(x)-f(y)\approx f'(x)(x-y)$ is just another way to express Taylor expansion (under appropriate regularity assumptions). Then, using linearity of the derivation, you can generalize it to the sum.
I think your problem is just <strong>the notation problem</strong> Let us start from the beginning; Suppose$X_1, X_2,...,X_n$ are i.i.d random variables with probability density function $f(x;\gamma)$ Usually, people will use $\theta$ here, I will keep it for later use. The likelihood function is $L(\gamma;x)=f(x_1...
https://stats.stackexchange.com
549
[ "https://dba.stackexchange.com/questions/549", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
This seemed like a better fit here than stackoverflow, so here goes: I've been using mysql for a while since on most of the cheap webhosts it is <em>the</em> provided database. However, now I've started seriously developing web apps I've been using postgresql locally for my database, with a view to using it properly o...
For redundancy in terms of system reliability and data safety running a slave on the same machine as the master offers you nothing (or close to). If something bad enough to bring down the master happens it will probably bring down the slave too. For purely segregating users for access rights reasons, a good RDBMS will...
It's not clear to me how this solves your problem. There's no redundancy since it's on the same physical hardware, the same OS kernel, the same MySQL binaries, maybe different disks but on the same storage controller, etc. And the reason for a reporting DB is to offload queries from the OLTP DB and as it's all on the s...
https://dba.stackexchange.com
348,589
[ "https://electronics.stackexchange.com/questions/348589", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/108717/" ]
In the ARM documentation it is stated that: <blockquote> The processor supports two operation modes, Thread mode and Handler mode. Thread mode is entered on reset and normally on return from an exception. When in Thread mode, code can be executed as either Privileged or Unprivileged. Handler mode will be ...
<blockquote> So can I switch back to unprivileged here? </blockquote> Yes. The simplest method would be to set up another stack for the unprivileged "thread". Now you can simply switch stacks in the interrupt handler and use the standard "exception return" by <code>mov</code>ing a special value into the <code>PC</...
<blockquote> CONTROL.nPRIV Defines the Thread mode privilege level: 0 = privileged 1 = unprivileged. </blockquote> There is no control register for Handler mode privilege level.
https://electronics.stackexchange.com
175,542
[ "https://softwareengineering.stackexchange.com/questions/175542", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/12033/" ]
Recently I was asked: <blockquote> Why is NoSQL faster than SQL? </blockquote> I didn't agree with the premise of the question... it's just nonsense for me personally. I can't see any performance boost by using NoSQL instead of SQL. Maybe SQL over NoSQL, yes but not in that way. Am I missing something about NoSQL?...
There are many NoSQL solutions around, each one with its own strengths and weaknesses, so the following must be taken with a grain of salt. But essentially, what many NoSQL databases do is rely on denormalization and try to optimize for the denormalized case. For instance, say you are reading a blog post together with...
The thing you are missing about NoSQL is that NoSQl cannot be compared to SQL in any way. NoSQL is name of all persistence technologies that are not SQL. Document DBs, Key-Value DBs, Event DBs are all NoSQL. They are all different in almost all aspects, be it structure of saved data, querying, performance and available...
https://softwareengineering.stackexchange.com
2,165,260
[ "https://math.stackexchange.com/questions/2165260", "https://math.stackexchange.com", "https://math.stackexchange.com/users/392384/" ]
<blockquote> Let $a$ be an integer $p$-adic number for $p\ge2$. Prove that $a$ is a perfect square iff $\exists$ such integer $x$ that $a \equiv x^2 mod$ $p$. </blockquote> It is easy to prove $\Rightarrow$: if $a$ is a perfect square then $\exists$ such $b = (...,b_2, b_1, b_0)$ that $b^2 = a$, then $x = b_0$. But...
Easiest to specify the squares <em>among the units</em>. Remember that, using standard $p$-ary notation, a $p$-adic unit is of form $\dots a_4a_3a_2a_1a_0;$ with $a_0\ne0$. The situation is special for $p=2$, since it’s not enough for $a_0$ to be a square. Rather, the $2$-adic units that are squares are those that are...
Consider $y=y_0+y_1p+y_2p^2+\cdots $ then $y^2\equiv y_0^2\pmod{p} $. Now its obvious that if there exist integer $x$ such that $a\equiv x\pmod{p}$ then $a $ is a perfect square. In fact $a\equiv x\pmod{p}$ leads to the two solutions of the equation.
https://math.stackexchange.com
2,904,213
[ "https://math.stackexchange.com/questions/2904213", "https://math.stackexchange.com", "https://math.stackexchange.com/users/18035/" ]
Given known vectors $\vec a$ and $\vec b$, is it possible to solve for $\vec u$, given the following equation? $\vec a \times \vec u = \vec b$ So far I have found that the following must be true $\vec u = \vec c + \lambda \hat a$ where <ul> <li>$\vec c = \frac{b}{a} (\hat b \times \hat a) = \frac{\vec b \times \ve...
The operator $L_{\vec{a}} \colon \mathbb{R}^3 \rightarrow \mathbb{R}^3$ given by $$ L_{\vec{a}}(\vec{u}) = \vec{a} \times \vec{u} $$ is a linear operator. There are two cases: <ol> <li>If $\vec{a} = 0$ then $L_{\vec{a}}$ is the zero operator and so your equation is solvable if and only if $\vec{b} = 0$ in which case...
Cross product can be written as matrix multiplication: $$\pmatrix{b_1 \\ b_2 \\ b_3} = \vec{b} = \vec{a} \times \vec{u} = \pmatrix{a_1 \\ a_2 \\ a_3} \times \pmatrix{u_1 \\ u_2 \\ u_3} = \pmatrix{a_2u_3 - a_3u_2 \\ a_3u_1 - a_1u_3 \\ a_1u_2 - a_2u_1} = \begin{bmatrix} 0 &amp; -a_3 &amp; a_2 \\ a_3 &amp; 0 &amp; -a_1 \...
https://math.stackexchange.com
220,783
[ "https://stats.stackexchange.com/questions/220783", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/100507/" ]
I know that when plotting CDFs, ECDFs, or PDFs by using finite samples, we must be doing some form of interpolation. As far as I guess, empirical cumulative density functions (ECDFs) perform linear or stair-case interpolation in most software that plot them. Which is a rough interpolation with sharp edges. But my eye...
I'd say, if you're interested in the CDF, then plot the CDF. If you're interested in the PDF, then plot the PDF (which you'll have to estimate). They're useful for different purposes. For example, the CDF makes it easy to identify quantiles of a distribution, which are not as obvious in the PDF. The PDF makes it easy t...
(I'll try to avoid rehashing issues that are already well covered in the other answer; in particular I strongly agree with its first paragraph and much of the remainder, though I will expand slightly on one of its points along the way.) If you're comfortable with some smoothing by eye, make your density estimates (lik...
https://stats.stackexchange.com
252,632
[ "https://dba.stackexchange.com/questions/252632", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/194026/" ]
I need to select all the table row count from a db2 database. I have a query to select all the schema and table name: <pre><code>select rtrim(tabschema)||'.'||rtrim(tabname) as tableName from syscat.tables where tabschema = 'COM' order by tabname; </code></pre> This query give me list of the table name of the databa...
You could try to first get the rows you are interested in, then do the join. Assuming you want the row with the highest class_year per student you can try: <pre><code>select a.student_id, b.student_name, a.class_year from ( SELECT distinct on (student_id) student_id, class_year FROM table_a ORDER BY student_id, ...
Looks to me like the best plan is being used: <ol> <li>First scan the small table B to make the hash buckets,</li> <li>then scan the big table A to find the matching rows from B via the hash.</li> </ol> You may have an I/O problem, 15 seconds for 15 million records, although if I assume that each row of table A is ab...
https://dba.stackexchange.com
96,305
[ "https://dba.stackexchange.com/questions/96305", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/62166/" ]
I am running SQL Server Management Studio 2012 on a Windows 7 machine. After a failed attempt to import my registred servers from SSMS 2008, the icons for Database Engine and Local Server Groups are not displayed in the Registered Servers window: the Registred Servers window is empty. <img src="https://i.stack.imgur....
In the folder %APPDATA%\Microsoft\Microsoft SQL Server\110\Tools\Shell you should find a file named RegSrvr.xml. That's the file where Management Studio stores local registered servers. If the file is missing or corrupt, SSMS won't display anything. In this case, you can create a new file and paste this: <pre><code>&...
I just deleted the file from here: <pre class="lang-none prettyprint-override"><code>C:\Users\peter\AppData\Roaming\Microsoft\Microsoft SQL Server\110\Tools\Shell </code></pre> and then restarted Studio.
https://dba.stackexchange.com
94,511
[ "https://electronics.stackexchange.com/questions/94511", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/29336/" ]
According to Wikipedia, "Pull-up resistors are used in electronic logic circuits to ensure that inputs to logic systems settle at expected logic levels if external devices are disconnected or high-impedance is introduced." <img src="https://i.stack.imgur.com/2vYOs.png" alt="enter image description here"> and in the a...
<blockquote> For example, If i were to remove the pull-up resistor from the circuit above, and the switch is open, still the voltage of the gate is pulled up the level of Vin. </blockquote> There are two ways of interpreting this sentence, both of which lead to problems in the circuit. If we replace the resistor wi...
To rephrase - a short is really a very low resistance, so low that your power supply can not source enough current to develop a steady voltage and as a consequence the output of your power supply drops to almost 0V, doing some nasty stuff on the way - resetting/turning off everything on board (nothing can work on 0V) A...
https://electronics.stackexchange.com