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
181,530
[ "https://security.stackexchange.com/questions/181530", "https://security.stackexchange.com", "https://security.stackexchange.com/users/172918/" ]
I have my B.Tech in Information Technology with CEHv8 certification. I have 2 years of vulnerability assessment experience and 1.5 years of python automation experience. I am not able to crack any security job interviews. I mainly look forward for Application security but I had worked only for web application assessme...
I am a penetration tester; I got my job without an OSCP but I was studying for it. That, however, was not relevant. I emailed every single CREST (UK) company I could (CREST provides a list, but I only got 1/4 of the way down the list before I got interviews), no generic emails. I explained my situation, my interests ...
Yes. Many do not have OSCP and I have never paid attention to that while interviewing. Are you explicitly being told you need OSCP or is this your assumption? I'd be surprised anyone would reject a decent candidate based on this alone. Are you able to decently answer all interview questions? It could be that your exp...
https://security.stackexchange.com
502,565
[ "https://electronics.stackexchange.com/questions/502565", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/109723/" ]
Say we look at the thermal noise spectrum of an ideal resistor. Now we know it will behave like <span class="math-container">$$ \langle U^2 \rangle = 4 \, k_B \, T \,R \,\Delta f $$</span> We also know that two subsequent voltages are uncorrelated: <span class="math-container">$$ \langle U(t) U(t+\tau)\rangle = c\, ...
If you convolve your U(t) with <span class="math-container">\$e^{i\omega t}\$</span> then you'll typically get a non-zero result. This means there <em>is</em> typically some component at <span class="math-container">\$\omega\$</span>. Note that if you convolve a delta function <span class="math-container">\$\delta (t)...
Since an ideal resistor has no memory elements (like capacitor or inductor), the thermal noise generated will not see any filtering element. Consequently, the noise spectrum can be expected to be flat at all frequencies. (Neglecting the quantum mechanical effects which become important at high frequencies where the spe...
https://electronics.stackexchange.com
98,963
[ "https://electronics.stackexchange.com/questions/98963", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/14039/" ]
I'm trying to drive a 7-segment common anode, in the following connection, however there is no output the comes from the ULN2003 at all, its like when it gets a 0 in the input, it gives a tri state<img src="https://i.stack.imgur.com/l3HJL.png" alt="enter image description here"> output.
The circuit you show will work fine in reality (assuming that you also add the resistors in series with the display to limit the current). In proteus it doesn't behave as expected, the open collector outputs of ULN2003 are not pulled high through the LED as they are supposed to be, this is a simulation model misbehavi...
The ULN2003 is an open-collector driver, it can sink current towards ground but not supply current from Vcc. You will need to use a different display (common anode instead of common cathode) or use a different driver (open-emitter (or sourcing) drivers do exist, but they are not as common as the ULN2004/ULN2803. Note ...
https://electronics.stackexchange.com
343,624
[ "https://softwareengineering.stackexchange.com/questions/343624", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/173849/" ]
I have a hierarchical data model and am trying to implement their CRUD operations in my Web Application. Currently I have code inheritance for CRUD operations of my entities (resources) as follows: ResourceCommonProcedures as a base class and each Resource procedure inheriting the base class. <pre><code>public class...
Since it seems you only use task as a <code>Runnable</code> internally, use Runnable instead of Object. Change your third line to: <code>private final Runnable task;</code> Simple, saves you a cast later. And I'd <em>consider</em> renaming it from "task" to "runnable" for clarity, if that makes more sense.
<strong>TLDR:</strong> Use just one constructor that accepts a <code>Runnable</code> and a member of type <code>Runnable</code>. <strong>Long answer:</strong> If you really, <strong>really need to have two difrerent constructors</strong>, one that receives a <code>TaskA</code> and one that receives a <code>TaskB</co...
https://softwareengineering.stackexchange.com
338,613
[ "https://physics.stackexchange.com/questions/338613", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/130958/" ]
I'm going through Callen's Thermodynamics book. After demonstrating from a physical point of view the maximum entropy implies minimum energy, the inverse argument is left as an exercise: <blockquote> Show that if the entropy were not maximum at constant energy then the energy could not be minimum at constant entropy. <...
I think I figured it out. We attach to our system this reversible heat source and consider it as a unit. Transferring $dQ$ indeed cause no change of entropy nor total energy in the system. We than takes this energy out of the system by storing it in a reversible work source. Since it's reversible, this cause no change ...
About your answer, have you found it to be true? I would say that there is a problem with your reasoning because the hint is that you can increase the entropy. My answer by following the same thought process as the book: Since your system has minimum energy and the entropy is not a maximum then you can increase it's ...
https://physics.stackexchange.com
625,098
[ "https://physics.stackexchange.com/questions/625098", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/146834/" ]
If we have a chain of fixed length hanging from two points we know that it will form a curve that minimizes the chain's potential energy. If we imagine the chain as having many small segments, then the potential energy of each segment is <span class="math-container">$E_p = mgh$</span>. As the number of small segments a...
What is wrong with your argument is this paragraph: <blockquote> If we imagine the chain as having many small segments, then the potential energy of each segment is <span class="math-container">$E_p=mgh$</span>. As the number of small segments approaches infinity, their masses equalize because the difference in mass be...
To put the accepted answer in mathematical terms, if you have a curve <span class="math-container">$y(x)$</span>, hanging fixed at <span class="math-container">$x_0$</span> and <span class="math-container">$x_L$</span> at an height <span class="math-container">$h=y(x_0)=y(x_L)$</span>, of total length <span class="math...
https://physics.stackexchange.com
266,478
[ "https://mathoverflow.net/questions/266478", "https://mathoverflow.net", "https://mathoverflow.net/users/107015/" ]
As part of my research I have to analyze recurrence relations of the form $$f_{m,n} = af_{m-1,n} + bf_{m,n-1} + c,$$ where $a,b,c$ are any given real numbers and $f_{m,0}$ and $f_{0,n}$ any given functions (e.g. $f_{m,0} = 2^m$ and $f_{0,n} = n+1$). Could somebody please suggest some good source (e.g. a website, a b...
I guess you might not be interested in this but here is a generating function. If $G(x,y)=\sum_{m,n\geq0}f_{m,n}\,x^ny^m$ then $$G(x,y)=\frac{\frac{x^2-(b+2)x}{(1-x)^2}+\frac{1-ay}{1-2y}+\frac{cxy}{(1-x)(1-y)}}{1-ay-bx}.$$
This isn't a full answer, but an attempt to begin to simplify the expression $f_{m,n} = \sum_{i=0}^{m-1} \sum_{j=0}^{n-1} {{i+j}\choose {i,j}} a^i b^j$, as in the comments and in the partial solution in the starting question. Note that this, too, is a sequence that satisfies the recurrence relation $f_{m,n} = a f_{m-1...
https://mathoverflow.net
430,298
[ "https://softwareengineering.stackexchange.com/questions/430298", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/140178/" ]
I have a simple question, why would I use an array of a single class over a class with multiple property arrays? Context: I have a series of calculators that extend off a base calculator. Each calculator is intended to calculate the same things but in different ways. Here is the simplified base class (pay attention to ...
You've spoken to structure of the internal implementation. You've spoken to internal clients — i.e. computing four from two and base at the same index. But, what does the external client want to see?  Make the external interface so that the external consuming client gets the best abstraction, where the best abstraction...
There are advantages and disadvantages to both designs. If Flow one to four are related, it's only natural to group those four together and the vast majority of programmers will expect this design. On the other hand, it looks like your <code>Calc...</code> methods are only looking at them independently, so maybe they a...
https://softwareengineering.stackexchange.com
12,056
[ "https://mechanics.stackexchange.com/questions/12056", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/6830/" ]
So I have a 2009 Honda Civic and it's getting close to 60k in miles. I know there is a big maintenance that's supposed to be done at that level, and I've been quoted for $400 for it at my local Honda dealership. My question is, if I have a quite well maintained Civic, what is the <em>minimal</em> set of services that y...
Generally speaking, the dealer should be able to adjust the cost to only perform maintenance on items that are actually needed. They should check the coolant, and other fluids, and only recommend replacing what needs to be replaced. The brake pads may have been replaced already, but the fluid does need to be flushed a...
You mention timing-belt - I would stick to what the manufacturer recomends. A little early is fine but try not to go over the recommend time/mileage Note: I thought Honda civic had a chain not a belt and the chain was rated for 300,000 miles, i.e. significantly longer than the rest of the car... regularly change air-...
https://mechanics.stackexchange.com
123,740
[ "https://cs.stackexchange.com/questions/123740", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/119051/" ]
Is it possible to implement an efficient priority queue (as efficient as a heap) only using the stack data structure? The usual efficiency for a priority queue which is implemented using a heap is : <ul> <li>get min - <span class="math-container">$O(1)$</span></li> <li>extract min - <span class="math-container">$O(\l...
Unfortunately, it's not possible. The order you extract items from the stack depends only on the order they're pushed, regardless of the values in those items; a priority queue needs items to be removed in an order that depends on the value of the items.
You can do such a perfect representation of priority queues using (binary) heaps data structure, using it you can implement stacks and queues... In priority queues it's a matter of preference, not FILO principle like in stacks. You can find all of this in Cormen et al., Introduction to Algorithms, 3rd edition. okay,...
https://cs.stackexchange.com
2,289,216
[ "https://math.stackexchange.com/questions/2289216", "https://math.stackexchange.com", "https://math.stackexchange.com/users/110995/" ]
We know that $\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\frac{1}{5}+\cdots$ diverges. So, $T=\frac{1}{n.2}+\frac{1}{n.3}+\frac{1}{n.4}+\frac{1}{n.5}+\cdots$=$\frac{1}{n}$$(\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\frac{1}{5}+\cdots)$ diverges too for any natural number $n$. Now, we can easily show that $S&gt;T$ since $n$ can ta...
Your proof is not correct. You say: <blockquote> $n$ can take greater value than the difference between the denominators of any two consecutive terms of $S$ </blockquote> It is true that if $p_1,p_2$ are two consecutive terms of $S$ (i.e., two consecutive primes) then we can find some $n$ such that $n&gt;p_2-p_1$....
Let $$S_n=\sum_{k=1}^n \frac {1}{k} $$ then $$S_{2n}-S_n=\sum_{k=n+1}^{2n}\frac 1k $$ $$&gt;n.\frac {1}{2n}=\frac 12$$ thus $(S_n) $ is not Cauchy and diverges
https://math.stackexchange.com
2,796,825
[ "https://math.stackexchange.com/questions/2796825", "https://math.stackexchange.com", "https://math.stackexchange.com/users/203397/" ]
I am wanting to prove that: $$\left&lt; e^{-x}\right&gt;=1\Rightarrow \left&lt;x\right&gt;\ge 0\tag{a}$$ which comes up in nonequilbrium physics with $x$ being the difference in entropy. Intuitively it seems correct as we have: $$ \int dx\; e^{-x} P(x)=1\tag{b}$$ thus $P(x)$ will need to be larger for the $x \gt 0$ ter...
Jensen's inequality $\langle e^{-x} \rangle \geq e^{-\langle x \rangle}$ holds due to the convexity of $\exp(-x)$. From that we obtain $$1= \langle e^{-x} \rangle \geq e^{-\langle x \rangle}$$ and after taking $\log$ $$ 0\geq - \langle x \rangle \Rightarrow 0 \leq \langle x \rangle.$$
Assuming $\left &lt;e^{-x}\right&gt;=1$ we can write $$\left &lt;x\right &gt;=\int (e^{-x}-1+x)P(x)dx$$ This follows, since $\left &lt;x\right &gt;=\left &lt;e^{-x}\right &gt;-1+\left &lt; x\right &gt;$. Now since $P(x)\geq 0$, we only have to show that $e^{-x}-1+x\geq 0$. Let $f(x)=e^{-x}-1+x$, and consider $$f'(x)=1...
https://math.stackexchange.com
2,668
[ "https://robotics.stackexchange.com/questions/2668", "https://robotics.stackexchange.com", "https://robotics.stackexchange.com/users/4080/" ]
I wrote my own quadcopter firmware which is based on some older code. This code shall stabilize the copter to be always in equilibrium. The model is behaving relatively nice. I can control it with my laptop. However I noticed, that the copter is hovering to the side (if not manually controlled), likely because of wind,...
The drift is being caused either by your position data being consistently wrong, or by your roll/pitch PIDs not correcting the drift error with their integral term. In any case, it is the integral term of a PID that (when working properly) prevents drift.
Do you have Gyros (roll pitch and yaw) installed? I would recommend those, since they give stability feedback to your code. If possible, you can even add a control board (from Hobbyking, kkV2). This board has 3 gyros, inputs to ale, rud, thr, ele. But the best thing is, it has gain adjusters for all 3 gyros, which mean...
https://robotics.stackexchange.com
653,690
[ "https://electronics.stackexchange.com/questions/653690", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/332671/" ]
I was going to drive a MOSFET from an ESP32 (3.3 V output) with a 2N3904 NPN transistor like this: <img src="https://i.stack.imgur.com/gpOcv.png" alt="Text" /> I will need 24 MOSFETs in my project, and that is a lot of soldering. I found the CA3081 general purpose high current NPN transistor array. Will it work OK with...
You may use CA3081. Vce for saturation of CA3081 is 0.7V when Ice is 1mA. (In your circuit, Ice is ~1.2mA.) It is higher than the 2N3904's Vce for saturation ~0.2V in the similar condition. Thus, if you're driving bipolar power transistor, you cannot use CA3091. However, the power MOSFET BUZ11 has Vgs threshold voltage...
Yes, but CA30xx are all obsolete; they do still seem to be in ready supply, but consider alternatives: <ul> <li>ULQ2003 and friends: the Darlington type doesn't help you much, but especially at low load currents, it will saturate (V<sub>CE(sat)</sub>) low enough for general power MOSFETs; avoid using with logic-level M...
https://electronics.stackexchange.com
52,772
[ "https://softwareengineering.stackexchange.com/questions/52772", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/4942/" ]
If so how, and what value would this rating have in understanding the code? For example, I would guess that programs using genetic or neutral algorithms would be less predictable than one calculating the sum of pi.
You seem to be asking a variation of the halting problem, so no, there is not a general solution to determine how predictable a program is. However, you can throw a battery of tests and code reviews at any application and get a heuristic confidence to a program's predictability.
If you write units tests and pass the tests with colors, you are pretty safe saying it will run in a predictable fashion. Of course nothing is 100%. Mechanical failures happen, account for those as well. A client machine can have it's power supply explode due to someone spilling coffee in it. Is your server prepared t...
https://softwareengineering.stackexchange.com
443,092
[ "https://stats.stackexchange.com/questions/443092", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/180158/" ]
I remember reading somewhere in another post about the different viewpoints between people from statistics and from machine learning or neural networks, where one user was mentioning this idea as an example of bad practice. Even then, I cannot find anyone asking this question, so I guess there is something evident I a...
In short, regularization changes the distribution of the test statistic, rendering tests of hypothesis moot. In instances where we want to use regression to make inferences about interventions, we want unbiasedness. Not everything to do with data is a prediction problem.
People often assume that regularization is superior to un-regularized models because they reduce multicollinearity, reduce model overfitting, and improve forecasting. They also like regularization because it explicitly avoid the entire body of model testing associated with the Gauss-Markov Theorem and other related un...
https://stats.stackexchange.com
220,161
[ "https://softwareengineering.stackexchange.com/questions/220161", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/85568/" ]
I'm reading Sedgewick's book on algorithms in C and I'm looking for an algorithm to evaluate postfix expressions (addition and multiplication only) without using a stack. I tried to implement one but I always get nowhere. I have a simple C implementation for <strong>prefix</strong> evaluation <pre><code>int eval() {...
I wouldn't exactly call using a global variable as a string index counter 'elegant', but in a nutshell: No, you can't, because you have no idea how to combine the various numbers you find until you get to the operators. Until you do, you have to store them somewhere - and to get the right result, whatever your storage ...
you pass the top 2 in the stack as parameter at each point, this way when you get to an operator you go up the stack when you see a value you go down the stack and when you get back you try again: here is the magic: <pre><code>eval(int x1, int x2) { do{ int x = 0; while (a[i] == ' ') i++; if (a[i] == '...
https://softwareengineering.stackexchange.com
6,864
[ "https://cstheory.stackexchange.com/questions/6864", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/1536/" ]
I've come across the polynomial algorithm that solves 2SAT. I've found it boggling that 2SAT is in P where all (or many others) of the SAT instances are NP-Complete. What makes this problem different? What makes it <em>so</em> easy (NL-Complete - even easier than P)?
Here is a further intuitive and unpretentious explanation along the lines of MGwynne's answer. With $2$-SAT, you can only express implications of the form $a \Rightarrow b$, where $a$ and $b$ are literals. More precisely, every $2$-clause $l_1 \lor l_2$ can be understood as a pair of implications: $\lnot l_1 \Rightarr...
Consider resolution on a 2-SAT formula. Any resolvent is of size at most 2 (note that $n + m -2 \le 2$ if $n, m \le 2$ for clauses of length $n$ and $m$ resp). The number of clauses of size 2 is quadratic in the number of variables. Therefore, the resolution algorithm is in P. Once you get to 3-SAT you can get bigger ...
https://cstheory.stackexchange.com
633,785
[ "https://math.stackexchange.com/questions/633785", "https://math.stackexchange.com", "https://math.stackexchange.com/users/116377/" ]
Is there a linear transformation $\psi: Mat_{3x2}(ℝ) \mapsto ℝ_8[x]$ that is surjective? $Mat_{3x2}(ℝ)$ is the space of real $3$x$2$ matrices. $ℝ_8[x]$ is the space of all real polynomials up to order $8$. Could you explain using the Rank-Nullity Theorem? <strong>Rank-Nullity Theorem:</strong> For a linear map $\p...
Using your Rank-Nullity Theorem: take $V=M_{3\times2}(\mathbb R)$, $W=\mathbb R_8[x]$. Then $V$ has dimension $6$ and $W$ has dimension $9$. If you consider a surjective $\psi:V\to W$, then the dimension of its image is $9$, and so the Rank-Nullity Theorem would imply $$ \dim\ker\psi+9=6, $$ a contradiction. So no ...
To answer it directly, without using the theorem. Pick a basis of $P_8$ and choose some preimages of each of these elements. You get a collection in $M_{3\times 2}$ that is larger than its dimension. This means they are linearly dependent. A linear dependence between them gives you, via $\phi$, a linear dependence of t...
https://math.stackexchange.com
285,519
[ "https://physics.stackexchange.com/questions/285519", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/43712/" ]
I teach 7th grade students about the difference between speed and velocity. One of them ask me why do physicists create the concept of velocity. I cannot answer. I don't know precisely why do we care about the difference between speed and velocity.
<s><strong>We care so that we can conveniently calculate motion in 2- or 3-D.</strong> Most motion important to us happens in 2- or 3-D (cars moving over land, airplanes flying through the sky, etc). Vectors make it convenient to handle quantities in more than 1 dimension, so we use vector quantities for position, vel...
I give you a different type of answer. In Italian, and in many other languages I suppose, there are not different words for speed and velocity and so there is not any ambiguity among these concepts. Velocity it's a vector, but you can refer to it's module because there is not any ambiguity, as you do for any vector qua...
https://physics.stackexchange.com
77,365
[ "https://softwareengineering.stackexchange.com/questions/77365", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/5430/" ]
The library that I'm working on has a parameter which defines priority of a certain process. I want the interface to be as clear as possible, but it seems that different people have opposite interpretations of priority values. <pre><code>1. Lowest number has highest priority (1 - highest priority, 10 - lowest priority...
There are good reasons for setting 1 (or 0) as the highest level of priority and using higher numbers for lower priorities. First, the priority can represent the order that task(s) should be performed. Number 1 is the first task you do, hence it has higher priority than the second set of tasks you will perform. Another...
Personally, I would never say "This is priority 1" and mean "This is the lowest priority possible". So logically, I would say 1 is a high priority and 10 is low. However, if I could replace it with an enum, from WhyShouldICare to TheWorldIsCollapsing then I would. And in that case, oddly enough, I would expect the enu...
https://softwareengineering.stackexchange.com
359,906
[ "https://physics.stackexchange.com/questions/359906", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/150015/" ]
I've been self-studying several qft books and I am having a little trouble reconciling the original purpose for introducing quantum fields with the function of these fields as operators. I understand that it is desirable to introduce quantum operators as functions of spacetime in order to reconcile Quantum Mechanical m...
I'll try to explain this in the way I found better for me. Your question is: <blockquote> However, I am a little unclear on what motivation there is for ultimately associating these operators with particle creation/annihilation at point x, in the case of theories that can be solved via cannonical quantization. </blo...
Have you read Weinberg's QFT Volume 1? Creation/annihilation operator decomposition is apparently not the only way to do it, but it makes it easy to satisfy Cluster Decomposition principle which is one of the axioms that is used for QFT. Given several particle groups ($\alpha_i$, $\beta_i$) and S-matrix, when one mov...
https://physics.stackexchange.com
327,018
[ "https://mathoverflow.net/questions/327018", "https://mathoverflow.net", "https://mathoverflow.net/users/137543/" ]
Given two discrete distributions <span class="math-container">$P$</span> and <span class="math-container">$Q$</span> with the same support <span class="math-container">$x_1,\cdots,x_n$</span>. Assume <span class="math-container">$K \in L^1(\mathbb{R})$</span> is a nonnegative function with <span class="math-container">...
This is definitely true, and the point is that for any two distinct <span class="math-container">$x\neq y\in \mathbb R$</span> the measures <span class="math-container">$\delta_x*K_h$</span> and <span class="math-container">$\delta_y* K_h$</span> are asymptotically singular as <span class="math-container">$h\to 0$</spa...
I would post this as a comment if I could: is it not the case that if K also has compact support you get exact equality as soon as the support of K_h is contained is a small enough interval ? E.g. if P and Q are Bernoulli with prop p and q of 1 resp. and K is uniform (-1/8, 1/8), then P*K is (1-p)*U(-1/8, 1/8) + p *...
https://mathoverflow.net
562,229
[ "https://physics.stackexchange.com/questions/562229", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/196529/" ]
I'm currently working on a project on my own where I'm interested in finding information about an object based on a spectrum. Namely, I want to use the spectrum that I input into my program to be able to analyze what atoms are present in the analyzed object. (I know this is probably hard but it's a fun project). Howeve...
The <em>amount of light</em> is not a precisely defined quantity here. For your purposes it may be safe to assume that each atom may absorb only one photon, however these photons would have different frequencies. The number of photons of different frequencies absorbed is then proportional to the number of atoms absorbi...
<blockquote> Do atoms that are exposed to the same amount of light absorb the same amount as well? </blockquote> The question is a little fuzzy, so let's try an be more concise. Take sodium (<span class="math-container">$\text{Na}$</span>), famous for its strong, yellow doublet emission line. In identical conditions al...
https://physics.stackexchange.com
17,624
[ "https://stats.stackexchange.com/questions/17624", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/6884/" ]
Could anyone advise if the following makes sense: I am dealing with an ordinary linear model with 4 predictors. I am in two minds whether to drop the least significant term. It's $p$-value is a little over 0.05. I have argued in favor of dropping it along these lines: Multiplying the estimate of this term by (for exam...
I have never understood the wish for parsimony. Seeking parsimony destroys all aspects of statistical inference (bias of regression coefficients, standard errors, confidence intervals, P-values). A good reason to keep variables is that this preserves the accuracy of confidence intervals and other quantities. Think o...
These answers about selection of variables all assume that the cost of the observation of variables is 0. And that is not true. While the issue of selection of variables for a given model may or may not involve selection, the implications for future behavior DOES involve selection. Consider the problem of predicti...
https://stats.stackexchange.com
95,998
[ "https://softwareengineering.stackexchange.com/questions/95998", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/24771/" ]
I have very similar code over multiple files in my project. If a client wanted some level of commented code, would I have to invest the time into duplicating the code for every file. I think it would simply be a waste of time. What would be the best/easiest way to provide comments to a client. (Refer them to a readme t...
If I understand you correctly, you are working with a framework that recommends a lot of very similar files, not repeating the logic, just structure - interface code that fits your classes into the framework. In this case, take one, most-representative file and comment it richly. Then in each similar file, give a shor...
Have you considered fixing your code so all these almost similar places call a common routine and then put the desired comment in there?
https://softwareengineering.stackexchange.com
483,650
[ "https://stats.stackexchange.com/questions/483650", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/279459/" ]
With an intercept in linear regression, I know that <span class="math-container">$R^2$</span> is bounded by [0,1]. Without an intercept, I know that <span class="math-container">$R^2$</span> can be negative. What is the lower bound for this case? And is the upper bound still 1 for this case?
This follows from some fairly standard distribution theory. Define <span class="math-container">$Y_1 \sim \text{Poisson}(\pi \lambda)$</span> and <span class="math-container">$Y_2 \sim \text{Poisson}((1-\pi) \lambda)$</span> independently, and let <span class="math-container">$Y = Y_1 + Y_2$</span> and <span class="mat...
Its a bit of algebra, but here is my try The expression of the density after you pull out the terms not involving <span class="math-container">$y$</span> are <span class="math-container">$$ p(z) = \pi^z \exp(\lambda) \sum_{z \leq y} \binom{y}{z} (1-\pi)^{y-z} \dfrac{\lambda^y}{y!}$$</span> The <span class="math-contain...
https://stats.stackexchange.com
3,458,419
[ "https://math.stackexchange.com/questions/3458419", "https://math.stackexchange.com", "https://math.stackexchange.com/users/556673/" ]
I have the following problem: "Given the two vectors <span class="math-container">$w_1=(5,0,1,1)$</span> and <span class="math-container">$w_2=(1,1,0,5)$</span>. Find a vector that is orthogonal to both <span class="math-container">$w_1$</span> and <span class="math-container">$w_2$</span>." I tried to create an aug...
<span class="math-container">$(0,1,1)\times(1,0,5)=(5,1,-1)$</span> is perpendicular to <span class="math-container">$(0,1,1)$</span> and <span class="math-container">$(1,0,5)$</span>, so <span class="math-container">$(0,5,1,-1)$</span> is perpendicular to <span class="math-container">$(t,0,1,1)$</span> and <span clas...
All you have to do is to find a solution of the system<span class="math-container">$$\left\{\begin{array}{l}5a+c+d=0\\a+b+5d=0.\end{array}\right.$$</span>One such solution is <span class="math-container">$(0,0,0,0)$</span>, of course. If you're after a non-zero solution, you can take <span class="math-container">$(1,-1...
https://math.stackexchange.com
33,953
[ "https://cs.stackexchange.com/questions/33953", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/20154/" ]
How can we ensure that we are continuing to make sound and valid statements about complexity classes when using oracle Turing Machines? According to my understanding (based on the definitions given in introductory textbooks on the subject) oracle Turing machines can determine the membership status of a string with re...
There's a number of ways to look at this. One is that in proofs, implication is kind of like a function, that takes as input a proof of something, and outputs a proof of something else. We can write functions that operate on values that we don't have. For example, let's consider the halting number $h$, which is not ...
Well, I would say that it is an essential feature of oracle TM that they have access to an oracle that is hard to solve. If you can decide the oracle $A$ in constant time, then for every class $B$ you would have $B=B^A$. So why to have the oracle at all in this case? So what is the point in using a oracle TM then? I w...
https://cs.stackexchange.com
328,585
[ "https://mathoverflow.net/questions/328585", "https://mathoverflow.net", "https://mathoverflow.net/users/32470/" ]
Let <span class="math-container">$\mathcal{H}$</span> be a separable Hilbert space. Let <span class="math-container">$v$</span> be a random variable taking values in <span class="math-container">$\mathcal{H}$</span> such that <span class="math-container">$P(v \perp h) &lt; 1$</span> for all <span class="math-container"...
(This may turn out to be a simplified version of J. E. Pascoe's answer). The <em>support</em> of (the distribution of) <span class="math-container">$v$</span>, that we denote by <span class="math-container">$\operatorname{supp} v$</span>, is the set of vectors <span class="math-container">$h \in \mathcal{H}$</span> su...
<strong>Another Try</strong> We say a <span class="math-container">$\mathcal{H}$</span>-valued random variable <span class="math-container">$h$</span> is a <strong>random vector</strong> if <span class="math-container">$P(h \perp g)&lt;1$</span> for all <span class="math-container">$g\in \mathcal{H}.$</span> If <span...
https://mathoverflow.net
123,308
[ "https://physics.stackexchange.com/questions/123308", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/34304/" ]
In a capacitor the parallel plates of opposite charge create equal electric fields in opposite directions. We know field outside the capacitor is zero but inside the capacitor it is non zero. My question is if we assume zero field because of superposition of the two electric fields, why can't we do the same in between ...
Microscopically, i.e. in the quantum theory the scattering with radiation is a collision of particles with photons such as $$ e^- + \gamma \to e^- + \gamma$$ The momentum vectors of the particles above are $$ \vec p_1+\vec p_2= \vec p_3 + \vec p_4$$ where the identity holds due to momentum conservation. But in general ...
Here's a parallel answer to Luboš's but purely classical. Start by noting that the momentum vector of a plane wave with wavelength $\lambda$ is: $$ \vec{p} = \frac{2\pi}{\lambda} $$ In some elastic scattering experiment, e.g. X-ray or some other diffraction measurement, we have something like: <img src="https://i.st...
https://physics.stackexchange.com
339,825
[ "https://softwareengineering.stackexchange.com/questions/339825", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/258776/" ]
I am currently perusing through Jdk 8 and I came across the feature where you have multiple interfaces that overlap with the same method signature for a default method, the compiler will throw an error if you try to have one class implement both interfaces, to prevent the problem of ambigious methods with multiple inhe...
Partially, this is historical. It would be much more difficult to add multiple inheritance now. For example, the <code>Class.getSuperclass()</code> method would no longer make sense, as a class might have multiple superclasses. Any code that depends on the single-inheritance nature of Java would break. Fields are more...
You are asking the wrong question. It's not "why can't Java", it's "why doesn't Java". Answer: Multiple inheritance is a pain in the arse. Most C++ code doesn't use multiple inheritance. Two highly popular languages, Objective-C and Swift, don't have multiple inheritance and nobody is complaining (and one of them is br...
https://softwareengineering.stackexchange.com
360,007
[ "https://physics.stackexchange.com/questions/360007", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
There is a question that explains work and energy on stack exchange but I did not see this aspect of my problem. Please just point me to my error and to the correct answer that I missed. What I am asking is this: Why in physics when the units are the same that does not necessarily mean you have the same thing.? Let...
<strong>One definition of work is "a change in energy." Any change in a physical quantity must have the same units as that quantity.</strong> Different kinds of work are associated with different kinds of energy: conservative work is associated with potential energy, non-conservative work with mechanical energy, and t...
Perhaps a better analogy than height and width can be found in terms of money. Both the balance in your bank account and amount you pay for, say, your electricity bill are denominated in the same units (dollars where I live), but they represent separate concepts. One is measure of what is stored and the other is a meas...
https://physics.stackexchange.com
121,682
[ "https://mathoverflow.net/questions/121682", "https://mathoverflow.net", "https://mathoverflow.net/users/3525/" ]
If we have the result as the title, then I can solve my real question. The original question was stated as follows. In a paper I found the following lemma: Let $S$ be a nonsingular projective surface, $R\in PicS$ a divisor with $R^2&gt;0$ . Let $(E_{i})$ be the family of distinct curves such that $R\cdot E_{i}=0$. ...
The answer already given here seems to assume the E_i are pairwise disjoint, which I didn't take to be the case from your question. To get the result in general, I think you need to use the additional fact that an effective divisor can never be numerically trivial (since it will have positive intersection with an ampl...
Hodge index tehorem for surfaces asserts that in the intersection quadratic form on $\mathrm{Num}(X)$, ther eis exactly one positive square. Hence, the restriction of this form to the orthogonal complement of $R$ must be negative definite. The classes of $E_i$ are pairwise orthogonal, and the quadratic form on the spac...
https://mathoverflow.net
147,013
[ "https://chemistry.stackexchange.com/questions/147013", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/16300/" ]
I know that the decaffeination process is not perfect and that it leaves some caffeine. I've looked online and there was a company in 2009 that offered <strong>caffeine test strips</strong> but they seem to be no longer offered. Another approach would be to use a GCMS, but used GCMS devices are expensive and it takes a...
I originally thought that UV/vis on tea samples (the liquid from contacting tea with hot water) would not be a good method as the tea is a complex mixture. I think that with a lot of clean up that it would be possible to make the measurement. I know that HPLC with a UV detector would be the best method of making the me...
You may try to extract the caffeine with DCM and determine its concentration by spectrophotometry.
https://chemistry.stackexchange.com
3,005
[ "https://physics.stackexchange.com/questions/3005", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/-1/" ]
I've started reading Peskin and Schroeder on my own time, and I'm a bit confused about how to obtain Maxwell's equations from the (source-free) lagrangian density $L = -\frac{1}{4}F_{\mu\nu}F^{\mu\nu}$ (where $F^{\mu\nu} = \partial^\mu A^\nu - \partial^\nu A^\mu$ is the field tensor). Substituting in for the definitio...
Well, you are almost there. Use the fact that $$ {\partial (\partial_{\mu} A_{\nu}) \over \partial(\partial_{\rho} A_{\sigma})} = \delta_{\mu}^{\rho} \delta_{\nu}^{\sigma}$$ which is valid because $\partial_{\mu} A_{\nu}$ are $d^2$ independent components.
We vary the action $$\delta \int {L\;\mathrm{d}t} = \delta \int {\int {\Lambda \left( {A_\nu ,\partial _\mu A_\nu } \right)\mathrm{d}^3 x\;\mathrm{d}t = 0} } $$ ${\Lambda \left( {A_\nu ,\partial _\mu A_\nu } \right)}$ is the density of lagrangian of the system. So, $$\int {\int {\left( {\frac{{\partial \Lambda...
https://physics.stackexchange.com
59,446
[ "https://softwareengineering.stackexchange.com/questions/59446", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/17887/" ]
I have been frequently asked questions like "Rate yourself in java" It goes like interviewer : Rate yourself in java on the scale of 10 me: 9 interviewer : Rate yourself in J2EE me : 8 .... But really I just come up with arbitrary numbers. Sure I know Java well , but what does it mean to say "9 out of 10" . I t...
I can't speak for your interviewers, but to impress me, you would not answer only a number. That is, if I say "rate yourself" and you say "9" I have learned nothing. If you say "I've written 7 books on this subject, spoken at national conferences about it for 10 years, and regularly meet with the dev team to tell them ...
I would ask back for what the interviewer considers 10 out of 10. That helps put him/herself into perspective, then I can give a more precise answer fitting to the context. I.e. for different interviewers, 10 out of 10 may mean <ul> <li>"you know by heart what the signature of <code>main()</code> is, and can list all...
https://softwareengineering.stackexchange.com
4,136,520
[ "https://math.stackexchange.com/questions/4136520", "https://math.stackexchange.com", "https://math.stackexchange.com/users/705451/" ]
Hy guys. I'm trying to prove this inequality for any <span class="math-container">$n,k \in \mathbb{N}$</span> <span class="math-container">$$1- x^n \le \dfrac{n}{n+1}\cdot \dfrac{1}{x^k}$$</span> Where <span class="math-container">$0&lt;x&lt;1$</span>. My solution attempt was to use induction over <span class="math-con...
Define for <span class="math-container">$0&lt;x&lt;1$</span>, <span class="math-container">$$f(x)=x^k-x^{n+k}$$</span> Then <span class="math-container">$$f'(x)=kx^{k-1}-(n+k)x^{n+k-1}$$</span> Now let's find the zeros of <span class="math-container">$f'$</span>. Putting <span class="math-container">$f'(x)=0$</span> an...
WTS <span class="math-container">$ x ( 1 - x^n) \leq \frac{n}{n+1} $</span> We will show something stronger, namely <span class="math-container">$ x ( 1 - x^n ) \leq \frac{ n } { (n+1) \sqrt[n] {n+1}}$</span>. This follows by applying weighted AM-GM: <span class="math-container">$$ \frac{n}{n+1} = \frac{ (nx^n) \tim...
https://math.stackexchange.com
56,215
[ "https://softwareengineering.stackexchange.com/questions/56215", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/9298/" ]
In C, you cannot have the function definition/implementation inside the header file. However, in C++ you can have a full method implementation inside the header file. Why is the behaviour different?
In C, if you define a function in a header file, then that function will appear in each module that is compiled that includes that header file, and a public symbol will be exported for the function. So if function <code>additup</code> is defined in <code>header.h</code>, and <code>foo.c</code> and <code>bar.c</code> bo...
C and C++ behave very much the same in this regard -- you can have <code>inline</code> functions in headers. In C++, any method whose body is inside the class definition is implicitly <code>inline</code>. If you want to do the same in C, declare the functions <code>static inline</code>.
https://softwareengineering.stackexchange.com
359,682
[ "https://math.stackexchange.com/questions/359682", "https://math.stackexchange.com", "https://math.stackexchange.com/users/64370/" ]
If i have 2 graphs: $f(x)=x\cdot \frac{\sqrt{1-x^{2}}}{2},\:g(x)=\frac{\sqrt{1-x^{2}}}{2}$ And need to calculate the volume obtained by rotating the area between $f(x)$ and $g(x)$ Around the $x$-axis. I know i need to compute the integral: $\pi \int_{-1}^{1}(g^{2}(x)-f^{2}(x))$ But can i do that direct or do i nee...
You didn’t take logs to base $2$: it isn’t true that $\log_2(u-v)=\log_2 u-\log_2v$, and it isn’t true that $\log_22^{x-1}=\log_2(x-1)$. Moreover, taking the log base $2$ of $y=2^{x-1}-3$ doesn’t solve for $x$, which is what you need to do in order to find the inverse function. What you want to do is solve $y=2^{x-1}-...
Here's the classic "switch $x$ and $y$ approach." $$x=2^{y-1}-3\\x+3=2^{y-1}\\y-1=\log_2(x+3)\\y=\log_2(x+3)+1$$ Alternately, if you'd prefer to avoid $y$: $$x=f\bigl(f^{-1}(x)\bigr)\\x=2^{f^{-1}(x)-1}-3\\x+3=2^{f^{-1}(x)-1}\\f^{-1}(x)-1=\log_2(x+3)\\f^{-1}(x)=\log_2(x+3)+1$$ <hr> You seem shaky with your log rules,...
https://math.stackexchange.com
184,273
[ "https://mathoverflow.net/questions/184273", "https://mathoverflow.net", "https://mathoverflow.net/users/40983/" ]
It is possible to prove elementarily that there are infinitely many primes that divide some element of the sequence $a_0 = k\ge 0$, $a_n = a_{n-1}^2+ 1$ for all $n\ge 1$ by showing that for all $m$, there exists $C$ that depends only on $m$ s.t. $(a_n, a_{m + n})\le C$ and then showing that this is not possible if the...
It is even true that the equation $n^2+1=m$ with $p|m\Rightarrow p\in S$ has only finitely many solutions. To see this note that every $m$ satisfying this property can be written as $m=m_1m_2^3$, where $m_1$ has only prime factors in $S$ and is cubefree. In particular $m_1$ comes from a finite set of integers. Hence it...
It is even true that the equation $n+1=m$ (without the square) with $p|mn \Rightarrow p \in S$ has only finitely many solutions in $\mathbb{Z}$ when $S$ is a fixed finite set of primes. This is an $S$-unit equation, about which there exists a large body of literature. The basic (ineffective) finiteness result, due to ...
https://mathoverflow.net
134,714
[ "https://dba.stackexchange.com/questions/134714", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/91602/" ]
I am new to Oracle DB and am in need of some help. I would like to drop a specific column but i am getting a specific error. The issue specifically is: <blockquote> SQL Error: ORA-12991: column is reference in a multi-column constraint Cause: an attempt was made to drop a column referenced by some constraints ...
Setup: <pre><code>create table t3 (c1 number, c2 number); alter table t3 add supplemental log group sl1 (c1, c2) always; alter table t3 add constraint t3_uk unique (c1, c2); insert into t3 values (1, 2); commit; </code></pre> Try to drop the column: <pre><code>SQL&gt; alter table t3 drop column c2; alter table t3 d...
If your application is having GG replication. Ensure GG is stopped, delete the trandata. Execute the drop and then add trandata. Start GG. These are the steps followed by my DBA.
https://dba.stackexchange.com
9,926
[ "https://dsp.stackexchange.com/questions/9926", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/5016/" ]
Suppose I have some amplitude modulated carrier wave $x$. If I have no access to the original message wave nor the unmodulated carrier, is it some how possible to calculate what is the modulation depth of $x$? If I have understood this correctly, amplitude modulation depth is given by $M/A$, where $M$ is peak amplitud...
A DFT will convert a segment of a periodic waveform of any frequency (uniquely below Nyquist) into an orthogonal set of frequency results. The problem is that if the signal is not periodic in the FFT length, the result will not be in one result bin, but be smeared into all the FFT result bins, due to convolution with...
Each bin in the FFT actually corresponds to energy in a <em>range</em> of frequencies, so while the notional <em>center</em> frequency of bin <code>i</code> corresponds to a frequency <code>Fs * i / N</code>, the bin will represent energy either side of this notional center frequency. So to answer you question, energy ...
https://dsp.stackexchange.com
57,143
[ "https://mechanics.stackexchange.com/questions/57143", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/23892/" ]
I had an engine seizure that happened while I was driving the car: it ran low on oil and suddenly the engine stopped working (with a bit of smoke). Now after being towed, I have left the car (and added oil) for a couple of weeks, hoping to try and free up the engine. I read online that you can only un-seize an engine ...
A seized engine due to not being used is usually due to the pistons / rings sticking in the bore, which with some freeing fluid may be easily solved, but this will not help the future life of the engine. An engine seized due to lack of lubrication, such as you describe, means that the crankshaft bearings, main bearing...
It's not practical to attempt a repair on that engine; it's toast. It also doesn't sound like you're in a position to do an engine replacement yourself, so you're now looking at a math problem rather than an engineering one; <strong>a</strong>. How much is the car worth in a working condition? <strong>b</strong>. Ho...
https://mechanics.stackexchange.com
4,555,445
[ "https://math.stackexchange.com/questions/4555445", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1065332/" ]
I want to prove that <span class="math-container">$\displaystyle\sum_{k = 0}^{n} {s + k \choose k}{n - k \choose m} = {s + n + 1 \choose s + m + 1}$</span> by using lattice paths. In the case of R.H.S, it is clear that it is all cases of lattice paths of <span class="math-container">$\left(s + m + 1\right) \times \left...
Suppose <span class="math-container">$m &lt; n$</span>, and that your rectangle has height <span class="math-container">$s+m+1$</span> and width <span class="math-container">$n-m$</span>. Draw a horizontal line at height <span class="math-container">$y=m$</span>. Given a lattice path, let <span class="math-container">$...
<span class="math-container">$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[...
https://math.stackexchange.com
48,497
[ "https://chemistry.stackexchange.com/questions/48497", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/6998/" ]
I'm being asked to find the volume of a $\ce{NH3}$ solution ($0.1\ \mathrm{M}$) to be added to $10\ \mathrm{mL}$ of a $\ce{AgNO3}$ solution ($0.1\ \mathrm{M}$) to assure the 'complete formation of $\ce{[Ag(NH3)2]+}$'. Both constants of formation are given: \begin{align*} \beta_1 &amp;= \frac{\ce{[Ag(NH3)+]}}{\ce{[Ag+]...
<strong>Ok, to start let's just check the given answer of 24.3 mL.</strong> The total solution is 34.3 ml (10 mL Ag + 24.3 ml NH3). We'll assume that all 0.001 moles of silver are as species $\ce{[Ag(NH3)2^+]}$ so: $\ce{[Ag(NH3)2^+]} \approx (\dfrac{10}{34.3})0.100 = 0.0291 $ $\ce{[NH3]_{initial} =}(\dfrac{24.3}...
Let $V_0 = 10~\mathrm{ml}$ be the initial volume of $\ce{AgNO3}$, $c_{\ce{AgNO3}} = 0.1~\mathrm{mol\, l^{-1}}$ its concentration, and $c_{\ce{NH3}} = 0.1~\mathrm{mol\, l^{-1}}$ the concentration of the $\ce{NH3}$. If complete complexation means that $\ce{[Ag+]}&lt;10^{-5}~\mathrm{mol\, l^{-1}}$ we could use it as a ta...
https://chemistry.stackexchange.com
565,476
[ "https://physics.stackexchange.com/questions/565476", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/217725/" ]
I want to apply a transformation to the rotating frame of a two level system such that a state in the transformed frame is <span class="math-container">$ |\hat{\phi} \rangle = U |\phi \rangle$</span>, where U is the generator of rotations <span class="math-container">$ U = e^{i\omega J_{z}t}$</span> with its Hermitian ...
<blockquote> The moment I turn on the fan, the fan starts pumping extra air into the space in front of it and the air pressure there should actually be higher than in the surrounding. </blockquote> You probably mean that the fan is able to push more air where it wasn't and produce an increase in pressure. That is true,...
The air in the moving stream has the same pressure as the surrounding air. Bernoulli only applies along streamlines. In the presence of vorticity adjacent treamlines can have different Bernoulli constants.
https://physics.stackexchange.com
195,642
[ "https://softwareengineering.stackexchange.com/questions/195642", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/72479/" ]
In many languages (a wide list, from C to JavaScript): <ul> <li>commas <code>,</code> separate arguments (e.g. <code>func(a, b, c)</code>), while</li> <li>semicolons <code>;</code> separate sequential instructions (e.g. <code>instruction1; instruction2; instruction3</code>).</li> </ul> So why is this mapping reversed...
<blockquote> So why in the same languages such mapping is reversed for for loops. </blockquote> Technically, the mapping is not "reversed". <ul> <li>The things separated by commas are not parameters. In (at least) C++ and Java, they can be declarations, so they are not even expressions.</li> <li>The things separat...
We write loops like: <pre><code> for(x = 0; x &lt; 10; x++) </code></pre> The language could have been defined so that loops looked like: <pre><code> for(x = 0, x &lt; 10, x++) </code></pre> However, think of the same loop implemented using a while loop: <pre><code> x = 0; while(x &lt; 10) { x++; } </code>...
https://softwareengineering.stackexchange.com
622,241
[ "https://electronics.stackexchange.com/questions/622241", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/24436/" ]
Can I build DIY radar system using ESP32 or Raspberry Pi modules + a bit of soldering that will be able to detect drones in a radius 1-2km? Is it possible? What do I need for this and how much will it cost? I need a system which will be able to detect a position of drone if it flies inside of radar radius (like a radar...
It will be expensive, since you'll need to hire an experienced RF engineer to design it, make the prototype, then pass the prototype through certification needed to legally operate it. And you'll likely need a license for a fixed radar installation. Very simple things like those microwave radar speed indicating road si...
You might have better luck with an optical system - the quick-and-dirty solution is to station somebody with a pair of binoculars, although you might consider teaching an AI system to spot drones. It’s not directly an answer to the ‘is it possible’ question but may achieve the objective.
https://electronics.stackexchange.com
18,026
[ "https://softwareengineering.stackexchange.com/questions/18026", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/7384/" ]
I'm working with a web company that's approaching a point where it will likely need re-think the product as a V2 - due to outgrowing some of its V1 foundations and principles that have been built into virtually everything, from the data model to the user interfaces. For various reasons, this evolution might involve a m...
If this is a commercial application that's your company's business, you may be better off going without a 3rd party framework entirely. Then when time for v3 comes around, you wont be facing this same problem again. And you'll never be in a situation where you have to keep adjusting your code in response to updates t...
Learn the new framework very well first, and make sure it is going to meet your needs, and that you really grok the paradigms of the new framework. You are going to have to throw out a lot of code, and that's ok. The important thing is that you are using the new framework the way it was meant to be used, taking full a...
https://softwareengineering.stackexchange.com
55,213
[ "https://physics.stackexchange.com/questions/55213", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/8082/" ]
Electricity and magnetism was unified in the 19th century, and unification of electromagnetism with the weak force followed suit, bringing into play the electroweak force. I've been told that unifying these with the strong force is likely to be far easier than unifying them with gravity, albeit still very hard. Appa...
If you go back to the origins, the difficulty in merging gravity with the other forces mostly stems from general relativity being a purely geometric theory -- again, that's in its original form -- and all the other forces being quantum, by which I mostly mean they are conveyed by well-defined force particles. The photo...
A detailed account of the subtleties and technicalities that highlight the problem, is a research topic by itself! An attempt is made here to provide some brief discussion on epistemological arguments, without mathematical jargon or detailed phenomenology, which I am sure some would wish to complement or improve. I wo...
https://physics.stackexchange.com
87,464
[ "https://mechanics.stackexchange.com/questions/87464", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/2618/" ]
The front crankshaft bolt, that secures the harmonic balancer, which is also the driving pulley of the drive belt, is 184 ft/lbs on my Tacoma. The Haynes manual says to use a pin spinner to lock the balancer/pulley in place while untwisting the bolt. Since I didn't have a pin spinner that matched, I just shifted in 1st...
The short answer is Yes, they are safe to use. Indeed the Autoglym Motorcycle Care pack includes the exact same polishes as they include in the Car Care pack. Obviously with a motorcycle there are more exposed components so be careful not to get the electrical items too wet. Interesting side note, I've also used car p...
Yes completely, I use either 3M or Motomax wax on my Duke 250 tank, headlamp housing, tank shrouds, and orange part of the frame. It takes a little effort but you will totally love the results. I also use it on my helmet!
https://mechanics.stackexchange.com
20,604
[ "https://physics.stackexchange.com/questions/20604", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7527/" ]
In David J. Griffiths's <em>Introduction to Electrodynamics,</em> the author gave the following problem in an exercise. <blockquote> <em>Sketch the vector function</em> $$ \vec{v} ~=~ \frac{\hat{r}}{r^2}, $$ <em>and compute its divergence, where</em> $$\hat{r}~:=~ \frac{\vec{r}}{r} , \qquad r~:=~|\vec{r}|....
Pretty sure the question is about $\frac{\hat{r}}{r^2}$, i.e. the electric field around a point charge. Naively the divergence is zero, but properly taking into account the singularity at the origin gives a delta-distribution.
I have the same book, so I take it you are referring to Problem 1.16, which wants to find the divergence of $\frac{\hat{r}}{r^2}$. If you look at the front of the book. There is an equation chart, following spherical coordinates, you get $\nabla\cdot\vec{v} = \frac{1}{r^2}\frac{\mathrm{d}}{\mathrm{d}r}\left (r^2 v_r\r...
https://physics.stackexchange.com
4,177,052
[ "https://math.stackexchange.com/questions/4177052", "https://math.stackexchange.com", "https://math.stackexchange.com/users/795849/" ]
I fail to see difference between <span class="math-container">$\exists x \forall y P(x) \vee Q(y)$</span> and <span class="math-container">$\forall y\exists x P(x) \vee Q(y)$</span>. after all, there is no relation between x &amp; y, and all we need to do is to check if one of the statements is true for the overall st...
If <span class="math-container">$P(x)$</span> has a single value that makes it true, both statements are true due to the fact that it is an or. If <span class="math-container">$P(x)$</span> is a contradiction, then the truth value of the or reduces to <span class="math-container">$Q(y)$</span>, so it will only be tru...
Working with the formulae as given: <ul> <li><span class="math-container">$$\exists x \forall y P(x) \vee Q(y)$$</span> is first-order equivalent to <span class="math-container">$$\exists x P(x) \vee Q(y),$$</span> which is first-order equivalent to <span class="math-container">$$\forall y\exists x P(x) \vee Q(y).$$</...
https://math.stackexchange.com
81,754
[ "https://stats.stackexchange.com/questions/81754", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/29153/" ]
<pre><code> acf(c(0,1,2,3,4,5),plot=FALSE) Autocorrelations of series ‘c(0, 1, 2, 3, 4, 5)’, by lag 0 1 2 3 4 5 1.000 0.500 0.057 -0.271 -0.429 -0.357 </code></pre> Why does the ACF output becomes negative as lag increases? My understanding is that no matter what the lag is, the ser...
Let $x = (x_1, x_2, \ldots, x_n)$ be the series. Set $$y_t = x_t - \bar{x}.$$ These are the residuals with respect to the estimated mean $\bar{x} = \frac{1}{n}\sum_{t=1}^n x_t$ of the series. For $k=0, 1, 2, \ldots, n-1$ the <code>acf</code> function is computing $$\text{acf}(x)_k = \frac{\sum_{t=1}^{n-k} y_t y_{t...
I am gonna show it for the case when the time series is a special form of $Y_t=0,1,2, ...,n.$ First assume $n$ is odd. So the $\bar{Y}=n/2$ that will happen at the time $(n+1)/2$. The formula for the sample acf at lag $k$ is $r_k=\dfrac{\sum_{t=k+1}^n(Y_{t}-\bar{Y})(Y_{t-k}-\bar{Y})}{\sum_{t=1}^n(Y_{t}-\bar{Y})^2}$.<br...
https://stats.stackexchange.com
40,221
[ "https://dba.stackexchange.com/questions/40221", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/23687/" ]
If I do the following MySQL query <pre><code>select * from table where name Like '%john%' limit 5; </code></pre> that mean the query will search all the mysql database table and return only the top 5 results that match the query where condition. <strong>BUT</strong>, what if want to just search the top 1000 records ...
You could use something like this: <pre><code>SELECT * FROM ( SELECT * FROM your_table ORDER BY ... limit 1000 ) s WHERE name LIKE '%john%' ORDER BY ... LIMIT 5 </code></pre>
You can't do something like a 'first 1000' without an order, since each query could give you a different order if you don't specify it. So, let's try this way: <pre><code>select * from (select * from table order by PUTYOURORDERFIELDHERE LIMIT 1000) where name like '%john%' limit 5; </code></pre>
https://dba.stackexchange.com
105,283
[ "https://electronics.stackexchange.com/questions/105283", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/13393/" ]
I guess it's a bad thing to try to debug a microcontroller-based project using <code>printf()</code>. I can understand that you have no predefined place to output to, and that it could consume valuable pins. At the same time I've seen people consume a UART TX pin for outputting to the IDE terminal with a custom <code...
I can come up with a few disadvantages of using printf(). Keep in mind that "embedded system" can range from something with a few hundred bytes of program memory to a full-blown rack-mount QNX RTOS-driven system with gigabytes of RAM and terabytes of nonvolatile memory. <ul> <li>It requires someplace to send the data...
In addition to some other fine answers, the act of sending data to a port at serial baud rates can just be downright slow with respect to your loop time, and have an impact on the way the remainder of your program functions (as can ANY debug process). As other folks have been telling you, there's nothing "bad" about...
https://electronics.stackexchange.com
25,923
[ "https://quant.stackexchange.com/questions/25923", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/15738/" ]
Suppose we have : $\frac{dS_{t}}{S_{t}}= \sigma dW_{t}$ with $\sigma_{t}$ a stochastic volatility process. How to compute $\mathbb{E}^{Q}[(S_{T}-K)+]$ ? Is there a BS alike formula : "$S_{0}N(d+)-Ke^{-rT}N(d-)$" ? Tx !
[<strong>Short answer</strong>] No closed-form formula in general. You need to resort to numerical methods. Monte Carlo is preferred by most practitioners but you could also use Finite Difference schemes (and sometimes even Fourier inversion techniques depending on the model used and the instruments to be priced). [<...
The answer is yes. In fact, there always exist a 'Black Scholes like' formula. Easy to show too. If the risk neutral distribution of the price has cumulative density $P$ and probability density $p$, then $$ E(S-K)^+=E((S-K)\ 1_{S&gt;K})=E(S\ 1_{S&gt;K})-K\ E(1_{S&gt;K}) $$ The second expectation is just $P(K)$, ie th...
https://quant.stackexchange.com
6,511
[ "https://astronomy.stackexchange.com/questions/6511", "https://astronomy.stackexchange.com", "https://astronomy.stackexchange.com/users/2439/" ]
Just wondering if we can examine individual stars from other galaxies, or if we are pretty much stuck with the billions that are in the Milky Way?
Yes, Edwin Hubble did that for the first time in 1919. Before that time, it was thought that the galaxies we can observe were just nearby gas nebulae located inside our Milky Way. But Hubble was able to resolve the nearby galaxies like the Andromeda nebula into individual stars. By measuring the brightness of so-called...
In addition to Count Iblis wonderful answer, consider that supernovae in other galaxies <strong>can sometimes be seen with low-powered binoculars</strong>. I seem to remember mention of a naked-eye extra-galactic supernova, but I cannot find the reference.
https://astronomy.stackexchange.com
43,291
[ "https://physics.stackexchange.com/questions/43291", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/5265/" ]
Assuming that it's engines are incapable of dying out at 100km altitude, would mere addition of airfoil area enable a commercial liner e.g. B787 to reach that altitude?
The individual streamline with velocity zero may not make much sense on its own, but it often does when you consider the bulk of the fluid as a whole. In the case of the surface of a body immersed in a fluid, you could trace a streamline starting at a point infinitesimally close to the surface, where the velocity would...
Yes I think it makes sense when the surface boundary layer is so thin that it can be neglected. You are assuming no drag or friction by the surface on the fluid. Or you are assuming the viscosity of the fluid can be neglected. The boundary is still there because you do not allow flow normal to the surface. It is not r...
https://physics.stackexchange.com
231,795
[ "https://dba.stackexchange.com/questions/231795", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/174312/" ]
I am trying to complete an assignment for my CIS class and I am required to include a data type called ENUM. I know that this stands for enumerated lists, but I am not sure when would be an appropriate time to use ENUM. A couple of the examples given in the book I am using were like a list of the continents. Could I us...
ENUM datatype can be seen as a "human-readable" numeric value, commonly used for convenience and data storage efficiency. Let's take your example with a table listing the countries and their respective continents. <h2>Using VARCHAR</h2> <pre><code>CREATE TABLE country_continent ( country VARCHAR(100), contin...
Generally enums are for static lists, i.e. lists that never change. Departments is a bad choice because these can change at any time. Continents is good because these are highly unlikely to change, but countries would be bad because these do change. Think of things that are constants, such as seasons, months, day of we...
https://dba.stackexchange.com
14,897
[ "https://robotics.stackexchange.com/questions/14897", "https://robotics.stackexchange.com", "https://robotics.stackexchange.com/users/17442/" ]
A robotic system is moving a getting its current location using visual odometry (incremental estimation of rotation and translation). To correct its localization, a loop closure technique may be added. However, this technique based on image comparison is costly. I want to find a way to only use this technique of loop c...
You can of course check if the robot is close to a prior position and looking in a similar direction (after he had moved away from this position sufficiently). But if your odometry was reliable enough to do this, you wouldn't really need loop closing. Loop closing was invented for exactly the reason that you cannot tru...
Well, there is an old solution that finds a possible loop closure by a growing uncertainty of the current location which was popular in EKF based SLAMs. In such way, you can reduce the number of the candidates for the place recognition. But I guess trajectory only is probably not enough for a loop closure unless you as...
https://robotics.stackexchange.com
41,919
[ "https://electronics.stackexchange.com/questions/41919", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/10499/" ]
I've seen many 2-layer PCBs that have a ground pour on both the top and bottom layers, I was wondering why do that ? and wouldn't it be better to use the top layer for power and signals and the bottom layer for ground to simplify the routing and also taking advantage of the capacitance between the planes ?
Good layout and grounding seems to be poorly understood out there so religion finds a foothold. You are right, there is really very little reason to use both the top and bottom of a two layer board for ground. What I usually do for two layer boards is to put as much of the interconnects as possible on the top layer. ...
Having a power plane on the top and ground at the bottom would hardly give any capacitance. \$ C = k \cdot \epsilon_0 \cdot A / d \$ where k is relative permittivity, about 4.5 for FR4, \$\epsilon_0\$ is permittivity of empty space, 8.85 pF/m, \$A\$ is area in square meter, and \$d\$ is distance also in meter. A Euro...
https://electronics.stackexchange.com
431,911
[ "https://softwareengineering.stackexchange.com/questions/431911", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/258140/" ]
I work as a Website developer. We use a framework for building the backend of our sites. This framework recently released a new major version with lots of breaking changes. We have some sites using the old and many sites using the new major version. I am currently tasked with writing a module that needs to work with bo...
If the two framework versions effectively require that you maintain two independent versions of the module, it is best to create two independent packages: <code>module-framework_v1</code> and <code>module-framework_v2</code>. That gives the clearest signal to everyone involved that if there are modifications or bug-fix...
Leveraging the idea of Semantic Versioning, incrementing the MAJOR version is justified when: <ul> <li>There are significant internal changes (i.e. changing underlying frameworks)</li> <li>There are significant API changes</li> </ul> In short, incrementing a major version is a signal that users of the module should exp...
https://softwareengineering.stackexchange.com
52,461
[ "https://electronics.stackexchange.com/questions/52461", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/9243/" ]
I've been told that analog video signal from computer's graphics card changes somehow, and because of that there is an "auto" button on many monitors that connect via d-sub. Why does the video signal change?
Although the screen of an analog color monitor is divided into many individual picture elements (RGB phosphor triplets), there is no fixed relationship between those and the pixels generated by the computer. Instead, an analog monitor will project a slightly blurred image of the computer's pixels onto the back of the ...
The issue with the old fashioned analog video signals like your "d-sub" connector (SVGA probably) carries is that there was no guaranteed exact registration of where the pixles are to the sync pulse. In analog this didn't matter. The image would appear a little left or right, and you'd expect to adjust the monitor fo...
https://electronics.stackexchange.com
122,284
[ "https://physics.stackexchange.com/questions/122284", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/52410/" ]
As a physics newbie I'm trying to get a grip on basic orbital mechanics. I think I'm beginning to get grasp on how bodies interact with each other. When a body approaches another body it accelerates due to gravity. It can reach a point where its velocity is high enough to keep falling but also keep missing the object i...
It does keep accelerating. Its velocity in the direction of the object being orbited keeps increasing. But this direction keeps changing. The reason the satellite's total speed doesn't increase, at least in the case of a circular orbit, is that while its velocity towards the object increases, its tangential motion...
You're right - the objects <em>are</em> always accelerating while orbiting, and this acceleration is due to gravitational influence. However, force/acceleration don't always cause an increase in speed. For example, a force acting opposite to the velocity will slow an object, and a force acting perpendicular to the vel...
https://physics.stackexchange.com
349,567
[ "https://physics.stackexchange.com/questions/349567", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/130615/" ]
$W=mg$ When finding the weight of an object, why do we multiply the mass of the object by the acceleration do to gravity $g$ even though the object isn't moving downwards?
Actually, to find the force (weight) you are multiplying the mass by the local gravitational field. The reason people colloquially say 'acceleration due to gravity' is because of Newton's 2nd law, applied to the gravitational force. If the local gravitational field is designated by $\vec{g}$, then the force is $$\vec...
The weight of an object is typically thought of when putting something on a scale. But where does the force come from that pulls an object downward in the first place? It is the force of gravity acting on the object. And from Newtown's second law, we know that a net force has the relation: $F_{net}=ma$. Sometimes for g...
https://physics.stackexchange.com
65,929
[ "https://cs.stackexchange.com/questions/65929", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/31167/" ]
Computers and programming languages tend to be deterministic and predictable. Yet progress bars seem the opposite, especially if the operation is complex. Even for world class professional products, some progress bars do little to reflect the real progress of an operation. I've seen them go from 10% to 90% in one le...
To add to the more general answers so far I can give a few examples from my field where progress bars don't work and why; Computer aided design programs - programs that perform thermal analysis or fluid mechanics can be generally terrible with progress bars. They jump forward, backwards, take inconsistence steps and t...
Both. Sometimes it's just difficult to estimate how much time an operation will take, because you don't know ahead how much work needs to be done. Sometimes its simplistic and inaccurate estimates. Example: I'm downloading four files simultaneously. Someone knows how big each file is, how much has been downloaded, an...
https://cs.stackexchange.com
374,653
[ "https://physics.stackexchange.com/questions/374653", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/56368/" ]
I'd like to somehow make a laser beam have a flat profile, or at least as flat as possible in the middle. The source is a diode laser (ThorLabs LD808-SA60 or similar), so it has different beam divergence parallel or perpendicular to the junction. It is possible to collimate it with a spherical lens and cylindrical ...
Because both the Fermi-Dirac distribution and the Bose-Einstein distribution are well approximated by the Maxwell-Boltzmann distribution in the limit of low density. Basically, the assumption behind the ideal gas is that the gas density is low enough that collisions are not a significant factor in describing the dynami...
Classical ideal gas is approximation such that number of energy states is very large. (g>>n) So the particles don't compete to occupy same energy state. Actually, we ignore because this case(particles with same state) is very unlikely. And if number of states is not large enough, then we must consider quantum statisti...
https://physics.stackexchange.com
151,830
[ "https://softwareengineering.stackexchange.com/questions/151830", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/56016/" ]
Value types are types which do not have an identity. When one variable is modified, other instances are not. Using Javascript syntax as an example, here is how a value type works. <pre><code>var foo = { a: 42 }; var bar = foo; bar.a = 0; // foo.a is still 42 </code></pre> Reference types are types which do have an i...
You are defining value types and reference in a language agnostic way, but doing so only by example in terms of changing of data members. Logically, making the types immutable makes you lose the only difference guaranteed by your definition (and the answer might be "no"). However, once we start looking at particular ...
Yes, equality still differs: <pre><code>a: value type = 4; b: value type = 4; c: reference type = 4; d: reference type = 4; a == b; // true; c == d; // false; </code></pre> C# cheats for things like strings by consolodating references that are equivalent, but this isn't strictly necessary for immutable reference ty...
https://softwareengineering.stackexchange.com
25,472
[ "https://mathoverflow.net/questions/25472", "https://mathoverflow.net", "https://mathoverflow.net/users/6031/" ]
In the simplest cases, the fundamental group serves as a measure of the number of 2-dimensional "holes" in a space. It is interesting to know whether they capture the following type of "hole". This example may look pathological, but one must understand where one gets stuck, when one tries to study pathological spaces...
The earlier answers showing that the fundamental group of this space is infinite cyclic by determining its universal cover or by constructing a fiber bundle over it with contractible fibers are very nice, but it's also possible to compute $\pi_1(X)$ by applying the classical van Kampen theorem not to $X$ itself but to ...
There is a projection map from $R^2 \setminus (0,0)$ down to this doubled line that simply forgets the y-coordinate except at x = 0. At x = 0 it projects y > 0 to the top origin and y &lt; 0 to the bottom origin. Using the open cover of the doubled line by two copies of R, one can show that this projection map is a f...
https://mathoverflow.net
83,732
[ "https://electronics.stackexchange.com/questions/83732", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/23638/" ]
Sorry for asking a question about the same subject as my last question, but I am once again stuck on a BJT Amplifier design problem. <img src="https://i.stack.imgur.com/teRbZ.jpg" alt="enter image description here"> Where the beta parameter may vary from 100 to 800, the voltage between the emitter and the base equals 0...
The DC collector current is determined by \$R_E\$: \$I_C = \alpha \dfrac{9.4V}{R_E} \approx \dfrac{9.4V}{R_E}\$ Since you require \$I_C &lt; 1.25mA \$, the constraint equation is: \$R_E &gt; \dfrac{9.4V}{1.25mA} = 7.52k\Omega\$ The second requirement, maximum output voltage swing, without any other constraint, doe...
I have the impression that this is a homework question, so I'll answer with some simplifications/neglections. Up to you to do more accurate calculations. Let's say Ic = Ie (which isn't exactly true, but good enough for me as it is you homework, not mine ;o)). Ie = Ic = 1.25mA Also you know that the base voltage is 0...
https://electronics.stackexchange.com
126,335
[ "https://stats.stackexchange.com/questions/126335", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/37226/" ]
Let us work with the following structural model: $$y=\mathbf{x_{1i}β}+x_{2i}β_2+\varepsilon_i$$ where $x_{2i}$ is our single endogenous regressor. It turns out that given my instruments and my first stage regression, I can obtain $β_2$ in two different ways. I can use the two stage least squares regression $$y=\mathbf...
When I am trying to figure out why a result is true, I usually look at it in the simplest possible case. So, let's try a bivariate system. Here is the structural system: \begin{align} y_i &amp;= \beta x_i + \epsilon_i\\ x_i &amp;= \delta z_i + \nu_i \end{align} Here, everything has a zero mean, and $z$ is a valid ins...
Here is a more general argument for the multivariate case to compute $\widehat{\delta}_{2SLS}$: <ol> <li>Regress the regressors $Z$ on the instruments $X$ and save the residuals $\widetilde{Z}:=M_{X}Z=Z-X(X'X)^{-1}X'Z$.</li> <li>Regress $y$ on $Z$ and $\widetilde{Z}$, $$ y=Z\widehat{\delta}+\widetilde{Z}\widehat{\thet...
https://stats.stackexchange.com
139,494
[ "https://physics.stackexchange.com/questions/139494", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/59062/" ]
Today is the day I ask silly questions : <img src="https://i.stack.imgur.com/jDGTl.jpg" alt="enter image description here"> The book says the particles passing through the surface $dS$ are the ones contained in the cylinder of volume $dS.v.dt.cos(\theta)$ but I really don't see why. For me, all the particles in the ...
Look at large $\theta$ : fewer particles per unit time will reach the surface because their perpendicular velocity is much less. When $\theta = \pi/2 $ zero particles cross the surface.
The volume of the shape drawn there <em>is</em> $dS\,v\,dt\cos(\theta)$. $dS$ is not a cross section, it is at an angle to the axis $v$ is aligned with.
https://physics.stackexchange.com
51,170
[ "https://electronics.stackexchange.com/questions/51170", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/15955/" ]
I am curious, are there any reasons why Altium tends to route a trace to the side of a pad, instead of the top? The top looks more logical, since it will not disturb other traces in a SOIC for example. I am including a picture for reference. EDIT: I am not using Auto Route. It's the snap of the trace on the pad that b...
It's worth noting that the mouse-snap actually <em>uses the autorouter</em> to some extent. Depending on the routing mode you have enabled, it will behave differently. <kbd>Shift</kbd>+ <kbd>R</kbd> while in the interactive routing mode (e.g. placing traces) changes the routing mode. Anyways, if you want to change t...
Autorouters typically employ a scoring system for figuring out "optimal" routes. Vias cost a certain amount, distance costs, angles have a cost... The lowest cost overall "wins." But this by no means imbues the autorouter with any sense of artistic quality or knowledge of what is aesthetically "better." There are cert...
https://electronics.stackexchange.com
101,303
[ "https://electronics.stackexchange.com/questions/101303", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/37910/" ]
I'm trying to solve a seemingly simple problem with (hopefully) an equally simple solution. I'm strictly an amateur when it comes to electronics, so I'm hoping someone here can guide me in the right direction so I don't do something stupid and fry my iPhone... I have an iPhone dock in my car, and the dock routes the ...
A parallel load, like resistors, would work, but like any parallel load, will draw more current or share the existing one, resulting in a lower signal at the input. Anyone that has used a headphone splitter will notice this. The solution to that would be an amplifier, like used in powered headphone splitters. <img src=...
Potentially it may work and should be safe, although resistors of lower value than headphone impedance (32 ohms) could theoretically be damaging. I would try 100 ohms and 50 ohms first. Standard 1/4 watt resistors will do. Note there will be a loss in signal amplitude through the resistor. Make sure you avoid the possi...
https://electronics.stackexchange.com
156,385
[ "https://physics.stackexchange.com/questions/156385", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/68952/" ]
When we say something travels close to the speed of light, what is its speed relative to? For example, we have 4 highly advanced spacecraft at rest beside each other, labelled A, B, C and D.<br> We leave A at rest and accelerate B, C and D to .8c.<br> We can now consider B, C and D to be at rest and that A is retrea...
Yes we can. According to special relativity, all inertial frames of reference are equal. What might seem as a paradox here, is that if C is travelling at $0.8c$ with respect to B, C should be travelling at $1.6c &gt; c$ with respect to A, which is a contradiction. However that argument is flawed, because the correct f...
<blockquote> When we say something travels close to the speed of light, what is its speed relative to? </blockquote> Left unspecified, it is generally understood that the speed is relative to the frame of reference in which one is at rest. However, it's better to explicitly specify the reference frame with respec...
https://physics.stackexchange.com
310,029
[ "https://physics.stackexchange.com/questions/310029", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/126999/" ]
Light bulb brightness increases with power, $P$. So why doesn't increasing $R$ increase $P$ and hence increase brightness as $P=I^2\cdot R$ due to $P=I\cdot V$ and $V=I\cdot R$? I read increasing $R$ decreases brightness.
Power sources can work in two modes : control voltage (CV) or control current (CC). In CV mode, the voltage is imposed, and the output current is adjusted depending on the load. This is for instance the case at home, where the electrical plugs deliver 100V (or 220V depending of country), regardless of what is plugged ...
You can use any of these formulas to calculate $P$: $$P = I^2 \cdot R$$ $$P = \frac{V^2}{R}$$ They are both correct and will give same result. You can not tell which one is "dominant". But to use these formulas you need to know not only $R$ but also $I$ or $V$. And to analyze these formulas you need to know how $I$ ...
https://physics.stackexchange.com
1,599,677
[ "https://math.stackexchange.com/questions/1599677", "https://math.stackexchange.com", "https://math.stackexchange.com/users/245360/" ]
I'm trying to solve the following exercise in my book: <blockquote> Find an orthonormal basis $\alpha$ for the vector space $\left(\mathbb{R},\mathbb{R}^{2 \times 2},+\right)$ (with default inner product, $ \langle A,B \rangle = Tr(A \cdot B^T $)) such that the matrix representation $L_\alpha^\alpha$ of the li...
In vector notation your transformation is: $$ L \begin{bmatrix} x\\y\\z\\t \end{bmatrix}= \begin{bmatrix} x+y+t\\x+y+z\\y+z+t\\x+z+t \end{bmatrix} $$ so, by a simple inspection, you can see that it is represented by the matrix $$ L= \begin{bmatrix} 1&amp;1&amp;0&amp;1\\1&amp;1&amp;1&amp;0\\0&amp;1&amp;1&amp;1\\1&amp;0...
Hint: Find the eigenvalues and eigenvectors for this map. Choose the eigenvectors in such a way that you obtain an orthonormal basis. Then find the matrix representation of your map with respect to this basis.
https://math.stackexchange.com
367,122
[ "https://softwareengineering.stackexchange.com/questions/367122", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1928/" ]
<h2>The Problem</h2> I'm looking for a query to help me solve the following: <ul> <li>I have a series of events</li> <li>Each event has a start and end date.</li> <li>Many of these events overlap</li> <li>The answer I'm looking for is the maximum number of events that overlap</li> </ul> <h2>Example</h2> Say I have ...
It might be more performant to write this in code, not sql. In code, I would sort the items by start date, then end date. Walk through them and check if it overlaps with the next item. If it does, increment its overlap counter and repeat: check the next item overlaps with your item. If it doesn't, move on to the next....
Another strategy in relational databases is to have a table with a record for each calendar day. This helps in situation where you're trying to determine days that don't exist in your system. It's just easier for them to work with data that are there instead of relying on the database to create data by calculation. Wi...
https://softwareengineering.stackexchange.com
1,983
[ "https://electronics.stackexchange.com/questions/1983", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/566/" ]
When driving an LED with PWM, the brightness (as I perceive it) does not scale linearly with duty cycle. The brightness is slow to ramp up, then increases exponentially with duty cycle. Can anyone suggest a rule of thumb to use as a correction factor, or other workaround?
For 16 levels it's easy to do a simple look-up table "by hand" and convert the 4 bit value in an 8 bit value to pass to PWM controller: this is the component i've used in my FPGA led array driver. For an 8 bit level controller, you'll need at least 11-12 bit output from the look-up table. <pre><code>library IEEE; use ...
In theory it should be exponential, but I've got best results for fading by using a quadratic function. I also think you got it backwards. At low duty cycle the perceived increase in brightness is much bigger than at almost full duty cycle, where the increase in brightness is almost imperceivable.
https://electronics.stackexchange.com
92,150
[ "https://electronics.stackexchange.com/questions/92150", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/29932/" ]
I noticed (I have some radios I was testing stuff with) that signal quality (not necessarily strength) seems to change from room to room. The frequency of my radio is 2.4GHz, bit rate is 100kHz. It can't be delay spread because the rooms aren't large enough for that to really play a role. No doppler, because the node...
You're probably seeing some form of multipath interference. After the signal is transmitted, it can bounce around quite a bit and the receiver can end up getting several overlapping copies of the original signal. Depending on their time delays, this can manifest itself in several ways. First, if the offset is less t...
Where is the transmitter? What kind of receiving antenna? How directive are these antennas? Signals transmitted at 2.4 GHz are affected by walls depending on their composition and the angle at which the signal has to travel through the wall to reach the receiver. Instructions for any wi-fi router have guidelines fo...
https://electronics.stackexchange.com
27,787
[ "https://softwareengineering.stackexchange.com/questions/27787", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/8073/" ]
We have recently replaced binary based communication protocol with XML one (between browser based client and server). The implementation is almost complete, however I am looking for ways to improve its performance both for faster transmission and parsing. Any ideas ? Please post link along with the answer.
I presume this is a web service and using C++ as a mod extenstions to a web server rather than writing your own. To speed up transfer you could be able to enable gzip compression on the web server, this is relatively straight forward in all modern web servers. Parsing could be sped up by: <ol> <li>Reducing node coun...
Use compression if you have the needed computing power on both ends.
https://softwareengineering.stackexchange.com
546,716
[ "https://electronics.stackexchange.com/questions/546716", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/159456/" ]
I'm not sure if this is true in general, but all intel hex files I have seen (from Atmel Studio, STM32CubeIDE and MPLAB) use data records with a length of 16 bytes. Even when the addresses written to are completely sequential there are just a lot of 16 byte records. This results in a lot of redundancy, because the prea...
The Intel Hexadecimal Object File Format Specification rev. A from 1988 acknowledges that representing binary data as ASCII makes it possible to store binary files into non-binary medium such as punch cards. The maximum data record size is 255 bytes, but even a 32-byte data record would not fit into a 70-column puch ca...
One could say &quot;for historical reasons&quot;, but also that it is good practice for these reasons: <ul> <li>Each line has a checksum. Applying the checksum to a smaller number of bytes makes it less prone to errors annihilating each other in the checksum;</li> <li>There are bootloaders that accept hex files direct...
https://electronics.stackexchange.com
4,704
[ "https://electronics.stackexchange.com/questions/4704", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1334/" ]
I want to create something like ambilight that can work based on a composite tv input. Basically I need to work out the average colour and brightness at 3 or 4 points along each edge which can then be used to control strips of RGB leds. I have no problem with the LED control part but where do I start with dealing wit...
The current through each LED would not change. Each one would draw 5/330 or 15mA (I=V/R). The power supply would have to supply 4*15mA or 60mA. You didn't change the amount of current through any of the LEDs, all you did is add more of them in parallel. Let's use a classic water analogy: you have a bucket of water ...
Ohm's law: V = R x I As you can see, voltage is directly proportional to resistence and current. The current through an ideal voltage source is completely determined by the external circuit. The ideal voltage source does not change its voltage. So, when the resistance value decreases, the current value must increase t...
https://electronics.stackexchange.com
161,030
[ "https://physics.stackexchange.com/questions/161030", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/71320/" ]
The photon or electron is just <em>one</em> subatomic particle, but if it hits the film and creates a dot visible to the human eye (btw, modern technology can do this), then the dot must be a collection of millions of atoms or molecules on the screen that have been transformed via chemical reactions triggered by that s...
<blockquote> but if it hits the film and creates a dot visible </blockquote> I guess that You think of a classical film made from silver halide crystals in gelatin? Your assumption is quite good, only the "atom" is not the right thing. Research on the most sensitive films showed that about 4 absorbed photons ar...
<strong>ALL</strong> reactions are a matter of energy, even when at the surface they may appear as something chemical, physical, .. etc. The visible results of the chemical reaction involves not only that one particle but also the kinetic energy and the transfer of that energy from the collision. An everyday example w...
https://physics.stackexchange.com
592,486
[ "https://physics.stackexchange.com/questions/592486", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/123183/" ]
I have some confusion about potential energy in Newtonian mechanics and field energy in classical Field mechanics. I have many questions but they are all strongly related. In Newtonian mechanics, we analyze a system of two particles A &amp; B attracted to each other by a conservative force, and say that there is kineti...
<blockquote> In Newtonian mechanics, we analyze a system of two particles A &amp; B attracted to each other by a conservative force, and say that there is kinetic energy and potential energy. Kinetic energy depends on their masses and velocities, and potential energy depends on their distance. </blockquote> You say the...
Yes each point of the space have some field energy located there. The potential energy is another expression of it in a simpler form. This equality can be seen by integration by part. <span class="math-container">$$\mathcal{E}_{field}=\iiint (\nabla \phi)^2d^3x=-\iiint \phi\Delta\phi d^3x = \iiint\phi \rho d^3x = \math...
https://physics.stackexchange.com
525,681
[ "https://math.stackexchange.com/questions/525681", "https://math.stackexchange.com", "https://math.stackexchange.com/users/100756/" ]
I'm struggling to work out odds on a game that were working on. It's probably best if I write an example as I'm <em>really</em> not a mathematician! I'm working on a dice game where the player bets 1 coin and rolls 3 dice. If any of the dice are a 6 we payout based on the following. If 1 dice is a six we pay x If 2 ...
The probabilities you have are wrong. Denote by $X$ the number of sixes rolled. Then the correct probabilities are:<br> $P(X = 0) = \left(\frac{5}{6}\right)^3 = \frac{125}{216}$ $P(X = 1) = P$ (first dice six) $ + P$(second dice six) $ + P$(third dice six) $= \frac{1}{6} \frac{5}{6} \frac{5}{6} + \frac{5}{6} \frac{1}{...
I cant comment so I will answer. Are you sure of your percentages for one six? I got this result: There is a total of 6^3=216 combinations if you roll 3 dice. There are 5^2x3=75 combinations that you will get one 6. Thus there is a 75/216=<strong>25/72</strong> chance of getting only one 6 when rolling 3 dice.
https://math.stackexchange.com
3,358,245
[ "https://math.stackexchange.com/questions/3358245", "https://math.stackexchange.com", "https://math.stackexchange.com/users/592479/" ]
Here is a theorem which can be found in page 92 of <em>Introduction to Real Analysis, Fourth Edition by Robert G. Bartle and Donald R. Sherbert</em>. <blockquote> If <span class="math-container">$(x_n)$</span> is an unbounded increasing sequence, then <span class="math-container">$\lim(x_n)=+\infty$</span>. <strong>Pro...
If an increasing sequence <span class="math-container">$(x_n)$</span> has an upper bound <span class="math-container">$M$</span> then <span class="math-container">$x_1 \leq x_n \leq M$</span> for all <span class="math-container">$n$</span> and this implies that <span class="math-container">$(x_n)$</span> is bounded. S...
For <span class="math-container">$n$</span> sufficiently large, <span class="math-container">$x_n$</span> must be positive, since the sequence is increasing and unbounded. Suppose not, then, you'd have <span class="math-container">$x_1\leq x_n\leq 0$</span> for all <span class="math-container">$n\in \mathbb{N}$</span>...
https://math.stackexchange.com
206,381
[ "https://softwareengineering.stackexchange.com/questions/206381", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/33930/" ]
I will be moving workplace in the near future and I believe they will be very interested in my experience of Scrum and how it may relate to their business. I am trying to understand if it will work in their environment. My current place of work we have a 2 products/2 backlogs/2 separate teams. These backlogs are obvio...
I work as a Development Manager in exactly this environment, and have inplemented Scrum extremely successfully with a team of 4 over the past year, from what was a horrible mess. It took a bit of time to get to where we are now, but it works great. I will try to summarise the most important actions, but feel free to en...
I'm currently working as part as a 4-person scrum team that is responsible, to one degree or another, for everyone of our company's products. Totaling at roughly 16 products, plus a mess of semi-connected one-off's, I can tell you from experience that scrum doesn't endear itself to a multi-project environment. As state...
https://softwareengineering.stackexchange.com
149,135
[ "https://physics.stackexchange.com/questions/149135", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/57998/" ]
I'm reading Griffith's text, and he starts by defining Electrostatics as requiring the source charges don't move. I've seen a few slightly different definitions of electrostatics and magnetostatics. If you wanted to start from the full Maxwell equations in a vacuum, how would you precisely define Electrostatics and Mag...
I guess different authors use different definitions. For me, it is that the E- and B-fields do not have time derivatives, hence curl free, conservative E-fields and B-fields that can depend only on steady currents. The condition that the divergence of $\partial {\bf E}/\partial t = 0$ is not the same thing. The E-fiel...
Static electromagnetic fields implies: $$ \frac{\partial\mathbf E}{\partial t} = 0 \quad\mbox{ and }\quad \frac{\partial\mathbf B}{\partial t} = 0 $$ This means for electrostatics: $$ \nabla\cdot\mathbf E = \frac{\rho}{\epsilon_0}, \quad \nabla\times\mathbf E = 0 \quad $$ And for magnetostatics: $$ \nabla\cdot\mathb...
https://physics.stackexchange.com
256,401
[ "https://security.stackexchange.com/questions/256401", "https://security.stackexchange.com", "https://security.stackexchange.com/users/158452/" ]
Looking for everyone's opinion here. One of my buddies was doing a vendor security review for a company that sells different types of software. The software allows you to create 3D models for home and office design (think HGTV home improvement). This software is installed locally on either a Win or Mac client. From wha...
<blockquote> To me, it's a software that just makes 3D models of homes or office. </blockquote> To me, it is a software which is installed on a local machine inside the local network. Thus any vulnerabilities in the software will affect the security of the machine and of the local network. And having access to the loca...
<blockquote> From what he told me about the company, they do collect/handle PII and process credit card information. He also said, the company doesn't have PCI or ISO 27001 cert nor are they looking at getting it done. </blockquote> I suppose they are talking about the <strong>website</strong>, which is something compl...
https://security.stackexchange.com
396,601
[ "https://electronics.stackexchange.com/questions/396601", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/164309/" ]
I intend to send a board to a PCB manufacturer and I am wondering how to mark unused components in the pick and place file. I'm using EAGLE and I saw that it includes all components in the file, but I do not want all of them to be mounted. <strong>Can someone give me an advice on how it is better to proceed?</strong> ...
Personally I'd do the opposite of @CrossRoads, leave the reference designators in the BOM. If you set the value to DNI or DNP (or NM) with no other part numbers, all assembly houses will interpret this as meaning do not place. If you want you can also add a column to your BOM which by true/false entry indicates whethe...
Leave them off the BOM, or mark them as qty 0.
https://electronics.stackexchange.com
2,645,051
[ "https://math.stackexchange.com/questions/2645051", "https://math.stackexchange.com", "https://math.stackexchange.com/users/469354/" ]
If $A\in M_3\left(\mathbb C\right)$ is an invertible matrix such that $$2A^2=4A+A^3$$ Then which of the following is(are)correct: (A) $\det (A)=8;$ (B) $det\left(adj\left(\frac A2\right)\right)=1;$ (C) $tr\left(A-2I_3\right)^3=24;$ (D) $adj(A)=A^2$ My working: From given information we get $A(A^2-2A+4I_3)=O_3$ $\...
Since $A^2-2A+4I=0$, we have $A^2-2A=-4I$. From the original equation together with this, $$ A^3=2A^2-4A=2(A^2-2A)=-8I. $$ Then $(\det A)^3=-8^3$, which tells us that $\det A$ is either $4-4i\sqrt3$ or $4+4i\sqrt3$. The real root is not an option, because no combination of the eigenvalues can have a real product. So ...
From the given information, $A(A^2-2A+4I_3)=O_3$ $\implies A^2-2A+4I_3=O_3$ $\implies (A+2\omega I_3)(A+2\omega^2 I_3)=O_3$ $\implies$ eigen values of $A$ can be $-2\omega,-2\omega,-2\omega^2$ or $-2\omega,-2\omega^2,-2\omega^2.$ Where $\omega$ is a non real cube root of unity. $\implies \det A=$ Product of eigen valu...
https://math.stackexchange.com
67,707
[ "https://softwareengineering.stackexchange.com/questions/67707", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/20636/" ]
I occasionally run into methods where a developer chose to return something which isn't critical to the function. I mean, when looking at the code, it apparently works just as nice as a <code>void</code> and after a moment of thought, I ask "Why?" Does this sound familiar? Sometimes I would agree that most often it is...
In the case of a bool return value to indicate the success or failure of a method, I prefer the <code>Try</code>-prefix paradigm used in various in .NET methods. For example a <code>void InsertRow()</code> method could throw an exception if there already exists a row with the same key. The question is, is it reasonabl...
IMHO returning a "status code" stems from historical times, before exceptions became commonplace in mid- to higher level languages such as C#. Nowadays it is better to throw an exception if some unexpected error prevented your method from succeeding. That way it is sure the error doesn't go unnoticed, and the caller ca...
https://softwareengineering.stackexchange.com
2,469,435
[ "https://math.stackexchange.com/questions/2469435", "https://math.stackexchange.com", "https://math.stackexchange.com/users/466737/" ]
prove that the infinite sum - $∑(1/2)^p$, where $p$ runs over all the $prime$ numbers,is $irrational$ <blockquote> one idea that may work is to use the given lemma <blockquote> $Lemma:$ $α$ is an irrational number iff there exists two convergent integer sequences ${a_n}$ and $b_n$ such that $(a_n-αb_n)≠0$ f...
<strong>Hint:</strong> look at the similar number $$\sum_{i = 1}^\infty \left(\frac{1}{10}\right)^{p_i} \approx 0.0110101000101000101$$ (be sure to notice that's "approximately," not "equals"). Clearly the $1$s will occur in the prime positions. You should already know that there are infinitely many primes. You should...
As in base $10$, rational numbers written in base $2$ are either terminating or, eventually, periodic. This sum is neither.
https://math.stackexchange.com
54,460
[ "https://cs.stackexchange.com/questions/54460", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/47874/" ]
Is it necessary to remove all lambda productions, unit productions and useless productions from a context free grammar(CFG) before converting to Chomsky Normal Form(CNF) or Greibach normal form (GNF). If so why is it required? Also my Professor said that we should convert a CFG into CNF before converting it to GNF. Is...
You can convert a context-free grammar into Chomsky normal form or Greibach normal form in whatever way you wish (converting a grammar to a normal form means finding a grammar in the normal form which generates the same language as the original grammar). A given algorithm might require you first to remove lambda produc...
<blockquote> Is it necessary to remove [lambda/unit rules] before converting [a CFG to CNF or GNF]? </blockquote> No, but it is necessary to remove them <em>as a part of</em> the conversion, because the definition of CNF and GNF imply that they do not occur in a grammar on those normal forms.
https://cs.stackexchange.com
68,580
[ "https://cs.stackexchange.com/questions/68580", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/64504/" ]
Here is my situation. I have a grid-type graph with obstacles. Every move (horizontally, vertically or diagonally with a range of 1) has a cost of exactly 1 (the graph is not weighted) provided that neither the source or the destination is an obstacle. I need to, provided a starting node (a square), find any path that...
Since an exact algorithm is most likely off the table, I'll propose the following heuristic: Start at any vertex (though a vertex with no vertices above it would be best), and always move to the first neighbour in the following list that exists and has not yet been visited: UPLEFT, LEFT, DOWNLEFT, DOWN, DOWNRIGHT, RIGH...
There isn't going to be a fast algorithm for this problem. The class of graphs you're dealing with is, in some of the literature, called grid graphs. That is, they're finite induced subgraphs of the infinite graph with vertices $\mathbb{Z}\times\mathbb{Z}$ with an edge from $(x,y)$ to $(x',y')$ if, and only if, $|x-x...
https://cs.stackexchange.com
120,568
[ "https://mathoverflow.net/questions/120568", "https://mathoverflow.net", "https://mathoverflow.net/users/26659/" ]
Let $f_1, f_2, \ldots, f_m \in \mathbb{Z}[x_1, \ldots, x_n]$. Assume $f_1(X) = f_2(X) = \ldots = f_m(X) = 0$ have no solutions over $\mathbb{C}^n$, then by Hilbert's Nullstellensatz, there exists polynomials $g_1, \ldots, g_m \in \mathbb{C}[x_1, \ldots, x_n]$ such that $1 = f_1 g_1 + \dots f_m g_m$. In this case, can ...
Yes. Given the degrees of the $g_i$, the equation $1 = \sum_i f_i g_i$ is tantamount to a system of linear equations in the coefficients of the $g_i$, and <em>those</em> linear equations have rational coefficients. Once such a system has a complex solution it automatically has a rational solution.
The answer is definitely yes. The argument is very simple: the ring extension $$\mathbb Q[X_1,\dots,X_n]\subset \mathbb C[X_1,\dots,X_n]$$ is faithfully flat.
https://mathoverflow.net
91,607
[ "https://electronics.stackexchange.com/questions/91607", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/30723/" ]
How many bits would you need to address a <strong>4M X 8</strong> memory if <ol> <li>the memory is byte-addressable?</li> <li>the memory is word-addressable with a word size of 16 bits?</li> <li>the memory is word-addressable with a word size of 32 bits?</li> </ol> For #1, I have understood the solution as 4M = 2<sup...
Solutions to Homework: <ol> <li>2M x 32<br> = 2<sup>1</sup> x 2<sup>20</sup> x (2<sup>5</sup> / 2<sup>3</sup>)<br> = 2<sup>1</sup> x 2<sup>20</sup> x 2<sup>2</sup><br> = 2<sup>23</sup><br> Answer: 23 bits for byte-addressable</li> <li>2M = 2<sup>1</sup> x 2<sup>20</sup> = 2<sup>21</sup><br> Answer: 21 bits for word-ad...
Yes, your solutions for the homework are correct. Note that for the 4Mx32 you only use 8 bits per 32 bit word. If you want to use all bits you'd need a 32-to-8 multiplexer/demultiplexer. #2 and #3 of the lecture are a bit confusing. If the memory is word-addressable with 16-bit words, it's no longer a 4Mx8 memory but ...
https://electronics.stackexchange.com