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 |
|---|---|---|---|---|---|
226,615 | [
"https://electronics.stackexchange.com/questions/226615",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/105872/"
] | I'm taking a course that is focused on electronics but I'm not sure if it will cover how a computer works in depth.
<strong>For Example</strong>
<ul>
<li><strong>I don't want to know</strong> "X sends data to Y and store it, send to Z" </li>
<li><strong>But instead</strong> I would like to actually know how it works ... | Understanding everything from electrons flowing (solid state physics) up through software is a big task. Bare minimum, you would need in-depth classes in:
<ul>
<li>Circuit theory</li>
<li>Digital electronics</li>
<li>Basic combinational and sequential digital logic</li>
<li>Computer architecture and assembly programmi... | Electronic Engineering will give you some understanding of parts that get used in computers, but you'd have to be doing Computer Engineering to get enough of an idea.
Once you understand the behaviour of electrons (and holes) start learning about how the 0s and 1s are operated with Boolean algebra.
Read any book in ... | https://electronics.stackexchange.com |
106,543 | [
"https://mathoverflow.net/questions/106543",
"https://mathoverflow.net",
"https://mathoverflow.net/users/26269/"
] | Hi,
is there a possibility to classify irreducible representations of (finite) groups over $ \mathbb{Z_p} $
with $p\neq 2$ a prime? Can one get the number of the irred. representations here? I tried to solve this for "easy" groups like the cyclic or symmetric groups, but did not really get a result. Maybe there is a ... | Usually, "irreducible" means having no subrepresentations. In the integral context, there is no such thing, since for any $\mathbb{Z}_p[G]$-module $M$, $pM$ is a proper submodule. The right question is to try and classify the indecomposable representations, i.e. those that cannot be written as direct sums of subreprese... | What Alex says is correct, but there is another viewpoint, which is a bit easier in some ways.
You can consider finitely generated $\mathbb{Z}_{p}$-free $\mathbb{Z}_{p}G$-modules which have no proper non-zero pure submodules. These are the modules which are irreducible when the ground ring is extended to $\mathbb{Q}_{p... | https://mathoverflow.net |
508,476 | [
"https://physics.stackexchange.com/questions/508476",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/150539/"
] | My question is for Minkowski metric <span class="math-container">$\eta_{\alpha\beta}=\mathrm{diag}(1,-1,-1,-1)$</span>. While defining quantities like the four potential, four momentum or even space-time interval for that matter, why do we prefer defining them in the fashion
<span class="math-container">$$A^{\alpha}=(... | This is an arbitrary convention that was fixed historically around the time that Einstein published the general theory of relativity. It's similar to the right-hand rule for defining torque, or the convention that the charge of the electron is negative. Although it's arbitrary, it's fixed, so different authors do not u... | There are two objects in relativity that contain the same information, but are of different mathematical nature - vectors and covectors. Covector is dual vector to the original vector. That is, it is member of different vector space, but (in space endowed with metric) there exists natural one-to-one correspondence bet... | https://physics.stackexchange.com |
18,303 | [
"https://softwareengineering.stackexchange.com/questions/18303",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/5701/"
] | How important is it to learn XML when JSON is able to do almost all that I need? Having said that, I use JSON mainly for AJAX requests and obtaining data from various APIs.
I am a total newbie to web development and the reason I am asking this is that I want to know whether I should go ahead and buy a book on XML or wh... | You'll need to learn XML to get anywhere in the web world. It's what drives of lot of B2B communications and there are many standard XML formats describing important.
Just restricting yourself to JSON is hugely self-limiting. Yeah, you'll be chucking AJAX calls around but what happens when you need to communicate with... | XML definitely outshines JSON for markup (which is, after all, hinted at in the name).
I wouldn't like to see a random XHTML page converted into JSON format. It would be horrible. OpenOffice and the latest editions of Microsoft Office all use compressed XML as their format of choice.
As a general rule: Markup goes in... | https://softwareengineering.stackexchange.com |
288,333 | [
"https://softwareengineering.stackexchange.com/questions/288333",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/162224/"
] | I'm developing a registration system for a project I'm working on.
Since users tend not to sign up if the process is too long, I've thought to require (at least initially) just their email, where I would send them their automatically generated password (and that would also allow me to verify their email address). That... | The problem is that a password should appear in plain text as rarely as possible.
In your case, the password appears in plain text in an e-mail. This has several drawbacks:
<ul>
<li>If the account of the person is compromised, the hacker gets access to your website as well.</li>
<li>If there is a malicious man in the... | Honestly, there is not much value to it.
1) Most people use their own password that they remember. If they do, then making them change their password will take longer than filling up an extra field during registration.
The benefit of your system may be that by then the user is registered so you'll not lose it.
2)... | https://softwareengineering.stackexchange.com |
454,367 | [
"https://physics.stackexchange.com/questions/454367",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/219880/"
] | I am doing an essay about particle physics and I need some help.
I am comparing the results in a Wilsonchamber with and without a radioactive material present. I were able to see a lot of traces from alpha particles, but without the radioactive material there were no traces at all. I've tried to improve my chamber by ... | Looks like in your calculations you are NOT using non-inertial frames of reference at all.
If I understood you correctly you frame of reference is at rest. In this frame of reference the elevator (and the body inside the elevator) are moving with some acceleration. But your frame of reference is not! You can use usual... | If you observe the elevator from the ground, you are evaluating its motion using an inertial reference frame (neglecting effect's of the earths rotation and revolution), and if these forces differ the elevator accelerates. The forces are: gravity and the force moving the elevator. If the elevator is accelerating rela... | https://physics.stackexchange.com |
52,522 | [
"https://dsp.stackexchange.com/questions/52522",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/38137/"
] | I am trying to understand why a system with a single pole inside the unit circle is stable. For example, take a system with one pole at <span class="math-container">$z=\frac{1}{2}$</span>. The literature says the system is stable. As a Physics major with not that much intuition for pole-zero plots I first tried to solv... | What you are missing is that this is about a <em>discrete-time</em> system, because we're talking about poles and zeros in the complex <span class="math-container">$z$</span>-plane and about poles inside or outside the unit circle. So there is no differential equation, but there is a difference equation:
<span class="... | You're conflating the discrete-time definition of a system with the continuous-time representation of a system.
Your discrete-time
<span class="math-container">$$Y(z)\cdot\big(z-\frac{1}{2}\big)=X(z)\cdot z$$</span>
does not transform to:
<span class="math-container">$$\dot{y}-\frac{1}{2}y=\dot{x}$$</span>
but to:... | https://dsp.stackexchange.com |
3,121,105 | [
"https://math.stackexchange.com/questions/3121105",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/633931/"
] | <blockquote>
Let <span class="math-container">$n$</span> and (<span class="math-container">$n+2$</span>) be two prime numbers. If any real value of <span class="math-container">$n$</span> satisfies that condition, then prove that <span class="math-container">$$\frac{4{[(n-1)!+1]}+n}{n(n+2)} = k$$</span> where <span c... | If <span class="math-container">$P$</span> is a prime then, <span class="math-container">$P|(P-1)!+1$</span>,or <span class="math-container">$P|(P-3)!(P²-3P+2)+1$</span>.So these means <span class="math-container">$P|2(P-3)!+1$</span>.
In your question <span class="math-container">$N+2$</span> is prime. If you arrange... | The hint:
<span class="math-container">$$(n+1)!+1\equiv0\pmod{n+2}.$$</span>
| https://math.stackexchange.com |
21,327 | [
"https://mathoverflow.net/questions/21327",
"https://mathoverflow.net",
"https://mathoverflow.net/users/4961/"
] | It is an easy exercise to show that the Euclidean plane cannot be partitioned into round circles (note however that it is possible to do so for $\mathbb{R}^3$). It seems almost obvious that it is not possible to partition the plane into Jordan curves either.
However, I am not able to design a proof that does not use t... | It is possible to change your argument so that the choice is over countable set; hope this is good enough. Namely, topology on the plane has countable base (say, circles at rational points with rational radii); let's index this base as $U_1,\dots,U_n,\dots$; your argument can be used to construct a sequence of Jordan c... | Isn't the "proper" 3D analogue of filling the plane with closed curves to fill space with surfaces?
I mean, the decomposition of the 3 sphere into two tori (Hopf fibration) is nice and all, but you're using a result involving link theory as the analogue of a result from measure theory...
What I would consider the pro... | https://mathoverflow.net |
64,397 | [
"https://cs.stackexchange.com/questions/64397",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/23471/"
] | Is there a rule that either every DFA contains or not, a loop(cycle in graph terminology)?
I do not seem to be able to generalize this idea in either direction.
Also if either of these is true, can we assume through DFA - NFA equivalence that the same is true for NFAs?
| Every finite directed graph in which every vertex has outdegree at least 1 has a cycle. This is a nice exercise. Thus, even if you look only at edges labeled by a particular symbol, you will find a cycle in every DFA.
| There are two ways of looking at a DFA.
Some folks insist that every state must have a transition for every symbol in the alphabet (the transition function is a total function). If you look at a DFA this way, then, yes, as according to the accepted answer there will always be a cycle. But this cycle might be self-loo... | https://cs.stackexchange.com |
708,241 | [
"https://math.stackexchange.com/questions/708241",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/100991/"
] | Today in school mathematics teacher gave us this example: $P(A)=\frac{1}{2}; $ $P(B)=\frac{5}{12}$; $P(A\cup B)=\frac{3}{4}.$ Find: $P(\overline A)=?;$ $P(\overline B)=?;$ $P(\overline {A\cup B})=?;$ $P(A\cap B)=?;$ $P(\overline A \cup \overline B)=?.$
Please help me. Thanks, for your help and your attention.
My atte... | Let $\Gamma$ be a sub-Hopf algebra of the Hopf algebra $\Lambda$. Let $M$ be a $\Lambda$-module and $N$ a $\Gamma$-module. Then
$$ \Lambda \otimes _\Gamma (N \otimes M|_\Gamma) \cong (\Lambda \otimes_\Gamma N) \otimes M.$$
The isomorphism is given by
$$ \lambda \otimes_\Gamma (n\otimes m) \mapsto \sum (\lambda_{(1)}... | Not an answer. Just explaining why we should not expect the obvious $k$-linear mapping to work. Hopefully this leads the OP or somebody else to dig out the correct isomorphism.
<hr>
The analogous result at the level of finite groups is the following. If $H\le G$, $L$ is a $kH$-module, and $M$ a $kG$-module, then ther... | https://math.stackexchange.com |
43,677 | [
"https://mechanics.stackexchange.com/questions/43677",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/15844/"
] | I recently bought a used VW Passat diesel 1.9 TDI (1997) model. It used to burn oil so I send it for general maintenance in the motor (pistons springs, valves, turbo). It seems that after the first 600 km burned about 250 ml of oil. Is this normal. I read in many forums arguing that this is normal or others to say that... | Especially given that you live in Florida, 10W-30 vs 5W-30 is not an issue at all. Sometimes thicker oil is even recommended in higher mileage engines, although I believe the jury is still out on it. If you lived in Siberia, I would be a bit more concerned about it.
However, the coolant in the oil definitly needs to... | With temperatures going down to 20F a 10W oil will not be an issue. Should you be faced with that kind of "extreme" cold you can just let your car warm up for 30 to 60 seconds before you start rolling.
There is a small benefit of using a 10W instead of a 5W oil in that the 10W will normally have less viscosity improve... | https://mechanics.stackexchange.com |
452,496 | [
"https://stats.stackexchange.com/questions/452496",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/275554/"
] | I'm studying the prosecutor's fallacy. Imagine that:
<span class="math-container">$C = \text{Convicted of rape} \\
I = \text{Innocent of rape} \\
A = \text{Accused of rape}$</span>
If I want to know the probability of being innocent having been accused, I apply Bayes' theorem:
<span class="math-container">$P(A|I) ... | At the moment your problem does not involve the event <span class="math-container">$C$</span> at all, and you have not yet specified sufficient information to obtain the probability of interest. Specifically, you have not specified <span class="math-container">$\mathbb{P}(I|\bar{A})$</span>, which is the probability t... | Not necessarily. You have incorrectly defined <span class="math-container">$P(I) = 1 - P(A)$</span>, which does not logically hold to be necessarily true. Is the probability of being innocent equal to the compliment of being accused?
Instead you have defined a <span class="math-container">$P(I|A)$</span> and a <span c... | https://stats.stackexchange.com |
193,547 | [
"https://softwareengineering.stackexchange.com/questions/193547",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/87048/"
] | Hopefully, this question is not too open-ended...
I have been tasked with taking a 3 year old application (.NET 4.0, WPF, WCF, EF 4, SQL 2008) that was designed for a very specific market X and "re-purposing" it for a another very specific market Y.
To further complicate things, the company has also mentioned a third... | Some thoughts:
<ol>
<li>Upper management very likely doesn't know or care what MEF is. If asked, they'd likely want to know that it will get them a solution sooner and cheaper than otherwise. That's a tough promise to keep if you are still learning the framework.</li>
<li>Do you really want to be learning a new fram... | Using MEF does not magically turn your application into a collection of composable components.
The code first has to be structured to have sufficiently loose coupling between the different parts, which probably requires quite a bit of refactoring. Sometimes it's almost a rewrite if you didn't care for loose coupling b... | https://softwareengineering.stackexchange.com |
551,638 | [
"https://physics.stackexchange.com/questions/551638",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/230495/"
] | My answer would be the longer the focal length, higher the magnification will be, resulting in a larger image. But in a ray diagram, how does it look? I am searching for a comparison of ray diagram between short focal length and long focal length but didn't manage to get anything. My high school textbook didn't explain... | Why not use a plotting compass instead of a home-made magnetised needle? Plotting compasses are available from educational suppliers. They used to be very cheap. They are easy to use.
With a current of 2 A through a long wire you should get a field of about 40 <span class="math-container">$\mu$</span>T at 1 cm from th... | You may want to go with D batteries. An old computer or stereo-amp that someone is throwing out may have a good multi-amp DC power supply. Some of the little black boxes (often available at garage sales) may be rated for 2 amps DC. Harbor Freight carries a low cost digital multi-meter. I use to string a wire from ceil... | https://physics.stackexchange.com |
30,905 | [
"https://electronics.stackexchange.com/questions/30905",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/9491/"
] | I have an alarm system that has been installed by an alarm dude ;)
I want to add a GSM module to the alarm system, so that I'm notified when the alarm is triggered. Before I purchase the module I need to understand where to wire it into my alarm control panel.
I have studied the control panel, but I'm unsure where to... | This label is in ROM, and cannot be modified as far as I know. Only NXP can change this in their production process - but they need good reason <code>($$$$$)</code> to do this.
The only thing you could do is to write your own boorloader. But given the small RAM (8k) and Flash (32k) of the device, this will be problema... | In the boot mode, the ROM will determine what the volume label will be when entering USB-ISP. According to the manual, the volume label will reflect the state of the code-protection bits (CRP). Seeing "CRP_DISABLED" means that the chip has not been code-protected, and you can read and/or write the flash memory. Seei... | https://electronics.stackexchange.com |
281,290 | [
"https://physics.stackexchange.com/questions/281290",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/113699/"
] | I will just present my arguments because the correct arguments would be known facts.
So in the experiment where a flash of light is given off at the center of a moving train just as the 2 observers pass each other ( one observer is standing at the midpoint of the train and the other observer on the platform), the p... | Lets start with the ground observer. Suppose that in his reference frame, the two flashes happen simultaneously. The light beams approach him from both sides with the same speed, so he sees the flashes happen at the same time.
But the train is moving, and so the ground observer sees that the first beam reaches the per... | The key to understanding time dilation lies in the idea that acceleration/deceleration is <strong>not</strong> relative, while velocity/momentum is relative. I didn't read your whole post but i can almost guarantee this is the confusion you're having.
| https://physics.stackexchange.com |
1,000,927 | [
"https://math.stackexchange.com/questions/1000927",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/145129/"
] | Whilst studying some category theory, I was blindly using the notation $\lim_\leftarrow D$ for the limit of a diagram $D$ in some category $\mathcal{C}$ (as they are notated in MacLane, Awodey, my lectures etc.).
Why does the arrow go from right to left?
Is it because we think of the limit of a diagram as sitting on ... | I don't know the reason for sure, but here is my guess.
The most basic (and historically important) examples of limits and colimits are those indexed by the natural numbers, ordered by $\geq$ (resp. $\leq$). In the case of limits, one takes diagrams of the form
$$\dotsc \dotsc \to A_2 \to A_1 \to A_0$$
and the limit g... | The universal property of the limit has certain arrows go <em>into</em> the limit.
Similarly, the universal property of colimits has certain arrows come out of the colimit.
| https://math.stackexchange.com |
344,170 | [
"https://softwareengineering.stackexchange.com/questions/344170",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/265563/"
] | I'm reading about pure-functions in functional programming and am wondering, whether a function being deterministic implies that the function is also side-effect free? (and vice versa?)
| Pure = deterministic + without side effects
A function is pure only, if both criteria are met. If it meets only one of them, it's not pure.
<strong>Deterministic but with sideeffects:</strong>
As pointed out by @Caleth
<pre><code>int DeterministicButSideeffects(int param)
{
Console.Writeline("Sideeffect"); // S... | It's easy to show that a function being deterministic doesn't imply that it is pure, with a simple counterexample:
<pre><code>int DeterministicButNotPure(int param)
{
Console.Writeline("Foo invoked"); // Side effect here
return param; // Result only depends on the parameters
}
</code></pre>
| https://softwareengineering.stackexchange.com |
72,052 | [
"https://mathoverflow.net/questions/72052",
"https://mathoverflow.net",
"https://mathoverflow.net/users/16944/"
] | I am having a problem which should not exist. I am reading what I believe to be an important paper by a person - let me call him/her $A$ - whom I believe to be a serious and talented mathematician. A lemma in this paper is proven by means of an argument which, if correct, is a highly elegant piece of mental acrobatics ... | There are three separate issues here.
1) How to clarify whether the proof is correct? You should start with making a serious good will effort to understand what is written (which amounts to redoing all the bad notation, splitting things into small steps, etc. to the best of your abilities). If this fails, you should s... | I think you neglected the simplest options of all: talk to other people about it (privately, not on MO). Even if that other person is not an expert in the field, it is likely that you will be able to clarify the arguments for yourself, while trying to explain what is wrong with the proof.
| https://mathoverflow.net |
179,908 | [
"https://mathoverflow.net/questions/179908",
"https://mathoverflow.net",
"https://mathoverflow.net/users/27249/"
] | Consider the following result which I recently came across in a research paper in my area (Signal Processing)
<blockquote>
Let $X$ be a $N\times N$ positive semidefinite (psd) matrix whose rank
is $r$. Let $A$ be any symmetric $N\times N$ matrix. Then, there exist
a set of vectors $x_1,\dots,x_r$ such that \begi... | I don't know what's going on with the paper, but here is an argument regarding existence of such decompositions.
Given a rank one decomposition
$$X = \sum_{i=1}^R x_ix_i^T$$
one has $\sum_{i=1}^R x_i^TAx_i = {\rm Trace}(AX)$, so the question is how to make these pairings $x_i^TAx_i$ equal to each other. Consider the ... | $$X_1 = RR' - x_1x_1'$$
U is unitary therefore,
$$X_1 = RUIU'R' - \frac{1}{r}RUhh'U'R'$$
Let $M = RU$ then $X = MM'$
So the question becomes whether $MM' - M\frac{hh'}{r}M'$ is psd or not ? so we go to the definition and consider
$$E = x'MM'x - x'Mhh'M'x/r$$
Let $y=M'x$, so we want to show that $||y||^2 > \langle \... | https://mathoverflow.net |
326,288 | [
"https://physics.stackexchange.com/questions/326288",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/143175/"
] | Imagine that you had two boxes with of steam and water of equal mass, both at <span class="math-container">$100~^\circ\rm C$</span>, and you decide to expose your left land to the steam and your right to the water for a short period of time. Which hand would 'feel hotter' (i.e if you were to take your hand out and meas... | I assume this is a thought experiment. Your question is more complicated than you think because of the ill-defined parameters of this situation. For one, the word 'amount' here could be taken to mean mass, volume or number of particles and each would be a different scenario. This question also raises a common myth that... | <blockquote>
equal amounts of steam and water, both at <span class="math-container">$100~^\circ\rm C$</span>
</blockquote>
I think it boils down (unintended pun!) to the density and this notion of "equal amounts".
Water is dense, and a stream of boiling water is going to do a lot of damage to your skin simply... | https://physics.stackexchange.com |
13,718 | [
"https://electronics.stackexchange.com/questions/13718",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/710/"
] | I don't know if this belongs here or stackoverflow. I assume here as although verilog looks like software it's actually describing hardware connections?
I have a Spartan-3AN evaluation board and I'm trying to implement a simple rs232 port interface on it which I can't get to work. I'm an experienced software developer... | I don't speak Verilog, but I noticed that your stopbit is zero, which should be 1. Are you reading the port on a scope, or are you reading on a UART? In the latter case you may not have a character received if it doesn't see the stopbit.
| You did not <strong>reset</strong> the system to a known state.
That said, I assume that you are doing this to learn Verilog? Otherwise, there are many freely available cores that you can find on the Internet that does this. :)
As an example:
<pre><code>// Count from 0..5207 then reset back to zero
always @(posedge ... | https://electronics.stackexchange.com |
21,644 | [
"https://dba.stackexchange.com/questions/21644",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/1396/"
] |
Please consider the following script:
<pre class="lang-sql prettyprint-override"><code>create or replace function f(p_limit in integer) return integer as
begin
set_global_context ('limit', p_limit);
return p_limit;
end;
/
create view v as
select level as val from dual connect by level<=sys_context('global_c... | No.
If you re-write your view with the context filtering against the where clause (instead of the connect by), you'll get the previously set value for the context:
<pre><code>create table t as
select rownum r from dual connect by level <= 10;
create or replace view v as
select r val from t where r <=sys_c... | Generally speaking you can not safely assume anything about the order in which your DBMS will do things when evaluating a single SQL statement. This is why many DBMS will not allow functions used that way to have side effects (i.e. MSSQL won't allow functions to set global/connection state, which you are doing there, o... | https://dba.stackexchange.com |
2,150 | [
"https://mathoverflow.net/questions/2150",
"https://mathoverflow.net",
"https://mathoverflow.net/users/1046/"
] | Are filtered colimits exact in all abelian categories?
In Set, filtered colimits commute with finite limits. The proof carries over to categories sufficiently like Set (i.e. where you can chase elements round diagrams), in particular A-Mod where A is a commutative ring. This implies that filtered colimits are exact ... | Here's a dumb counterexample. If C is an abelian category, so is C<sup>op</sup>. In C<sup>op</sup>, filtered colimits are filtered limits in C. And, of course, there are many examples of abelian categories (such as abelian groups) where filtered limits aren't exact.
Of course, your question is really: when is an ab... | A counterexample which is non-trivial is given in Chapter 6 of Neeman's book Triangulated Categories. The category in question is the full subcategory of additive functors Cat(S^{op}, Ab) where S satisfies some hypotheses (e.g. is an essentially small triangulated category) and we take those functors which are product ... | https://mathoverflow.net |
172,935 | [
"https://softwareengineering.stackexchange.com/questions/172935",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/35793/"
] | In C#.NET language: This style of coding is recommended or the one below it?
<pre><code> if (sheet.Models.Data is GroupDataModel)
{
GroupDataModel gdm = (GroupDataModel)sheet.Models.Data;
Group group = gdm.GetGroup(sheet.ActiveCell.Row.Index);
if (group!=null &... | If you intend to cast (or use <code>as</code>) if the result of calling <code>is</code> is <code>true</code>, you should just call <code>as</code> and avoid two cast attempts.
I prefer the second version for this reason.
| <strong>In short,</strong> if you already know what type it can cast to <strong>use a C-style</strong> cast:
<pre><code>var o = (string) iKnowThisIsAString;
</code></pre>
Note that only with a C-style cast can you perform explicit type coercion. If you don't know whether it's the desired type and you're going to use... | https://softwareengineering.stackexchange.com |
25,432 | [
"https://softwareengineering.stackexchange.com/questions/25432",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/9520/"
] | I'm working at my first programming job. My boss is a very smart software engineer, and I feel
like I have very little to offer compared to him. Problem is, he is always busy, and needs someone to help him out. I feel like I'm not good enough, but I still want to succeed. I want to be a great programmer.
What can I d... | Did I ever tell you about Ashton?
Ashton was your classic corn-fed farm boy. His parents had been hippies who never really managed to get their acts together until his mother inherited 15 acres in a rural part of Michigan. The family moved out there, bought a couple of dairy goats, and struggled to make a living selli... | Remember the scene in <em>Aladdin</em> where Aladdin wants to impress Jasmine, and the genie tells him he'd do better to just focus on being himself? Same principle here.
If the boss is that much better than you and you know it, he probably knows it too. He isn't expecting any great feats of programming rock-stardom... | https://softwareengineering.stackexchange.com |
5,870 | [
"https://stats.stackexchange.com/questions/5870",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/1643/"
] | Lets say we have three independent variables:<br>
$$\eqalign{
X_{1}\sim &B(n,\frac{1}{2}+\beta) \cr
X_{2}\sim &B(n,\frac{1}{2}) \cr
X_{3}\sim &B(n,\frac{1}{2}-\beta).
}$$
I'm looking for the distribution of
$$\max(X_{1},X_{2},X_{3})-\min(X_{1},X_{2},X_{3}).$$
For sufficiently large $n$ we have
$$... | For $n \le 20$ just compute the distribution by brute force.
For example, with $n=3$ the pdf is
$$\begin{array}{}
k=0: &-\frac{7}{64} \left(-1+4 \beta ^2\right)^3 \cr
k=1: &\frac{39}{256} \left(1-4 \beta ^2\right)^2 \left(3+4 \beta ^2\right) \cr
k=2: &-\frac{3}{128} \left(-15-92 \beta ^2+560 \beta ^4+... | Call $R_n=\max(X_1,X_2,X_3)-\min(X_1,X_2,X_3)$. The usual LLN shows that $R_n/n$ converges to $2\beta$ almost surely and in $L^1$. (The <b>distribution</b> of $R_n$ for a given fixed $n$ is an altogether different story.)
| https://stats.stackexchange.com |
35,781 | [
"https://physics.stackexchange.com/questions/35781",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/8082/"
] | The Oxford English Dictionary definition of particle is as follows:
"A component of the physical world smaller than the atom."
I read an article in NewScientist and it said
"...all particles from the atom to the electron..."
Now I'm assuming that since NewScientist is one of the leading science magazines, albeit s... | In practice, I would say a particle is anything that can be treated as a single, bound, small object. This means that whether an object is considered a particle depends on how you're working with it.
For example, an atomic nucleus is a particle if you're doing spectroscopy, because the structure of the nucleus is irre... | It seems you are trying to say that the word particle only has one possible meaning. And if you decide for yourself that that is true, then you have to stick with it. But in general, a "particle" can have various meanings. I can say I have a "particle of dust", which is certainly a particle. I can also refer to a "... | https://physics.stackexchange.com |
57,873 | [
"https://cs.stackexchange.com/questions/57873",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/51734/"
] | I have a set of numbers, and want to calculate the maximum subset such that the sum of any two of it's elements is not divisible by an integer $K$.
I tried to solve this problem, but I have found the quadratic solution, which is not efficient response.<br>
$K < 100, N < 10000$, where $N$ is the number of elements... | Indeed there is a linear time algorithm for this. You only need to use some basic number theory concepts. Given two numbers $n_1$ and $n_2$, their sum is divisible to $K$, only if the sum of their remainder is divisible to $K$. In other words,
$$K \mid ( n_1 + n_2 ) ~~~~ \Longleftrightarrow ~~~~ K \mid \left((n_1 ~mod... | Consider a set S of size n containing all distinct natural numbers. We have to form the maximal subset from this set . We use a basic modulus property and add a few deductions to it to solve the problem. I hope it is helpful for you all.
For any two natural numbers N1 and N2 : (N1+N2)mod(K)=(R1+R2)mod(K) where R1=N1mo... | https://cs.stackexchange.com |
388,607 | [
"https://math.stackexchange.com/questions/388607",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/29189/"
] | The problem is as follows:
We have $N$ dice and we throw them on a table. What is the probability that $M$ will fall $X$ times?
<em>Specific example:</em>
We have $10$ dice and we throw them on a table. What is the probability that $3$ will occur $7$ times (so there are seven dice out of $10$ which have $3$ on top)?
... | This is problem represents a binomial distribution.
We have $N$ trials of $M$, and each of possible $M$ has a $\frac{1}{S}$ chance of occurring, where $S$ is the number of sides on each die. $X$ will represent how many times you want to roll $M$.
So, we can represent this probability as follows:
$$\binom{N}{X}\left(... | Suppose first that the ten dice are all different colors. If you want to get 3 on the blue and red dice only, then you want a non-3 on the other eight colors. The probability of this happening is $(\frac 16)^2(\frac 56)^8$.
But the dice <em>don't</em> have all different colors. So blue+red is just one way to pick... | https://math.stackexchange.com |
138,486 | [
"https://security.stackexchange.com/questions/138486",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/126178/"
] | I am thinking about using a raspberry pi, or some other SBC, to open a simple node.js based web server and a ssh server. I know that when opening ports there are always security vulnerabilities created. While I don't care too much about people getting into my SBC I was wondering if opening a port would also make other ... | Whenever you open up a port for inbound traffic, you are adding <em>some</em> risk to the network. Note that you said "insecure" but the truth is that you need to think about levels of risk. There is no such thing as a "Secure" computer, especially one connected to the Internet. You simply need to make breaking into it... | You are right: the other computers are at risk.
Solution: use a Firewall and put the Raspberry Pi in the DMZ. This will isolate your Raspberry Pi from the other PCs.
| https://security.stackexchange.com |
221,836 | [
"https://softwareengineering.stackexchange.com/questions/221836",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/18948/"
] | Let's say I wanted to start an open source project that I hope/expect to have many people submit patches and whatnot. Is it viable to take a strict TDD approach? Can/should I expect/trust collaborators to write quality tests whenever they submit a patch?
One thing I've been thinking about is writing test suites for in... | You can't really enforce a TDD (test first) approach on an open source project where patches can be submitted by the general public.
What you <em>can</em> enforce is that all patches must have a set of test cases for the fixes included in the patch and that those test cases, as well as all the existing test cases, mus... | You could ask people to submit <strong>test-only patches</strong> before they're allowed to work on the code; this would provide an additional opportunity to review the planned design before the code itself is written.
In practice, this may kill any enthusiasm people have for contributing to the project--or it might k... | https://softwareengineering.stackexchange.com |
87,042 | [
"https://cs.stackexchange.com/questions/87042",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/44719/"
] | What's the running time of:
<pre><code>foo(n)
if(n==1) return;
int i=1;
while(i<n)
{
i=i+2
}
foo(n-2)
</code></pre>
There are $n/2$ recursive calls to <code>foo</code> but how to add to the calculation the while loop
| You can write the relation likes the following:
$$T(n) = T(n-2) + \frac{n}{2}$$
$$T(n) = \frac{n}{2} + \frac{n-2}{2} + \frac{n-4}{2}+\cdots +\frac{n-(n-2)}{2} = $$
$$\frac{n^2-2(1+2+3+\cdots+(\frac{n}{2}-1))}{2}=$$
$$\frac{n^2-(\frac{n}{2}-1)\times \frac{n}{2}}{2}= \Theta(n^2)$$
| The number of the iterations of the while loop is
$$n/2+(n-2)/2 + (n-4)/2 + \dots +1$$
which is $O(n^2)$.
| https://cs.stackexchange.com |
2,158,668 | [
"https://math.stackexchange.com/questions/2158668",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/395059/"
] | I want to solve the following problem:
<blockquote>
Show that the derivative of $\mbox{det}:GL(n,\mathbb{R})\rightarrow\mathbb{R}$
at $I\in GL(n,\mathbb{R})$
is given by
$$\mbox{det}_{*}(I)(X)=\mbox{tr}X$$
</blockquote>
I would like you to check my proof, and answer the question in the end.
<strong>My A... | Since it seems you want to understand all the various identifications involved, let me introduce some notation to try and clarify what is going on.
Let $V$ be a finite dimensional real vector space (endowed with the natural smooth structure) and let $U \subseteq V$ be an open subset. Assume we are given a smooth funct... | Another approach uses standard coordinate : note that, as a function of several variables, the determinant is particularly simple as it is linear in each coordinate.
If you developp the determinant using standard rule, you see that is $X=(x_{i,j})$ is a matrix and the index $i$ is fixed $\det M= \sum _{j=1}^n x_{i,j} ... | https://math.stackexchange.com |
3,512 | [
"https://dba.stackexchange.com/questions/3512",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/2224/"
] | I am new to data mart design and need to clear a few concepts.
I have read up a bit on dimension modelling where I see that fact tables store foreign key references to dimension tables.
Now suppose I have a phonenumber dimension table and a phone_extension dimension table.
(These tables have different details because... | You can leave the FK to some dimension tables as NULL if those dimensions are not known or not applicable. You just have to remember to use outer joins when you do your reporting query.
Alternatively, some people create a "none" and/or an "n/a" dimension record for data mart dimensions and then populate fact table FK... | Don't put nulls in the Warehouse or in the Marts.
The warehouse should be well normalized (at least BCNF) and therefore should exclude nulls. Nulls might be preserved in staging tables if they exist in data sources but they shouldn't be needed in the warehouse itself.
Marts should be designed to support presentation ... | https://dba.stackexchange.com |
76,257 | [
"https://cs.stackexchange.com/questions/76257",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/73058/"
] | I am reading about Representative Grammars from book, where I encountered the following grammar:
$$ E \rightarrow E + T \ | \ T $$
$$ T \rightarrow T * F \ | \ F $$
$$ F \rightarrow (E) \ | \ id$$
The above grammar is left-recursive, which is bad. So in order to eliminate left recursion, they changed it to the follow... | The left recursive and the right recursive grammars describe the same language. But grammars do more than give the set of allowed strings in the language, they also give a structure to such strings and that structure is sometimes meaningful. Consider <code>a+b+c</code>; the structure implied by the left recursive gramm... | You can use a grammar to <em>recognize</em> a language, but usually you want more: You want to know how a string was <em>parsed</em>. (That's why we want grammars that are unique, otherwise there are sentences that can be parsed in more than one way).
Your changes don't change the language that is recognised, but the... | https://cs.stackexchange.com |
12,860 | [
"https://scicomp.stackexchange.com/questions/12860",
"https://scicomp.stackexchange.com",
"https://scicomp.stackexchange.com/users/3481/"
] | I'm writing a small library for sparse matrix computations as a way to teach myself to make the best use of object-oriented programming. I've worked really hard on having a nice object model, where the parts (sparse matrices and the graphs which describe their connectivity structure) are very loosely coupled. In my own... | Very few scientific software developers understand good principles of design, so I apologize if this answer is a bit long-winded. From a software engineering perspective, the goal of the scientific software developer is to design a solution that satisfies a set of constraints that are often <em>conflicting</em>.
Here... | It's a question on what you spend your time on. For most of us, we spend 3/4 of the time programming and 1/4 of the time waiting for results. (Your numbers may vary, but I think the number is not completely without merits.) So, if you have a design that allowed you to program twice as fast (3/4 of a time unit instead o... | https://scicomp.stackexchange.com |
45,111 | [
"https://softwareengineering.stackexchange.com/questions/45111",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/5736/"
] | My current database design makes use of a multiple column primary key to use existing data (that would be unique anyway) instead of creating an additional column assigning each entry an arbitrary key. I know that this is allowed, but was wondering if this is a practice that I might want to use cautiously and possibly a... | Usually when you have a table with a multi-column primary key, it's the result of a join table (many-to-many) that became elevated to be its own entity (and thus deserves it's own primary key). There are many who would argue that any join table SHOULD be an entity by default, but that's a discussion for another day.
L... | It makes sense having a separate id column. When you want to get something from your database table, it is easier to do:
<pre><code>SELECT whatever FROM table WHERE id=13
</code></pre>
than
SELECT whatever FROM table WHERE col1='val1' AND col2='val2' AND col3='val3'
For example, in a web application it translate... | https://softwareengineering.stackexchange.com |
493,975 | [
"https://stats.stackexchange.com/questions/493975",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/301165/"
] | Let <span class="math-container">$X_i$</span> be <span class="math-container">$i=1$</span> to <span class="math-container">$n$</span> be random variables of variance 1 with pairwise correlation <span class="math-container">$\frac{-1}{n-1}$</span>. Suppose we know the value of any <span class="math-container">$n-1$</spa... | Since <span class="math-container">$$\text{Var}(X_1 + \cdots + X_n) = n + n(n-1) \left(-\frac{1}{n-1}\right) = 0$$</span>
the sum of the <span class="math-container">$n$</span> random variables is a constant. <strong>If you know this constant</strong>, then yes knowing the realizations of <span class="math-container">$... | As a concrete example of @angryavian's point, with <span class="math-container">$n=2$</span>
If you take <span class="math-container">$X_1\sim N(0,1)$</span>, you could have <span class="math-container">$X_2=42-X_1$</span> or <span class="math-container">$X_2=69-X_1$</span> or <span class="math-container">$X_2=17-X_1$... | https://stats.stackexchange.com |
386,886 | [
"https://electronics.stackexchange.com/questions/386886",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/193539/"
] | This is probably very easy to answer, but I'm working on a project where I need to heat a chamber (insulated Styrofoam container), and my option to heat it is essentially a hair dryer, as a heat gun outputs too much and would melt it since I do not have access to a variable temp heat gun.
My question is that if I hav... | Hair dryers are typically similar power compared to heat guns, maybe higher, though the air flow is usually a lot higher. Somewhere in the 1500-1800W range for North American ones, which is about as much juice as you can get out of a standard 120VAC outlet.
If you block off the air flow from either one, the internal ... | As @spehro-pefhany pointed out, the main difference of hair dryer from other heat sources is high air flow. So you need an unobstructed way for air to escape, or risk overheating the dryer.
But this requirement creates another problem - hot air will escape quickly when dryer is off, so you will have high temperature f... | https://electronics.stackexchange.com |
30,795 | [
"https://security.stackexchange.com/questions/30795",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/20038/"
] | Lets say I have 2 windows dual booting on the same harddrive (windws 7), How isolated are they?
I am thinking that there should be up to date antiviruses software on both Windows, and they should be different software so that each one can pick what the other missed.
| Well, they aren't isolated at all if they can both see the hard drive.
You are correct that they both should have their own anti-virus solutions though.
| The only code in common should be the bootloader. One of the Windows installations will have a bootloader that allows you to toggle which Windows installation you boot to. Some rootkits inject themselves into or below the bootloader, so a single infection from that would probably be present for both operating systems.
... | https://security.stackexchange.com |
137,528 | [
"https://mathoverflow.net/questions/137528",
"https://mathoverflow.net",
"https://mathoverflow.net/users/4423/"
] | Let T be a tree which satisfies the following conditions. (A) The set of vertices of T is denumerably infinite. (B) Each vertex of T is an end-point of at most finitely many edges of T. Does there always exist a planar graph G which is isomorphic to T and which satisfies the following conditions? (1) Every edge of G is... | The answer is clearly yes.
Pick a vertex and choose it as a root. Put it at (0,0). Then put its children at (0,1), (1,1), ..., (n1,1). Then for each of these vertices put their children at (0,2), (1,2), ..., (n2,2) (in doing so make first appear the children of (0,1), then the one of (1,1) etc). Then repeat the same c... | An illustration of V. Delecroix's idea, as I understand it...
<br />
<img src="https://i.stack.imgur.com/Ed1YW.jpg" alt="LatticeTree"><br />
| https://mathoverflow.net |
12,112 | [
"https://stats.stackexchange.com/questions/12112",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/5057/"
] | I read that in Bayes rule, the denominator $\Pr(\textrm{data})$ of
$$\Pr(\text{parameters} \mid \text{data}) = \frac{\Pr(\textrm{data} \mid \textrm{parameters}) \Pr(\text{parameters})}{\Pr(\text{data})}$$
is called a <em>normalizing constant</em>. What exactly is it? What is its purpose? Why does it look like $\Pr(... | The denominator, $\Pr(\textrm{data})$, is obtained by integrating out the parameters from the join probability, $\Pr(\textrm{data}, \textrm{parameters})$. This is the <strong>marginal probability of the data</strong> and, of course, it does not depend on the parameters since these have been integrated out.
Now, since... | When applying Bayes' rule, we usually wish to infer the "parameters" and the "data" is already given. Thus, $\Pr(\textrm{data})$ is a constant and we can assume that it is just a normalizing factor.
| https://stats.stackexchange.com |
1,322,304 | [
"https://math.stackexchange.com/questions/1322304",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/247619/"
] | how do I show that the $\sum_{n=0}^{n=N} (n+1)x^n$ is less than or equal to the <strong>square</strong> of this whole sum : $\sum_{n=0}^{n=N}x^n$
Tried induction didn't work. Got messy
tried doing directly by using the formula to a geometric series- didn't work
Would really appreciate some help
Thanks
| Hint: Both sums can be done in closed form. One is a geometric series, the other is the derivative of a geometric series.
| $$\begin{array}\\
\displaystyle\left(\sum_{n=0}^N x^n\right)^2
&=\displaystyle\sum_{n=0}^N \sum_{m=0}^N x^{n+m}\\
&\ge\displaystyle\sum_{n=0}^N \sum_{m=0}^{N-n} x^{n+m}\\
&=\displaystyle\sum_{j=0}^N x^j \sum_{m=0}^{j} 1
\quad (j=n+m)\\
&=\displaystyle\sum_{j=0}^N (j+1)x^j\\
\end{array}
$$
| https://math.stackexchange.com |
22,473 | [
"https://mathoverflow.net/questions/22473",
"https://mathoverflow.net",
"https://mathoverflow.net/users/5566/"
] | Hi, everyone:
For the sake of context, I am a graduate student, and I have taken classes in
algebraic topology and differential geometry. Still, the 2 proofs I have found
are a little too terse for me; they are both around 10 lines long, and each line
seems to pack around 10 pages of results. Of course, I am consideri... | Torsten's answer was good, but there are also more elementary answers. Here's one, which is essentially a big transversality argument, followed by a mild de-singularization.
Let me consider $M$ to be a triangulated 4-manifold, and represent a class in $H_2(M)$ as a sum of 2-faces of the triangulation. For each 2-fac... | I do not know if this provides more details:
I assume the closed ($4$-)manifold $M$ to
be oriented (we need the submanifold to be oriented to have an integral homology
class and the construction I am about to give will make the normal bundle
oriented) and as transversality arguments are a little bit tricky in the pur... | https://mathoverflow.net |
146,769 | [
"https://mathoverflow.net/questions/146769",
"https://mathoverflow.net",
"https://mathoverflow.net/users/12905/"
] | The following <em>irreducible</em> trinomials are solvable:
$$x^5-5x^2-3 = 0$$
$$x^6+3x+3 = 0$$
$$x^8-5x-5=0$$
Their Galois groups are isomorphic to ${\rm D}_5$, ${\rm S}_3 \wr {\rm C}_2$ and
$({\rm S}_4 \times {\rm S}_4) \rtimes {\rm C}_2$, respectively.
<b>Question:</b> Is there an irreducible septic trinomial $... | If such polynomials exist, there will only be finitely many of them, up to composing on both sides with scalar polynomials $\alpha x$ with $\alpha\in\mathbf{Q}$. More generally, Guralnick and Shareshian proved that if $d=7$ or $d>8$ then there are only finitely many equivalence classes of irreducible degree-$d$ tri... | The good news is that in this book:
Generic Polynomials: Constructive Aspects of the Inverse Galois Problem
By Christian U. Jensen, Arne Ledet, Noriko Yui (pp. 52 and up).
There is a complete criterion, as follows:
$x^7 + a x + b$ is solvable (we assume it's irreducible) if and only if the polynomial (which I am in... | https://mathoverflow.net |
98,209 | [
"https://cs.stackexchange.com/questions/98209",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/93641/"
] | Given that this wave was sampled at a sampling frequency <em>f</em>:
<img src="https://i.imgur.com/R7oFWcn.jpg" alt="1]">
Why does the wave sampled at a sampling frequency <em>3f/2</em> look like this?
<img src="https://i.imgur.com/tElBRqu.png" alt="2]">
What does <em>3f/2</em> mean? Does it mean that we sample eve... | The wave is the whole curve: you shouldn't think of your first diagram as showing "four waves" as if you were counting waves from the sea hitting the beach. Although your graphs aren't labelled, the horizontal axis is likely intended to be time, not distance, and the graph shows the oscillation of a single particle ove... | Both <span class="math-container">$f$</span> and <span class="math-container">$3f/2$</span> are frequencies, measured in units of <span class="math-container">$\mathit{time}^{-1}$</span>. Sampling at frequency <span class="math-container">$f$</span> means sampling every <span class="math-container">$1/f$</span> time un... | https://cs.stackexchange.com |
35,948 | [
"https://physics.stackexchange.com/questions/35948",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/11624/"
] | I'm confused here. I have a three particle (rigid) system. What would be the degree of freedom? I found out five. 3 coordinates for center of mass and 2 for describing orientation.<br>
But we have only three constraints, i.e. three equations that reduce 9 coordinates by 3, 9 - 3 = 6, which gives 6 degrees of freedom?? ... | You missed that to specify orientation, you not only need an axis, but how far the body rotated around the axis. The two axis angles and the angle of rotation is the Euler angle parametrization, and I find it unweildy because the relation between this and position involves transcendental functions.
The nicest way to g... | Every rigid body has 3 translational dof. In addition, there are 0, 2, or 3 rotational dof, depending on the geometry, giving a total of 3, 5, or 6 dof.
A spherically symmetric rigid body has no rotational dof.
A rigid body with rotational symmetry around an axis has 2 rotational dof, namely two angles for orienting ... | https://physics.stackexchange.com |
520,582 | [
"https://physics.stackexchange.com/questions/520582",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/227010/"
] | I visited some websites and they state that it is because the least distance of distinct vision is <span class="math-container">$25\,\mathrm{cm}$</span>.
However, we know that the diameter of the eyeball is <span class="math-container">$2.3\,\mathrm{cm}$</span>, so <span class="math-container">$v=2.3\,\mathrm{cm}$</sp... | The total focusing power of the eye is indeed much higher than 4 diopters. From the diameter of the eyeball, the lens formula tells you that to get an object at infinity in focus, you need about <span class="math-container">$\frac{1}{2.3 cm} \approx 43 D$</span>.
Most of this power is static, and simply a property of ... | You are very much in need of some exact figures, primary sources, and a bit of logical clarification.
Eyeballs, like the earth itself, are not a perfect sphere; they are both flattened at the poles and fat around the equator. With the human eyeball ( I think) it is the axial length that is noticeably longer than other... | https://physics.stackexchange.com |
60,559 | [
"https://stats.stackexchange.com/questions/60559",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/25184/"
] | This sounds easy, but I don't know of a good statistical method for it.
I have a time series that has (good) data points that range from ~3.5 to 30. The data are collected by an automated sensor. However, there are flawed measurements in the time series-- the sensor will sometimes read values that are typically at exa... | <strong>output:</strong>
<pre><code>summary(aov(length ~ factor(site), x))
Df Sum Sq Mean Sq F value Pr(>F)
factor(site) 2 0.829 0.4145 0.514 0.622
Residuals 6 4.840 0.8067
</code></pre>
<hr>
<code>overallmean</code> should be the overall mean
<blockquote>
overallmean <- mean(x$... | Look at the line <code>n = 3</code>. The overall number of data points is 9, not 3, so when you calculate the overall mean you are dividing the sum of 9 numbers by 3, so your mean is not the mean. Change that to <code>n = 9</code> and it looks like it matches to me.
| https://stats.stackexchange.com |
700,532 | [
"https://physics.stackexchange.com/questions/700532",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/147291/"
] | Electric charge is used to describe the behavior of electrons which seek to counterbalance the positive charge of protons.
But I have read about other forces which also attract electrons to atoms, could someone explain the mechanism behind electronegativity? Or why an electron might seek to enter the orbit of an atom w... | The short answer is: electromagnetism also causes electronegativity.
The longer answer is: what electron distribution develops in equilibrium around a set of positive nuclei (and hence, in a molecule) depends on the distribution of nuclei and their charges. It is quite intuitive that the electrons will feel more attrac... | It's the electromagnetic force. An object being neutral does not mean no electric field- it just doesn't have a <span class="math-container">$1/r^2$</span> component to its electric field. A dipole moment will give it a <span class="math-container">$1/r^3$</span> component, and higher-order moments will give higher ord... | https://physics.stackexchange.com |
199,889 | [
"https://physics.stackexchange.com/questions/199889",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/42743/"
] | It is clear to me why angular momentum is always conserved, and how in some cases energy is not necessarily conserved within the system (in those cases where bodies deform, or friction is involved).
However, I am unable to see why energy is not conserved in the following situation:
You have a spinning disk with some ... | Energy is conserved, but if you ignore some kinds of energy then it will look like it isn't conserved.
You can imagine a really big disk with some radial pointing two by fours attached at the one o'clock, two o'clock etcetera positions then attach springs to each two by four with the spring pointing in the clockwise/c... | As one of the comments mentions, it is simpler to consider a linear case. Dropping a body of mass $m$ on one moving with mass $M$ and velocity $v$ is essentially considered the instantaneous transformation $M \to M + m$. Momentum must be conserved in the collision, but the mass of the system effectively increases, prod... | https://physics.stackexchange.com |
423,144 | [
"https://physics.stackexchange.com/questions/423144",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/30877/"
] | I'm currently reading <em>Quantum Mechanics: The Theoretical Minimum</em>. I'm stuck trying to understand a minor point in the book where the authors seem to suggest that we can know the probability of measuring a spin in a certain direction to be 50% while not knowing the amplitude of the components of the spin states... | <blockquote>
if the acceleration is 8.0 m/s^2, then why didn't it fall 8.00 m in the first second of its motion (since the initial velocity was 0m/s at t = 0 s)?
</blockquote>
Because the distance it moves in a second depends on the average speed it has during that period, not the maximum speed.
<blockquote>
why ... | As the marble gains the velocity of 8m/s only after 1sec, it can't cover distance of 8m in first second.
| https://physics.stackexchange.com |
2,557,509 | [
"https://math.stackexchange.com/questions/2557509",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/381431/"
] | <span class="math-container">$$f(x) = \begin{cases} \dfrac{x^2+xy+y^2}{x^2+y^2} &\text{ if $(x,y)\neq (0,0)$}\\1 &\text{ if $(x,y)=(0,0)$}\end{cases}$$</span>
When I evaluate, using polar coordinates, <span class="math-container">$$\lim_{(x,y)\to(0,0)}\dfrac{x^2+xy+y^2}{x^2+y^2}=\lim_{\rho \to0}1+\cos\theta\si... | Your piece-wise function on $\mathbb{R}^2 \setminus \{(0,0)\} $ is a rational function which is continuous everywhere except at $(0,0)$ and the limit of this rational function at it approaches $(0,0)$ is not $1$. So it is continuous everywhere except at $(0,0)$ as you claimed.
| yes exactly it’s continuous with exclusion of (0,0)
| https://math.stackexchange.com |
108,659 | [
"https://dba.stackexchange.com/questions/108659",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/71825/"
] | Is it possible to find queries in the <code>system.profile</code>-Collection of a MongoDB-database that did not finish due to a timeout?
I found some queries that ran longer than the time specified in <code>$maxTimeMS</code>.
<pre><code>db.coll.find(
{ millis: {$gt: 1300}, "command.maxTimeMS": NumberLong(1300) },
... | On a pretty large dataset I tested a query that times out after 10 seconds:
<pre><code>db.collection.find({"foo": "bar"}).maxTimeMS(10000)
</code></pre>
(In my case the collection has <code>> 100 GB</code> of data and no index on the field <code>foo</code>). I searched for the query using:
<pre><code>db.system.pr... | MongoDB targets operations for termination if the associated cursor exceeds its allotted time limit(maxTimeMS). I believe the few millis more come from two things.
1) There should be an internal process that checks periodically so you will get the check interval overhead (for example every 1ms)
2) MongoDB terminate... | https://dba.stackexchange.com |
2,649,462 | [
"https://math.stackexchange.com/questions/2649462",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/529604/"
] | I am reviewing for an exam, and I have come across a question that does not contain a solution, so I wanted to verify my answer.
Question 1: If $\exists y \forall x P(x, y)$ is true, then $\forall x \exists y P(x, y)$ is also true.
To me that appears true, because if there exists at least one particular value of $y$ ... | Yes. The two statements read as:
1) There exists a $y$ such that for all $x \dots$
2) For all $x$, there exists a $y \dots$
The first statement says that I can pick a $y$ so that no matter what $x$ you give me, $P(x,y)$ will be true.
The second says that you can pick any $x$, and I can pick a $y$ that makes $P(x,y)... | Correct. To demonstrate that something does <em>not</em> follow, it is often helpful to provide a concrete counterexample, e.g. you could assume that $P(x,y)$ stands for $x$ has $y$ as a parent. So then $\forall x \exists y P(x,y)$ becomes the claim that everyone has a parent (true), but $\exists y \forall x P(x,y)$ ... | https://math.stackexchange.com |
66,330 | [
"https://dsp.stackexchange.com/questions/66330",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/46444/"
] | I am recently working with a sensor that I its sampling frequency can only be configured to either 32hz- 64hz- 128hz-256hz... and I was wondering whether using such sampling frequencies have any benefits. For example is it better to use 128 Hz than use 100 Hz? or 64Hz rather than 60 Hz?
| There's a lot of things that influence your choice of sampling rate.
First of all, of course, the Nyquist theorem, which says you need to sample at more than twice of the signal's single-sided bandwidth <span class="math-container">$B$</span> (for real signals)¹.
Then, you often choose a sampling rate that is <em>use... | Only requirement for sampling frequency is that it should be more than twice the maximum frequency component in desired signal. Any other constraint can only be because of the oscillator design of the ADC circuit. So, the sensor you are working with might be able to generate a fundamental frequency of 32Hz and, using s... | https://dsp.stackexchange.com |
226 | [
"https://cs.stackexchange.com/questions/226",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/39/"
] | In a round-robin scheduler, adding a process multiple times to the process list is a cheap way to give it higher priority.
I wonder how practical an approach this might be. What benefit does it have over other techniques such as giving the process a longer time slice (benefit: less switching time) or maintaining a sep... | The advantage of this approach is that round robin scheduling is very efficient, so you don't need to rely on a more complex scheduler, which would steal cycles. Introducing longer time slices for higher priority processes would decrease the responsiveness of other threads and make it harder for the OS to jump in to de... | Adding the task to a round-robin scheduling queue multiple times opens up the problem of ensuring that the entries remain reasonably evently distributed. This is easy to ensure if the system does not permit dynamic task creation or deletion, but not possible in general.
In addition to the more complex process of remo... | https://cs.stackexchange.com |
265,736 | [
"https://dba.stackexchange.com/questions/265736",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/201812/"
] | I need to
<pre><code>SELECT MAX(created_at) FROM someTable
</code></pre>
whenever my application starts up. The table is enormous (billions of rows). The index on <code>created_at</code> that I created to make this query fast is using up multiple gigabytes. Is there a way to create some kind of partial index only on ... | The best is to take an alternative approach and <em>not</em> to query the large table all the time, if that is the only purpose of the index.
Create a second table that only contains a single timestamp and define a trigger on <code>sometable</code> that updates that small table whenever a new row arrives or an old one... | If you can afford to have this information not always up-to-date, you can can create a materialized view:
<pre><code>create materialized view my_view as select max(created_at) from my_table;
</code></pre>
And you only need to run (which should be very fast):
<pre><code>select max from my_view;
</code></pre>
This ob... | https://dba.stackexchange.com |
558,331 | [
"https://physics.stackexchange.com/questions/558331",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/267035/"
] | I hope this is an okay place to ask this. Not a lot of places for amateurs to seek guidance for failed experiments or rudimentary knowledge.
This was an experiment I just tried, and want to understand why it didn't work.
I understand that moving a magnet through a copper <strong>coil</strong> will generate a magnetic f... | Electric (arc) welding is performed at relatively low voltage (often less than 10 volts) and high current (150 to 250 amps). This means the electrode needs to brought very close indeed to the workpiece, in order to trigger breakdown and start the arc. In practice, the arc is initially "struck" by physically t... | They don't technically have to touch. They just have to get close enough for the field to exceed the breakdown limit of air (around 3kV/mm).
So if you're doing something at 750V, you just need around...
<span class="math-container">$$d = \frac{V}{E_{break}} = \frac{750\text{V}}{3\text{kV/mm}} = 0.25\text{mm}$$</span>
... | https://physics.stackexchange.com |
9,815 | [
"https://biology.stackexchange.com/questions/9815",
"https://biology.stackexchange.com",
"https://biology.stackexchange.com/users/3615/"
] | Bacteriophages have sequences which often do not have specific sites for restriction enzymes of bacteria to cut at and so can attack the bacteria.
Wouldn't it be better if bacteria had something "universal" like an enzyme that simply cuts the nucleotide sequence "randomly"? Is there any particular advantage of cutting... | Such universal restriction enzymes would be very dangerous to leave lying around even if contained within a vacuole. Remember that bacteria are prokaryotes and have no nuclear membrane to protect their DNA.
The analogy would be having a burglar alarm capable of burning down the house in order to protect it against thi... | Notice that viral DNA is not the only foreign DNA that a bacterial can meet during its bacterial adventures. Plasmids, conjugated DNA and DNA inserted by transformation exist, and it may confer ecological advantages. Because of that, even if the enzymes would recognize only non genomic DNA and destroy it effectively, i... | https://biology.stackexchange.com |
47,378 | [
"https://physics.stackexchange.com/questions/47378",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/10899/"
] | We call $E=mc^2$ the Mass-Energy Equivalency because it equates mass and energy together. But, by that same logic, shouldn't we call $E=\frac{1}{2}(mv^2)$, the equation of kinetic energy in Newtonian mechanics as the Mass-Energy Equivalence ?
| The equation $E=mc^2$ equates rest energy to mass. There is a third symbol in this equation that represents the speed of light, but this is a universal constant. One can always select physical units such that this constant attains value unity. Regardless the system of units selected, up to a numerical proportionality c... | The formula $E=mc^2$ is ambiguous - you can take it as either
$$
E_0 = mc^2
$$
relating rest energy and invariant mass, or as
$$
E = m_rc^2
$$
relating total energy and relativistic mass $m_r=\gamma m$.
Now, as
$$
\gamma = 1 + \frac 12 \left(\frac vc\right)^2 + \mathcal O\left(\left(\frac vc\right)^4\right)
$$
we have... | https://physics.stackexchange.com |
48,562 | [
"https://softwareengineering.stackexchange.com/questions/48562",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/11211/"
] | The senior dev in our shop insists that whenever code is modified, the programmer responsible should add an inline comment stating what he did. These comments usually look like <code>// YYYY-MM-DD <User ID> Added this IF block per bug 1234.</code>
We use TFS for revision control, and it seems to me that comment... | I usually consider such comments a bad practice and I think this kind of information belongs to the SCM commit logs. It just makes the code harder to read in most cases.
<strong>However</strong>, I still often do something like this for specific types of edits.
<h2>Case 1 - Tasks</h2>
If you use an IDE like Eclipse,... | We use that practice for files not under version control. We have RPG programs that run on a mainframe, and it has proven difficult to do much more than back them up.
For versioned source code, we use the check-in notes. I think that's where they belong, not cluttering up code. It's metadata, after all.
| https://softwareengineering.stackexchange.com |
155,089 | [
"https://physics.stackexchange.com/questions/155089",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/23937/"
] | I wanna find out the expected value of the $xp$ operator for the $n$-th excited state of the harmonic oscillator, i.e. calculate the value $\langle n|xp|n \rangle$. I express the position and momentum operators in terms of the ladder operators:
$$x = \frac{x_0}{\sqrt{2}} \left( a+a^{\dagger}\right)$$
$$p = \frac{p_0}{... | As you have already worked out, $(xp)^\dagger = p^\dagger x^\dagger = px \neq xp$, so that the product of two self-adjoint operators is not needfully self-adjoint, and indeed from this equation we see that the product is self adjoint if and only if $p$ and $x$ commute.
To complete your thinking, how indeed do we calc... | Is it really a mistake? Let me see using QM.
For calculating
$-i \hbar \int dx \ x \ \psi^* \frac {∂ \psi}{∂x},$
we can integrate by parts, use the fact that the solutions vanish at $+\infty$ and $-\infty$, and obtain
$i \hbar \int dx \frac {∂ (x\ \psi ^*)}{∂x}\psi$
= $i \hbar \int dx \ \psi ^* \psi$ + $i \hb... | https://physics.stackexchange.com |
2,679,359 | [
"https://math.stackexchange.com/questions/2679359",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/538016/"
] | I know that you draw an absolute value graph by writing the equation in the format of $y = a \vert x - p \vert + q$ and I know how to draw it from there, but what do you do when there is an $x$ value outside the absolute signs?
| By the definition of the absolute value, you have:
$$\left|2x+1\right| = \begin{cases}
2x+1 &\mbox{if }\; x\geq -\tfrac{1}{2}
\\ -2x-1 &\mbox{if }\; x< -\tfrac{1}{2}
\end{cases}$$
and thus:
$$\left|2x+1\right|+x-3 = \begin{cases}
3x-2 & \mbox{if }\; x\geq -\tfrac{1}{2}
\\ -x-4 & \mbox{if }\; x&l... | We can write absolute value as a piecewise function,
$$|x| = \begin{cases} x & x\geq 0,\\ -x & x<0\end{cases}$$
Using that for your equation will give you two functions to graph, one on the positive half of the line and the other for the negative half.
| https://math.stackexchange.com |
43,268 | [
"https://physics.stackexchange.com/questions/43268",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/846/"
] | Take a field $\phi(\bf{x})$ created from a charge distribution contained within a radius $R$. The multipole expansion in spherical harmonics $Y_{\ell,m}$ outside of $R$ is approximated by:
$$
\phi({\bf x}) \approx \frac{1}{4\pi \epsilon_0}
\sum_{\ell=0}^{\ell_{MAX}}
\sum_{m=-\ell}^{\ell} \frac{4\pi}{2\ell +1}
\alpha_... | It turns out my approach was correct, but I had different errors preventing acceptance of my solution. To summarize:
<ul>
<li>Calculate the maximum constant deceleration $a$ that can be applied for time $t$ that results in non-negative final velocity: $a_{max}=\frac{v_0}{t}$. This is needed because the next equat... | Lets call your maximum time and distance to stop $T$ and $D$. If your vehicle is moving with speed $v_0$ and you apply a constant deceleration $a$, it will stop after a time $t = v_0 / a$, having traveled a distance $d=\frac{1}{2}v_0^2/a$.
Divide those two equations, and you can relate stopping time, distance and star... | https://physics.stackexchange.com |
565,397 | [
"https://physics.stackexchange.com/questions/565397",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/148271/"
] | The internet tells me that:
<blockquote>
The voltage (from the power supply) is shared across each bulb in a series circuit because the energy carried by the electrons is used as they pass through the components.
</blockquote>
However, I believe this is likely to be incorrect since electrons do not carry energy per se.... | Consider it in this way, voltage in a way is work done in moving a charge. When we have a series connection of 'n' resistors, we would need to perform work to push the charge across all of them and the total work would be a summation of the work done to move it across one of those 'n' resistors. The total work refers t... | I am reminded of the revised A-level syllabus that was introduced in parts of the UK after we got PM who replaced the professional teachers by a committees of businessmen: "In a series circuit the bulbs gradually get dimmer as electrons are used up as they pass through successive lamps --- but remember tha... | https://physics.stackexchange.com |
2,209,859 | [
"https://math.stackexchange.com/questions/2209859",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/352980/"
] | I just started to study Mathematical Logic and I am having trouble finding a <strong>simple</strong> proof of the following exercise. <br/>
Let <strong>A</strong> be a propositional formula that contains only the $\equiv$ connective. For those who are not familiar with it $f_\equiv(T,T)=f_\equiv(F,F)=T$ and $f_\equiv... | I think you're on the right track. You can use induction to prove the following:
<strong>Lemma</strong>
Any statement $\phi$ built up from atomic statements and $\equiv$’s alone is true if and only if it contains an even number of instances of false atomic statements
Proof by structural induction on syntactical for... | I'd prove the commutative property, the associative property, that ($\alpha$ iff $\alpha$) = T, and ($\alpha$ iff T) = $\alpha$.
Then it follows that any formula with an even number of instances of an atomic sentences, that you can using commutation and association to eliminate those two into a T. So, any formula wit... | https://math.stackexchange.com |
46,441 | [
"https://security.stackexchange.com/questions/46441",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/34522/"
] | I am wondering what others do in regards to setting up their enterprise scheduled vulnerability scan policies. For example do you prefer to create a single scan policy and scan all networks regardless of the hosts platforms (windows, linux, SQL Server, Oracle, Apache, IIS, etc.) or do you end up creating multiple scan ... | Nessus and other vulnerability scans will only scan using applicable packages, dependent on what ports and applications are found per host during discovery. Nessus isn't going to run a web vulnerability scan against a db process, nor will it run a windows scan against a linux server, so tailoring your scans to specific... | In addition to GdD I would also advise at timing your scans so that you:
<ul>
<li>Don't scan critical systems when nobody is available to restore them should you knock them over</li>
<li>Scan at night or during the weekend (generally all hours where the least load is set on the servers)</li>
</ul>
| https://security.stackexchange.com |
379,343 | [
"https://softwareengineering.stackexchange.com/questions/379343",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/160523/"
] | When I created a c# desktop application and move the exe file to another computer that has anti virus security, the security program shows an alert as unknown exe. I want to create a desktop application and a windows installer. How can I solve this problem? The virus programs should not alert an unknown exe.
| You'll probably want to get a code signing certificate. That will identify your application. They are like SSL certificates, but for programs.
Once you have that, sign both your executable and your installer. That should help. When your installer is launched, you'll get the blue admin prompt, not the yellow one t... | This message is more commonly associated with User Account Control (UAC) than with virus scanners.<br>
The installer want to make changes to the computer so UAC steps in and warns the user that this is about to happen. It "classifies" the program in question based on the Author of that program, which is determined by ... | https://softwareengineering.stackexchange.com |
237,126 | [
"https://softwareengineering.stackexchange.com/questions/237126",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/125576/"
] | Linked lists, as far as I have seen, are largely implemented using object-oriented ideas. (having an object that holds some information and the address of the next link). How were Linked-lists implemented before the object-oriented paradigm came out? Were they only invented(?) once the OOP was developed?
| Linked list have nothing to do with OOP, in fact they predate OOP by quite a bit. Linked list are implemented simply by having a recursive structure, this is in my opinion conceptually easiest to understand in assembly -- you allocate some memory, and the first bytes of that memory serve as a pointer to the next/previo... | They used, for example in C, struct for simulating a node; and pointers to link the nodes
| https://softwareengineering.stackexchange.com |
38,635 | [
"https://dsp.stackexchange.com/questions/38635",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/26964/"
] | There is a system (consisting of several LTI analogue filters) whose input and output signals are being recorded at $20 \ \mathrm{kHz}$ (the sampling period is in the range of 10 times the system's transient response). Suppose I calculate
$$ G = \frac{\mathrm{FFT(output)}}{\mathrm{FFT(input)}}$$
What does that corres... | Similar questions have been asked before, you may search. (I'm sorry but I cannot refer to one here)
You want to <strong>identify</strong> an analog <strong>LTI</strong> system from analysing its response $y(t)$ to a known input $x(t)$.
One method of analysis involves the use of continous Fourier transforms of the in... | If your input is $x(t)$ and your output is $y(t)$ then you'll have in the Fourier domain $X(\omega)$ and $Y(\omega)$. The relation between the two will be your transfer function.
For example if you work only with the absolute values then you will have the the amplitudes of frequency response.
| https://dsp.stackexchange.com |
249,699 | [
"https://softwareengineering.stackexchange.com/questions/249699",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/43961/"
] | I want to build a similar notification mechanism that Facebook handles.
<img src="https://www.techlicious.com/images/computers/facebook-notification-icon-100px.jpg" alt="enter image description here">
I actually store the user's notification in an SQL table (actually it's a graph database but everybody master RDBMS t... | The best practice is to store a datetime stamp in the user's table that indicates the last pull by the browser for notifications. Any notifications created after this datetime stamp would be counted as new and unread.
The database can index notifications by their created datetime stamp efficiently, and adding a flag i... | I cannot fully agree with previous answer, though the main idea is the same.
<h1>Last read timestamp</h1>
First of all you have to store last pull timestamp for every user if there is only personal messages, or / and last pull timestamp for every user-channel (chat, stream, room, topic, etc. whatever) pair to keep tr... | https://softwareengineering.stackexchange.com |
359,798 | [
"https://softwareengineering.stackexchange.com/questions/359798",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/286905/"
] | I have a hypothetical C++ code containing these two classes:
<ul>
<li><strong>Master:</strong> it's big, does a lot of things and is meant to have only one instance;</li>
<li><strong>Slave:</strong> quite the opposite. It can also do a lot of things, but it's small, and has many instances.</li>
</ul>
Every slave need... | Well you're right about something being wrong. But I highly doubt worrying about memory usage is going to fix it.
Unless you can point to some real world data that shows you have a memory problem at the scale of these references, I wouldn't worry about it. This smacks of premature optimization.
Now that doesn't mea... | The only time I see the pointer reference (<code>Master* ref</code>) being a problem is when you are in a constrained environment such as embedded programming. In that case, it would be better to use a standard Singleton with a static accessor to provide the <code>Master</code> instance to all your <code>Slave</code>s... | https://softwareengineering.stackexchange.com |
29,005 | [
"https://scicomp.stackexchange.com/questions/29005",
"https://scicomp.stackexchange.com",
"https://scicomp.stackexchange.com/users/18932/"
] | In the context of the solution of advection-diffusion equations by finite volume method, many numerical schemes, papers and book chapters are dedicated to address the numerical diffusion and/or numerical dispersion that comes from the discretization of the advection term.
If I understand it correctly, the discretizati... | We have the following problem:
$$\frac{\partial u}{\partial t}+v\color{red}{\frac{\partial u}{\partial x}}-\nu\color{blue}{\frac{\partial^2u}{\partial x^2}}=0 \tag{*}$$
The function $u$ may represent for example the concentration that propagates at velocity $v>0$ and disperses in a medium with viscosity $\nu>0$.... | Numerical diffusion is not a (big) problem in diffusive equation solvers because it is there in your model. If you had no diffusion in your model, say Euler's equations or nondiffusive Shallow Water equation or any other hyperbolic equation, then numerical diffusion becomes an issue because it denatures the numerical s... | https://scicomp.stackexchange.com |
145,977 | [
"https://cs.stackexchange.com/questions/145977",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/145078/"
] | Can someone tell me what the rules are for moving log or exponents into the <span class="math-container">$O(n)$</span> notation so it is still correct?
For example: Is this <span class="math-container">$\log(O(n))= O(\log(n))$</span> correct? Or is this correct <span class="math-container">$O(n)^2=O(n^2)$</span>? Or am... | To prove or disprove this kind of equality with <span class="math-container">$\mathcal{O}$</span>, you need to go back to the definition of <span class="math-container">$\mathcal{O}$</span> with inequalities.
For example, let's study the question <span class="math-container">$\log(\mathcal{O}(n)) = \mathcal{O}(\log n)$... | In order for <span class="math-container">$f(O(n)) \in O(f(n))$</span> to hold you essentially want <span class="math-container">$f$</span> to satisfy <span class="math-container">$f(cn) \le df(n)$</span> where <span class="math-container">$n$</span> is sufficiently large. Here the inequality must hold for all sufficie... | https://cs.stackexchange.com |
1,247,375 | [
"https://math.stackexchange.com/questions/1247375",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/233674/"
] | To find the expected number of suits the formula is
$E(Num Suits) = 1*P(1 Suit) + 2*P(2 Suit) + 3*P(3 Suit) + 4*P(4 Suit)$
For the probability of getting 4 suits I got
${13 \choose 1}^4 {4 \choose 4}/{52 \choose 4}$
For the probability of getting just 1 suit I got
${4 \choose 1} {13 \choose 4} / {52 \choose 4}$
I'm ... | Hint: The number of suits is the sum of four <em>indicators</em>: $N = X_1+X_2+X_3+X_4$ where $X_k$ equals 1 if suit $k$ is present, and equals zero otherwise, with $k$ ranging over the four possible suits.
Now the expectation you seek is $E(N) = E(X_1)+E(X_2)+E(X_3)+E(X_4)=4E(X_1)$ by symmetry. But $E(X_1)=P(\text{su... | This is a nice exercise, because the method described by @grand_chat is so much easier than the direct method. Using OP's notation, the probability of having exactly one suit is
$$
P(AAAA)=\frac{4\cdot{{13}\choose{4}}}{{52}\choose{4}}\approx 0.0106;
$$
the probability of having two suits is
$$
P(AAAB)+P(AABB)=\frac{4\... | https://math.stackexchange.com |
407,458 | [
"https://electronics.stackexchange.com/questions/407458",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/204765/"
] | I hard-wired a 12v cigarette-plug into my a-pillar.
The whole point is to have an additional phone charger on the leftside where my phone mostly sits.
I connected it directly to the battery ( with a fuse ), so I can use it when the engine is off aswell.
When I connected the usb-charger to the cigarette-12v-plug an i... | 1) yes, how long that will take depends on how much it draws and how long between car uses.
2) yes, they use power, more or less depends on the design & quality
3) Solve it by powering it from a fused accessory feed or ignition feed.
And, personally, I would do 3 whatever the power it draws...
| A similar question would be: 'what's the mileage of my car?'. Depends on your car, obviously.
So in this case: depends on the design. It could draw several µA up to several 10's of mA. Pretty simple to measure actually, then you'll know the answer you're looking for immediately.
| https://electronics.stackexchange.com |
111,523 | [
"https://dba.stackexchange.com/questions/111523",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/54928/"
] | In a Postgres 9.1 database, I have a table <code>table1</code> with ~1.5M rows and a column <code>label</code> (simplified names for the sake of this question).
There is a functional trigram-index on <code>lower(unaccent(label))</code> (<code>unaccent()</code> has been made immutable to allow its use in the index).
T... | In PostgreSQL 9.6 there will be a new version of pg_trgm, 1.2, which will be much better about this. With a little effort, you can also get this new version to work under PostgreSQL 9.4 (you have to apply the patch, and compile the extension module yourself and install it).
What the oldest version does is search for ... | I have found a way to scam the query planner, it is a quite simple hack:
<pre><code>SELECT *
FROM (
select id, title, label
from table1
where lower(unaccent(label)) like lower(unaccent('%someword%'))
) t1
WHERE lower(lower(unaccent(label))) like lower(unaccent('%someword and more%'))
</code></pre>
<cod... | https://dba.stackexchange.com |
2,439,985 | [
"https://math.stackexchange.com/questions/2439985",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/168051/"
] | <blockquote>
Let <span class="math-container">$f$</span> be a holomorphic function on <span class="math-container">$\mathbb{C} \backslash \{0\}$</span> such that <span class="math-container">$f(z) = f(\frac{1}{z})$</span> for all <span class="math-container">$z \ne 0.$</span><br />
Show that there exists a holomorphic ... | The function $z\mapsto z+\frac1z$ maps the exterior of $S^1$ to the complement of $[-2,2]$. There is a holomorphic inverse $h\colon\Bbb C\setminus[-2,2]\to \Bbb C\setminus \overline D$ (you can even write it down by solving a quadratic). If we let $g(z)=f(h(z))$, then $g(z+\frac1z)=f(z)$ at least for $|z|>1$. By the... | Let $\Omega_1$ be obtained from removing the imaginary axis and the segment $[-2,2]$ from the plane. Let $\Omega_2$ be obtained by removing the segments $(-\infty,2]$ and $[2,\infty)$ from the plane. Using obvious analytic branches $A_1$ and $A_2$ of square roots define $g_j(z)=f((z+A_j(z^2-4))/2$, $j=1,2$. The union o... | https://math.stackexchange.com |
420,335 | [
"https://physics.stackexchange.com/questions/420335",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/179594/"
] | I have always used adiabatic process to be <em>fast</em>, so that the system doesn't get enough time to exchange energy in the form of <em>heat</em>. But as I was reviewing adiabatic process from the Resnick, Halliday, & Krane book, the authors claim that:
<blockquote>
we assume the process to be carried out <em... | In Thermodynamics parlance, an adiabatic process is one in which there is no exchange of heat between the system and its surroundings. One way of accomplishing this is to have perfect insulation between the system and surroundings (zero thermal conductivity). In this case, it doesn't matter how rapidly the process is... | Maybe in practice (approximate) adiabatic processes are carried out fast in order to make them as adiabatic as possible, but in theory one could have an isolated system where energy is preserved, which is useful when you want the pressure to be well defined at all times.
You can however assume that any process in a th... | https://physics.stackexchange.com |
24,936 | [
"https://softwareengineering.stackexchange.com/questions/24936",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6509/"
] | I've been developing concurrent systems for several years now, and I have a pretty good grasp on the subject despite my lack of formal training (i.e. no degree). There's a few new languages that have become popular to at least talk about lately that are designed to make concurrency easier such as Erlang and Go. It ap... | <blockquote>
I've been developing concurrent
systems for several years now, and I
have a pretty good grasp on the
subject despite my lack of formal
training (i.e. no degree).
</blockquote>
Many of best programmers I know didn't finish the University.
As for me I studied Philosophy.
<blockquote>
C/C++, C... | To me is all about the data. Break your data right, and parallel processing is easy. All the problems with retention, deadlocks, and so go away.
I do know that this is not the only way to parallelize, but for me is far the most useful.
To illustrate, a (not-so-quick) story:
I did work on a big financial (stock-marke... | https://softwareengineering.stackexchange.com |
638,103 | [
"https://physics.stackexchange.com/questions/638103",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/140404/"
] | Starting from D'Alembert's general wave equation we can find the propagation speed of an impulse along a tightrope as a function of linear mass density,
<span class="math-container">$$\boxed{v= \sqrt{\frac \tau \mu}} \tag 1$$</span>
where <span class="math-container">$\tau$</span> it is tension of the rope (in Newton) ... | If you know (just using trig) the formula for centripetal acceleration <span class="math-container">$v^2/r$</span>, and (again just using trig) how to get the centripetal force as <span class="math-container">$T/r$</span> (analogous to the excess pressure in a soap bubble being <span class="math-container">$2T_{\rm sur... | You can use unit analysis to get the form of the formula.
The properties that completely define a thin string are the tension (<span class="math-container">$\tau$</span>) with unit <span class="math-container">$N = kg\cdot{}m/s^2$</span> and linear mass density (<span class="math-container">$\mu$</span>) with unit <spa... | https://physics.stackexchange.com |
128,389 | [
"https://softwareengineering.stackexchange.com/questions/128389",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/29270/"
] | Is it considered bad practice to throw <code>NotImplementedException</code> for code you haven't written yet? Possibly TODO comments would be considered safer?
| I believe <code>NotImplementedException</code> is actually a good practice.
Indeed, if you forget to implement a method, and you use it later on in your project (and believe me, it happens), you might spend a long time debugging looking for what went wrong step by step. If you have the exception, the program will stop... | It depends on your general philosophy around errors and error handling. I am the "hard error" type of guy: I will throw an exception at the slightest hint that something might be wrong; I will assert everything; If there is an error, if something was expected to be there, and it is not, or if something is there, and i... | https://softwareengineering.stackexchange.com |
248,255 | [
"https://mathoverflow.net/questions/248255",
"https://mathoverflow.net",
"https://mathoverflow.net/users/16267/"
] | I'm looking for a proof of convergence of stochastic gradient descent applied to a non-convex smooth function. I'm generally interested in just asymptotic convergence, preferably to a critical point, but not necessary to a (local) minimizer.
I have found many relevant results but they all have some additional assumpt... | The number of totient divisors of $n$ is $d(n-1)-d((n-1, \varphi(n))$. As $n$ gets large, then almost all $n$ have the property that $\varphi(n)$ is divisble by all small primes. The average number of prime divisors $p<y$ of $n-1$ is of magnitude $\log\log y$, hence, for almost all $n$ we have that the number of pri... | First, consider the number of divisors of a given number $m$. This is a product of numbers derived from the exponents of the prime factorization of $m$. The only way this is a prime is if $m$ is itself a prime to a power one less than some (likely different) prime. In general, think of the divisor lattice of $m$ as ... | https://mathoverflow.net |
424,139 | [
"https://math.stackexchange.com/questions/424139",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | I am trying to figure out the rate the water level increases in a conical tank that is 3 m height, 2 m radius at top and water flows in at $2\text{m} ^3 / \text{minute}$
I know that
$$(1/3) \pi r^2 h = V$$
$$4 \pi = V$$
or at 2 seconds the volume of the water is $8.37758$
so now I have
$$(1/3) \pi r^2 h * dh/dt ... | By similar triangles, observe that:
$$
\dfrac{h}{3}=\dfrac{r}{2} \iff r=\dfrac{2h}{3}
$$
Hence, substituting into the formula for the volume of a cone will help us to avoid product rule:
$$
V=\dfrac{1}{3}\pi \left(\dfrac{2h}{3}\right)^2h = \dfrac{4\pi}{27}h^3
$$
Differentiating each side with respect to $t$ yields:
$$
... | The rate of increase depends on the depth. As you say, $V=\frac 13 \pi r^2 h$. The calculation of the tank volume is not useful. Then $\frac {dV}{dt}=2=\frac 13\pi(2rh\frac {dr}{dt}+r^2\frac {dh}{dt})$ using the product rule. Now the dimensions of the cone give you $\frac {dr}{dh}$. Can you use that to combine the... | https://math.stackexchange.com |
61,262 | [
"https://mechanics.stackexchange.com/questions/61262",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/43070/"
] | Vw cc 2010 2.0l sport
I accidentally snapped the passenger right caliper bleeder valve while I was flushing my brake fluid.
A shop wants to charge me $670 to replace both calipers and the fluid. They said you usually replace calipers in pairs.
I was thinking. Do I need to replace calipers in pairs? And do I even need... | Brake <strong>pads</strong> should be replaced in pairs, that is to make sure you get even braking action. Calipers do <strong>not</strong> need to be replaced in pairs I would suspect anyone telling you that wants to rip you off. A broken bleed screw is not a reason to replace a caliper unless the remains cannot be re... | The calipers do not always need to be replaced in pairs. If the shop looked at the calipers they may have determined that the odds of getting the bleeders out is too low. Depending on the shops hourly rate they may have determined that it is more cost effective to just replace the calipers. Sometimes this is a liabilit... | https://mechanics.stackexchange.com |
17,626 | [
"https://stats.stackexchange.com/questions/17626",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/6917/"
] | Let's say you have a large random sample of soccer players in Europe but you are only interested in what happens in Spain. Could you reduce your sample to players in Spain and still call it a random sample (but of a different population)?
If not, how would you call that subsample and which specific precautions should y... | Generally speaking, what you really want from a sample, is to be "representative". Random sampling is a good way to go since it allows all subjects the same probability of being sampled; In the hope that all attributes and attribute-relations existing in the population will exist in the sample. Making it "representativ... | Assuming there are no biases in the sampling technique, this should be fine. Some questions to ask might be:
-> Was the survey conducted in Spanish if requested? (Language bias)
-> Was the survey conducted over the phone or in person? If over the phone, and cell phones were excluded, are Spanish players more or less l... | https://stats.stackexchange.com |
424,272 | [
"https://stats.stackexchange.com/questions/424272",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/257676/"
] | Please help me understand what a negative confidence interval actually means and how it can be interpreted, especially when the variable has a positive correlation with the dependent variable. Below is the data and its structure.
<pre><code>'data.frame': 251 obs. of 7 variables:
<span class="math-container">$ Body... | You are comparing two very different things. In the first case, you are making pairwise comparisons when calculating the correlation coefficient between BodyFat and Weight. In the second, you are doing a multiple regression that also accounts for the variation in BodyFat that is explained by all your other variables.
... | To add to @mkt 's answer, which does capture all the most critical mathematical aspects, a few observations:
<ol>
<li>The intercept CI spans from -70 to -33. Assuming that body fat is a percentage, then this means that the baseline amount of fat in the cohort is very variable. </li>
<li>If the distribution of BodyFat ... | https://stats.stackexchange.com |
22,020 | [
"https://mechanics.stackexchange.com/questions/22020",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/7132/"
] | Wouldn't various A/F ratio problems such as vacuum leaks, low fuel pressure or clogged injectors cause a constant adjustment to fuel trims, first via STFT and then to LTFT? For example, if there is a air / vacuum leak significant enough to cause noticable idle problems wouldn't that cause a more or less constant attem... | You have hit the nail on the head.
When the car is in closed loop, this part is important, the fuel trims reflect the current A/F ratio. When a vacuum leak develops, first the car will compensate withe the sort term fuel trims. When the STFT stay high long enough (every car is different) they will cause the LTFT to d... | It does to a certain point but it has to be limited to avoid engine damage.
The basics:
ECM first set it's base value let say 3.5ms. This is received from signals such Airmass, TPS, crankshaft position sensor etc. When both the long and short term fuel trim sit in they mid value 0% the injection pulse width is unmod... | https://mechanics.stackexchange.com |
362,817 | [
"https://softwareengineering.stackexchange.com/questions/362817",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/291614/"
] | I am writing a library for some data structures in C that will be used in embedded systems. I have had issues designing and coming up with a solid error handling plan. This API is only subject to logic errors which is why I am so conflicted. By this I mean the preconditions might be: "x != NULL" or "index < size of ... | Speaking as a developer for small embedded systems, I would take asserts over any of the other options.
If the space for your code is limited, then you can easily get into a situation where every byte counts. In that situation, asserts (especially the <code>assert</code> macro) has the advantage that you can disable t... | This is a common misconception:
<blockquote>
To my understanding, asserting logic errors for debugging purposes is encouraged,...
</blockquote>
In spite of the fact that a lot of developers use them for that purpose, assertions are <em>absolutely not</em> meant for logical error checking. If an assertion fires, it ... | https://softwareengineering.stackexchange.com |
324,237 | [
"https://softwareengineering.stackexchange.com/questions/324237",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/223118/"
] | Consider the following simplified example:
<pre><code>abstract public class Controller {
protected final boolean isUserAdmin() {
return getServiceContainer().getUserService().isUserAdmin();
}
/* ... other methods ... */
}
public class UserController extends Controller {
public Page showUs... | <blockquote>
Is creating methods such as isUserAdmin() bad practice?
</blockquote>
It is, though it isn't so much that this method is bad practice, but rather using a parent class as a dumping ground for methods you want to share with the child objects but that don't have any particular relationship to each other in... | Two points:
<ol>
<li>I prefer methods like these because they help break up method trains like: <code>myObject.getFoo().doBar().tooManyCalls()</code> (i.e. Train Wrecks)</li>
<li>However, If you find yourself writing several of these "shortcut" methods you may very well have a bigger/better refactoring that you can ta... | https://softwareengineering.stackexchange.com |
21,142 | [
"https://softwareengineering.stackexchange.com/questions/21142",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6614/"
] | In several projects we have been using the following layers:
<ol>
<li>Action (has 1 or more managers)</li>
<li>Manager(has 1 or more Daos)</li>
<li>Dao</li>
</ol>
But most of the time the manager only calls the dao. We do use the manager class to prepare the date to be sent to the db or to prepare the data to be sent... | <blockquote>
<ol>
<li>What are the responsibilities of a Manager and of the Dao classes?</li>
</ol>
</blockquote>
The responsibility of the DAO is the abstraction over data access. The responsiblity of the manager it to organize and execute the business logic of the application -- the manager uses the DAOs to a... | This is just my preference:
<ul>
<li>Data Access Classes are responsible for each table</li>
<li>Managers are responsible for low level business logics and consistency between a few data tables. They use DAO for performing their duties.</li>
<li>Services provide higher level business services which needs collaboration... | https://softwareengineering.stackexchange.com |
2,637,575 | [
"https://math.stackexchange.com/questions/2637575",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/68259/"
] | I do not know why I am having so many issues with complex numbers. I am basically trying to teach myself, but keep doubting myself and getting very frustrated. I've no way of checking my answers so I'm just lost. So I want to write the following in polar form <span class="math-container">$re^{i\theta}$</span> (although... | Let $\sqrt[3]{34-x}=a$ and $\sqrt[3]{x+1}=b$.
Thus, $$a^3+b^3=35$$ and $$ab(a+b)=30,$$ which gives
$$(a+b)^3=125$$ or $$a+b=5.$$
Can you end it now?
I got $$\{26,7\}$$
| if $x=7$ then $x+1 = 8$ has an integer cube root and $34-x = 27$ has an integer cube root. Also, you get an answer to the original problem.
worth checking what happens when $x=26...$
Yes, $x=26$ also works.
| https://math.stackexchange.com |
341,592 | [
"https://electronics.stackexchange.com/questions/341592",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/149589/"
] | I have a differential signal ranging from 0 to 2 MHz and need to transform it into a single-ended signal.
I found out that there are 3 methods:
<ol>
<li>Transformer</li>
<li>Amplifier</li>
<li>simply ground the negative part with a matching load</li>
</ol>
How can I decide which method to use? I mean I would just t... | <blockquote>
1.Transformer
</blockquote>
If your signal is a single, or narrow band, frequency this method is fine. However, anything else and you introduce the transformers frequency response into your signal.
<blockquote>
3.simply ground the negative part with matching a load
</blockquote>
This method is ok, I... | DC to 2Mhz is differential amplifier territory, they can have excellent phase and gain flatness over that sort of range combined with reasonable CMRR (This tends to fall with frequency). Have a look at the high CMRR parts from THAT Corp, they are aimed at audio but IIRC have plenty of GBP and usefully bootstrapped comm... | https://electronics.stackexchange.com |
142,625 | [
"https://stats.stackexchange.com/questions/142625",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/28746/"
] | This post asks <strong>"why a familiar and widely used estimator of sample covariance has expected value zero, in a situation where the variables involved are characterized by non-zero and equal pair-wise covariance"?</strong>
<strong>Specifically</strong>, the set up is as follows: we have a sequence of identically d... | The conditions on the covariances will force the $X_i$ to be strongly correlated to one another, and the $Y_j$ to be strongly correlated to each other, when the mutual correlations between the $X_i$ and $Y_j$ are nonzero. As a model to develop intuition, then, let's let both $(X_i)$ and $(Y_j)$ have an exponential aut... | If $\{X_i\}$ are iid and $\{Y_i\}$ are iid, then $\{(X_i,Y_i)\}$ are iid. Hence $\operatorname{Cov}(X_i,Y_j) = 0$ when $i \ne j$. Since you are requiring $\operatorname{Cov}(X_i,Y_i) = \operatorname{Cov}(X_i,Y_i)$, you end up concluding that $\operatorname{Cov}(X_i, Y_i) = 0$, and thus $\operatorname{Cov}(X,Y) = 0$.
| https://stats.stackexchange.com |
79,878 | [
"https://physics.stackexchange.com/questions/79878",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/29687/"
] | <img src="https://i.stack.imgur.com/kUyg1.png" alt="enter image description here">
A wheel rolling down a hill has two axis of rotation. One is where the center or mass is and the other is the point of contact with the surface which acts as a fulcrum. I was trying to understand how this happens, how it rotates down th... | First things first, Torque is always relative to a given point. You can calculate the torque about the centre of mass or about the point of contact.<br>
Next, Any object, moving howsoever, can be analysed in one definite way, by considering the <em>pure</em> translational motion of the Centre of mass and the <em>pure</... | To answer your question as simply as possible: the torque comes from the force of gravity. For rolling to occur, the force of gravity must not be able to overcome the static friction at the point of contact with the ground, otherwise sliding occurs. Thus, we can say the contact point is a fixed pivot. Then the force du... | https://physics.stackexchange.com |
44,648 | [
"https://physics.stackexchange.com/questions/44648",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/10788/"
] | Earlier this evening I was looking at the Moon through my cheap toy telescope (x150 magnification) when I noticed a (rather mundane) optical effect I couldn't explain. The Sun had just dipped below the horizon and the sky was still a fairly bright shade of blue, and the Moon itself near zenith. But when I looked at the... | Unless you have a filter on the lens, the color shouldn't change noticeably. I think your explanation is the correct one: the telescope simply doesn't transmit anywhere close to 100% of the light it's receiving. Note that with perfect optics, the sky would be brighter by approximately the ratio of the areas of the ob... | In telescopic (binocular) observation brightness of observed extended surface (like sky, Moon's surface, etc.) strongly depends from applied magnification. Lower magnification makes observed surface brighter. Higher magnification makes surface darker.
Applying 150x on your my cheap toy telescope you must get much mor... | https://physics.stackexchange.com |
37,926 | [
"https://electronics.stackexchange.com/questions/37926",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/9768/"
] | I'm trying to use CD4051BCN chip to channel some speaker outputs from a computer. these chips handle analog voltages from +/-5V.
What is the audio line max/min Voltage coming out of the desktop PC? I just need the audio line this is without any amplification.
Would it be better to use a series of relays with higher v... | I just measured the voltage from my smartphone headphone jack, which should be similar to what you'd get from a PC headphone jack. I got +/- 1.5v (3.0 volts peak to peak). This was not under controlled conditions with a known audio source. I would guess that the output could peak at higher than +/- 3v (6v peak to pe... | In some cases [ not extreme cases] due to the ground looping it may
get up to more than ~60V. So if you designing a system, where poor grounding
and many places are grounded, and with different power sources, I HIGHLY
recommend you to use a 1:1 transformer too.
This is called an isolation transformer. If your not usi... | https://electronics.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.