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
763,271
[ "https://math.stackexchange.com/questions/763271", "https://math.stackexchange.com", "https://math.stackexchange.com/users/143855/" ]
Let say I have a graph $\mathcal{G}$. Denote this graph by $\mathcal{G}=(\mathcal{V}, \mathcal{E})$ where $\mathcal{V}$ is the set of vertices and $\mathcal{E}$ is the set of edges. My question is simple and very basic (it could be wrong): Can I say that the graph $\mathcal{G}$ is represented by $\mathcal{G}=(\mathca...
In a directed graph, the Cartesian product notation is spot on. However, in an undirected graph, I don't like it. It indicates $(v_{1}, v_{2}) \neq (v_{2}, v_{1})$. Of course, notationally, we can wave our hands based on context. I prefer $E = \{ (v_{1}, v_{2}) : v_{1}, v_{2} \in V, v_{1} \neq v_{2} \}$. This also tak...
As others have mentioned, the cartesian product would include both $(u,v)$ and $(v,u)$, which is not desirable for an undirected graph. The cartesian product also includes $(v,v)$, which is not desirable for simple graphs. For a simple undirected graph with vertex set $\cal V$ and edge set $\cal E$, you could instead d...
https://math.stackexchange.com
571,867
[ "https://physics.stackexchange.com/questions/571867", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/225215/" ]
This may be a silly question, but I don't know how to approach an answer myself and I can't seem to find the right search terms to input. A simple rocket might be a compressed air bottle, where a reaction does not take place and the exhaust gas is the same form as the exhaust itself. Thrust is produced because the air ...
the best example is a little CO2 cartridge, as used in pellet guns and to charge soda water bottles. These have pressurized gas inside them and a constricted nozzle. They make great rocket motors. Amateur rocket people use this type of motor to propel motorcyclists like Evel Kneivel into the air; in this case the press...
Like a can of compressed Air or CO2? I've read warnings on spray cans to that effect. To my understanding Diet Coke & Mentos is purely physical as well, though of course it would be a ticklish matter to power a water rocket in this manner, what with overturning things fast enough.
https://physics.stackexchange.com
418,521
[ "https://math.stackexchange.com/questions/418521", "https://math.stackexchange.com", "https://math.stackexchange.com/users/29706/" ]
<blockquote> For a given equation system (over field $R$), determine the basis for the space $\operatorname{Sol}(U)$ (where $\operatorname{Sol}$ is a set of solutions): \begin{cases} 2x + 7y + 3z+t=0 \\ 3x + 5y + 2z + 2t=0 \\ 9x + 4y + z+7t=0 \end{cases} </blockquote> It's a new type of problem for me and I'm...
<strong>Proposition$^{[1]}$</strong> Fix $k\in\mathbb{P}$ and functions $f_1,f_2,\dots,f_k:\mathbb{N}\to K$. Define a new function $h:\mathbb{N}\to K$ by $$h(\#S)=\sum f_1(\#T_1)\ f_2(\#T_2)\dots f_k(\#T_k),$$ where $(T_1,\dots,T_k)$ ranges over all weak ordered partitions of $S$ into $k$ blocks, i.e., $T_1,\dots,T_...
Consider the generating function given by $( R + W + B + Y )^n$ Without restriction, the sum of all coefficients would give the number of ways to paint the distinguishable posts in any of the 4 colors. We substitute $R=W=B=Y = 1$ to find this sum, and it is (unsurprisingly) $4^n$. Since there are no restrictions on...
https://math.stackexchange.com
7,225
[ "https://dba.stackexchange.com/questions/7225", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/1074/" ]
A little information. I'm running SQL SERVER 2008 R2 64bit. I have Microsoft.ACE.OLEDB.12.0 provider installed. On my production server I've setup a linked server to the access db using the provider listed above and everything works great. Copy the Access db to our dev environment and try to setup linked server usei...
I found the issue but I'm not sure why its happening. To query the linked server I have to right click SSMS and select Run as Admin. Then I can query the access db. I dont know why this is the case as I'm remoted into the machine. I'm an administrator on the machine. I created the Linked Server to the Access D...
This is happening due to permissions on the 'Network Service' folder that SQL server uses for Linked Server setup. Inorder to access the linked server using another account (assuming that you have the server permissions set correctly) you will need to do the following: Open Windows Explorer and navigate to the followi...
https://dba.stackexchange.com
322,841
[ "https://stats.stackexchange.com/questions/322841", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/45453/" ]
For a simulation study, I need to generate $n$ Uniform$[0,1]$ random variables with population correlation $\rho$. I'm not aware of any simple ways to do this. I have considered sampling from a multivariate normal with mean 0 and exchangeable correlation matrix $ \Sigma= \left[ {\begin{array}{cccc} 1 &amp; \rho &a...
<strong>Your method works.</strong> Take a standard bivariate normal random variable $(X_1,X_2)$ with correlation $\tau$. Let $\Phi$ be the standard Normal distribution function. The copula $(U_1,U_2)$ given by $U_i = \Phi(X_i)$ has <em>some</em> correlation $\rho=f(\tau)$. Although this function $f$ cannot be dete...
@whuber: Great derivation, and highly useful for those creating copulas. I always wondered where some correlation gets lost when channeling the normal random deviates with desired correlation through the CDF: <pre><code>## we arrive at rho = 1.91 set.seed(123) X &lt;- mvrnorm(100000, mu = c(0, 0, 0), Sigma = matrix(c(...
https://stats.stackexchange.com
375,267
[ "https://mathoverflow.net/questions/375267", "https://mathoverflow.net", "https://mathoverflow.net/users/135674/" ]
Let <span class="math-container">$K$</span> be a non-archimedean field of char 0 and a morphism <span class="math-container">$f:V \rightarrow W$</span> of normed <span class="math-container">$K$</span>-vector spaces given. The map <span class="math-container">$f$</span> is said to be strict if <span class="math-contain...
Counterexamples are trivially obtained by taking a stricly coarser norm on a Banach space, e.g., the <span class="math-container">$\ell_\infty$</span>-norm on <span class="math-container">$\ell_2$</span>. For <span class="math-container">$V=(\ell_2,\|\cdot\|_2)$</span>, <span class="math-container">$W=(\ell_2,\|\cdot\|...
I think you need the assumption that <span class="math-container">$W$</span> is Banach, at least I don't see a way around that. If <span class="math-container">$W$</span> is Banach, then the reasoning is as follows. Let <span class="math-container">$\phi:V/\ker(f)\to \text{im}(f), [v]\mapsto f(v)$</span>. Then <span cl...
https://mathoverflow.net
320,103
[ "https://physics.stackexchange.com/questions/320103", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/86936/" ]
$$F = ma$$ This was never an intuitive equation. A much more intuitive equation would be: $$F = m \cdot velocity$$ When you punch someone, the force exerted seems to be proportional to velocity. Is there an intuitive way to understand $F = ma$, or to understand why $F\neq m\cdot velocity$?
Punching someone in the face involves changing the velocity of your fist. If your fist goes from very fast to not moving, this is greater acceleration than not-so-fast to not moving (provided this change in speed occurs over the same time interval). So the faster fist does provide the largest bunch but its accelerati...
What is more difficult: keep some heavy object in hands when you are standing on ground or when you are standing inside a moving train? Actually there is no difference. You do not need to push this heavy object forward in a direction of a train's velocity to keep it moving. More than that, if train's velocity decrease...
https://physics.stackexchange.com
184,682
[ "https://physics.stackexchange.com/questions/184682", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/81545/" ]
I have a system of equations: \begin{cases} f\left(x_{1}\right)+f\left(x_{2}\right)+P=0\\ \\ g\left(x_{1}\right)+g\left(x_{2}\right)=0 \end{cases} where $f$ and $g$ are some functions, $P$ is a parameter that I want to vary, and $\boldsymbol{x}=\left[x_{1}, x_{2}\right]$ is the unknown. Let's say that for $P&lt;P^{*...
You can use the teleportation protocol to teleport and part of a larger quantum state (which can be arbitrarily entangled), and it will work the way it should: I.e., if initially A+C hold $\vert\psi\rangle_{AC}$, after the protocol B+C hold $\vert\psi\rangle_{BC}$. The same is true if the initially shared state is mix...
I was under the impression that the standard teleportation protocol preserves teleportation. That is to say that if Alice shares some entangled state with Bob, and then teleports her part of this state to Carol in the usual way, Carol will now share that entangled state with Bob. Using this teleportation protocol requ...
https://physics.stackexchange.com
701,531
[ "https://physics.stackexchange.com/questions/701531", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/259524/" ]
Instantaneous eigenstate <span class="math-container">$\psi(t)$</span> is defined as<br /> <span class="math-container">$\hat H(t)\psi(t)=E(t)\psi(t)\tag{1}$</span> But in the lecture notes of Quantum Physics III MIT (in the section of adiabatic approximation), it is written that <span class="math-container">$\psi(t)$<...
Wave speed is <span class="math-container">$f\lambda$</span> <span class="math-container">$c=f\lambda$</span> If the frequency increases, the wavelength decreases Frequency is how frequent a peak travels across a certain point ( or freq of osscilations), if the frequency is increased, with a constant wavelength, then t...
A wave is characterized by its amplitude <span class="math-container">$A$</span>, frequency <span class="math-container">$\nu$</span>, wavelength <span class="math-container">$\lambda$</span>, and speed <span class="math-container">$v$</span>. Stand at a certain point and allow the wave to travel past you. The amplitud...
https://physics.stackexchange.com
213,697
[ "https://physics.stackexchange.com/questions/213697", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/95608/" ]
The only examples I've found talk about rotating an object about one axis and then about another axis. When you reverse the order, the object ends up in a different position. However, as those rotations happen on different planes and at different times, I see them as unrelated, each with their own equation. Can anyone ...
From the title of the question: <blockquote> When does angular position, or angular displacement, not obey the rules of vector addition? </blockquote> The answer to this question is simple: It's whenever the rotations span more than a two dimensional space. Vector addition must be commutative by definition: $a + b ...
In the comments, you clarified what you had in mind for a "vector" of rotation. <blockquote> Well, in my mind the magnitude of angular position would be the counterclockwise angle from the positive x axis in the plane of rotation, to a ray from the origin to the rotating object. The direction would be the same as th...
https://physics.stackexchange.com
96,494
[ "https://electronics.stackexchange.com/questions/96494", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/35551/" ]
I'm working on a frequency counter coursework, where I use MSP430 MCU. I have to measure signals with specifications: frequency from 0.1 Hz to 1 MHz and signal's amplitude from 0.1V to 10V. The problem is with signal’s amplitude, I understand that the voltage of 10V is too high and 0.1V is too low for MCU input. Do you...
I agree with Andy about using a comparator, but disagree about attenuating the input signal to fit into the comparator range. I would rather clip it than attenuate it. Another possibility is to power the comparator from a wide supply range, and use the type that has a open collector output. 1 MHz isn't really all th...
Use a comparator - it has a reference input (set to some midrail value) and a "real" input. If the real input rises above the reference input the comparator's output goes high. When the real input falls below the reference input the comparator output falls low. MAX999 springs to mind - it's super fast, has built in hys...
https://electronics.stackexchange.com
126,022
[ "https://electronics.stackexchange.com/questions/126022", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/26398/" ]
I am trying to figure out how long my project will last on a single battery. It's powered by a single AA battery with an NCP1402 3.3 volt boost converter. I've determined that the target circuit draws around 75 µA at rest and around 250 µA for 35 ms per second. I could just run that number, assume the boost converter i...
I actually discovered that my scope has a measurement function that can average the entire displayed portion of the waveform, which is separate from the averaging function in the acquisition menu. This is adequate for my purposes. Meanwhile, I believe my earlier measurements of the circuit without the boost converter ...
A method I've used for this kind of measurement is actually one of the simplest. Put a known value capacitor in parallel with the supply and wait until the capacitor is fully charged to the known voltage \$V_1\$. Then remove the supply. After some amount of time, measure the remaining voltage \$V_2\$on the capacitor...
https://electronics.stackexchange.com
129,099
[ "https://softwareengineering.stackexchange.com/questions/129099", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1554/" ]
My understanding is that one of the key features of a B-Tree (and a B+Tree) is that it is designed such that the size of its nodes are some multiple of the block size of whatever media the data is stored on. Considering that, in a memory managed language like java/c#, we don't really have access to <em>how</em>, <em>w...
Yes, B-Trees still make good sense in managed languages. A few points of explanation: <ul> <li>If you're using the B-Tree as an on-disk data structure, then I can absolutely guarantee that <strong>disk IO will be your bottleneck</strong>, not the fact that you are using a managed language.</li> <li>If you are using a...
The use of a managed language like Java, C# etc. has absolutely nothing to do with the way data is accessed from the drive, and in any case it certainly does not deprive developers from an iota of control over precisely how, when, and in what order data will be accessed from the drive. The problem is elsewhere: manage...
https://softwareengineering.stackexchange.com
108,564
[ "https://physics.stackexchange.com/questions/108564", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/22364/" ]
I understand a problem like this has already been asked, but I have not found an answer that makes it clear. A force is applied to a box on a table(lets ignore friction), and the box moves with some constant velocity. In this case, acceleration is equal to zero. The net force does not. How can we explain this? $$ \sum...
<blockquote> A force is applied to a box on a table(lets ignore friction), and the box moves with some constant velocity. </blockquote> It's impossible. Or, don't ignore friction. When an object moves with constant velocity, the total net force on the object is always zero. If you have applied force, there's anothe...
By Newton's second law of motion, if there is a nonzero net force there is an acceleration. If there is no acceleration then the net force is zero. In the situation you describe, where the box has no acceleration, there <em>must</em> be another force balancing $F_{app}$ otherwise there <em>will</em> be an acceleratio...
https://physics.stackexchange.com
285,147
[ "https://softwareengineering.stackexchange.com/questions/285147", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/20211/" ]
All software development projects are moving into separation of design, logic , data in patterns like MVC , MVVM and others. Strangely i got a very strange requirement for a new software; that is : It is required to have all controls/fields of the screen to be based in the database with their access rules which user ...
The way this is normally done is with user <em>roles</em> and a <em>role access matrix</em>. Each user has a role, saved in the database along with the user name, password, etc. Then, there is a two-dimensional role access matrix somewhere, specifying for each role and for each screen field what kind of access is to ...
I have experience with big CRM/ERP product created this way. It is doable, but takes considerable more time and functionality will be limited. If this kind of thing is proposed only for access control, I don't think it's worth it. Some downsides: <ul> <li>All types of controls you want to use, must be custom coded to...
https://softwareengineering.stackexchange.com
136,377
[ "https://chemistry.stackexchange.com/questions/136377", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/94605/" ]
Why is oxygen (or other elements) isn't present in the formulae for calculation of the value of degree of unsaturation <span class="math-container">$(\mathrm{DU})$</span> as it usually more common than nitrogen and halogens. And whats so special about nitrogen and halogens to be in the formulae <span class="math-contai...
The degree of unsaturation is defined as the index of hydrogen deficiency (IHD) that determines the total number of rings and π bonds. It means the removal of two hydrogen atoms from a molecule is equal to one added <span class="math-container">$\mathrm{DU}.$</span> <span class="math-container">$$\text{rings} + \pi~\te...
So here is the method I learned years ago without memorizing an awkward formula. The concept is to reduce the molecular formula to a hydrocarbon and compare it to the most saturated hydrocarbon bearing the same number of carbon atoms. Consider the infamous free-base, hydroxychloroquine, <span class="math-container">$\...
https://chemistry.stackexchange.com
13,400
[ "https://cs.stackexchange.com/questions/13400", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/9308/" ]
I realize non-deterministic pushdown automata can be an improvement over deterministic ones as they can "choose" among several states and there are some context-free languages which cannot be accepted by a deterministic pushdown. Still, I do not understand <em>how</em> exactly they "choose". For palindormes for exampl...
Quite simply, the mechanism is magic. The idea of non-determinism is that it simply knows which way it should take in order to accept the word, and it goes that way. If there are multiple ways, it goes one of them. Non-determinism can't be implemented as such in real hardware. We simulate it using techniques such as b...
The main difference (in my opinion) between a deterministic automaton and a non-deterministic automaton is that for a deterministic automaton a given input word has only one path through the machine. In a non-deterministic automaton a given input word may have multiple paths through the machine (because there may be ch...
https://cs.stackexchange.com
13,251
[ "https://mathoverflow.net/questions/13251", "https://mathoverflow.net", "https://mathoverflow.net/users/1106/" ]
<strong>Background</strong> Yet another homework inspired question: A scheme is reduced if no section of the structure sheaf is nilpotent. To every scheme $X$ there is a scheme $X_{red}$ and a morphism $i: X_{red} \rightarrow X$ such that every morphism from a reduced scheme into $X$ factors through $X_{red}$. Hartsh...
Here is a nontrivial example I like. Let $W:\mathrm{Rings}\to\mathrm{Rings}$ denote the Witt vector functor of some fixed finite length. (You can consider the $p$-typical Witt vectors, for some prime $p$, but everything works with the other standard flavors.) Then the functor $W_*(-)=-\circ W$ is an endofunctor of the ...
Actually $X$ is identified with the covriant functor $CRing \to Sets$ $A\mapsto Hom(Spec(A),X)$. The functor $X\circ F$ is usually called the de Rham space of $X$. This is not the reduced scheme associated to $X$ because you mod out by nilpotents on the source instead of $X$: for $X=Sepc(B)$ you get $Hom(Spec(A);Spec(...
https://mathoverflow.net
228,691
[ "https://softwareengineering.stackexchange.com/questions/228691", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/107106/" ]
I sit with a project that I need to quote, and until the job is awarded, I can only use "View source" to check, and ask a few questions about the system. That makes quoting outright impossible for me to do. My question is: how do one go about quoting for such a project? What kind of questions should I ask? Do I declin...
This is a normal problem with running as a freelancer - you have to take a risk and quote accordingly. Its the same for every business, that requirements come in and you have to estimate the cost of delivering them, sometimes you'll get it right, sometimes you'll get it wrong, the idea is that overall you'll make enoug...
You can always ask to sign an NDA (Non-Disclosure Agreement) and ask to view the code or at least a sample of it. You should also be focusing on the business problem rather than the technical aspect. If this is legacy PHP code, you're taking a risk and so is the business and you should be charging as much as possible:...
https://softwareengineering.stackexchange.com
493,968
[ "https://stats.stackexchange.com/questions/493968", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/297625/" ]
Is random sample imputation a valid method of imputation for categorical variables? Not randomly drawing from any old uniform or normal distribution, but drawing from the specific distribution of the categories in the variable itself. As a simple example, consider the Gender variable with 100 observations. Male has 64 ...
Random imputation is certainly a valid imputation method, though it is not often used as there are better alternatives. It’s advantages are; it preserves the distribution of the data, it is easy to implement, is computationally efficient and has the benefit of only imputing values that are observed in the dataset.It is...
If this is a multivariate dataset, randomly imputing missing values based on the records available from that same variable is generally <strong>not</strong> a good way to proceed. <ol> <li>The records with missing values may represent a non-homogeneous subset of the overall population, and have different statistical pr...
https://stats.stackexchange.com
19,609
[ "https://dsp.stackexchange.com/questions/19609", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/12056/" ]
Is there any way how to compute convolution matrix for Nearest Neighbor (bicubic, bilinear) image scaling (upscale/downscale)?
The <em>a priori</em> SNR is the ratio of the power of the clean signal and of the noise power. The <em>a posteriori</em> SNR is the ratio of the squared magnitude of the observed noisy signal and the noise power. Both SNRs are computed for each frequency bin. Of course, the only signal we have is the observed noisy s...
@Matt L. I'm also using this same paper by Y. Ephraim and D. Malah and the decision directed approach mentioned in the paper. But there is this formula eq no 53 which uses recursion to find priori SNR but i am having hard time implementing the code. <img src="https://i.stack.imgur.com/tso5V.png" alt="enter image descri...
https://dsp.stackexchange.com
25,806
[ "https://quant.stackexchange.com/questions/25806", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/20360/" ]
From the pricing formula, we know that the value at time $t\in [0,T]$ of a zero coupon bond maturing at time $T$ is $$ B(t,T)=E\left(\exp{\left(-\int_{t}^{T}r_sds\right)}\bigg|\mathcal{F}_t\right). $$ Moreover, we say that $B(t,T)$ has an affine term-structure, if $$ B(t,T)=\exp{\left(A(t,T)-C(t,T)r_t\right)}\;\;\ \t...
Here is a general proof for all parameters in an open domain. <span class="math-container">$$dr = adt+bdW:=r\big(k(\theta-x)+\frac12\sigma^2\big)dt+\sigma rdW.$$</span> Let <span class="math-container">$$u(r(s),s):=e^{-\int_t^sr}B(r(s),s,T)=:\phi(s) B.$$</span> Then <span class="math-container">$$u(r(t),t)=\mathbf E\b...
We shall prove this by contradiction. Let $\theta=0$ and $\sigma=0$. $X_t=X_0e^{-kt}$ and $$B(0,t)=\exp\Big(-\int_0^te^{X_0e^{-ks}}ds\Big).$$ Suppose the contrary that $B(0,t)$ is affine. We should have $$ B(0,t)=\exp{\left(A(0,t)-C(0,t)e^{X_0}\right)}\;\;\ \forall (t,X_0), \tag{1} $$ Differentiate the logarithm of E...
https://quant.stackexchange.com
570,819
[ "https://physics.stackexchange.com/questions/570819", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/256066/" ]
I was going through a text and it said that <blockquote> The mean momentum <span class="math-container">$p$</span> of a nucleon in a nucleus of the mass number <span class="math-container">$A$</span> and atomic number <span class="math-container">$Z$</span> depends on <span class="math-container">$A$</span> as <span cl...
You have an answer about nuclei with angular momentum. But the result also holds for spinless nuclei, because of the uncertainty principle. A particle that is somewhere within a box of size <span class="math-container">$R$</span> has position uncertainty <span class="math-container">$\sigma_x \sim R$</span>, and theref...
You can get a <em>very</em> rough idea of the momentum scales that you would expect in the nucleus simply by using the Heisenberg Uncertainty Principle. Essentially, when you localize a particle such that its uncertainty in position is <span class="math-container">$\Delta x$</span>, then its uncertainty in momentum <sp...
https://physics.stackexchange.com
144,293
[ "https://softwareengineering.stackexchange.com/questions/144293", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/42446/" ]
I work with someone who insists that any good software engineer can develop in any software technology, and experience in a particular technology doesn't matter to building good software. His analogy was that you don't have to have knowledge of the product being built to know how to build an assembly line that manufact...
<blockquote> but in a way it also trivializes the profession, as in "Codemonkey, go sling code". </blockquote> I would argue quite the opposite. A good software engineer would have the ability to conceptualize, architect, and design quality software agnostic of technology. The opposite end of this spectrum is the...
I agree to an extent with the person you work with. A good software engineer deals with general principles of design and software production. The actual languages and frameworks are details. That's not to trivialise the ease with which you can pick up new languages and frameworks. There's always a learning curve as...
https://softwareengineering.stackexchange.com
9,311
[ "https://stats.stackexchange.com/questions/9311", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/3592/" ]
I can see that there are a lot of formal differences between Kullback–Leibler vs Kolmogorov-Smirnov distance measures. However, both are used to measure the distance between distributions. <ul> <li>Is there a typical situation where one should be used instead of the other? </li> <li>What is the rationale to do so?</li...
The KL-divergence is typically used in information-theoretic settings, or even Bayesian settings, to measure the information change between distributions before and after applying some inference, for example. It's not a distance in the typical (metric) sense, because of lack of symmetry and triangle inequality, and so ...
Another way of stating the same thing as the previous answer in more layman terms: KL Divergence - Actually provides a measure of how big of a difference are two distributions from each other. As mentioned by the previous answer, this measure isnt an appropriate distance metric since its not symmetrical. I.e. distance...
https://stats.stackexchange.com
23,810
[ "https://softwareengineering.stackexchange.com/questions/23810", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/8983/" ]
Well I've been hitting the books wherever I can. I have an interview coming up, first one via phone, for a software engineer position. I've read all the blog posts, I've read all the accounts of interviews (some pretty old), and Google itself even suggested a reading list of books, none of which would surprise anyone h...
<strong>Things you should know</strong> <ul> <li>Google wants to hire you! The life-blood of any software company is its employees and Google is no different. It's looking to hire the best and the brightest and the people conducting the interview(s) want you to succede just as much as you do.</li> <li>Google will do ...
<h1>Relax</h1> if your interview is anything like mine was, the interviewer is not there to grill you into submission, he's there to <em>see how you think</em>. EDIT: this was just the initial phone interview, i don't know about anything further than that...and if i did i probably couldn't tell you anyway!
https://softwareengineering.stackexchange.com
285,681
[ "https://electronics.stackexchange.com/questions/285681", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/115152/" ]
I am using the timer of a microcontroller to create square wave signals from 10KHz to 40KHz, but my microcontroller generates the signal only with positive values (0 - 3.3V). I have generated the same signals from my PC with the sound card, the signals in the oscilloscope have a range from -2V to 2V (at maximum volume)...
The 0-3.3V signal has a 1.65V DC component, and this will effectively be shorted by the speaker. You should not connect the speaker directly to the microcontroller as the speaker presents a very low impedance at DC (assuming a regular moving magnet speaker with a voice coil), and it will essentially short the microcont...
Driving a speaker with DC-biased signals will cause it to convert more power into heat than driving it with bipolar signals. In addition, speakers are usually designed for balanced mechanical stresses, and a DC bias will cause unbalanced stresses. Speakers will often be more tolerant of this at higher frequencies tha...
https://electronics.stackexchange.com
324,154
[ "https://mathoverflow.net/questions/324154", "https://mathoverflow.net", "https://mathoverflow.net/users/136313/" ]
Say I have compact Riemann surfaces <span class="math-container">$X$</span>, <span class="math-container">$Y$</span>. Is there necessarily a Riemann surface <span class="math-container">$Z$</span> which maps holomorphically onto both <span class="math-container">$X$</span>, <span class="math-container">$Y$</span>?
Here is some construction. <span class="math-container">$X$</span> and <span class="math-container">$Y$</span> are smooth projective algebraic complex curves. So the complex surface <span class="math-container">$X \times Y$</span> is projective (e.g. by Segre embedding) and so admits a very ample line bundle <span clas...
Choose non-constant meromorphic functions <span class="math-container">$f:X\to \mathbb P^1$</span> and <span class="math-container">$g:Y\to \mathbb P^1$</span> and denote by <span class="math-container">$Z$</span> the normalization of the fiber product <span class="math-container">$X\times_{\mathbb P^1} Y=\{(x,y)\in X\...
https://mathoverflow.net
2,679
[ "https://dba.stackexchange.com/questions/2679", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/136/" ]
When trying to use the SQL Tuning Advisor from SQL Developer I get this error. Tuning advisor was working some days before. <img src="https://i.stack.imgur.com/n3ED0.jpg" alt="enter image description here">
The solution is very simple. The string of the query is just too long. I'm trying to optimize a stored procedure using dynamic sql with a parameter to decide if the sql is executed or output. I just copied the output into a fresh sql developer pane and tried to use the tuning advisor. The problem is that the genera...
Try to switch your browser's language settings. If the database is running with American/America, switch your browser to en-us. Then re-connect and run the task again. This fixed up our SQL Tuning Advisor task which failed with the same error.
https://dba.stackexchange.com
1,031,439
[ "https://math.stackexchange.com/questions/1031439", "https://math.stackexchange.com", "https://math.stackexchange.com/users/171196/" ]
My high-school math professor told us that in order for a function $ f $ to have a reverse it must be monotonic and continuous, but I always thought that necessary and sufficient condition for a function to be invertible is bijectivity. Are these conditions equivalent? Or is the first stronger than the second?
As a counterexample for the implication "bijective implies continuous and monotonic", consider the bijection $f:\mathbb{R}\rightarrow \mathbb{R}$ defined by $$f(x)=\begin{cases} x &amp; x\in \mathbb{Q} \\ -x &amp; x\in \mathbb{R}\setminus \mathbb{Q} \end{cases}$$ This is neither monotonic nor continuous, but is a bijec...
The precise statement is: if $f:[a,c]\to [c,d]$ is continuous, then it is bijective (it means: has a reverse) if and only if it is monotonic.
https://math.stackexchange.com
243,269
[ "https://softwareengineering.stackexchange.com/questions/243269", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/134888/" ]
As I understand, the cause of the speed difference between compiled languages and python is, that the first compiles code all way to the native machine's code, whereas python compiles to python bytecode, to be interpreted by the PVM. I see that this way python codes can be used on multiple operation system (at least in...
No. The reason why there are speed differences between languages like Python and C++ is because statically-typed languages give the compiler tons of information about the structure of the program and its data which allows it to optimize both computations and memory access. Because C++ knows that variable is of type int...
Two concepts might help us understand better why Python compiled to native machine code "may" not run as fast as compiled C or other commonly compiled languages. They are called early binding and late binding. I should begin by saying I am not a Python expert, and I came to this site by accident. But I like this site....
https://softwareengineering.stackexchange.com
286,914
[ "https://electronics.stackexchange.com/questions/286914", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/139300/" ]
Environment: GNU_ARM, STM32F407 Every time I use <code>hal_delay()</code> the program hangs just before the call to <code>hal_delay()</code>. I added: <code>printf("\n%d==&gt;%d,",tickstart,HAL_GetTick());</code> in the loop of HAL_DELAY. The result is always: <code>0==&gt;0</code> <code>HAL_GetTick()</code> doesn...
As an advanced STM32 user I can say that you did not handle the SysTick interrupt. The HAL library enables the SysTick timer and interrupts for it. In stm32f4xx_it.c file add this function call: <pre><code>void SysTick_Handler(void) { HAL_IncTick(); } </code></pre> Then it should work.
When you use a HAL_DELAY you have to keep in mind that the counting is done in the interrupt routine SysTick. If you call the HAL_DELAY in the interrupt that has greater priority, then systick counting is stopped. So the HAL_DELAY gets stucked in the endless loop do...while, because the systick isn't counting. The reme...
https://electronics.stackexchange.com
163,518
[ "https://physics.stackexchange.com/questions/163518", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/23937/" ]
Everyone knows that a body with no external forces acting on it remains at rest or moves with a constant velocity. But how would you answer the following multiple choice question: <blockquote> <em>Question: A body with no forces acting on it <strong>always</strong>:</em> <ul> <li>A.) Remains at rest</li> <l...
You are right in assuming that being at rest is considered a special case of rectilinear uniform motion (abbreviated <em>r.u.m.</em> hereafter). The closest thing to a <em>reason</em> for this convention I can give is this: It is a nice property to have all observers in inertial frames agree on whether a body is in r....
A is wrong because the concept of "at rest" implies an arbitrary decision. The right answer is B which is correct whatever the observer's chosen frame.
https://physics.stackexchange.com
10,049
[ "https://quant.stackexchange.com/questions/10049", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/6353/" ]
I am unsure how to start with the following problem. I have two contingent claims where contingent claim (1) pays $\int_0^T S_u du$ and contingent claim (2) pays $(\log S_T)^2$ at time $T$ Now I would like to use the Black-Scholes model to get their time-zero prices Using the BS formula $C(S_0,K,\sigma,r,T)=S_0\Phi(...
Assuming the filtration is generated by Brownian Motion, you know that the price of a contingent claim is just the expectation under the risk neutral measure $Q$. Hence for the first one $$E_Q[\int_0^TS_udu]$$ where $S$ has the dynamic: $S_t=S_0e^{\sigma W^Q_t-(\frac{1}{2}\sigma^2-r)t}$, where $W^Q_t=W_t+\frac{\mu-r}...
I think we can compute the price of the first contingent claim at time 0 without using any models (e.g., Black-Scholes). For the first claim, $$ V_0 = e^{-r T} \mathbb{E}^Q \left[ \int_0^T S_u \; du\middle \vert \cal{F}_0\right] = e^{-r T} \int_0^T \mathbb{E}^Q \left[ S_u \middle \vert \cal{F}_0\right] du \; . $$ S...
https://quant.stackexchange.com
24,358
[ "https://mathoverflow.net/questions/24358", "https://mathoverflow.net", "https://mathoverflow.net/users/3816/" ]
I need a reference which states which of the "normal properties of vector spaces" carry over to free $\mathbb{Z}$-modules. Especially I am interested in things like: If you have a linear map between two free $\mathbb{Z}$-modules and you choose a basis for its kernel, can you choose a basis of a complementary space so ...
What carries over? As Peter pointed out, a submodule of a free $\mathbb{Z}$-module though free need not have a complement. Indeed each submodule of a free $\mathbb{Z}$-module is free, but a quotient module need not be, for instance $\mathbb{Z}/2\mathbb{Z}$. Also a $\mathbb{Z}$-module is free if and oly if it is projec...
You can write your map as a matrix. Moreover, you can choose a different basis so that the matrix is in the Smith's normal formal. The complement to the kernel exists only if the Smith's normal form contains only ones and zeroes. That is about it and should be explained in many Algebra books, say, Artin's Algebra.
https://mathoverflow.net
588,010
[ "https://physics.stackexchange.com/questions/588010", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/112200/" ]
We know that an operator is Hermitian when: <span class="math-container">$\langle f|\hat{O}g\rangle$</span> = <span class="math-container">$\langle \hat{O} f|g\rangle$</span> Parity operator in 1D is simply defined as: <span class="math-container">$\hat{\Pi} f(x) = f(-x)$</span> I don't know anything about the eigenva...
Set <span class="math-container">$x=-\xi$</span> in <span class="math-container">$$ \int_{-\infty}^{\infty} f(x)g(-x)\,dx $$</span> to get <span class="math-container">$$ \int_{-\infty}^{\infty} f(x)g(-x)\,dx=\int_{+\infty}^{-\infty}f(-\xi)g(\xi)d(-\xi)\\ = - \int_{+\infty}^{-\infty}f(-\xi)g(\xi)d\xi= \int_{-\infty}^{+...
Regarding eigenvalues, notice that the parity operator is an involution, in the present context means it is it's own inverse. Next, use that every function can be expressed as the sum of its symmetric and antisymmetric part. Think that it does the job. Please note that we assume the operator is hermitian with respect t...
https://physics.stackexchange.com
153,417
[ "https://electronics.stackexchange.com/questions/153417", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/66376/" ]
I recently got a job dealing with FPGAs. My first project is to modify an old board that uses an FPGA + MCU + Flash setup into something like FPGA (with soft core) + Flash, so we'll have one less component to deal with. I was told the purpose of the MCU in the old board was to program the FPGA on startup (configuratio...
The most useful thing about using a soft core CPU is the fact that it's customisable. Most microcontroller chips come with a set number of on-board peripherals: I2C, SPI, GPIO, PWM channels are all limited to however many they give you. In a soft core processor, if you need 10 I2C channels and nothing else, then you ...
If the ONLY purpose of the MCU on the old design was to load the FPGA, then on the new design, you're going to be using one of the self-configuration methods for the FPGA, and you won't need an MCU at all (soft or otherwise). But if the MCU was doing anything else at all, then your soft-core CPU will be doing those ot...
https://electronics.stackexchange.com
8,631
[ "https://softwareengineering.stackexchange.com/questions/8631", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1785/" ]
When you are defining a function/variable/etc and are not sure what to name it, what do you name it? How do you come up with a name? If you use a <em><strong>temporary</strong></em> name as a place-card until you give it it's real name, what temporary name do you use? <hr /> <h3>update</h3> I have been using things lik...
It's nearly impossible to not be able to think of a name for an artifact you want to design. You may not like what name you come up with because it isn't concise or sexy, but if you think too hard, you'll end up with a poorly named artifact. Let's say you have something that helps you construct objects, but you don't ...
I always try to give my variables and functions <strong>great names</strong>. If I can't think of a great name, I'll settle for a <strong>good name</strong>. If I can't come up with a good name, I'll use an <strong>okay name</strong>. I have never, in 15 years of professional programming, been unable to come up with...
https://softwareengineering.stackexchange.com
241,895
[ "https://mathoverflow.net/questions/241895", "https://mathoverflow.net", "https://mathoverflow.net/users/50901/" ]
Consider the first order nonlinear ODE problem: $$ y'(x)=\frac{1+ay(x)x}{1+by(x)x}, \quad x&gt;0 $$ where $a, b&gt;0$ are some constants. I would like to know if these kind of equations were studied somewhere else (i.e., existence of global solutions, uniqueness etc). Any references will be helpful. Remarks: ...
You might find it useful to make a change of variables to reduce the equation to a more familiar form. For example, if we assume, as we may, that $a$ and $b$ are not equal, then we can substitute $y = (z+ax)/b$, where $z$ is a new unknown, and then the equation can be written in the form $$ \frac{dx}{dz} = \frac{(1 + ...
<em>Mathematica</em> does give solutions (in terms of the Lambert $W$ function) for specific values of $a, b.$ it's just that it finds different numbers of solutions for different $a, b$ so can't formulate a general answer. for example, for $a=3, b=7,$ it gives: $$\left\{\left\{y(x)\to \frac{1}{21} \left(-4 W\left(-\f...
https://mathoverflow.net
144,619
[ "https://mathoverflow.net/questions/144619", "https://mathoverflow.net", "https://mathoverflow.net/users/2273/" ]
$\newcommand{\C}{\mathbf{C}} \newcommand{\D}{\mathbf{D}}$ Let $\C$ be a category with pullbacks. Taking any choice of pullbacks gives us re-indexing functors $f^* \colon \C /Y \to \C/X$, and these will be functorial in $f$ up to natural isomorphism, in that $g^* \cdot f^* \cong (f \cdot g)^*$. However, these will usu...
<strong>No, it is not always possible to make a strictly functorial choice of pullbacks.</strong> Four years later, I found a simple (if contrived) counterexample for this: Let $\newcommand{\C}{\textbf{C}}\C$ be any full subcategory of $\textbf{FinSet}$ containing infinitely many sets of size 2, and at least one set o...
Many years ago, Peter Freyd published (I think he published it) a paper in which he showed that while it was possible to replace any category with products by a category with canonical products, the same could not be done for pullbacks. The only thing I remember about the paper was the use of the word "table" for some...
https://mathoverflow.net
470,659
[ "https://physics.stackexchange.com/questions/470659", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/227271/" ]
If we have two bodies of considerable mass and charge both .Will we consider both its gravitational force and electrostatic force to calculate its acceleration ? Why (not) ?
The comparison which is often made when discussing the forces acting within a nucleus is that for two protons where the ratio of the electrostatic repulsion to the gravitational attraction is found. <span class="math-container">$$\frac{1}{4\pi \epsilon_0}\frac {q_{\rm p}q_{\rm p}}{r^2} \quad{\Large{:}}\quad G \frac{m...
The Newton's Second Law of Motion states that: <span class="math-container">\begin{align} \mathbf{F} \; = \; m \mathbf{a} \end{align}</span> <ul> <li><span class="math-container">$m$</span> is the mass of the point particle</li> <li><span class="math-container">$\mathbf{a}$</span> is the acceleration of the point p...
https://physics.stackexchange.com
492,919
[ "https://physics.stackexchange.com/questions/492919", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/208825/" ]
The momentum operator for one spatial dimension is <span class="math-container">$-i \hbar\frac{\mathrm d}{\mathrm dx}$</span> (which isn't a vector operator) but for 3 spatial dimensions is <span class="math-container">$-i\hbar\nabla$</span> which is a vector operator. So is it a vector or a scalar operator?
<span class="math-container">$-i\hbar \frac{d}{dx}$</span>, a scalar, is the <em>position space representation</em> of <span class="math-container">$\hat{p}_x$</span>, the <span class="math-container">$x$</span> component of the momentum operator, a scalar. The momentum operator itself, <span class="math-container">$\h...
Momentum is a vector operator. Period. When restricted to one-dimensional problems, momentum becomes a one-dimensional vector, which coincides with scalars in that space.
https://physics.stackexchange.com
45,687
[ "https://mathoverflow.net/questions/45687", "https://mathoverflow.net", "https://mathoverflow.net/users/10217/" ]
Hi, Is it true that for every locally compact separable metric space $E$ there exists a sequence $(K_n)_{n\in\mathbb{N}}$ of compact subsets of $E$ such that $K_n\subset\stackrel{\circ}{K_{n+1}}$ and $\cup K_n = E$ ? I’m almost sure this is false but I can’t find a counterexample. Thank you.
I think the following argument works under your hypothesis: Consider $\mathcal{B}=\{B_n\}$ a countable basis of the topology of $E$ such that $\overline{B_n}$ is compact for any $n$ (this exists since $E$ is a separable metric space, thus, it has a countable basis and then a basis like this is constructed using local ...
Sure. Let $\{x_1,x_2,\ldots\}$ be dense in $E$, let $K_0=\emptyset$ and let $K_n$ be a compact neighbourhood of $K_{n-1}\cup\{x_n\}$ for $n=1,2,\dots$. Just make sure that $K_n$ contains a sufficiently large ball around $x_n$: Say if $\epsilon&lt;1$ and $B_{2\epsilon}(x_n)$ is precompact, then insist on $B_\epsilon(x_n...
https://mathoverflow.net
1,912,330
[ "https://math.stackexchange.com/questions/1912330", "https://math.stackexchange.com", "https://math.stackexchange.com/users/345851/" ]
<blockquote> <strong>Question</strong> : Let $P(x)$ be the quadratic $Ax^2 + Bx + C$. Suppose that $P(x) = x$ has unequal real roots. Show that the roots are also roots of $P(P(x)) = x$. Find a quadratic equation for the other two roots of this equation. Hence solve $(y^2 - 3y + 2)^2 - 3(y^2 - 3y + 2) + 2 - y = 0...
Suppose that the root of $Ax^2+(B-1)x+C$ are $\alpha$ and $\beta$ . Then $\alpha+\beta=\frac{-(B-1)}{A}$ and $\alpha\beta=\frac{C}{A}$. Consider $A(Ax^2+(B)x+C)^2+B(Ax^2+(B)x+C)+C-x$. Two of its roots are known . If we use sum of roots formula and subtract the sum of known roots we get the sum of remaining two roots as...
The special case: Since the (NB: distinct) roots of $P(y)-y$ are also both roots of $P(P(y))-y$, the first polynomial must be a divisor of the second, so it suffices to make a polynomial division: $$ P(P(y))-y= y^4-6y^3+10y^2-4 y : P(y)-y = y^2-4y+2= y^2-2y$$ from which we get the supplementary roots: 0 and 2. (In addi...
https://math.stackexchange.com
41,429
[ "https://mathoverflow.net/questions/41429", "https://mathoverflow.net", "https://mathoverflow.net/users/3233/" ]
Given two smooth elliptic curves $C_1$ and $C_2$ over $\mathbb{C}$. Assume they are not isogenous. I'm interested in the structure of $Pic(A)$ and $Pic^{0}(A)$ for $A:=C_1 \times C_2$. Reading Birkenhake/Lange - Complex Abelian Varieties, i think this has to do with correspondences of curves. Since an elliptic curve i...
Yes: in fact $Pic^0(C_1\times C_2)=Pic^0(C_1)\times Pic^0(C_2)$ for any pair of curves. The fact that $C_1$ and $C_2$ are not isogenous in your case only affects the Neron-Severi group $Pic/Pic^0$ of $C_1\times C_2$, exactly for the reasons you describe.
Am I missing something? Doesn't this hold for arbitrary smooth pairs of varieties using the Kunneth decomposition?
https://mathoverflow.net
36,816
[ "https://softwareengineering.stackexchange.com/questions/36816", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1961/" ]
I have listed Ruby as a skill on my resume becuase I've been programming in Ruby for 5 years while I work on my Ph.D. thesis. I've mostly been using it to implement natural language processing algorithms. I'm starting to look for a job, and I posted my resume to a few sites (as an extra bonus when applying to certain o...
This is a good question. I would leave your resume alone. It's good to filter out languages you are not comfortable working with, but do not filter out frameworks. You don't know what version of your resume will be sitting on someone's desk when they become interested in you. By the time they see it, you might be a we...
You could tell them you're very good with Ruby (assuming you ARE good with Ruby) and that you'd be willing to learn Rails as a part of a new job (assuming you ARE willing and interested to learn the Rails framework). On-the-job training is not that uncommon. I had to pick up JavaEE, Spring, Hibernate on the job. I had ...
https://softwareengineering.stackexchange.com
513,050
[ "https://physics.stackexchange.com/questions/513050", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/246938/" ]
I understand that electrostatic potential is scalar because the curl of the field is zero, and this implies the electrostatic field is the gradient of the scalar potential to satisfy this. Similarly the divergence of a magnetostatic field is zero so a magnetostatic field is the curl of the vector potential. But what a...
For some vector field <span class="math-container">$\mathbf F$</span>, you can use a scalar potential (unique up to a constant) whenever <span class="math-container">$\nabla\times\mathbf F=0$</span>, and you can use a vector potential (unique up to the gradient of a scalar field) whenever <span class="math-container">$...
The good hint is in the scalar or vectorial properties of the sources. For the magnetic field, the sources are currents, which are vectors since currents flows in specified direction: it’s no surprise the associated potential should be a vector. For (time-independent) electric fields not induced by magnetic field...
https://physics.stackexchange.com
230,374
[ "https://softwareengineering.stackexchange.com/questions/230374", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/109905/" ]
A question that has been vexing me lately has been about how to effectively test (end-to-end) features in a distributed system. Particuarly, how to effectively manage (through time) test data for feature testing. The system in question is a typical SOA setup. The composition is done in JavaScript when call to severa...
I faced a similar question recently. The answer so far has been a mix of both. Some shared data in a single place, other data created by relevant components/tests. I found shared, centralized data convenient when it reduces common boilerplate, but it's costlier to maintain because it must be reconciled with all the my...
Trying to provision for a widely distributed system is a <strong>hard</strong> thing to do. Assumption 1: You don't have control over the databases at the level where you can reset them readily. Institutional test databases tend to be used, often heavily, by a number of separate development/maintenance groups. Hence, ...
https://softwareengineering.stackexchange.com
188,371
[ "https://mathoverflow.net/questions/188371", "https://mathoverflow.net", "https://mathoverflow.net/users/11919/" ]
In preparing some practice problems for my complex analysis students, I stumbled across the following. It is not hard to show, using Liouville's theorem, that $$\pi\cot(\pi z)=\frac{1}{z}+\sum_{n=1}^\infty\left(\frac{1}{z+n}+\frac{1}{z-n}\right),$$ which implies that $$-\frac{\pi z}{2}\cot(\pi z)=-\frac{1}{2}+\sum_{k=1...
This is not a completely satisfactory answer. I would like a simpler one. Nevertheless still probably a good exercise in Complex variables. I will only sketch it. What we want to show is equivalent to $$\zeta(2n)=-\frac{1}{2\pi i}\int_{C_r}\frac{\pi z \cot(\pi z)}{2z^{2n+1}}\,dz,\qquad n\ge 0,\quad n\in{\bf Z}.\tag{1...
Here is an explanation based on the Euler-Maclaurin summation formula. (Or rather, since we'll only ever need two terms of the Euler-Maclaurin summation, it's really more or less just "the trapezoid rule".) I think it's a good explanation because it sticks to the general structure of the argument outlined in the questi...
https://mathoverflow.net
20,650
[ "https://security.stackexchange.com/questions/20650", "https://security.stackexchange.com", "https://security.stackexchange.com/users/11679/" ]
In our office we are blocking sites like Facebook, Twitter etc.The problem is that some of the users bypass our proxy and firewalls through external proxy sites like <code>www.youhide.com</code> or <code>www.freezethefirewall.com</code>. Problem: There's an enormous number of proxy sites on the Internet.<br /> Is ther...
The technical solution is to monitor access and block new offending sites as they appear. This isn't a technical problem, it's a policy problem. You cannot possibly block every proxy out there, so you must stop the problem at its source - the employees. You need them to understand <em>why</em> you're blocking those si...
Truth is, there's really no reliable way to provide general Internet access while at the same time removing access to sites you don't want. Back when I worked in a cubicle I used to waste my time finding new and interesting ways to circumvent all the IT security policies. And I can tell you with relative certainty th...
https://security.stackexchange.com
175,213
[ "https://stats.stackexchange.com/questions/175213", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/91040/" ]
I would like to have your help for (simple) correlation problems. I've data about the measurement of some substances in the organs of animals (more than 20 samples).My data are obtained by different sources (journal articles, report, etc) I need to check the presence of the correlation among different data. For exampl...
The first answer is correct. Let's say we flip a coin with bias $p$ (probability of heads) until it lands on heads, and the number of tosses is $X$. I'll demonstrate a more direct calculation and then you'll see why the recursive calculation works. $$ \mathbb{E}[X] = 1p + 2p(1-p) + 3p(1-p)^2 + 4p(1-p)^3 + \dots $$ ...
The question does not clearly define the three cases. The problem is either that the cases are not mutually exclusive or that the probability of one of those is wrong. In this answer, I explain the solution for two cases (which is already contained in the question) and (a) solution for three cases. NB: I assume the coi...
https://stats.stackexchange.com
165,975
[ "https://electronics.stackexchange.com/questions/165975", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/38282/" ]
My resource shows the following common-emitter transistor configuration and claims that the output voltage compared to the input voltage is inverted (higher input voltage means lower output voltage): <img src="https://i.stack.imgur.com/dLw0O.png" alt="common emitter"> This makes sense to me. But then he shows the fo...
In both cases, the output voltage is measured between 'ground' and whichever point has been defined as the output for that circuit configuration.<br> So in a common-emitter circuit (1), the output is defined as being at the collector.<br> But in a common-collector circuit (2), the output is defined as being at the emit...
No, you are mistaken in your analysis. When the base is driven harder in a common collector NPN circuit, the transistor passes more current from collector to emitter and this raises the emitter voltage with respect to 0V. In a common emitter circuit, with a higher base drive, the collector voltage falls towards 0V pot...
https://electronics.stackexchange.com
137,214
[ "https://security.stackexchange.com/questions/137214", "https://security.stackexchange.com", "https://security.stackexchange.com/users/-1/" ]
I know that YouTube videos are processed by Google in order to prevent them from having any malware in them. But I was wondering, are image thumbnails processed in any way to prevent them, or at least, make it less likely that they contain browser or library exploits? Because I believe that this would be possible, but...
They can, but it is VERY unlikely. Since both Youtube videos and images go tru multiple stages of cutting, converting to other formats etc. it's very unlikely that your exploit would be kept in such environment. Best it could do is hijack one of Google's converters where it would probably easily raise some red flags o...
I imagine a company like Google/YouTube takes proper/standard security measures with all uploads/files. If there was an oversight in this malware via thumbnails would have been targeted long ago. While I don't know the particular procedures they take the resampling of the image, verifying it is an image, and removal o...
https://security.stackexchange.com
97,738
[ "https://physics.stackexchange.com/questions/97738", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/39913/" ]
I am currently learning general relativity, and in the textbooks that I am reading, temperature seems to be treated as a scalar field, extraneous to the geometry of spacetime. This is puzzling me, because I would naively believe that purely geometric data, namely the stress-energy tensor, should be enough to determine...
"Thermodynamics of continuum" is the discipline that defines the temperature as a classical field i.e. a function of the coordinates $(x,y,z,t)$ that parameterize a continuum (solid, liquid, gas, plasma) and its evolution in time. (Temperature cannot be a quantum field because it doesn't really correspond to any opera...
For temperature to make sense the system must be in approximate local thermal equilibrium. In this case the energy momentum tensor is (approximately) of the ideal fluid form $$T_{\mu\nu}=(\epsilon+P)u_\mu u_\nu + P g_{\mu\nu}\, . $$ This means that that $T_{00}$ in the local rest frame is the energy density of the matt...
https://physics.stackexchange.com
96,168
[ "https://cs.stackexchange.com/questions/96168", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/86098/" ]
We are given an array A of size n and we have to rotate it in left direction by d positions. So e.g. if <code>A = {1, 2, 3, 4, 5, 6, 7}</code> then for <code>d = 2</code>, the resultant rotated array is <code>{3, 4, 5, 6, 7, 1, 2}</code>. One algorithm which does this goes as follows: <ol> <li>Reverse <code>A[0..d-1]...
Here is a proof by picture, which follows the steps of the algorithm: $$ 0,\ldots,d-1,d,\ldots,n-1 \\ d-1,\ldots,0,d,\ldots,n-1 \\ d-1,\ldots,0,n-1,\ldots,d \\ d,\ldots,n-1,0,\ldots,d-1 $$ You can easily turn this into a formal proof by giving a formula for the permutation after each step, which you can easily prove co...
First, we can see the rotation problem (as described in the question) as equivalent to: interchange of two blocks of elements which are at index-ranges <span class="math-container">$[0, d-1]$</span> and <span class="math-container">$[d, n-1]$</span>. Let's call these blocks, with elements exactly as the original array ...
https://cs.stackexchange.com
4,941
[ "https://cs.stackexchange.com/questions/4941", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/3101/" ]
Dynamic programming with large number of subproblems. So I'm trying to solve this problem from Interview Street: <blockquote> <strong>Grid Walking</strong> (Score 50 points)<br> You are situated in an $N$-dimensional grid at position $(x_1,x_2,\dots,x_N)$. The dimensions of the grid are $(D_1,D_2,\dots,D_N$). In o...
The different dimensions are <strong>independent</strong>. What you can do is compute, for each dimension <em>j</em>, how many different walks there are in just that dimension which take $t$ steps. Let us call that number $W(j,t)$. From your question, you already know how to compute these numbers with dynamic programmi...
Let's extract a formula for $\newcommand{\now}{\operatorname{now}}\now(s,x_1,\dots,x_n)$ from your code (for an inner cell, that is ignoring border cases): $\qquad \begin{align} \now(s,x_1,\dots,x_n) = \phantom{+} &amp;\sum_{i=0}^n \now(s-1,x_1,\dots,x_{i-1},x_i + 1, x_{i+1},\dots,x_n) \\ + &amp;\sum_{i=0}^n\now...
https://cs.stackexchange.com
115,431
[ "https://dba.stackexchange.com/questions/115431", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/7820/" ]
I'm developing a SQL Server 2012 database and I have a question about a One-to-Zero-Or-One relationship. I have two tables, <code>Codes</code> and <code>HelperCodes</code>. A code could have zero or one helper code. This is the sql script to create these two tables and their relationships: <pre><code>CREATE TABLE [db...
To answer the question in the title, no, all the primary columns have to be <code>NOT NULL</code>. But without altering the design of the tables, you could add a filtered index on the <code>Code (HelperCodeId)</code> column: <pre><code>CREATE UNIQUE INDEX FUX_Code_HelperCodeId ON dbo.Code (HelperCodeId) WH...
Try using a unique constraint instead. Supposedly the ANSI standard declared nulls as a primary key to be invalid, but I have never seen the standard and don't wish to purchase it to verify this. Not having null keys seems to be one of those things that developers have a very hard belief on one way or the other. My p...
https://dba.stackexchange.com
51,179
[ "https://electronics.stackexchange.com/questions/51179", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/2191/" ]
Many years ago I bought a multi-function testing screwdriver, the instruction sheet (which I have mislaid) claimed you could use it for a surprising number of tasks: <ul> <li>Continuity of fuses</li> <li>Mains voltage present (barrel marked &quot;70-240V&quot; and, amusingly, &quot;CE&quot;)</li> <li>Locating a conduc...
It's an LED turned on by a transistor! The base (gate?) lead connects to the screwdriver blade. Yes, all sorts of tricks and useful applications are possible with something this simple. The resistor is a few-KVs high-volt type, probably chosen out of extreme safety paranoia (since customers might use it on a 440V ...
Traditionally such devices used a Neon bulb with a ~~~~ 100V strike voltage, a HIGH value resistor and capacitive body coupling to ground. This one MAY instead use a MOSFET. AC capacitive couple signal turns on MOSFET by driving gate high enough and LED is driven via batteries. Gate sensitivity can be 1V or less if d...
https://electronics.stackexchange.com
79,930
[ "https://security.stackexchange.com/questions/79930", "https://security.stackexchange.com", "https://security.stackexchange.com/users/45159/" ]
So I cleaned up some malicious PHP scripts from a client's site and I've been monitoring for follow up connections to the scripts. Of course, I've found a LOT of IPs requesting the files. Too many to try and blacklist and too many different netblocks to block at a high level. I'm thinking about redirecting all su...
I'm afraid all those IPs are nothing but victims clicking on <em>phished/malicious</em> links. Your client was hacked and malicious scripts were hosted on their server in order to infect inconspicuous victims. Whether you like it or not, your client contributed to spread malware. The next step for you is to just serv...
It is probably the same tool/malware and yes, it is also probably an automated botnet. You were once in the infected hosts list, so they could probing to learn if the disconnection was due to disinfection, WAF blocking or proxies along the way... Well, it depends on your network structure. If you control the front-fac...
https://security.stackexchange.com
146,687
[ "https://math.stackexchange.com/questions/146687", "https://math.stackexchange.com", "https://math.stackexchange.com/users/27071/" ]
Can comeone help me? How do I show that every group of order 90 is not simple?
<h3>First attempt:</h3> <span class="math-container">$90=2\cdot 3^2\cdot 5\Longrightarrow\,$</span> by Sylow theorems, if a group of order 90 is simple then it must have six 5-Sylow subgroups, but then we can make the group act on this sbgps. and thus obtain a homomorphism into <span class="math-container">$\,S_5\,$</s...
This is a very very late answer. But anyway I'll post for the use of people who are learning form this site (like myself). First note that <span class="math-container">$90=2\times 3^2\times 5$</span> and of the form <span class="math-container">$pq^2r$</span> with three different primes (like <span class="math-containe...
https://math.stackexchange.com
2,368
[ "https://datascience.stackexchange.com/questions/2368", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/88/" ]
What are the common/best practices to handle time data for machine learning application? For example, if in data set there is a column with timestamp of event, such as "2014-05-05", how you can extract useful features from this column if any? Thanks in advance!
I would start by graphing the time variable vs other variables and looking for trends. <h2>For example</h2> <img src="https://i.stack.imgur.com/QGYUC.png" alt="enter image description here"> In this case there is a periodic weekly trend and a long term upwards trend. So you would want to encode two time variables...
In several cases, data and events inside a time series are seasonal. In such cases, the month and the year of the event matters a lot. Hence, in such scenarios you can use binary variables to represent if the event is during a given month/year or not. Hope this answers your question. If not, kindly be a little more spe...
https://datascience.stackexchange.com
171,799
[ "https://chemistry.stackexchange.com/questions/171799", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/131836/" ]
Knowing that the second law of thermodynamics states that everything tends to entropy, why does water and other volatile substances spontaneously evaporate, getting energy to do so from the surface they were touching? Wouldn't that unobey said law, as the substance would get more energetic and the surface it was previo...
The first thing OP has tried was the correct step, by finding the concentration of cyclobutane using the first-order rate law: <span class="math-container">$$ \mathrm [A]_t = [A]_0 e^{-kt}$$</span> where <span class="math-container">$\mathrm [A]_t = [\ce{C4H8}]_t$</span> when <span class="math-container">$t = \pu{120 s...
Found it. So, after 2 minutes, the concentration of cyclobutane is around <span class="math-container">$0.250$</span> M, which means that around <span class="math-container">$0.750$</span> moles of cyclobutane is left in the reaction. If <span class="math-container">$0.750$</span> moles of cyclobutane are left, this me...
https://chemistry.stackexchange.com
463,239
[ "https://math.stackexchange.com/questions/463239", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Integrate $$\int{x^2(8x^3+27)^{2/3}}dx$$ I'm just wondering, what should I make $u$ equal to? I tried to make $u=8x^3$, but it's not working. Can I see a detailed answer?
<blockquote> $$\int{x^2(8x^3+27)^{2/3}}dx$$ </blockquote> It is certainly possible to work with $u = 8x^3$, but I'd suggest setting $u = 8x^3 + 27$. The key is to remember to compute and account for $\,du$. What you'll see is that for both $u = 8x^3$ and $u = 8x^3 + 27$, we have $du = 24x^2$. $$u = 8x^3 + 27 \im...
Now, $u = 8x^3 + 27$ is a choice that makes less work for you. But, one thing that students should understand is even if you don't make the best choice, it still might work. You tried $u = 8x^3$. In that case $du = 24x^2 \,dx$ and your integral becomes $$\int{x^2(8x^3+27)^{2/3}}dx = \frac{1}{24} \int (u+27)^{2/3} \,...
https://math.stackexchange.com
425,593
[ "https://softwareengineering.stackexchange.com/questions/425593", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/150590/" ]
I have several global variables that I need to store in a database. These variables rarely change, but when they do, all installed instances of the application must updated to those changes, which is why I think the central database is the appropriate place for them. The variables are not linked to any &quot;concept&qu...
Like for almost any problem in software design, there is no &quot;best way&quot; or &quot;standard way&quot; of doing things. Both approaches you mentioned are <strong>valid</strong> solutions for storing isolated, global parameters in a database, and you should not refrain from using them just for some superstitious g...
A database with one row serves its purpose and isn’t particularly bad in any way. Have an API that returns it as JSON, and make sure your client code can at least find unexpected items. That’s it. If you need an <em>immediate</em> reaction find some way to send push notifications out. Easy(ish) for iOS or Android clien...
https://softwareengineering.stackexchange.com
318,385
[ "https://stats.stackexchange.com/questions/318385", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/186658/" ]
I am confused as to how I should analyse my data since I think it violates almost all possible assumptions. I applied several hormoneconcentrations to plants and counted the amount of roots. Underneath is part of my dataset. <pre><code>LongRoots0ppm = c(2, 1, 3, 0, 3, 3, 3, 1, 3, 2, 4, 2, 3, 2, 2) LongRoots13ppm =...
One way to look at this is by Taylor approximation. Remember $$f(x+\Delta x)\approx f(x)+\Delta x f'(x)+\frac 1 2 \Delta x^2 f''(x)+\frac 1 6 \Delta x^3f'''(x)+\dots$$ One sided looks like this $$\frac{f(x+\Delta x)-f(x)}{\Delta x}\approx f'(x)+\frac 1 2 \Delta x f''(x)$$ Two sided looks like this $$\frac{f(x+\Del...
For a theoretical analysis you need to read a book on numerical analysis. But intuitively it seems reasonable to appriximate the tangent line with a secant between two point symmetric about the point of tangency. Lets look at a simple numerical example, let $f(x)=x^2$ and we are interested in the derivative at $x_0=0$,...
https://stats.stackexchange.com
3,026,202
[ "https://math.stackexchange.com/questions/3026202", "https://math.stackexchange.com", "https://math.stackexchange.com/users/565964/" ]
How do you prove: <blockquote> Suppose <span class="math-container">$x$</span> is a real number. if <span class="math-container">$x^3-x&gt;0$</span> then <span class="math-container">$x&gt;-1$</span> </blockquote> It seems really easy to do the contrapositive here i think but dont now how to word it. So suppose <s...
<span class="math-container">$$ x(x-1)(x+1)&gt;0\implies x\in(-1,0)\cup (1,\infty)\implies x&gt;-1$$</span>
The contrapositive of a statement "<span class="math-container">$P \Rightarrow Q$</span>" is "<span class="math-container">$\neg Q \Rightarrow \neg P$</span>." The negation of "<span class="math-container">$x &gt; -1$</span>" would <strong>not</strong> be "<span class="math-container">$x \leq 1$</span>", it would be "...
https://math.stackexchange.com
120,456
[ "https://cs.stackexchange.com/questions/120456", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/115366/" ]
Consider this, I have n coins and I have placed them in a random order (1st coin is Head, 2nd is Tails etc.). You do not know the order. You can flip one coin at a time and then I tell you if all the coins face the same side or not. You continue flipping until all coins are facing the same side.<br> <br> I tried breaki...
Here is a general algorithm. The maximum number of flips needed is <span class="math-container">$2^{n-1}-1$</span>. Input: coin 0, coin 1, coin 2, ..., coin <span class="math-container">$n-1$</span> Procedure:<br> <span class="math-container">$\quad$</span> If all coins face the same side, return. <span class="math...
Without going into the details, you are looking for something that's known as a Gray code. Any cyclic Gray code that has the all zero bitstring at the opposite part of the cycle as the all one bitstring gives a minimal expected solution time assuming an uniform random input.
https://cs.stackexchange.com
3,935,609
[ "https://math.stackexchange.com/questions/3935609", "https://math.stackexchange.com", "https://math.stackexchange.com/users/857630/" ]
I came across a variation of the birthday problem asking &quot;in a room of <span class="math-container">$4$</span> people what is the probability that at least <span class="math-container">$3$</span> of them share the same birthday&quot;. I was unsure of the answer and thought that it would be P(<span class="math-cont...
Choose any point and call it <span class="math-container">$A_1$</span>. Label the points in counterclockwise manner <span class="math-container">$A_2,\ldots,A_{30}$</span> . Second vertex can be any from <span class="math-container">$A_5$</span> to <span class="math-container">$A_{27}$</span>. When second is <span clas...
An alternative approach is to use the stars and bars method. We can generalize and consider instead of triangles, <span class="math-container">$k$</span>-sided polygons. Also let <span class="math-container">$d$</span> be the minimum &quot;distance&quot; among vertices of those <span class="math-container">$k$</span>-s...
https://math.stackexchange.com
49,000
[ "https://mechanics.stackexchange.com/questions/49000", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/33230/" ]
So I just got Meguiar's Cleaners Wax and it's my first time waxing. I'm going to completely hand-wax my car myself. Should I wipe the wax on in a circular motion or back and forth? Any other tips?
I'd suggest a good starting point for you to look at is the tuning options available within the Gran Turismo games (4, 5 or 6, haven't played the earlier games so I don't know how the tuning options vary in those games). Lots of the time they don't allow you to do modifications you couldn't do in real life (due to rest...
You can add anything including turbos , intercoolers, fuel injection, nox injection - just takes money and technical knowledge. If you want a relevant example of design progression look at the inline 6 cylinder Jaguar engine that dates back to the late 1930's or 40's - original power about80 bhp and when they finished...
https://mechanics.stackexchange.com
6,625
[ "https://electronics.stackexchange.com/questions/6625", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1870/" ]
I'm currently trying to lay out my first from scratch project on veroboard. While I get connecting things in series and parallel I'm trying to work out if a + shaped connection and a pair of + shapes would be equivalent. <img src="https://i.stack.imgur.com/O3bfV.png" alt="T shaped connections"> Would they?
Yes. For simple circuits, so long as all the same electrical connections exist then the circuit is equivalent. (Only for high speed or some analogue circuits do wire length and shape start to have effects)
For simple projects on Veroboard, they're exactly equivalent electrically. However, there are other things you need to consider. However, I think that a better question is to ask whether they're equivalent to you. There's been some research (I can't remember where at the moment - Can anybody help?) that there's an...
https://electronics.stackexchange.com
398,857
[ "https://softwareengineering.stackexchange.com/questions/398857", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/3736/" ]
How do you plan a sprint for the same product with two releases when the same team will be working on both releases during the sprint cycle? To give some background, our product gets released out to customers every 6 months and we provide weekly automated releases with bug fixes and small features to those customers. ...
Sprints are different than releases. Although the outcome of a Sprint is a "potentially releasable Increment", the team can produce a "potentially releasable Increment" at any point in the Sprint and the Product Owner can release it at any point. In the context of the Sprint, the important thing to consider is if the ...
In Scrum, there is no correlation between Sprints and Releases. A release can contain the work done in multiple sprints, but at the same time can multiple releases be done during one sprint. It should be possible to indicate for each ticket (user story, bug, etc.) in which release it is expected to be delivered and se...
https://softwareengineering.stackexchange.com
553,588
[ "https://electronics.stackexchange.com/questions/553588", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/240856/" ]
Is it possible to approximate a battery's current (the &quot;right now&quot; kind of current) capacity, given its absolute capacity and a voltage measurement? An example: I have a 1s 260mAh LiPo that is at 3.75 volts. I must charge it to 3.85 volts to store it, but I'd like to have a rough approximation of how long tha...
The problem is that the first transistor to be illuminated brings the output voltage too close to the supply, it is not possible for the output voltage to go higher than that so the second and subsequent transistors cannot raise the voltage any higher. If you reduce the value of the 500k resistor so that a single trans...
When photo-transistors are connected in parallel, the way that is shown in your schematic, the <span class="math-container">\$V_{ce}\$</span> of each transistor will be equal, (assuming negligible voltage drop in the wires between the photo-transistors). As a result, the photo-transistor that is most conductive will do...
https://electronics.stackexchange.com
49,089
[ "https://engineering.stackexchange.com/questions/49089", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/35653/" ]
It's always said that jerk function should be smooth to avoid undesired vibrations. What exactly is the vibration in a cam follower mechanism and why is it important to avoid it?
I've seen similar action when a straw is in a glass of soda. Bubbles form on the straw, causing it to &quot;float&quot; upwards, then the bubbles break free and the straw sinks again. Rinse, lather, repeat. In both scenarios what we're seeing is the slow release of CO<sub>2</sub> from dissolved to gas-bubble phase. ...
It is CO<sub>2</sub> that is released from the liquid. As the liquid warms up, it is unable to hold as much of the CO<sub>2</sub> in a dissolved state. The CO<sub>2</sub> raises the gas pressure above the liquid. I think that you can figure out the rest.
https://engineering.stackexchange.com
209,307
[ "https://softwareengineering.stackexchange.com/questions/209307", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/4046/" ]
I am finishing up a decently sized Python/Shell project, and I'm wondering if there's a 'best practice' list of things to do when finishing up development. So far I've done: <ul> <li>pylint</li> <li>pycallgraph</li> <li>grep'ed for :TODO: and :FIXME:</li> <li>find orphan code</li> <li>some more documentation</li> <...
<ul> <li>make sure you have enough automatic tests</li> <li>run them!</li> <li>also test things for which you don't have automatic regression tests (for example, your install scripts)</li> <li>and make sure you have everything checked in into your SCCS (test that by checking everything out on a clean machine and see if...
Spend good amount of time on back-up plans to roll-back deployments in the case of failure or un-expected events. <h1>Back-up :</h1> <ul> <li>Prepare a checklist and add items to it</li> <li>Make sure you have a back-up plans for Database roll-back, scripts, etc.</li> <li>Remove logging code or check the production/t...
https://softwareengineering.stackexchange.com
186,546
[ "https://security.stackexchange.com/questions/186546", "https://security.stackexchange.com", "https://security.stackexchange.com/users/171075/" ]
While studying Nmap, I came across different port scans. Out of these XMAS and FIN scan caught my interest. Though XMAS scan sends FIN, URG and RST flags, the response is the same as that of a FIN scan, which only sends a FIN packet. How do I decide when to use XMAS or FIN scans when both have the same response and s...
The nmap documentation states the following for <code>NULL</code>, <code>FIN</code> and <code>Xmas</code> scans: <blockquote> When scanning systems compliant with this RFC text, any packet not containing SYN, RST, or ACK bits will result in a returned RST if the port is closed and no response at all if the port is o...
NULL, FIN, and Xmas scans all send packets without SYN, ACK, or RST flags. They <em>should</em> all get the same responses, according to the RFC, but different implementations may treat them differently. If you want to use one, it's best to find one open and one closed port by some other means (such as open source inte...
https://security.stackexchange.com
342,352
[ "https://softwareengineering.stackexchange.com/questions/342352", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/204301/" ]
I have a class <code>Item</code> that has a non-default constructor and doesn't have a default constructor. There is no default constructor because I don't want to have <code>Item</code> objects with some strange default values around. <pre><code>class Item { int a; public: Item(int a) : a(a) {} } </code>...
In a situation like yours, there are only a few real options <ol> <li>Allow creation of a default-constructed <code>Item</code>. This means adding a default constructor</li> <li>Return a (pointer to a) <code>Item</code> from <code>GetItem</code></li> <li>Take a <code>Item**</code> or <code>Item*&amp;</code> and let t...
You can use a pointer for the anotherValue Item. You don't have to call the constructor, you can pass it to the getItem function, you don't have to manage it, Because clearly you don't have the ownership of it.
https://softwareengineering.stackexchange.com
132,325
[ "https://softwareengineering.stackexchange.com/questions/132325", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/46293/" ]
I've recently had the misfortune of hiring a developer who failed to deliver a <strong>working</strong> product by the arranged date. I have the software, but it produces errors on installation. The developer said the product works. I had wanted to give the developer the benefit of the doubt, but they have ignored all...
From the attitude you have described, I don't think you can comfortably rely on the code you have even if some of the functions work. The guys don't look professional and I would not use such a software for anything serious. As a result hiring a consultant to look at it won't really work well if the software is large....
You have the right to sue, if you paid for work that didn't actually function. That is a significant threat, but be prepared to compensate for a refund.
https://softwareengineering.stackexchange.com
211,737
[ "https://math.stackexchange.com/questions/211737", "https://math.stackexchange.com", "https://math.stackexchange.com/users/44416/" ]
This is my university homework. I was on it for a day but I couldn't solve the problem. I found a implicitness solution for this problem: $f(2)=3$ $f(4)=11$ $f(n)=3f(n-2)+2f(n-4)$ I thought that it should be true but when I found an implicitness solution there was difference between implicit and explicit answers. C...
If I understand correctly, you’re trying to find a recurrence (and perhaps also a closed form) for the number of ways to tile a $3\times n$ checkerboard with $2\times 1$ dominoes. Clearly this is possible only when $n$ is even, and I agree that $f(2)=3$ and $f(4)=11$. Now let’s consider $f(2n)$ for some $n&gt;2$. For $...
If we define $m=\frac {n-2}2$ your recurrence becomes $f(m)=3f(m-1)+2f(m-2), f(0)=3, f(1)=11$. Using the standard technique of assuming a power law solution, the roots are $\frac {3 \pm \sqrt{17}}2$ and the solution is $f(m)=\left(\frac 32 + \frac {11}{\sqrt {17}}\right)\left(\frac {3 + \sqrt{17}}2\right)^m+\left(\fra...
https://math.stackexchange.com
494,426
[ "https://physics.stackexchange.com/questions/494426", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/177077/" ]
Suppose a homogenous magnetic field <span class="math-container">$\vec{B}$</span> in vacuum that varies with time, but always points in the <span class="math-container">$z$</span>-direction. This induces a curl in the electric field <span class="math-container">$\vec{\nabla} \times \vec{E} = -\frac{\partial B}{\partial...
The main reason this argument is giving counter-intuitive results is, as the comments suggest, boundary conditions. Generally speaking, taking domains to be infinite in the study of differential equations gives rise to 'badly behaved' functions - discontinuities, Dirac deltas and other non-differentiable objects are re...
<blockquote> Because of translational symmetry one could argue that if <span class="math-container">$\vec{E} $</span> is non zero in one point, it must be non zero everywhere. </blockquote> We can't, because we do not know anything about translation symmetry of electric field in this system. The system is not specified...
https://physics.stackexchange.com
607,437
[ "https://physics.stackexchange.com/questions/607437", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/128581/" ]
There are several points over which I stumble when studying Goldstein, 3rd ed., chap 8.1, concerning the matrix representation of the hamiltonian formalism. In (8.22) he assumes the lagrangian to be (with Einstein's convention) <span class="math-container">$ L(q_i,\dot{q}_i,t)=L_0(q,t)+ \dot{q}_i a_i (q,t)+ \dot{q}^2_i...
<ol> <li>Qmechanic is correct, eq. (1) has a typo and should have a factor of <span class="math-container">$1/2$</span> in front of the <span class="math-container">$T$</span>. If you don't find this satisfactory, then you might also argue that the <span class="math-container">$T$</span> in (1) has not been properly de...
The Hamiltonian is: <span class="math-container">$$H=\boldsymbol p^T\,\dot{\boldsymbol{q}}-L(\boldsymbol q~,\boldsymbol p)$$</span> with <span class="math-container">$$L=L_0(\boldsymbol q)+\dot{\boldsymbol{q}}^T\,\boldsymbol a+\frac 12 \dot{\boldsymbol{q}}^T\,\boldsymbol T\,\dot{\boldsymbol{q}}$$</span> <strong>Step I<...
https://physics.stackexchange.com
89,618
[ "https://physics.stackexchange.com/questions/89618", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/8821/" ]
The soft-photon theorem is the following statement due to Weinberg: <blockquote> Consider an amplitude ${\cal M}$ involving some incoming and some outgoing particles. Now, consider the same amplitude with an additional soft-photon ($\omega_{\text{photon}} \to 0$) coupled to one of the particles. Call this amplitude ...
The universality of the coupling of the photon to charged particles exhibited by this formula is only valid in the limit of ultrasoft photons. This is also known as the eikonal approximation, in which the photon couples only to the charge x velocity of the charged particle.
Since it is valid only in the low energy limit you can think as it is the leading term of an expansion. An expression of this is that the photons with long wavelengths cannot resolve the internal structure of the source. But as you go higher energies ( next to leading order terms ) it starts to reveal the internal stru...
https://physics.stackexchange.com
15,068
[ "https://mathoverflow.net/questions/15068", "https://mathoverflow.net", "https://mathoverflow.net/users/290/" ]
I've just finished reading Ash and Gross's <em>Fearless Symmetry</em>, a wonderful little pop mathematics book on, among other things, Galois representations. The book made clear a very interesting perspective that I wasn't aware of before: that a large chunk of number theory can be thought of as a quest to understand...
If you want to go further in understanding this point of view, I would advise you to begin learning class field theory. It is a deep subject, it can be understood in a vast variety of ways, from the very concrete and elementary to the very abstract, and although superficially it appears to be limited to describing abe...
In the 1-dimensional case we are talking about class field theory, and I can't recall having seen anything better than Cox's book (already mentioned by Emerton) in this direction (undergrad etc.). With Artin's reciprocity law (the central role of the Frobenius elements in connection with reciprocity laws wasn't exactly...
https://mathoverflow.net
4,432,236
[ "https://math.stackexchange.com/questions/4432236", "https://math.stackexchange.com", "https://math.stackexchange.com/users/749669/" ]
I'm trying to understand a specific proof that <span class="math-container">$|\mathbb{R}| = |\mathcal{P}(\mathbb{N})|$</span>. I'm paraphrasing it below. The proof relies on the Schroder-Bernstein theorem. <blockquote> For each <span class="math-container">$A \subset \mathbb{N}$</span>, we associate a real number <span...
I assume that you mean that the space <span class="math-container">$E$</span> has finite measure and that <span class="math-container">$f_n(x) \to f(x)$</span> for almost every <span class="math-container">$x$</span>. You can write, for <span class="math-container">$K &gt; 0$</span> : <span class="math-container">$$ \V...
Since <span class="math-container">$x^{1 + \beta}/x \to \infty$</span> as <span class="math-container">$x \to \infty$</span>, <span class="math-container">$\{|f_n|^p : n \in \mathbb{N}\}$</span> is uniformly integrable. By the uniform integrability <span class="math-container">$L^p$</span> convergence theorem, it follo...
https://math.stackexchange.com
5,322
[ "https://mechanics.stackexchange.com/questions/5322", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/2625/" ]
I am waiting for a 2013 STI and have been looking into upping the performance, but before I go down that road I would like to thoroughly understand the components in a forced induction vehicle. I've done a bit of reading but I'm still confused as to the difference between a blow-off valve and a wastegate. These two co...
The waste gate is designed (as you'll see in Bob's excellent answer to his linked question) to avoid spinning the turbo up unless needed. This saves fuel and wear. The blow off valve or dump valve is designed to stop a compression wave passing back into the turbo when you close the throttle, as this wave could stall t...
You've understood how they work, now you must think about "when" they work to understand why they're there. A turbo utilizes the exhaust gas to spin a turbine which which is mechanically coupled to another impeller on the intake side which forces air into the engine. As the engine produces more exhaust, the turbo spi...
https://mechanics.stackexchange.com
1,229,349
[ "https://math.stackexchange.com/questions/1229349", "https://math.stackexchange.com", "https://math.stackexchange.com/users/230330/" ]
I happened to create this problem and solved it. I used only basic algebra and trigonometry. I thought it was a fun problem, so I wanted to expose the problem to the public. Please provide an exact answer.
$$2^{\cos^2x}=2^{1-\sin^2x}=\frac2{\sqrt[4]{16^{\sin^2x}}}=\frac2{\sqrt[4]5}$$
$$2^{\cos^2 x}= 2^{1-\sin^2 x}=\frac{2}{2^{\sin^2 x}}=\frac{2}{\sqrt[4]{5}}$$
https://math.stackexchange.com
54,786
[ "https://quant.stackexchange.com/questions/54786", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/42992/" ]
Suppose someone buys $4bn of a particular stock over the period of a few weeks. Depending on how much that stock is being traded, you would expect that the price goes up in a visible way compared to if the purchase hadn't been made. I think there is no <em>exact</em> way to calculate the stock price after such a transa...
There are a number of price impact models which seek to predict the bias induced on prices by trading. There are also issues with some of these models (which I will mention later). <h1>Models</h1> Probably the earliest and most-known model is that by Torre and Ferrari (1997) which estimates the impact to be a multiple ...
Let me try to answer: I have seen how equity trades are executed at the order book level. Let's say the price of the stock is 100 (last traded price). Let's say the order book is as follows: <strong>Bids</strong>: Bid1 = 99 (size = 10,000), Bid2 = 98 (size = 20,000), Bid3 = 97 (size = 25,000), Bid4 = 96 (size = 30,000)...
https://quant.stackexchange.com
149,859
[ "https://electronics.stackexchange.com/questions/149859", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/27510/" ]
So i want to measure a resistor of around 20 ohm in a voltage divider with an Arduino UNO R3. Is there any way on an arduino to use 1.1v instead of 5v? I want to do this to decrease the current, because the resistor to be measured is a small speaker.
The Arduino Uno R3 has a default Reference Voltage of 5V. You can change it to 1.1V using the analogReference() command as follows: <pre><code>analogReference(INTERNAL) </code></pre> Or you can apply an External reference to the ARef pin (0V to 5V): <pre><code>analogReference(EXTERNAL) </code></pre> Similar, but d...
You can use the 1.1V reference to change what the ADC measures the incoming voltage against. You can't use the 1.1V reference to do the actual measuring though. That is, you have no access to that 1.1V from outside the chip to connect your resistance to. You would have to provide your own 1.1V (or lower) supply to t...
https://electronics.stackexchange.com
185,997
[ "https://physics.stackexchange.com/questions/185997", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/82060/" ]
Why do two materials, under the same weather, have different temperatures? I have a small clue about it. For example, iron and wood supposed under the sun's radiation, and if we touch both of them, we'll notice a remarkable difference in temperatures just on the surface, or even by a near area, and that's a fact about...
When you touch something, you don't feel how hot/cold the thing is; you feel how hot/cold it makes your hand. Metal conducts heat more easily than wood. So if wood and metal are hot, the heat will flow more easily from the metal to your hand. If wood and metal are cold, the heat will flow more easily from your hand to ...
The answer depends on whether the materials are in the sunlight (including on a cloudy day), in which case the wood is actually cooler than metal. In addition, when they are the same temperature the metal will feel hotter on a hot day and cooler on a cold day because of the rate of heat/cold transferred from the metal ...
https://physics.stackexchange.com
358,677
[ "https://softwareengineering.stackexchange.com/questions/358677", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/198298/" ]
I have started working on a new project and to my surprise its written by a single developer with almost no tests at all, the remaining tests are either buggy or feel error prone throwing a lot of <code>NullPointerException</code> when anything is changed. To my surprise a release was scheduled just after I started so ...
I would strongly advise you not try an refactor this code. You are in a no win situation here, any new features you add may introduce a bug in an existing feature for which there is no test. However, if you refactor that existing feature you are just as likely to create bugs in other features. If you sell refactoring...
We have all been there, I had to refactor some messy projects once. What I can tell you is to not underestimate how long it can take. Having the system tested first will definitely make your task easier. The choice between integration and acceptance tests depends on how big is your refactoring. Acceptance tests are w...
https://softwareengineering.stackexchange.com
130,561
[ "https://security.stackexchange.com/questions/130561", "https://security.stackexchange.com", "https://security.stackexchange.com/users/118073/" ]
I am running an IDS on the outside of my firewall (I know not ideal) and an IDS on the inside of my LAN running the same detection algorithms and definitions. My website auto redirects all HTTP requests to HTTPS. My IDS frequently detects nmap scans, OpenVAS scanning activity, GNU Bash Environment Variable Code Injecti...
Yes this is a known issue, you can also route all sorts of attacks to servers via a variety of encrypted protocols using SSL/TLS client-side proxies, or other client side services just to make attacks easier. This does create a situation where on some networks attacks against an http listener would not be effective (de...
Looks like you already have a Load Balancer that hosts the certificate on behalf of your web servers so inbound SSL can be inspected after they are decrypted. Your load balancer should have a public facing interface to decrypt your own SSL cert so your IPS can inspect. However for outbound, your clients directly conne...
https://security.stackexchange.com
29,671
[ "https://datascience.stackexchange.com/questions/29671", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/49624/" ]
I have a data frame of 3000 rows x 101 columns like as follow: <pre><code>Time id0 id1 id2 ………… id99 1 1.71 6.99 4.01 ………… 4.98 2 1.72 6.78 3.15 ………… 4.97 . . 3000 0.36 0.23 0.14 ………… 0.28 </code></pre> Using Python, how could we add a column that counts for each row the number of va...
If you know what the state history is, you don't need a 'hidden' Markov model, you just need a Markov model (or some other mechanism). The 'hidden' part implies a distinction between some sequence of unobservable states, and some observations that are related to them. In your case, you say you have observed the past ...
Because there is very little data HMM will probably overfit (depends on the number of states and letters). I would go with a simple markov chain as it has less parameters and you dont need to tune things like hidden states. If you are going with HMM I would recommend a package called Pomegranate. I would also recommen...
https://datascience.stackexchange.com
178,690
[ "https://electronics.stackexchange.com/questions/178690", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/80233/" ]
I scavenged a li-ion battery from a broken laptop. It is made of 6 Samsung ICR18650 cells (3.75V 2800mAh), parallels two by two so that the total pack is in fact the sum of 3 cells at 3.75V, so 11.25V (it's written 11.1V on the pack). I have a raspberry pi which can run out of only one power boosted cell to 5V.<br> Bu...
No: you have to treat all cells of a LiIon battery alike, or you will overdischarge or overcharge some cells. Yes, there are &quot;balance&quot; chargers which handle small discrepancies in the capacity or charge level of the different cells, but that's meant to deal with naturally-occurring differences, not deliberate...
You could use the battery to power the screen directly and use a regulator to power the Pi
https://electronics.stackexchange.com
137,403
[ "https://electronics.stackexchange.com/questions/137403", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/57699/" ]
I have come across the following problem a few times in the past: You have a break-out board where some pins have already been pulled up or down for convenience, e.g. RESET pulled high to keep the board running even when you don't connect the input pin to your MCU. Now you want the opposite standard behaviour when the...
The best way is (as you suggest) to remove the pull-up from the PCB and fit a pull-down elsewhere. But, you could try just fitting a pull-down resistor of much lower value than the pull-up. The two resistors will form a voltage divider, but with one resistor much lower in value than the other, the lower value will "win...
The best is removing the original pull-up or pull-down. If not and if you have enough space, you can add another resistor. There is a rule that the new pulls should be at least 15 time the original pulls. That say, if your pull-up is 15K, then if you want to add another resistor to change it to pull-down, your resistor...
https://electronics.stackexchange.com
117,883
[ "https://electronics.stackexchange.com/questions/117883", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/46775/" ]
what is the difference between time domain and frequency domain components? How do these domains differ from each other?
Both domains describe the same thing, but seen from different perspectives. I like to think of the frequency domain as the time domain skewed through 90°. In the time domain you have your typical signal waveform - the X axis is time passing, and the Y axis is the level of the signal at any one point in time. Now, a ...
In time domain, all the changes are mapped with respect to time, while in frequency domain, the changes are mapped with respect to change in frequency. In the former, the X axis component is time, and in the latter, it is frequency.
https://electronics.stackexchange.com
26,741
[ "https://engineering.stackexchange.com/questions/26741", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/17605/" ]
When we use Abaqus to solve the static problem, one step is to set: <strong>Time period, the number of increments and increments size</strong>. But since the static problem is not time-dependent, there is no time, which means the above time is virtual time. Then I was wondering how we look at those parameters in the ...
"Statics" usually is defined as meaning that the <em>acceleration</em> of the structure is too small to cause significant <em>inertia</em> forces, i.e. the "mass <span class="math-container">$\times$</span> acceleration" terms in the equations of motion can be ignored. However the <em>response</em> of the structure ma...
Static analysis is an ideal scenario, no real event is actually static- either quasi-static or dynamic. It is based on the assumption that all loads are applied slowly and gradually until they reach their full magnitudes. So when you have some (pseudo) time steps, what you are basically doing is discretizing the ste...
https://engineering.stackexchange.com
343,325
[ "https://electronics.stackexchange.com/questions/343325", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/165640/" ]
I bought a bipolar stepper motor (Mercury SM-42BYG011, 12V, 0.33A) and an LN293 H-bridge. I drive the motor with a 9V alkaline battery. Unfortunately the stepper motor empties the battery very quickly. I don't need a lot of torque, and I don't need high accuracy (the motor turns 1/10 of a turn every few minutes). How c...
Basically, use the enable function of the LN293. For each step, provide a short enable pulse and the motor will only draw current for that period. What "short" means depends on the load.
When the battery effective series resistance approaches the equivalent load resistance you approach the maximum power transfer to the motor but only at 50% efficiency. Any voltage drop in the transistor drivers is another loss of battery power. <blockquote> This application is like starting your car in winter eve...
https://electronics.stackexchange.com
281,311
[ "https://electronics.stackexchange.com/questions/281311", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/136470/" ]
I was just wondering how you would calculate the friction torque for a DC motor? and how the calculations would be different when finding the current, EMF, torque etc, when this is neglected.
Remember a CMOS sensor needs to pack millions of pixels onto a chip, while the stuff you read about benchtop experiments with photodiodes assumed you only need one receiver. So in the CMOS sensor, using the absolute minimum number of transistors is critical, especially if you want to be able to advertise a higher pix...
Lets consider the circuit with photodiode and 2 FETs. That 3T circuit has no amplifiers, just FET switches. The 3T has the ERASE_THE_CHARGE function in the bottom transistor. During RESET time, the electrons are flushed. The top right transistor connects the charge of the pixel onto the shared readout bus. Again, the...
https://electronics.stackexchange.com
101,754
[ "https://physics.stackexchange.com/questions/101754", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/41732/" ]
Well I am still small student of physics, but as far as I know, Newton's Third Law states that, <blockquote> "For every action there is equal and opposite reaction." </blockquote> Now let me tell you how I understood this, Suppose there are two bodies A &amp; B initially at rest (w.r.t the earth), now if A makes ...
Your mistake is to believe that every action <em>causes</em> an equal and opposite reaction, in which case the reaction would cause a re-reaction, etc. Instead, the right way to think about Newton's Third Law is that whatever causes an action must <em>simultaneously</em> cause an equal and opposite reaction. The acti...
<blockquote> <em>"For every action, there is an equal and opposite reaction"</em> </blockquote> This means, forces exist as pairs. When there is an interaction between $A$ and $B$, an action-reaction pair between them is produced. Which one is action and which one is reaction depends on your frame of reference. N...
https://physics.stackexchange.com
712,411
[ "https://physics.stackexchange.com/questions/712411", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/337458/" ]
I'm new to quantum mechanics and confused about the way the Schrödinger equation is used (more general eigenvalue equations of observables). Let's take the time-independent Schrödinger equation (eigenvalue equation). Suppose our system is n+1 dimensional and the eigenvectors of our hamiltonian (or any other observable)...
In standard bra-ket notation, one could write <span class="math-container">$$\hat H|\psi\rangle = E|\psi \rangle\implies \int \mathrm dx \int\mathrm dy\ |x\rangle\langle x|\hat H|y\rangle\langle y|\psi\rangle = E\int\mathrm dx \ |x\rangle\langle x|\psi\rangle$$</span> where we have inserted two copies of the identity o...
Algebraic relations are independent of the choice of basis, so the expression: <span class="math-container">$$\hat{H}|x_i\rangle=x_i|x_i\rangle$$</span> doesn't require any choice of basis (only that <span class="math-container">$|x_i\rangle$</span> is an eigenvector of <span class="math-container">$\hat{H}$</span>). W...
https://physics.stackexchange.com
22,204
[ "https://electronics.stackexchange.com/questions/22204", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/5992/" ]
I am trying to build a Wien bridge oscillator that oscillates at 2.1kHz and that can be switched on by a transistor. The reason for me placing a transistor switch in the circuit is so that I can turn the oscillator on and off from a PIC MCU. However, when I build the simulation in multisim, I get an DC output voltage o...
Your opamp only has a gain of 1.<br> A wien bridge oscillator needs a gain of 3 to compensate for the attenuation of the RC network at the freqeuncy of oscillation.<br> Try adding the neccessary feedback resistors for G = 3. You would typically need some AGC (automatic gain control) in a real circuit, possibly here too...
I think that if you make a slight modification to your circuit to operate as a wien bridge oscillator, the gain should be equal to 3, I added to your circuit 3k and 1k 3/1=3 you may need to reduce the value of the resistor R4 to 10 ohm or short it (make it equal to zero) and replace q1 with a power transistor like BD...
https://electronics.stackexchange.com