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
8,766
[ "https://biology.stackexchange.com/questions/8766", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/577/" ]
I'm looking at services like 23andme, and see that they identify a wide variety of genetic-based risks, like predisposition to diseases, hair loss, cancer, etc. <strong>Are there a more "positive" DNA analysis outcomes out there?</strong> Like increased strength, cheerfulness(resistance to depression), etc?
First of all, I think it is, to a large extent, the way you perceive it. Instead of cancer-causing allele and hair-loss allele, you can think of them as cancer-protection and great-hair alleles. If you don't have disease alleles, that means that in some sense you have "life-extending" genes! Sounds much better, doesn't...
Lactase persistence is a recent mutation which enables the people who have it to drink and digest milk as adults, while the default state has people unable to digest milk after childhood. There is also a loci for muscle performance. People either have fast-twitch or slow-twitch preference, which affects your sprinting...
https://biology.stackexchange.com
10,527
[ "https://dsp.stackexchange.com/questions/10527", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/1329/" ]
Suppose we have filter $h[n]$, length $N$. If I use it to do convolution in the time domain, then there will be $N$ multiplications each time during the sliding. (Ignore border conditions for now). However if say $h[n]$ had zeros every other sample, then there would be <em>half</em> that number of multiplications, so o...
If you <em>know</em> ahead of time that your filter pulse response has zeroes in alternation, then you can use a <em>different</em> FFT routine to speed up the convolution. On the other hand, if you simply pass the filter input and the pulse response to a generic computational subroutine that will spit out the filter o...
<blockquote> <em>Is this a correct assessment? If so, might there then be cases where a good old fashioned convolution in the time domain is in fact much faster than an FFT?</em> </blockquote> You're right. Convolution in the time domain with small N is always faster than FFT convolution. I researched this issue f...
https://dsp.stackexchange.com
1,344,690
[ "https://math.stackexchange.com/questions/1344690", "https://math.stackexchange.com", "https://math.stackexchange.com/users/251527/" ]
I was wondering how to find the vertices of an equilateral triangle given its center point? Such as: <pre><code> A /\ / \ / \ / M \ B /________\ C </code></pre> Provided that <code>AB, AC, BC = x</code> and <code>M = (50,50)</code> and <code>M</code> is the middle of the tri...
Let's assume that <span class="math-container">$x$</span>, the side of the equilateral triangle, is a known positive quantity and that side <span class="math-container">$BC$</span> is horizontal (or that point <span class="math-container">$A$</span> is directly above point <span class="math-container">$M$</span>). Let'...
Draw the circle of radius $\frac {\sqrt 3}3x$ around $M$. Pick an arbitrary point $A$ on this circle. Then intersect the circle of radius $X$ around $A$ with the first circle to determine $B,C$ as intersection points. Note that $A$ could be picked anywhere on the circle, hence the result is not unique.
https://math.stackexchange.com
38,901
[ "https://mechanics.stackexchange.com/questions/38901", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/18856/" ]
I recently added a cold air intake and cleaned the throttle body and IAC valve (I was having hunting idle issues) on my '01 Accord V6, and I noticed that there were coolant lines running through the IACV. Instead of reconnecting them, I bypassed the flow with a loop of transmission hose and instead routed the breather...
The use of the IAC and coolant running through it are just as you speculated: to prevent icing. In most places there really aren't any issues with the freezing issue. Even in cooler climates, there usually aren't any issues. As we all know, when there is a tremendous amount of air moving in/around/over a metal object, ...
I'd be surprised if the heating is extraneous in general – too much cost and engineering for a component without a purpose. But, <em>you</em> might be able to get away without the heating. It will depend on where you live, how you drive, the weather conditions, etc. With a fuel injected engine (assuming it isn't throt...
https://mechanics.stackexchange.com
7,177
[ "https://cstheory.stackexchange.com/questions/7177", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/2938/" ]
My <strong>questions</strong> are: <blockquote> [Solved by Dave] Given a learner N, can you design a learner M that behaves differently from N? No. </blockquote> and <blockquote> [Solved by Dave] Given a learner N, can you design a learner M that is more powerful than N? No. </blockquote> and <blockquote> [Solved by Da...
Answer to questions 1 and 2: No. This is also the answer to 3 if $M$ is required to always halt (isn't this implied by the definition of a learner, or do you mean the program produced by $M$ must always halt?). Here's a proof for 1 (2 and 3 work pretty much the same way) Suppose there's an algorithm $A$ which takes th...
Here's an answer to your second question. Consider a learner $M$ which always produces a machine that enumerates every natural number. This converges on any text which contains every natural number. In the next paragraph, we will show that there is a one-to-one mapping from the set of all texts to the texts on which $M...
https://cstheory.stackexchange.com
36,810
[ "https://mathoverflow.net/questions/36810", "https://mathoverflow.net", "https://mathoverflow.net/users/8658/" ]
Let $X$ be a subcomplex of a CW-complex $Y$. Is $(Y/X)^{\wedge k}$ homotopy equivalent to $Y^{\wedge k}/X^{\wedge k}$, where $\wedge k$ is the $k$-fold smash product? I know it is not true for products but am having a hard time visualizing for smash products.
The easiest way I know to say what is going on is to resort to looking at "products" of pairs: $$ (X, A) \times (Y, B) = ( X\times Y , A\times Y \cup X\times B). $$ The point of this notation is that the functor $(X, A) \mapsto (X/A, *)$ carries $(X, A) \times (Y, B)$ to $X/A \wedge Y/B$. We can iterate this procedure...
$X\wedge X\subset (Y\wedge X)\cup (X\wedge Y)\subset Y\wedge Y$, with quotients $((Y/X)\wedge X)\vee (X\wedge (Y/X))$ and $(Y/X)\wedge (Y/X)$.
https://mathoverflow.net
17,637
[ "https://engineering.stackexchange.com/questions/17637", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/10590/" ]
I was wondering about the ethics of an interviewer asking to see your design notebooks in an interview. First off, I'm not sure if it's even legal for someone to ask that, since many of the designs I have are covered by (Non disclosure Agreements) NDA'S with various companies which the interviewer is not a part of. ...
Only offer work you wish to show and have the right to show. If work is subject to an nda, then they should not ask and if they do, they should respect that you are under an nda...
Although already answered, for such an interview question the best response would be to show them some portfolio containing a few sample design sketches, instead of NDA protected materials. If they really wish to see a notebook related to a previous company, I would fear about their ethical basis. I've been to sever...
https://engineering.stackexchange.com
12,606
[ "https://electronics.stackexchange.com/questions/12606", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/3123/" ]
I have seen dozens of different real-time clock chips on the market, as well as a number of processors with a built-in separately-powered real-time clock module. Nearly all of them not only store time as year-month-day-hours-minutes-seconds, but even the individual fields are stored in BCD rather than binary format. ...
<h1>Do all RTCs use BCD encoding?</h1> RTCs from Philips/NXP (both standalone and integrated into ARM7 or Cortex-M3 chips) do not use BCD encoding. <h1>What's wrong with a BCD RTC?</h1> When compared to flat counter the only operations which are more difficult with a split BCD clock are time difference calculations ...
When using clocks in the end you're more likely to be interested in minutes and tens of seconds(towards displaying them) than just the total of seconds, minutes and so on. In case you're not interested in separate digits chances are that you don't care about separate minutes or seconds values either, and that you might...
https://electronics.stackexchange.com
448,156
[ "https://electronics.stackexchange.com/questions/448156", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/158951/" ]
I'm doing a project where I have ground sensors that detect seismic activity and report their GPS coordinates via APRS if seismic activity is detected. I'd like to do the APRS over satellite. The sensors are small and utilizing a satellite dish for each one would not suit my needs. There is a product I came across ca...
<blockquote> Do you really need a satellite dish to communicate with satellites? </blockquote> No, if that were true, your phone's GPS would be rather unwieldy, wouldn't it? And satellite phones would be pretty impractical. (Satphones predate modern smartphones solidly.) All that a satellite dish is an antenna with...
"satellite dish" is not a proper name. Proper name is parabolic antenna. There is nothing special about antennas used for communicating with satellites. It is just antenna for some frequency (or range of frequencies) and with some specified gain. Satellites are far away so you need antenna with pretty good gain. You...
https://electronics.stackexchange.com
190,048
[ "https://physics.stackexchange.com/questions/190048", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/83930/" ]
First some assumptions. 1) Photons travel at the speed of light. 2) From the photon's reference spacetime is contracted to 0 length in the direction of photon travel. 3) From the photon's reference it is emitted and absorbed at the same time and in the same place. Now imagine a setup with 1 emitter and 2 detectors (E...
Let's start with your assumptions: <em>1) Photons travel at the speed of light.</em> Right. No problem with that. <em>2) From the photon's reference spacetime is contracted to 0 length in the direction of photon travel.</em> Wrong. The photon doesn't have any kind of reference frame. To appreciate why, imagine you'...
As John Duffield pointed out in his answer, there is no reference frame in which the photon is at rest. This is the simple reason why most parts of your statements do not make sense. Still, there is an interesting perspective to the issue you raise: Normally one considers the events or states "photon emitted", "photo...
https://physics.stackexchange.com
10,947
[ "https://mathoverflow.net/questions/10947", "https://mathoverflow.net", "https://mathoverflow.net/users/290/" ]
There's a wonderful analogy I've been trying to understand which asserts that field extensions are analogous to covering spaces, Galois groups are analogous to deck transformation groups, and algebraic closures are analogous to universal covering spaces, hence the absolute Galois group is analogous to the fundamental g...
This is a great question. Someone will come along with a better answer I'm sure, but here's a bit off the top of my head: 1) The Hilbert class field of a number field $K$ is the maximal everywhere unramified abelian extension of $K$. (Here when we say "$K$" we really mean "$\mathbb{Z}_K$", the ring of integers. Tha...
I guess you're looking for the maximal unramified abelian extension. The fundamental group of a genus g curve has abelianization isomorphic to $\mathbb{Z}^{2g}$, so if g is positive, you get an infinite extension. The corresponding cover is not an algebraic curve in the usual sense of the word, although I suppose you...
https://mathoverflow.net
89,862
[ "https://stats.stackexchange.com/questions/89862", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/41846/" ]
I have a device which rotates on a stepper motor through a belt and pulley system. I would like to know both the positional accuracy and precision of this movement. It is of my opinion that this should be determined by taking a large number of measurements to random angles to give a bell curve then using the offset of...
People use the two terms more or less interchangeably in daily life, which is why this can be confusing. In fact, your office has it exactly backwards. Precision doesn't require an external reference, but accuracy does. Let's start by thinking about a scale. Suppose we measure the mass of an object many times. If the...
In addition to Matt's answer, <ul> <li>I'd highly recommend to spell out what you refer to with your terms (which should of course be used according to their general definition).<br> The fact that you encounter confusion already within your office underlines this.</li> <li>Also you need to be clear whether you report...
https://stats.stackexchange.com
374,179
[ "https://electronics.stackexchange.com/questions/374179", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/92508/" ]
I have to develop a consumer product for home automation. We initially wrote a requirement to have a on/off switch, but after a second thought we realized that hard-reset can be done by simply unplugging the device. This lead to another question. Why customer products such as routers or Hi-Fi products usually have a ...
It's largely for convenience. Not having to crawl under desks to plug and unplug things you aren't using isn't exactly my favourite pastime, and I assume it wouldn't be yours either. Adding a switch on the front panel to just simply turn a thing on and off without turning everything else off, nor having to dig into t...
One could simply remove the DC power barrel connector but they tend to be cheap with thin nickel plating which can erode and oxidize the substrate conductor from hundreds or thousands of operations, so that is your choice also with uncontrolled contact bounce unlike a spring switch which can also bounce but will be les...
https://electronics.stackexchange.com
154,236
[ "https://chemistry.stackexchange.com/questions/154236", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/41196/" ]
I've seen that Gibbs free energy is defined as the maximum amount of work that a system can do. From this I gather, this is how much energy it will release - right? But, I've also learnt that the heat released when I burnt ethanol was due to the <em>enthalpy</em> of the reaction. Given that the formula for Gibbs free e...
<blockquote> I've seen that Gibbs free energy is defined as the maximum amount of work that a system can do. From this I gather, this is how much energy it will release - right? </blockquote> No, this conclusion is incorrect, the Gibbs energy is not how much energy a process releases. A system can exchange energy with ...
Suppose you have an ideal gas in a container in mechanical and thermal equilibrium with its surroundings (same <span class="math-container">$T$</span> and <span class="math-container">$p$</span>—say, 298 K and 1 atm). It can't do any work on the surroundings. Now compress it isothermally to, say, 100 atm. Now it cert...
https://chemistry.stackexchange.com
178,831
[ "https://physics.stackexchange.com/questions/178831", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/45557/" ]
People say yes, and give a wonderful example of vacuum tubes, CRTs. But can we really say that vacuum (..as in space) is a good conductor of electricity in a very basic sense?
The conductivity of the vacuum is not a very trivial issue. In fact, depending on how you look at it, it behaves in two different ways. Firstly, there is no retarding force on any charged particle with constant velocity in vacuum. To this extent, no extra work is required in maintaining a constant current through any ...
<strong>No</strong>, in the very basic sense it is not a <strong>good</strong> conductor, because very high voltages are required to shoot them through. But <strong>yes</strong> it still is a conductor, because it allows the flow of current. Compare this to a diode, which similarly only allows current (in the same ver...
https://physics.stackexchange.com
263,101
[ "https://math.stackexchange.com/questions/263101", "https://math.stackexchange.com", "https://math.stackexchange.com/users/53128/" ]
I know that I should use the definition of an odd integer ($2k+1$), but that's about it. Thanks in advance!
Step 1: pick an odd number (like $n=13$ here) <img src="https://i.stack.imgur.com/lbj1m.png" alt="13 squares"> Step 2: bend it in "half" (any odd number $n$ can be written as $2k+1$, and $13=2\cdot 6 + 1$) <img src="https://i.stack.imgur.com/jYiFe.png" alt="enter image description here"> Step 3: fill in the blank s...
<strong>Hint:</strong> Consider the difference of two consecutive squares. What is $(k+1)^2-k^2$?
https://math.stackexchange.com
439,340
[ "https://softwareengineering.stackexchange.com/questions/439340", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/416366/" ]
I'm working on an application with a database containing many recipes. The API is written in Django (with Django REST Framework) and frontend in React.<br><br>Each recipe is assigned a high-quality image. In React application, the user can see all the recipes with their images in a list view. The problem is that they t...
Having multiple different resolution images is a very good idea. Perhaps 2, perhaps more, in your use case probably those 2. The problem with downscaling on the fly is that you have to: <ul> <li>Wait for network capacity to give you the images from the database</li> <li>Wait for JPEG decompression to decompress each hi...
The biggest issue you will run into is bandwidth. Quite simply larger images require more bytes than smaller images. Having a down-scaled image for your listing helps save that bandwidth until a user actually picks a recipe to open. You don't need the high resolution photo at that time. The downside is that you are...
https://softwareengineering.stackexchange.com
68,592
[ "https://electronics.stackexchange.com/questions/68592", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/22551/" ]
I'm trying to design a circuit in GEDA/Gschem in Ubuntu. I could insert new components in the circuit but I cannot in the name change or add values. For instance when opening the window for attributes of a resistor, I cannot see 'value' on the list. I tried to add 'value' but the field for adding the actual numeric va...
It sounds like you are not managing to select anything other than the default attribute name. Click the dropdown arrow for the "Name" field where it defaults to 'netname' and select 'value' from the list. Then enter your value in the large "value" text area. Then select the visible button and choose name and value or n...
It's embarrassing but I found the solution. Right click, add attribute... what I referred earlier was just the preview of attributes. Either way, I solved. Thank you for your kind help! – alkopop79 just now edit
https://electronics.stackexchange.com
160,286
[ "https://stats.stackexchange.com/questions/160286", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/81658/" ]
I have some doubts which <code>R</code> function choose for my task. Lets imagine we have two types of objects "tree" and "grass" . I've estimated the height of both multiple independent trees and grasses. And i would like to understand whether is there a statistical significant contrast of height between trees and gr...
<blockquote> Both p-values of F-statistic and t-statistic are significantly lower then 0.05 </blockquote> This does not actually make sense. In the null hypothesis significance testing framework, we set a "significance level", which is often 0.05 <em>by convention</em>. It is sufficient to say that the p-values are ...
Yes, <code>lm()</code> is correct for 4 groups, if I'm understanding you correctly. You're looking to perform ANOVA, which is testing for differences between means of different groups in your data. If you only had 2 groups, then a simple t-test would suffice. Here's an example: <pre><code>set.seed(1) # Make sure you s...
https://stats.stackexchange.com
341,181
[ "https://softwareengineering.stackexchange.com/questions/341181", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/6330/" ]
At work I'm using Java, but I'm planning to study some other programming languages as Python or Clojure. I'm thinking of coding one project in Java in my Git repository and, during my study, coding the same functionality in Python or Clojure. Because it will be a project without an effective value at work and by a pe...
This is very personal and depends on your style of maintaining your code and how you work with code repositories. Then again there are recommended "best practices", that are there for a pretty good reason. You can do either one approach and it won't be "wrong" in the sense that as you stated, this is going to be a pe...
If it is the same project, it makes sense to have all "versions" of it (in different languages) in the same repository, so that you will be able to easily track changes in each version (a subdirectory of your main repository per language I would think, not a branch in the <code>git</code> sense). For example, if you i...
https://softwareengineering.stackexchange.com
220,770
[ "https://mathoverflow.net/questions/220770", "https://mathoverflow.net", "https://mathoverflow.net/users/36563/" ]
It is classically known that every positive integer is a sum of at most four squares of integers, i.e. every sum of squares of integers is a sum of four squares of integers. Now consider a symmetric $n\times n$ matrix $M$ with integer entries which can be written as $M= Q^{\rm T} Q$ for an $m \times n$ matrix $Q$ with ...
Here is an answer (see the last point). It differs from what I had been claiming in my first post. There I was saying that any positive bilinear module $\Lambda$ over $\mathbf Z[\frac 12]$ was representable by some euclidean module $\mathrm{I}_n\otimes\mathbf Z[\frac 12]$. This is true (with $n\leq \text{rk}(\Lambda)+3...
In Maria Icaza's Ohio State PhD thesis (1992?) she established the following result. For any positive integer $n$, let $S(n)$ be the set of $\mathbb Z$-lattices (or integral quadratic forms, if one prefers polynomials) of rank $n$ that can be represented by some sums of squares. Then there exists an integer $g(n)$ su...
https://mathoverflow.net
346,992
[ "https://stats.stackexchange.com/questions/346992", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/-1/" ]
I am completely new to ML and R and I just want to understand why my Residual Standard error went down when i log replace my dependant variable with log(y). I am running regression using R <strong>lm</strong> Initial formula: <strong><em>y~ time(x1) + x2 + x3</em></strong> This gave RSE : 60.37 I replaced the formula...
The main reason is that you can not compare the residuals of the model <strong>y ~ ...</strong> with the residuals from the model <strong>log(y) ~ ...</strong>. The residuals of your model <strong>log(y) ~ ...</strong> are the differences<br> <code>log(y) - fitted.values(lm(log(y) ~ ...))</code><br> Here an example t...
Residual Standard Error defines the standard deviation(<strong>σ</strong>) of the residuals in OLS i.e. errors are assumed to be normally distributed with mean <strong>0</strong> and standard deviation <strong>σ</strong>. Lesser this value better the results(obviously other assumptions of regressions should also hold t...
https://stats.stackexchange.com
706,084
[ "https://physics.stackexchange.com/questions/706084", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/267782/" ]
The following equation(subset of Maxwell's equations of electromagnetic wave(s)) is said held in free space. <span class="math-container">$$\underbrace{ \color{fuchsia}{\nabla^2\mathbf{H}_{}=\sigma\mu{\partial\mathbf{H}_{}\over\partial\mathrm{t}}+\epsilon\mu{\partial^2\mathbf{H}_{}\over\partial\mathrm{t^2}}} }_{\text{...
<span class="math-container">$\nabla × \vec{B} = \mu (\sigma \vec{E}) + \mu \epsilon \frac{\partial \vec{E} }{\partial t} $</span> Take the curl and sub gauss law for magnetism <span class="math-container">$-\nabla^2 \vec{B} = \mu \sigma \nabla × \vec{E} + \mu \epsilon \frac{\partial \nabla × \vec{E} }{\partial t} $</s...
I don't know where you've seen this, but that source is wrong. This is the equation in a conducting medium, which means you have current <span class="math-container">$$ \vec j = \sigma \vec E $$</span> (Ohm's law) so no vacuum. Furthermore, if <span class="math-container">$\epsilon,\mu\neq\epsilon_0,\mu_0$</span> this ...
https://physics.stackexchange.com
728,129
[ "https://physics.stackexchange.com/questions/728129", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311516/" ]
If all reference frames are valid, then why is the geocentric model taught as &quot;wrong&quot; in schools? I've checked many websites but none of them clear the issue. Wiki says that in relativity, any object could be regarded as the centre with equal validity. Other websites and answers make a point on the utility of...
If 'geocentrism' means that you can regard the Earth as stationary and describe the motion of Sun and planets accordingly, then geocentrism <em>isn't</em> wrong. But if 'geocentrism' means that The Sun and planets have simple (for example circular) orbits about the Earth, then it is wrong. Almost 2000 years Ago, Ptolem...
You're right that in general relativity any frame of reference can be accommodated. That said, some frames of reference are more convenient than others in terms of simplifying the description of all the phenomena. And by &quot;convenient&quot; I mean the difference between requiring a modern computer to handle and coul...
https://physics.stackexchange.com
148,903
[ "https://security.stackexchange.com/questions/148903", "https://security.stackexchange.com", "https://security.stackexchange.com/users/124335/" ]
Having read books on iOS Pentesting, I noted almost all <em>security testcases</em> or tool(s) require a jailbroken device. I looked for information about this, because it is needed to perform those tests or to use those tools, and I understood it. But I cannot find an explanation around: <em>In the real world not a...
Generally iOS Security assessments (a.k.a penetration testing) are targeting applications running on an iOS device and not the Operating System/platform itself (which has already been subjected to a large number of assessments). In order to effectively assess the security of an application running on iOS a jailbroken ...
It's true that in a real world most devices won't be jailbroken. In fact, it's not recommended to have a jailbroken/rooted device if you don't use it for development, pentest, etc Most vulnerabilities you found in a jailbroken device probably can't be replicated in a non-jailbroken device, but that doesn't prevent an ...
https://security.stackexchange.com
277,903
[ "https://electronics.stackexchange.com/questions/277903", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/60145/" ]
I want to know is any risk factor (electrical shocking or ... ) for using one aluminum (4mm) device body which is used as heat-sink for IGBT and Bridge rectifier that are working with 220 volt power? is use a silicon layer between those surface how is it? (guess withstand temperatures up to 260°C (500 °F)) thanks a lo...
Obviously there are two primary risks: shock and temperature. For shock, any mains-connnected circuitry MUST be double-insulated. &mdash; in other words, there must be at least two independent layers of insulation, each of which is capable of withstanding the peak voltage on its own. For temperature, you must make su...
The obvious risk is shock if the part of the case the heatsink is connected to is at dangerous voltage. A thin insulating layer, like a silicon sheet for that purpose, between the part and the heatsink is not considered safe. I've seen such things fail on occasion. The better way to deal with this is to consider the...
https://electronics.stackexchange.com
115,726
[ "https://cs.stackexchange.com/questions/115726", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/107724/" ]
We know that singleton languages (languages containing exactly one word) are regular. We also know that a finite union of regular languages is also regular. Suppose there is a non-regular language <span class="math-container">$L$</span>. For every finite subset <span class="math-container">$\{x_1,x_2,\ldots,x_i\}$</sp...
The same "argument" would show that <span class="math-container">$\mathbb{N}$</span> is finite since it's the union of finite sets <span class="math-container">$$\mathbb{N}=\{0\}\cup\{0,1\}\cup\{0,1,2\}\cup ...$$</span> The point is that knowing that a given property is preserved under a given operation does not mean t...
You proved that any <em>finite</em> languages are regular. All the languages that you generated are finite.
https://cs.stackexchange.com
615,660
[ "https://physics.stackexchange.com/questions/615660", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/276953/" ]
Most of the time we make a mistake when calculating average velocity where <span class="math-container">$$\bar v'=\frac {\sum v} n$$</span> but the actual is <span class="math-container">$\bar v=\frac {\sum s} {\sum t}$</span>, can we use the wrong to get the correct ones?
It's about how you define average. The formula <span class="math-container">$$ \bar{v} = \frac{\sum_i v_it_i}{\sum_i t_i}$$</span> is called a <strong>weighted average</strong> or a <strong>weighted mean</strong>, where times <span class="math-container">$t_i$</span> are the weights, as opposed to the arithmetic averag...
The average velocity is NOT given by V = (V1 + V2 +...+ Vn)/n, since the velocities are vectors in different directions and the acceleration is not always constant in different motions. But, for this special case, in which if the begining and ending velocities for a motion are known and the acceleration is constant, th...
https://physics.stackexchange.com
313,882
[ "https://softwareengineering.stackexchange.com/questions/313882", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/97861/" ]
Okies, totally newbie question here. I can read the code, mimic the code and understand the basics to be deadly. But, I never really took the time to understand what ANSI C really meant. I just look and code. Been doing it since I was 15 years old and I'm 33 now. It's been awhile since I touched C, but getting back in...
In the case of <code>gcc</code>, you can <em>tell</em> the compiler what C standard to use via the <code>--std</code> option. Running <code>man gcc</code> will explain this, and will list all of the standards that are supported. Note that there are lots of variations including some "standards" that are GCC specific e...
If you were not consciously trying to follow the ANSI standard when writing the code, then most likely your code will not conform to any of the ANSI C standards.<br> The reason for this is because there are no C compilers that by default enforce an ANSI C standard, but they all accept their own dialect of C. To add to...
https://softwareengineering.stackexchange.com
10,469
[ "https://cs.stackexchange.com/questions/10469", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/6728/" ]
Would it be correct to characterize loop invariants as a type of tautology? I ask since the invariant must basically always be true, before the loop starts, before each iteration and after the loop terminates. I realize that there is the possibility that the invariant could become false during the body of the loop. ...
A Tautology is a formula (in a certain logic) that is true under <em>every</em> model of that logic. That is, it is equivalent to the formula "$True$". A loop invariant, however, is a certain claim that is usually true under some models, and false under others (a model in this case is an algorithm). Then, you prove th...
The word tautology is a technical word. The following is a tautology of classical propositional logic. <blockquote> $\vdash p \lor \neg p$ </blockquote> When interpreted over the natural numbers, the following is a theorem. <blockquote> $ (\mathbb{N},&lt;)\vdash \forall x. \exists y. x &lt; y$ </blockquote> Bu...
https://cs.stackexchange.com
383,471
[ "https://math.stackexchange.com/questions/383471", "https://math.stackexchange.com", "https://math.stackexchange.com/users/60244/" ]
How can we expand this using the binomial theorem? $(x^2 + 1/x)^7$
One way is to note that our expression is $\frac{1}{x^7}(1+x^3)^7$ and use the ordinary binomial expansion of $(1+t)^7$. Then substitute $t=x^3$ and (if it is useful) divide the resulting expression for $(1+x^3)^7$ through by $x^7$ term by term. Another way is to use the ordinary expansion of $(a+b)^7$, substitute $a...
Let $a = x^{2}$ and $b = \frac{1}{x}$. The binomial is written as $(a + b)^{7}$. Apply Binomial Theorem, so we have: $$(a + b)^{7} = \dbinom{7}{0} a^{7}b^{7 - 7} + \dbinom{7}{1} a^{6}b^{7 - 6} + \dbinom{7}{2} a^{5}b^{7 - 5} + \dbinom{7}{3} a^{4}b^{7 - 4} + \dbinom{7}{4} a^{3}b^{7 - 3} + \dbinom{7}{5}a^{2}b^{7 - 2} +...
https://math.stackexchange.com
632,269
[ "https://physics.stackexchange.com/questions/632269", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/269418/" ]
My question is simple. If we have a spaceship, whose top half is in a region of highly curved space, while the bottom half is in a region of flat space, will the top half bend in a way, which will break the ship in two? Or will it not break, because the ship is not bending, but rather space itself is bending? I am not ...
The ship will break due to tidal forces. If the gravity strength is high enough then the ship will break in two where the ship crosses the surface of gravity-no-gravity. It can be of course that the difference in force (tidal force) between just inside and just outside the surface to make the ship break is already pres...
Here is what happens when there is a sharp shift in the curvature of spacetime. First of all, those big shifts occur in the immediate vicinity of a very dense object like a neutron star or a small black hole. In either case, the curvature grows more severe the closer you (in your spacesuit) get to the object, and the <...
https://physics.stackexchange.com
19,207
[ "https://mechanics.stackexchange.com/questions/19207", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/11680/" ]
I bought a Ford Fiesta Zetec and the previous owner has removed the stripes that run over the middle of the car, which has left a terrible looking mark, as if the glue has not come off when they removed the stripes. What's the best way to get rid of it?
Use some WD-40 and a little elbow grease and it should come right off. Spray the WD-40 right onto the glue residue, then wipe off with a soft cloth. This will destroy the cloth in the process by having the glue residue build up on it, but the glue will be off your vehicle. When you have cleaned the entire area, ensure ...
Can also use brake and clutch spray cleaner test on hidden area first but this will remover almost every thing also amazing for cleaning alloy wheels.
https://mechanics.stackexchange.com
30,248
[ "https://mathoverflow.net/questions/30248", "https://mathoverflow.net", "https://mathoverflow.net/users/-1/" ]
The title basically says it all. Is there a group with more than one element that is isomorphic to the group of automorphisms of itself? I'm mainly interested in the case for finite groups, although the answer for infinite groups would still be somewhat interesting.
The automorphism group of the symmetric group $S_n$ is (isomorphic to) $S_n$ when $n$ is different from $2$ or $6$. In fact, if $G$ is a <strong>complete</strong> group you can ascertain that $G \simeq \mathrm{Aut}(G)$. The reverse implication needn't hold, though.
I am slightly surprised that Wielandt's automorphism tower theorem has not been mentioned: this asserts that given a finite group $G$ with trivial center, the sequence of groups defined by $G_{0} = G$ and $G_{n+1} = {\rm Aut}(G_{n})$ for $n \geq 0$ eventually stabilizes, that is at some stage ${\rm Aut}(G_{n}) = G_{n}$...
https://mathoverflow.net
108,734
[ "https://mathoverflow.net/questions/108734", "https://mathoverflow.net", "https://mathoverflow.net/users/21136/" ]
I got a question about a proof I found in Gelfand-Manin's "Methods of homological algebra" (Page 200): <strong>Theorem 1.</strong> Let $\mathcal{A}, \mathcal{B}, \mathcal{C}$ be three abelian categories, $F: \mathcal{A} \rightarrow \mathcal{B}$, $G: \mathcal{B} \rightarrow \mathcal{C}$ be two additive left exact funct...
To show that $E$ is an isomorphism of functors, it suffices to show that $E(A)$ is an isomorphism for each object $A$ of $D^+(\mathcal{A})$. This has been shown for each $K^\bullet$ an object of $\operatorname{Kom}^+(\mathcal{R}_\mathcal{A})$. For an arbitrary object $A$, choose a quasi-isomorphism $f:A\to K^\bullet$ f...
If you want to check that a morphism of functors is an isomorphism, it suffices to verify this only on one object in each isomorphism class. Since each isomorphism class in $D^+(A)$ contains a bounded below complex of adapted objects (this is the so-called "adapted resolution", it exists by definition of an adapted cla...
https://mathoverflow.net
168,303
[ "https://physics.stackexchange.com/questions/168303", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/63278/" ]
This is probably a very basic question, but I've been going through all my course materials and looking through various books to find a simple way of figuring this out. But consider the following process: $e^- e^+ \rightarrow \mu^- \mu^+$. Why is the s-channel diagram the only one that contributes to the Matrix element...
If there were a $t$-channel or $u$-channel diagram for this process, it would have to involve a vertex where an electron changes into a muon and some other particle. There is no such vertex in the standard model.
In QED there are vertex only with the same two lepton line and one photon line. I mean that there is not vertex when $\mu\to e\gamma$ in QED.
https://physics.stackexchange.com
67,085
[ "https://dsp.stackexchange.com/questions/67085", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/41209/" ]
I want to smooth the phase of a measured (transfer) spectrum without destroying unit-complexity of the phase factor. Suppose <span class="math-container">$$f:\mathbb{R}\to \mathbb{C}\qquad , \qquad f(\omega)=r(\omega)\cdot {\rm e}^{i\phi(\omega)}$$</span> is the spectrum, then it is well-known how to smooth the power s...
<span class="math-container">$$1 - e^{-4j\omega} = e^{-2j\omega}(e^{2j\omega} - e^{-2j\omega}) \tag{1}$$</span> Now, <span class="math-container">$$ \sin(2\omega) = \frac{e^{2j\omega} - e^{-2j\omega}}{2j} \tag{2}$$</span> Equation 2 is a consequence of Euler's formula. Multiply and divide by <span class="math-cont...
<span class="math-container">$\begin{align} 1-e^{-j4\omega} &amp;=1-(\cos(4\omega)-j\sin(4\omega))\\ &amp;=1-\cos(4\omega)+j\sin(4\omega)\\ &amp;=1-(1-2\sin^2(2\omega))+j2\sin(2\omega)\cos(2\omega)\\ &amp;=2\sin(2\omega)(\sin(2\omega)+j\cos(2\omega))\\ &amp;=2\sin(2\omega)(j)(\cos(2\omega)-j\sin(2\omega))\\ &amp;=2\sin...
https://dsp.stackexchange.com
257,362
[ "https://security.stackexchange.com/questions/257362", "https://security.stackexchange.com", "https://security.stackexchange.com/users/77792/" ]
I have a dual boot PC, where the Win10 (uncompressed) partition is encrypted with BitLocker. I was curious about making this test (and also encryption took quite a short time in my opinion), so while running Linux I did this: <pre><code># cat /dev/nvme0n1p3 | strings -25 Remove disks or other media. xxxxxxxxxxxx...
The test may be good or not, depending on what you need. If you need to make a distinction between a known good encryption (bitlocker is pretty much acceptable for a lot of purposes) and a plaintext data, it is good. The situation is much more frequent than you think. It is probably better to use something like hexdump...
No, this is not a good test, not at all. If you do the same with a zip file, or a docx, or a PNG, you won't see text strings, but the file is not encrypted. Not being able to see plaintext does not mean the file is encrypted. Believing that garbled means encrypted can lead to wrongs assumptions. If you take a look at a...
https://security.stackexchange.com
28,000
[ "https://mathoverflow.net/questions/28000", "https://mathoverflow.net", "https://mathoverflow.net/users/6243/" ]
There are (at least) two ways of writing down the Dirichlet L-function associated to a given character &chi;: as a Dirichlet series $$\sum_{n=1}^\infty \frac{\chi(n)}{n^s}$$ or as an Euler product $$\prod_{p\mbox{ prime}} \left(1-\frac{\chi(p)}{p^s}\right)^{-1}.$$ Correspondingly, this gives two ways of restricting a ...
It's best to split this up into two cases. Case 1: $\chi(a) = 1$. Then for $\Re(s) &gt; 1$, $$\prod_{p \equiv a \pmod{q}} \left(1 - \frac{\chi(p)}{p^s}\right)^{-1} = \prod_{p \equiv a \pmod{q}} \left(1 - \frac{1}{p^s}\right)^{-1} = \sum_{n \in \left\langle \mathcal{P} \right\rangle} \frac{1}{n^s},$$ where $\left\langl...
Well, Peter's answer is overkill for this particular problem. While this zeta-function will certainly be a Burgess zeta-function, the study of the zeta-function of this particular kind will be much simpler, and its properties can be directly deduced from properties for the Dirichlet L-functions. For simplicity I will ...
https://mathoverflow.net
100,590
[ "https://electronics.stackexchange.com/questions/100590", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/37605/" ]
<img src="https://i.stack.imgur.com/1R1vq.jpg" alt="Schematic"> Are these resistors in parallel? A question is asked to find the equivalent resistance between X1 and X2; to my knowledge, these resistors are like parallel connections. But the choices are given as: <ul> <li>A. 2 Ohms</li> <li>B. 4 Ohms</li> <li>C. 8 Oh...
<blockquote> is these resistors are in parallel ? </blockquote> Hmm ... <img src="https://i.stack.imgur.com/WahkS.png" alt="enter image description here">
Redraw the circuit so that it makes more sense is the main clue or even colour code all the nodes: - <img src="https://i.stack.imgur.com/iV4Yk.jpg" alt="enter image description here"> Count the nodes. How many are there? Does this tell you how the resistors are connected? It should.
https://electronics.stackexchange.com
621
[ "https://electronics.stackexchange.com/questions/621", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/267/" ]
What are the advantages of stranded vs solid wire? what should i be using for prototyping circuits?
Solid wire (24 gauge) is good for use as jumpers in solderless breadboards. Trying to push in stranded wire is frustrating. Solid wire holds its shape, so you can route wires along a path and they'll stay there. Use stranded wire for everything else. It is flexible so it's good for cables going between a circuit bo...
Advantages Stranded-More Flexible, Non-Stranded-Easy to solder, will fit into breadboard. Trying to insert stranded into a breadboard is like trying to push string! I prefer non stranded, in fact I have a good tip here for a cheap source. Buy Solid Core Cat 5 or 6 Network cable, a couple of meters goes a long way...
https://electronics.stackexchange.com
138,745
[ "https://electronics.stackexchange.com/questions/138745", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/53389/" ]
In the picture below, what is the purpose of R1? Compared to a high pass filter with 1 resistor, how does this affect Fc? Thank you. <img src="https://i.stack.imgur.com/AnqQn.jpg" alt="enter image description here">
This is basically a voltage divider between \$R_2\$ and \$R_1, C_1\$ in series, so the transfer function is the following: $${V_{out} \over V_{in}}={R_2 \over{R_2+R_1+{1\over j\omega C_1}}}={j\omega R_2C_1 \over 1+j\omega C_1(R_1+R_2)}$$ The first resistor limits the current into the capacitor, therefore it can charge...
Your voltage source is an "ideal" source. In practice, voltage sources vary, depending on how much current they need to source. This is modelled with an external series resistor - \$R1\$ in your diagram.<br> When you draw a lot of current, the the output voltage will drop by \$V = IR\$. If \$R_2\$ is more than \$10 \ti...
https://electronics.stackexchange.com
404,574
[ "https://softwareengineering.stackexchange.com/questions/404574", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/93973/" ]
Say an API returns the following pieces of data: <ul> <li>daily_price</li> <li>number_of_days</li> <li>total_price</li> </ul> Assume that the API will always have the <code>number_of_days</code> and <em>at least</em> <code>daily_price</code> or <code>total_price</code>. In cases when the API only has the <code>daily...
The mistake is mixing them together. If the api provides totals it shouldn't provide what it used to arrive at that total. If the api provides the dependencies used to calculate the total it shouldn't also calculate the total. The reason why is because these are two different levels of abstraction. You can provide ...
<blockquote> Should an API return calculated values that the consumer can calculate themselves? </blockquote> <strong>Short answer:</strong> Yes. <strong>Long answer:</strong> What are the advantages for letting the client compute the missing information? Are you saving bandwidth because there is less bytes tran...
https://softwareengineering.stackexchange.com
141,893
[ "https://dba.stackexchange.com/questions/141893", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/77886/" ]
I need to retrieve data from several tables. For now I am getting maximum of them from <pre><code> SELECT disc.id, users.user_login as 'last_active_user', disc.discussion_sub, list.todo_list_title, todo.todo_title, count(comments.comment), MAX(CAST(comments.comm...
"last_active_user" sounds like <pre><code>( SELECT user_login FROM users WHERE ... ORDER BY ... DESC LIMIT 1 ) </code></pre> count(comments.comment) sounds like <pre><code>( SELECT COUNT(*) FROM abc_comments WHERE ... ) </code></pre> That is, get rid of the joins and replace the aggregate values by subqueries as ab...
How about somethig like this : <pre><code>SELECT a.id , user_login as 'last_active_user' , discussion_sub , todo_list_title , todo_title , count(comment) , MAX(CAST(comment_posted AS CHAR)) FROM abc_discussions a LEFT JOIN abc_todo_list b ON comment_table_...
https://dba.stackexchange.com
142,505
[ "https://mathoverflow.net/questions/142505", "https://mathoverflow.net", "https://mathoverflow.net/users/-1/" ]
Is there a known characterization of the rings $R$ (containing $1$) with this property: <strong>every element of $R$ is a sum of two commuting idempotents</strong>.
If $x$ and $y$ are two commuting idempotents, then $(x+y)^3 = x+y+6xy$, $(x+y)^2=x+y+2xy$, so $z=x+y$ satisfies the equation $z^3-3z^2+2z=0$. Plugging $z=3$ into the equation, we obtain $6=0$. So the ring is a product of a ring of characteristic $3$ and a ring of characteristic $2$. In the ring of characteristic $2$, ...
<strong>The trivial/elementary proof (in particular, it does not use the axiom choice).</strong> A ring $R$ satisfies your condition iff it satisfies the identity $x^3=x$.<br> Pf. Will shows above with a short computation that if $R$ satisfies the condition, then the characteristic divides $6$. So if $z=e+f$ with $e,...
https://mathoverflow.net
156,439
[ "https://physics.stackexchange.com/questions/156439", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/7743/" ]
Frame dragging is a consequence of general relativity. But I don't really understand it. Of course I can find metaphors like the "honey metaphor" where stirring a honey can move the specks even if the spoon doesn't touch them. But I'm not satisfied with such simplistic explanations. So if I understood it right rotati...
First I'll address your stress tensor question. Angular momentum is encoded in the following tensor: $$M^{\mu\nu\rho}=x^\nu T^{\mu\rho}-x^\rho T^{\mu\nu}$$ We then define the angular momentum tensor as $$J^{\mu\nu}=\int_\Sigma M^{0\mu\nu}$$ where the measure on the space-like hypersurface $\Sigma$ is understood. There ...
There are a multitude of ways to explain this -- <ol> <li> <b>Think about this in analogy to electromagnetism:</b> In this context, think about a distribution of charges at rest with respect to each other. There is one special Lorentz frame where there is no magnetic field, namely, where you are at rest with respec...
https://physics.stackexchange.com
305,809
[ "https://dba.stackexchange.com/questions/305809", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/245895/" ]
I am trying to create dynamic function in postgresql function Created but it generates error while executing function. <pre><code>CREATE OR REPLACE FUNCTION public.upCal( table_name_ text , --1-- the this table name -- house1 calCol text , --2-- the column you want to change -- calendar calConcat text ...
<pre><code>CREATE OR REPLACE FUNCTION public.upCal( table_name_ text , --1-- the this table name -- house1 calCol text , --2-- the column you want to change -- calendar calConcat text , --3-- the new value will be -- concated refCol text , --4-- with this value -- is &gt; 0 then new value ...
It's much better to use <code>format()</code> when dealing with dynamic SQL. Additionally parameters shouldn't be concatenated into the SQL, but passed as parameters with the <code>USING</code> clause. You can also ne <pre class="lang-none prettyprint-override"><code>execute format($dyn$ UPDATE %I ...
https://dba.stackexchange.com
15,628
[ "https://softwareengineering.stackexchange.com/questions/15628", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/4422/" ]
How can I maintain proficiency (if not expertise) in multiple languages? In any large organization it seems necessary to know more than one language. For example, this week I've looked at if not written code in the following languages. <ul> <li>VBA</li> <li>C</li> <li>C#</li> <li>Java</li> </ul> <sub>Thankfully the...
Well, use them regulary. For example, I'm not doing much in C now, but whenever I need a little one-off program that reformats text files or whatever, I do it in C just to keep in touch with that language, even if the same program in Java would be more beautiful/shorter/easier to understand.
I like to play strategy games. Seriously. My experience has been that it's less about retaining proficiency or expertise in particular skills and more about maintaining the focus and mentality it takes to learn (or relearn) things quickly. One week I'll be developing in C#, able to experiment with WPF and new techni...
https://softwareengineering.stackexchange.com
21,782
[ "https://mechanics.stackexchange.com/questions/21782", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/12240/" ]
Yesterday, my car did not start and I had to ask the ADAC (automobile club in Germany) to come. The problem was in the battery. The ADAC guy connected my car's battery to another battery then the car started. It was the first time that this happened. The battery is almost new. There is no sign in the computer board tha...
In my specific case, I called the distributor (Tire Rack - not sure if mentioning them is allowed, but it's a positive experience and I'm not affiliated) They saw that the brown stain was in the same pattern on every tire and "deduced" that it was something on the tire, not a problem with the tire itself. They recomme...
This sounds like tire blooming. <blockquote> Why </blockquote> Tire rubber usually contain an anti-ozonant which prevents UV damage to the tire (like you might see on a windshield wiper blade, it starts cracking). The anti-ozonant, when exposed to air, turns brown. Since the anti-ozonant is part of the tire's rubbe...
https://mechanics.stackexchange.com
394,669
[ "https://mathoverflow.net/questions/394669", "https://mathoverflow.net", "https://mathoverflow.net/users/8628/" ]
If <span class="math-container">$X\neq\emptyset$</span> is a set, then <span class="math-container">${\cal S}\subseteq {\cal P}(X)$</span> with <span class="math-container">${\cal S}\neq \emptyset$</span> is said to be a <em>sunflower</em> if there is <span class="math-container">$K\subseteq X$</span> such that wheneve...
There exist uncountable chains in the poset <span class="math-container">$([\omega]^\omega,\subseteq)$</span> (e.g. by bijecting <span class="math-container">$\omega$</span> with <span class="math-container">$\mathbb Q$</span> and taking all downwards-closed sets). Let <span class="math-container">$L$</span> be such a ...
Let <span class="math-container">$C$</span> be the set of finite sequences of zeros and ones. I'll exhibit uncountably many infinite subsets of <span class="math-container">$C$</span> such that no three form a sunflower. Since <span class="math-container">$C$</span> is countably infinite, the example can be copied from...
https://mathoverflow.net
394,298
[ "https://electronics.stackexchange.com/questions/394298", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/167893/" ]
I know that linear voltage regulators are more accurate at holding the required voltage but the boost converter i am using seems to keep a pretty steady one. the voltage will of course be within the chips requirements. what would be the main drawbacks of not using one?
<em>is a voltage regulator required for atmega328p when powering from boost converter at a set voltage?</em> <strong>No</strong> it is not. The ATMega is "just" some logic circuits in a chip. So is the CPU in your PC and in your smartphone. Both of these are powered <strong>directly</strong> from switched regulators...
If you just have an all digital circuit, there are little drawbacks (some ICs do not react very well to voltage ripple, but those can be fixed with a RC combination on the supply usually). One thing which might be an issue is also the ramp up of the voltage for the chips. You should make sure it starts fast enough for...
https://electronics.stackexchange.com
11,699
[ "https://stats.stackexchange.com/questions/11699", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/4933/" ]
I am trying to use SPSS to build a linear regression on historical data (dependent and independent variables) and then apply this to new data (independent variables only) to generate predicted values and associated prediction intervals. I've looked in detail at the documentation on the <code>REGRESSION</code> procedur...
I believe the ability to save the parameter file and score new data is in quite older versions than 19, but a general solution is to stack the datasets and run the regression with the original data, then save the predicted values. As long as the hold out data has all of the independent variables SPSS will still provide...
If you have SPSS Version 19, I believe they introduced "Scoring Wizard" under Utilities that apparently can accomplish this sort of task. That said, I have tried to get it to work and do not have the desire to debug the errors I am getting since it is very easy to do in R. I echo @Jeromy's response; if you need to ...
https://stats.stackexchange.com
332,973
[ "https://softwareengineering.stackexchange.com/questions/332973", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/139334/" ]
We're developing a big application with a vast GUI and complex business layer. Without going into too much detail, the application is currently implemented in a rich native client, but functionality is roughly seperated into core business logic related parts and the (also complex) GUI which is based on an MVC paradigm....
Surely this totally depends on your business. <ul> <li>Example 1: document editor with save functionality</li> </ul> The editor itself might give you undo/redo as you edit, but those commands arent persisted via save. its not part of the product to supply a history of changes to the document. -> GUI logic <ul> <li>E...
The fact that you struggling with decision where you need to move your object/class/package - pointing to the fact that this object/class/package already violate separation of concerns or even better violate Single responsibility principle. <em>The application features Undo/Redo, based on a classic Command pattern <s...
https://softwareengineering.stackexchange.com
34,512
[ "https://softwareengineering.stackexchange.com/questions/34512", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1517/" ]
The other day, a friend told me that in USA, they pronounce SQL like <em>squel</em>, not <em>es-qu-el</em>. I was surprised. I was wondering how "SELECT *" is read/pronounced while talking. <ul> <li>select star?</li> <li>select asterisks?</li> <li>select all?</li> </ul>
I live in the US and almost always hear it pronounced <strong>select star</strong> And normally I use <strong>sequel</strong> instead of <strong>es-qu-el</strong> because it has fewer syllables and seems easier to say
The voice in my head (well, one of them) reads that to me as 'select all' as I read it, so that's how I pronounce it. I think any of the three would convey what you mean, though. I really don't think it matters so long as you are understood.
https://softwareengineering.stackexchange.com
53,843
[ "https://physics.stackexchange.com/questions/53843", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/10362/" ]
I want to find out the linear velocity of a point in 3D space, (Euclidean), given: <ul> <li>Its position </li> <li>Its angular velocity</li> <li>The point it's rotating around (fulcrum)</li> </ul> (This is a problem I need to solve for 3D graphics programming with a physics engine). The position of the point and pos...
Let $\vec r_0(t)$ denote the point around which the object is rotating and $\vec r(t)$ the position of the object. Then the fact that the particle is rotating around the point $\vec r_0(t)$ can be formalized by the mathematical statement that $$ \vec r(t) - \vec r_0(t) = R(t) \vec c $$ for some constant vector $\vec...
The relation between angular velocity $\vec{\omega}$, position $\vec{r}$ (assuming rotation around the origin) and tangential velocity $\vec{v}$ (which is what you are asking for) is given by $\vec{\omega}=\frac{\vec{r}\times\vec{v}}{\mid\vec{r}\mid^2},$ where $\times$ is the cross product and $\mid\vec{r}\mid^2$ th...
https://physics.stackexchange.com
34,911
[ "https://physics.stackexchange.com/questions/34911", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/11657/" ]
How does quantum electrodynamics actually explain HOW reflection occurs on a microscopic scale? Note that Feynman's QED lecture series/book is not sufficient, as he only assumes that light DOES reflect ('turn around and go back') in order to expound his path integral theory. My question is why does light have the pro...
the process is coherent--- the same photon is bouncing off all the atoms at once, and you only get constructive interference when the angle of reflection is equal to the angle of incidence. The condition is that the surface is smooth on the scale of the wavelength of light, so that the light can excite each atom indepe...
I think this is the right question to ask as it demonstrates a weakness in QED. Firstly, the mirror is a form of partial measurement: the sea of electrons in the mirror constitutes a conductor that eliminates any electrical field parallel to the mirror. Thus the incident photon can only support an electric field norm...
https://physics.stackexchange.com
233,789
[ "https://softwareengineering.stackexchange.com/questions/233789", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/74013/" ]
I have some methods im trying to test which use a StreamReader dependency that i mock using Rhino mocks. But it is a large xmlFile. In the spirit of unit testing im trying to keep away from using a test file in my test project. On the other hand copy-pasting 100 lines of xml into my test class seems sort of ugly. What...
<blockquote> In the spirit of unit testing im trying to keep away from using a test file in my test project. </blockquote> In the battle between idealism and pragmatism, sometimes a truce is needed. The main push for not using test files is threefold: <ol> <li>Your job isn't to test reading files from disk, it's ...
I'm not sure what "spirit of unit testing" you are talking about. But if you really need to address that spirit ... <ol> <li>Have basic tests that use small data sets. You can put string constants in your code for this purpose.</li> <li>Have not-so-basic tests that actually test the things that need to be tested. For ...
https://softwareengineering.stackexchange.com
134,503
[ "https://electronics.stackexchange.com/questions/134503", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/45616/" ]
How do the sound pressure values correspond to the magnetic domains on the tape? Is the format analog or digital?
It's analogue. A high-frequency 'bias' carrier has the incoming audio signal superimposed onto it, and the result is sent to the recording head, which is just an electromagnet. The purpose of the bias is to drive the magnetic material around and around its hysteresis curve, so as to avoid the non-linear part of the c...
Standard audio cassette tapes are analog. There are some digital formats, though, including DAT tapes. Standard tape heads are much too large to address individual domains, so the signal is basically encoded as the average domain orientation in all the domains under the head at a given moment. I believe the fact that ...
https://electronics.stackexchange.com
183,339
[ "https://physics.stackexchange.com/questions/183339", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/71773/" ]
Why is $$\Sigma^0 \rightarrow \Lambda +\pi^0$$ not a possible process? Charge and baryon number both are conserved. There's no issue with strangeness that I can tell. The masses in $\frac{Mev}{c^2}$ are approximately $$1193 \rightarrow 1116 + 135.$$ This gives me a red flag... It doesn't seem energetically favorable, ...
You should always apply energy conservation, and it ought to hold in all reference frames, including the frame in which the sigma is at rest. In the sigma's rest-frame, $$ E_{\text{initial}} = E_\Sigma = m_\Sigma $$ and $$ E_{\text{final}} = E_\Lambda + E_\pi \ge m_\Lambda + m_\pi $$ Thus we have that, $$ E_{\text{ini...
Energy conservation always applies. Your mistake is in thinking that adding masses will solve the problem instead of clarifying some aspects. In the case of the sigma-zero the decay <strong>at rest</strong> allows to see that the sum of the constituent masses is larger than the mass of the sigma-zero. For a decay to...
https://physics.stackexchange.com
2,501,336
[ "https://math.stackexchange.com/questions/2501336", "https://math.stackexchange.com", "https://math.stackexchange.com/users/479167/" ]
<blockquote> Question: Find value of $a$ if equation $ax^2 + 2x -1 = 0$ has at least one real root for $3 \leq x &lt; 4$ </blockquote> I know if the restriction of $x$ is not given, I can use $D \geq 0$ to get condition for at least one real root, but if $x$ is restricted then how do I do it?
From the quadratic equation, $$a=\frac{1-2x}{x^2}$$ and the range of this expression for $3\le x&lt;4$ is $$-\frac59\le a&lt;-\frac7{16}.$$
Consider the values of the quadratic at end points, viz. $9a+5$ and $16a+7$. There is exactly one root in the interval iff $(9a+5)(16a+7)\le 0 \implies a\in [-\frac59, -\frac7{16})$. [<em>Note we can’t have simultaneously both end points zero for any value of $a$.</em>] The remaining possibility is two roots in the in...
https://math.stackexchange.com
105,242
[ "https://chemistry.stackexchange.com/questions/105242", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/21778/" ]
For example, is 3M HCl a stronger acid than 1M HCl? I would reason that the concentration of an acid/base does not influence its strength. Strength is determined by the pKa, and, as per Le Chatelier's Principle, the initial concentration does not influence the equilibrium constant. It may shift the equ...
The term ‘strong acid’ is sometimes used in a rather fuzzy way and you ran into problems doing so. I prefer to use the term ‘strong acid’ <em>only</em> with respect to an acid’s <span class="math-container">$\mathrm pK_\mathrm{a}$</span> value and disregard all other influences. This gives a clearly defined measure of ...
Normally, when comparing Acid Strengths between two acids, the first criterion used is their respective value for Ka at the same temperature. Obviously the one with a higher Ka at the same temperature is "stronger". If you have two different acids (let's say HF and HCl) with the same pH, their strength can be compare...
https://chemistry.stackexchange.com
6,459
[ "https://mathoverflow.net/questions/6459", "https://mathoverflow.net", "https://mathoverflow.net/users/717/" ]
I know that there exists a nice presentation (generators and relations) of the general linear group over a finite field (by Steinberg, I think). Is there also a nice presentation of $GL(n,\mathbb{Z}/m\mathbb{Z})$ for an arbitrary integer $m$? And perhaps also for the symplectic group over $\mathbb{Z}/m\mathbb{Z}$? I w...
As Alex says, there's no good one. One way to see the problem is to compare nimbers with (surreal) numbers. Addition in both is just game addition, so you can consider nimbers and numbers together and add them consistently. But there is no consistent multiplication. (What would the unit be?) A good game theoretic ...
Not a pleasingly natural one, I think. Somewhere or other I've seen a discussion of a game played with rectangular cards in which the move is to replace an a*b card by three cards of sizes a'*b, a*b', and a'*b' for some 0&le;a'&lt;a and 0&le;b'&lt;b, but it was clear that this game had been concocted to match nim-mult...
https://mathoverflow.net
1,063,281
[ "https://math.stackexchange.com/questions/1063281", "https://math.stackexchange.com", "https://math.stackexchange.com/users/133140/" ]
Let $X_{1}, X_{2}$, . . . be i.i.d. with the following shifted exponential distribution:$f(x)=ae^{-a(x-1)}, x&gt;1$.Let $Y_{n}=X_{(1)},Z_{n}=X_{(n)}$ Show that $Y_{n}$ converges to 1 in probability Derive the limiting distribution of $T_{n}=Z_{n}-1-\frac{logn}{a}$ I have find $f_{Y_{n}}(x)=nae^{-a(x-1)n}$, but how c...
According to the definitions $Y_n$ is the minimum of the $n$ i.i.d random variables $X_i$. Thus $$F_{Y_n}(y)=P(\min\{X_1,X_2,\ldots,X_n\}\le y)=\ldots=1-\left(1-F_X(y)\right)^n$$ and and therefore (by substituting $F_X$) we obtain that $$F_{Y_n}(y)=1-\left(1-1+e^{-a(x-1)}\right)^n=1-e^{-na(x-1)}$$ (Observe that the pow...
<blockquote> how can I prove $Y_{n}$ converges to 1 in probability? </blockquote> First correct the PDF of $Y_n$, then show that $P(Y_n\geqslant1+x)\to0$ for every positive $x$. <blockquote> Any idea to the second questions? </blockquote> First compute $P(Z_n\leqslant z)$ for every $z$, then use the formula for ...
https://math.stackexchange.com
124,627
[ "https://softwareengineering.stackexchange.com/questions/124627", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/25404/" ]
I'm designing a small library and there is a strong temptation to provide synonyms to some of the exported functions. <pre><code>var foldl = function(){ ... }; var reduce = foldl; //reduce is a synonym for foldl </code></pre> I imagine that the multiple names might help the initial learnability of the API (since the ...
Don't provide multiple ways to do the same thing - that will just confuse the API users. Having several names for the same things means you don't have a good name for it.
Not only is it confusing to use multiple names for the same thing, but this will also pollute the namespace of whoever is using your API. In c# i am often tortured by not being able to name my variables default or checked =P. Knowing a bit of Perl, my intuition is also that functions which seems like they do the same t...
https://softwareengineering.stackexchange.com
229,344
[ "https://mathoverflow.net/questions/229344", "https://mathoverflow.net", "https://mathoverflow.net/users/85776/" ]
<blockquote> Given a nonempty set of integers, and given that there exists a subset of this set whose elements sum to zero, is finding the <em>smallest</em> such subset NP-complete? </blockquote> <strong>Disclaimer:</strong> The above question involves part of ongoing research for my dissertation. To flesh this o...
This is merely a simplification of Tony Huynh's answer, but still more than a comment imho. Note that throughout, I work with multi sets (or sequences of integers) rather than sets. Reduce SUBSET SUM to SMALLEST SUBSET SUM as follows: Given an instance $(a_1, \ldots, a_n)$ of SUBSET SUM, let $b := -(a_1 + \ldots + a_n)...
I believe your problem is indeed NP-hard, via the following reduction from subset sum. Let $(a_i)_{i=1}^n$ be an instance of SUBSET SUM. We will make an instance of SMALLEST SUBSET SUM as follows. Let $a_k$ be such that $a_k \neq 0$ and $|a_k|$ is minimal among all $a_i$. Let $p$ be the smallest prime which is at le...
https://mathoverflow.net
649,028
[ "https://math.stackexchange.com/questions/649028", "https://math.stackexchange.com", "https://math.stackexchange.com/users/120596/" ]
<blockquote> Let $f:\mathbb{R}\rightarrow \mathbb{R}$ differentiable everywhere. Assume that $\mathop {\lim }\limits_{x \to \infty } f(x) + f'(x) = 0$.<br> Prove: $\mathop {\lim }\limits_{x \to \infty } f(x) = 0$ </blockquote> I've seen a suggestion for a solution defining $g(x)=e^xf(x)$ and taking its derivative...
We show that for every <span class="math-container">$\varepsilon &gt;0$</span>, there exists <span class="math-container">$X$</span> such that <span class="math-container">$f(x) \le \varepsilon$</span> when <span class="math-container">$x&gt;X$</span>. This statement implies that <span class="math-container">$\limsup_{...
You can reason loosely (and yes, I know I'm violating all kinds of rules by doing this, but I <em>did</em> say "loosely") that $\lim (f' + f)=0$ means $\lim f' = -\lim f$, so $\lim f' / \lim f =-1$. Then $\lim (f'/f) = -1$; hence $\lim (\log f)' = -1$, so $\lim \log f = -\infty$ and thus $\lim f = 0$. Now it's up to y...
https://math.stackexchange.com
156,410
[ "https://softwareengineering.stackexchange.com/questions/156410", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/-1/" ]
I am newly learning C Programming. When we have a C Program with lot of functions, parameter passing, calling and all - It becomes a great problem as to which variable must be declared where. My question is: If I declare all the variables (or atleast the variables that are confusing me) as Global Variables - my prob...
Others already stated that global variables are not the solution. Here are some hints for managing local variables: <ol> <li>Some people declare their variables at the latest possible line (right before using them the first time). Others declare them all at the top of the function body (which is more compatible with v...
No, this causes far more problems than it solves. It is VERY BAD practice, and a classic anti-pattern. Don't do it. One of the main problems is that it is much more difficult to discover how a global variable gets changed, and what the impacts of changes are, than when you have values which isolated from the rest of t...
https://softwareengineering.stackexchange.com
10,938
[ "https://dsp.stackexchange.com/questions/10938", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/1115/" ]
Usually the filters for detecting edges have the sum of all the values in the filter matrix equal to 0. For example: [-1 -2 -1, 0 0 0, 1 2 1]. Why is it so ?
An edge detection filter is, by definition, a high-pass filter. It is looking for quick changes (i.e. high frequencies), not slow trends. Thus, a good edge detection filter will have a response of 0 at DC. A FIR filter whose taps sum to 0 has a response of 0 at DC.
An edge detection filter computes a derivative. A derivative of a discrete image is approximated by finite differences, i.e. you subtract the left pixel from the right pixel. If your filter did not sum up to 0, then you would be weighing the value of one pixel more than the value of the other, and that would be wrong.
https://dsp.stackexchange.com
46,850
[ "https://astronomy.stackexchange.com/questions/46850", "https://astronomy.stackexchange.com", "https://astronomy.stackexchange.com/users/43849/" ]
What is the most time dilation possible outside of the event horizon of a black hole with the reference to us? I know that time dilation is stronger if you are near an extreme amout of mass. It is also important how close you are to this mass. So my first thought was: more massive black hole = more time dilation. But i...
Time dilation with respect to a far away observer tends to infinity as you get close to the event horizon. <span class="math-container">$$dt = {1 \over \sqrt{1- {r_s \over r}} }d\tau$$</span> Here <span class="math-container">$t$</span> is the time of a far away observer, <span class="math-container">$\tau$</span> is t...
Time dilation is dependent on Two ways <ul> <li>SPEED</li> <li>Gravity And is variable...</li> </ul> In regards to speed, the faster acceleration determines perceptable time movement.
https://astronomy.stackexchange.com
151,239
[ "https://stats.stackexchange.com/questions/151239", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/76525/" ]
In Carroll's 2006 book "Measurement Error in Nonlinear Models", and on p38 it is stated without proof that: <blockquote> [One can] estimate the regression of $Y$ on $(Z, X)$ and then to substitute into this model $\{Z,E(X|W)\}$ [ ... ] [which is equivalent to] to substituting (Z, W) into the fitted model for the reg...
There is something else about women that means that they outperform men, rather than just being a woman. Imagine running a logit model with just gender as an explanatory variable. The results suggest being female is a strong predictor of exam success. However, there must be lots of things that are correlated with bei...
Remember the interpretation of a coefficient in a multivariate model. It is the effect of a 1-unit increase in it's corresponding independent variable, $X_i$, holding all other variables constant. If a certain coefficient is significant in a univariate regression setting, but not in a multivariate, that means that the ...
https://stats.stackexchange.com
495,315
[ "https://electronics.stackexchange.com/questions/495315", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/213323/" ]
Is it necessary to declare reg before assignment in Verilog? Or does Verilog-2001 allow to declare reg after assignment? For example this code is synthesized by Quartus and simulated by ModelSim without errors <pre><code>module my_module(output out_my_reg); reg my_reg; assign out_my_reg = my_reg; endmodule </code><...
The LRM says in 1800-2017 section <em>6.5 Nets and variables</em> that you must declare data(signals) before using them. There are such things as implicitly declared nets, but that does not apply here. There are also different rules when referencing names that have a <code>.</code> (period) in them. But both of those o...
<strong>TL;DR</strong> You should always declare your variables before trying to use them. <hr> When you declare your variable first, both ModelSim and Quartus will happily know what it is. However if you try to use a variable before declaring it, all bets are off. If you don't declare a variable at all, its existen...
https://electronics.stackexchange.com
38,502
[ "https://stats.stackexchange.com/questions/38502", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/14247/" ]
I am looking for an appropriate method to analyse these data/situation: We sell electronic devices. Customers are encouraged to report defective devices. Around every months we calculate the cumulative rate of {defective_devices}/{all_sold_devices}. I would like to monitor for sharp increases in the rates of defectives...
Rather than rates , you should be modelling the number of complaints as a function of the number sold perhaps including previous sales as complaints might have some time dependency. One needs to possibly identify level shifts and/or trends in the number of complaints. Seasonal structure might also have to be identified...
We had a similar problem when I worked in the medical device industry. We wanted to determine the reliability of our product in my case a pacemaker. Physicians were encouraged to report failures that are detected when they explant the device. Most failure are battery depletions but other modes of failure occur. We u...
https://stats.stackexchange.com
55,807
[ "https://quant.stackexchange.com/questions/55807", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/44566/" ]
Assume standard Black-Scholes model, <span class="math-container">$$dS(t)=S(t)(rdt+\sigma dW(t))$$</span> where <span class="math-container">$\sigma$</span> is a constant and <span class="math-container">$W(t)$</span> is a Brownian motion under the risk neutral measure.<br /> A call option is replicable, so if we are l...
<ul> <li>In Black Scholes <span class="math-container">$$\frac{dS}{S}=rdt+\sigma dW$$</span> </li> <li><span class="math-container">$dC_{BS}(S,t)=\underbrace{\frac{\partial C_{BS}}{\partial t}dt}_{Theta PnL}+\underbrace{\frac{\partial C_{BS}}{\partial S}dS}_{DeltaPnL}+\underbrace{\frac{1}{2}\frac{\partial^2 C_{BS}}{\pa...
When you replicate the option, you negatively scalp yourself when hedging deltas (if you are short the option). That negative scalp should be offset by theta you make by being short the option, and thus on net your option + hedge has 0 pnl. This obviously assumes realized volatility = implied volatility. If your opti...
https://quant.stackexchange.com
64,508
[ "https://dsp.stackexchange.com/questions/64508", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/47923/" ]
Can someone elaborate this theory where there is a link between the stability of a filter and the zeros or nulls being on the unit circle?
BIBO stability of LTI systems implies that their impulse response is absolutely summable, that is, <span class="math-container">\begin{equation} \sum_{n=-\infty}^{+\infty}|h(n)| &lt; +\infty \end{equation}</span> That exact same relationship is a sufficient condition for the Fourier Transform of the impulse response ...
If you're familiar with LaPlace transforms, you can see the Z transform by analogy. The unit circle is equivalent to the jw axis, with zero frequency at 1+j0 and the Nyquist rate at -1+j0.
https://dsp.stackexchange.com
123,292
[ "https://dba.stackexchange.com/questions/123292", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/64316/" ]
I have a table with two columns:<br> <code>Brand(varchar) | optional_os_type(varchar)</code> for example: <pre><code>+--------------+ | Lenovo | 1 | | Dell | 2 | +--------------+ </code></pre> Whereas<br> 1 = win8.1<br> 2 = win10 Currently I want to be able to have only one OS type for a given brand, but very...
You should use 3 tables: <ol> <li><code>brand</code></li> <li><code>os</code></li> <li><code>brand_os</code></li> </ol> Add the fields that you need to the first 2 tables. The third (<code>brand_os</code>) will hold the primary key of <code>brand</code> and <code>os</code> for every combination that you need. You are...
Another option which might be better: first table that contains brands ( each brand has 1 row ) , such as : <strong>create table brands (brand_id number, brand_name , additional columns...)</strong> second table contains the brand_id's+OS_types , such as : <strong>create table Brand_OS_Types ( brand_id number , OS_t...
https://dba.stackexchange.com
173,723
[ "https://mathoverflow.net/questions/173723", "https://mathoverflow.net", "https://mathoverflow.net/users/6094/" ]
Define an ellipse $E$ on a sphere as the locus of points whose sum of shortest geodesic distances to two foci $p_1$ and $p_2$ is a constant $d$. There are conditions on $\{ p_1, p_2, d \}$ for this definition to make unambiguous sense, but assume those conditions hold. (<em>Added</em>: Ian Algol specifies: $p \in E$ sh...
The equiangular property follows from the properties of Jacobi fields. If we consider a point $p\in E$ on the ellipse, and geodesics $\alpha, \beta$ from $p$ to the foci $p_1, p_2$ respectively, then for a tangent vector $V$ to $E$ at $p$, we may decompose it uniquely as $V= A^T+ A^\perp = B^T+B^\perp$, where $A^T$ is ...
I'd like to add that the same holds not only for Riemannian, but also for Finsler metrics: E. Gutkin, S. Tabachnikov. Billiards in Finsler and Minkowski geometries J. Geom. Phys. 40 (2002), 277-301. Of course, the law of reflection should be defined appropriately. My explanation of the optical property of ellipses i...
https://mathoverflow.net
447,490
[ "https://stats.stackexchange.com/questions/447490", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/145482/" ]
In a study of crowdfunding, I am investigating the relationship between the reputation of a person seeking funding for a project (a continuous variable) and the proportion of funding target received (i.e., funding received/funding target*100). The data I have however is right-censored. Some of the crowdfunding projec...
<code>proportions_ztest</code> seems to work exactly as documented. Unfortunately what the documentation says it does is just not what you're expecting it to do. By default this function uses the <em>sample</em> proportion in calculating the standard error of <span class="math-container">$p-p_0$</span>. There's an o...
Even though @Glen_b answer is completely right, it doesn't mention the parameter they are referring to. For others who may fall into this same problem, the right way of using <code>proportions_ztest</code> the way the OP tried to use it is as follows: <pre><code>from statsmodels.stats.proportion import proportions_ztes...
https://stats.stackexchange.com
256,556
[ "https://physics.stackexchange.com/questions/256556", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/28745/" ]
The physics states in Quantum mechanics is represented by vectors in Hilbert space, however in Heisenberg's picture, the equation of motion $$ \frac{d}{dt}A_H(t) = \frac{i}{\hbar}[H,A_H(t)]+\frac{\partial}{\partial t}A_H(t) $$ only deals with <strong>operators</strong>' time evolution. I am confused that what is t...
If you ask about what plays the role of the state of the system at some given time than the answer is: nothing. You talk only about the initial state and what you get in the measurements (expectation values or probabilities of outcomes for observables). The Heisenberg picture is very "Copenhagen" in its spirit and abst...
The physical states in the Heisenberg picture are frozen in time, and can be made to coincide with the Schrodinger-picture state at any given time $t_0$. In other words, $$|\psi(t_0)\rangle^S=|\psi\rangle^H$$ which doesn't evolve with time.
https://physics.stackexchange.com
9,293
[ "https://mathoverflow.net/questions/9293", "https://mathoverflow.net", "https://mathoverflow.net/users/2266/" ]
The largest complete graph that embeds in 2 dimensions is $K_4$, while the largest complete graph that embeds in 3 dimensions is $K_{\infty}$, right? However, I don't know any constructive proof of it. <strong>Informal Explanation</strong>: What is the max number of points in $\mathbb{R}^3$, interconnected by lines of...
Take straight lines connecting the points $(t, t^2, t^3), t \in \mathbb{N}$. As far as I can tell you can also boost this to $t \in \mathbb{R}$. The point here is that two distinct lines between points on this curve intersect if and only if the four points involved lie on a plane (or there are only three points invol...
I guess the main reason is that $\mathbb{R}^3$ minus any finite set of curves is still path-connected, so you can build any graph up inductively as a subset of $\mathbb{R}^3$. Here is a slightly different answer: any graph is naturally a metric space. The Menger sponge $M$ (3d version of the Sierpinski carpet) has th...
https://mathoverflow.net
82,675
[ "https://stats.stackexchange.com/questions/82675", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/31420/" ]
Suppose $X_1,X_2,\ldots,X_n$ is a random sample from a Poisson Distribution with mean $\theta$. How can I find the conditional expectation $E \left( X_1+X_2+3X_3 |\sum_{i=1}^n X_i \right)$? I know that $\sum X_i $ has a $poisson (n\theta$) distribution. Similarly the random variable $X_1+X_2+X_3$ has a $poisson (3\the...
Define $S_n=\sum_{i=1}^n X_i$. By symmetry, $$ \mathrm{E}\left[ X_1 \mid S_n \right] = \mathrm{E}\left[ X_2 \mid S_n \right] = \dots = \mathrm{E}\left[ X_n \mid S_n \right] \quad \textrm{a.s.} \quad (*) $$ Hence, using $(*)$ and the linearity of the conditional expectation, we have $$ \mathrm{E}\left[ X_1 \mid S_n ...
The OP has apparently found the way, so I am posting an answer. I will denote $Z \equiv \sum_{i=1}^n X_i$. By linearity of the expected value we have $$E \left( X_1+X_2+3X_3 |Z \right)= E \left( X_1 |Z \right)+E \left( X_2 |Z \right)+3E \left(X_3 |Z \right)$$ Since the variables are i.i.d. they are also exchangeable,...
https://stats.stackexchange.com
160,629
[ "https://stats.stackexchange.com/questions/160629", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/6547/" ]
I have two variables whose correlation coefficient $\rho=1$. I know that if two random variables are a linear combination of themselves, it implies $|\rho |=1$. Is the converse also true? How to prove that?
whuber's much more detailed answer appeared while I was composing this answer of mine (which essentially uses the same argument). Let $X$ and $Y$ denote two random variables with finite variances $\sigma_X^2$ and $\sigma_Y^2$ respectively and correlation coefficient $\rho = \pm 1$. Then, \begin{align}\operatorname{v...
Let the pair of (random) variables be $(X_1,X_2)$. Since their correlation coefficient exists, each has a finite variance $\sigma^2_i$ and a finite mean $\mu_i$. The standardized variables are $Z_i = (X_i - \mu_i)/\sigma_i$. In particular their second moments are unity: $$\mathbb{E}(Z_i^2) = 1.$$ By definition, th...
https://stats.stackexchange.com
2,107,743
[ "https://math.stackexchange.com/questions/2107743", "https://math.stackexchange.com", "https://math.stackexchange.com/users/408627/" ]
Give an example of an algebraic extension of $\mathbb Q$ of degree 3 which is not a normal extension.
<strong>HINTS:</strong> $(1)$ Enforce the substitution $x\to 1/x$ so that the new limits are from $0$ to $1$. $(2)$ Next, write $(x^{-r}-1)^p=x^{-rp}(1-x^r)^p$. $(3)$ Enforce the substitution $x\to x^{1/r}$ Can you finish now? <hr> <strong>SPOILER ALERT: Scroll over the highlighted area to reveal the solution.</...
Upon your substitution we have $du=rx^{r-1}dx$ so $\frac{1}{r}x^{1-r}du=dx$. And $\frac{1}{r}(u+1)^{1/r(1-r)} du$: $$\frac{1}{r} \int_{0}^{\infty} u^p (u+1)^{(-1/r)q}(u+1)^{1/r(1-r)} du$$ $$\frac{1}{r} \int_{0}^{\infty} \frac{u^p}{(1+u)^{1/r(r-1+q)}} du$$ Now note one representation , $$B(x,y)=\int_{0}^{\infty} \fr...
https://math.stackexchange.com
127,705
[ "https://security.stackexchange.com/questions/127705", "https://security.stackexchange.com", "https://security.stackexchange.com/users/91316/" ]
I frequently hear that 600 and 700 is recommended for security when possible before 660, 770. I'd like to understand the risk that 660, 770 would have that 600, 700 wouldn't.
The principle at play here is the <strong>least privilege</strong>. A chmod permission of 600 or 700 gives only the owner rights to the file, while 660 or 770 gives the same rights to the group too. Whether this is intended or not depends on the use case. Either might be appropriate. A server might - and will proba...
The risk from "inadvertently add[ing] an extraneous user to the group" is minimal. And fACLs are not obsolete. Used properly fACLs supplement the the things which are difficult to do with the base permissions system, but they do open the possibility of creating a labrynthine mess the likes of which are only normally se...
https://security.stackexchange.com
6,947
[ "https://biology.stackexchange.com/questions/6947", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/1813/" ]
What effect do SSRIs have on the expression of the ligand-gated ion channel, the 5-HT<sub>3</sub> receptor?
There are five subunits to this receptor (5-HT3), which are encoded by the genes HTR3(A-D) and differentially expressed depending on cell location in the (human) body. In contrast to the information in the previous answer, my first source actually has shown HTR3A to be most highly expressed in the CNS. The others are a...
SSRI's theoretically increase Serotonin levels. Serotonin is an agonist to the 5HT-3 receptors. The 5HT-3a primarily associated with the upper gut and the 5HT-3b with the lower gut. I would guess that theoretically again, SSRI's would tend to increase nausea, emesis, and diarrhea. There may be other effects, but the...
https://biology.stackexchange.com
131,232
[ "https://physics.stackexchange.com/questions/131232", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/57378/" ]
An inclined plane makes angle $\theta$ with horizontal. Upper half plane is perfectly smooth where as lower half is rough. The block of mass <em>m</em> starts sliding from top. If the block again comes to rest at bottom. The coefficient of friction between block and plane. This means it will first accelerate and the t...
<strong>Hint:</strong> Try to draw FBD (free body diagram) Acceleration is parallel to slope in upper half portion = $g\sin\theta$ Acceleration in lower half half = $g\sin\theta - \mu g\cos\theta$
You're right, first it will accelerate (over the smooth surface), and then it must decelerate (over the rough surface, to come to rest again). If the plane has length $L$, then it will accelerate (along the plane) over a distance $L/2$, at $g\sin{\theta}$. So we can write, if we call its velocity $v$ when it has gone...
https://physics.stackexchange.com
92,003
[ "https://stats.stackexchange.com/questions/92003", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/40124/" ]
Are the two interchangeable terms? I have been reading about markov-switching models and am struggling to see the difference with HMM models.
There is no need for correction. Think about it like that: you could conduct 10 independent ANOVAs for each of the 10 dependent variables (in case of only 2 groups ANOVA reduces to t-test, but it does not matter for this question). Then you would get 10 different p-values, and certainly would need to correct for multi...
There's no need to adjust the alpha level of the MANOVA test itself, as amoeba noted. However, a significant MANOVA doesn't allow you to make statements about any of your 10 DVs--that would require conducting individual <em>t</em>-tests, which <em>would</em> require correcting for multiple comparisons.
https://stats.stackexchange.com
208,770
[ "https://softwareengineering.stackexchange.com/questions/208770", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/54627/" ]
I'm working on reviving a C++ codebase that hasn't been touched since '97. It's academic software for text analysis, and originally it was non-functional, it wouldn't even compile. I fixed the code so that it works, and added some new functionality of my own. I'm doing this privately for someone else, and they will ...
IANAL! The License of the code is incompatible with the provisions of the GPL, so you cannot put the GPL on it. Or rather you can put the GPL on your code but users would still be bound by the stricter provisions of the original License, making the legal situation a real mess. The only option if you want to relicens...
No, you can not distribute your revived version of the project under the GPL license. The current license does not grant you the right to re-license or sub-license the code, which means that the original code must remain under this license. Your own code, you can copyright with any license you like, but the GPL has t...
https://softwareengineering.stackexchange.com
13,264
[ "https://engineering.stackexchange.com/questions/13264", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/7538/" ]
Should standard SI units be used in this formula or are other units supposed to be used for the formula for stress in a thin-walled spherical pressure vessel? $$\sigma_{yield}=\frac{P_g r_i}{2t}$$ where $\sigma_{yield}$ is the yield strength of the material, $P_g$ is the gauge pressure, $r_i$ is the inner radius of t...
You can use any <em>consistent</em> set of units. That includes SI. But if you try to use a pressure in ATM, a sphere radius in feet, a wall thickness in mils, and want the stress in tons per square inch, you will probably get the wrong answer that you deserve!
Yield should be in MPa, Pressure Pa, and R in mm t is thickness therefor mm
https://engineering.stackexchange.com
102,789
[ "https://mathoverflow.net/questions/102789", "https://mathoverflow.net", "https://mathoverflow.net/users/11084/" ]
Let $G$ be an algebraic group with Lie algebra $\mathfrak g$ and let $\Gamma$ be any finitely generated (discrete) group. One can consider the representation variety $\mathfrak R=\mathrm{Hom}(\Gamma,G)$. If one considers the group scheme $\mathfrak G$ associated to $G$, there is a nice argument that shows that infinite...
This fact holds for general Lie groups $G$ (which I will equip with a real-analytic structure) and finitely-generated groups $\Gamma$. It is explained in detail in Raghunathan's book "Discrete subgroups of Lie groups", sections 6.1-6.9), but goes back to Andre Weil's paper "Remarks on cohomology of groups", Annals of M...
A quick small answer: for reductive real Lie groups, there are the "rigidity theorems" of Mostow, Margulis, and others. Basically, the point is that for real rank above 1, "lattice subgroups" admit no deformations whatsoever (and are essentially "arithmetic"). These groups are typically either algebraic or isogenous to...
https://mathoverflow.net
403,205
[ "https://softwareengineering.stackexchange.com/questions/403205", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/354132/" ]
Consider something like.... (Pseudocode Javascript like) <pre><code>var capitalizeWord: function(word){ word.toAllCaps(); } </code></pre> What if now I need to do multiple words, but still sometimes only do one still. Is it better to do... <pre><code>var capitalizeWords: function(words){ _.forEach(words, f...
Having two methods is perfectly fine, as both are valid use cases. The key to this is to have one method call the other, as you have shown. You don't want to duplicate code. Having a single method which operates on arrays is fine, too. If you find you are using that method to operate on a single word often, though, yo...
<strong>Better</strong> can only be defined in the context of your application. Usually, the public API you choose should reflect the use case of the application. For that, let me present two different scenarios, in which for each of them I would give a different answer: <hr> <strong>Scenario #1: capitalizing words ...
https://softwareengineering.stackexchange.com
710,383
[ "https://physics.stackexchange.com/questions/710383", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/324860/" ]
For example let's take a simple example of velocity that is the object displaced per unit time or rate of change of position. It has some meaningful units, i.e. <span class="math-container">$\rm m/s$</span>, which means that the position is changed by <span class="math-container">$1$</span> meter per unit second. Howev...
Not every unit is supposed to have a direct interpretation. During a computation, you can find yourself combining physical quantities in varied ways, and when you analyse the result to determine its unit, you usually find something that isn't particularly illuminating. For example, let's take electrical resistance. We ...
A quantity's units arise directly from the quantity's definition. For example, <em><strong>Impulse</strong></em> due to a constant force <strong>F</strong> acting for a time <span class="math-container">$\Delta t$</span> is <span class="math-container">$\mathbf F\ \Delta t$</span>. So if <span class="math-container">$\...
https://physics.stackexchange.com
68,878
[ "https://mechanics.stackexchange.com/questions/68878", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/4327/" ]
Was replacing the front left marker light on a 2012 VW Passat when the bulb just bumped off and fallen off the holder inside in headlight fixture. Any tips on how to remove the bulb from the fixture without removing the grill and headlight fixture itself? <img src="https://i.stack.imgur.com/aDXw6.jpg" alt="enter ima...
There have been carbed road bikes with the fuel tank under the engine. Various late 1980s 125cc 2 stroke Gileras for example, where in some cases it released space to allow a storage area for a crash helmet where the fuel would normally be. Problem generally attributed to this design is a more noticeable difference to...
What would you move? Put the engine on top and the tank below? Would that complicate the drive to the wheel? Make the tank as a "surround" to the front wheel? Except for the hazards or collisions... The design has been "fairly" standard for approximately 100 years or so, and seems to be the "best" all-round solution...
https://mechanics.stackexchange.com
87,967
[ "https://mathoverflow.net/questions/87967", "https://mathoverflow.net", "https://mathoverflow.net/users/-1/" ]
The real numbers is a locally compact Tychonoff connected complete ordered topological field. I am looking at minimal collections of adjectives that can characterize the reals. The one often used to define the reals is that it is (Dedekind- or Cauchy-) complete ordered field. Consider the real numbers among other orde...
The following characterization of $\mathbb R$ and $\mathbb C$ among topological rings is due to Pontryagin and seems to be in the spirit of your question: <strong>Theorem</strong>: If $F$ is a field with a Hausdorff ring topology which is locally compact and connected then $F$ is isomorphic as a topological field to e...
The answer to the original question is positive, and even more is true. <blockquote> <strong>Proposition:</strong> $(\mathbb R,+,\le)$ is up to isomorphism the unique nontrivial connected ordered group. </blockquote> <strong>Proof:</strong> Let $(G,+,\le)$ be such a group (not necessarily abelian despite the notat...
https://mathoverflow.net
262,558
[ "https://mathoverflow.net/questions/262558", "https://mathoverflow.net", "https://mathoverflow.net/users/66688/" ]
Let $G$ be a semi-simple compact Lie group. Let $V$ be a real vector space and let: $\rho : G \to Aut_{\mathbb{R}}(V)$ be an irreducible real representation of $G$ on $V$. We say that $\rho$ is a real representation of complex type if and only if there exist a $J\in Aut_{\mathbb{R}}(V)$ satisfying: $J^{2} = - Id\, ,...
Irreducible <em>real</em> representations of <em>complex</em> type of a compact group correspond to irreducible complex representations that do not admit an invariant bilinear form. Irreducible real representations of <em>quaternionic</em> type correspond to irreducible complex representations that admit an alternating...
Let $\pi$ be a complex representation of the compact connected Lie group $G$ (no need for semisimplicity here) on a (finite-dimensional) vector space $V$. We say that $\pi$ is of <em>real</em> type if it comes from a representation of $G$ on a real vector space by extension of scalars, and we say that $\pi$ is of <em>q...
https://mathoverflow.net
136,037
[ "https://stats.stackexchange.com/questions/136037", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/1390/" ]
I'm trying to help a student of a colleague. The student observed and counted bird behaviour (number of calls) in an experimental setup. The number of calls attributable to a specific observed bird during each experiment couldn't be determined but counting the number of birds that contributed to the number of calls rec...
So the response you want to model is "Number of calls per bird" and the troublesome lines are where you didn't observe any birds? Just drop those rows. They add no information to the thing you are trying to model.
In a Poisson GLM, an offset is simply a multiplicative scaling on the Poisson rate being modelled - and a Poisson with a rate of zero is not helpful or even meaningful... That's why Spacedman is correct!
https://stats.stackexchange.com
1,639,865
[ "https://math.stackexchange.com/questions/1639865", "https://math.stackexchange.com", "https://math.stackexchange.com/users/275050/" ]
I'm trying to prove that when $p ≡ 1 \pmod3$ is a prime, $p$ is reducible over the Eisenstein integers, and I've gotten to the point where, provided $p\,|\,u^2 - u + 1$ for some integer $u$, then $p$ is reducible, and in trying to prove the existence of such a $u$, I arrived at this problem. I may be going in the wrong...
Integrals of this form can actually be solved with a simple factoring and then a slightly different substitution. $$\int \frac{7}{x(x^4+2)} dx$$ = $$\int \frac{7}{x^5(1+\frac{2}{x^4})} dx$$ then letting $u=1+\frac{2}{x^4}$, $\frac{du}{-8}=\frac{dx}{x^5}$, so the integral becomes $$\frac{-7}{8}\int \frac{du}{u} $$=$\fr...
Set a equation \begin{equation} \frac{1}{u(u^2+2)}=\frac{A}{u}+\frac{Bu+C}{u^2+2}, \end{equation} where $A,B$ and $C$ are constants. Then \begin{equation} \frac{1}{u(u^2+2)}=\frac{(A+B)u^2+Cu+2A}{u(u^2+2)} \end{equation} and you can find $A,B$, and $C$ by checking coefficients.
https://math.stackexchange.com
6,122
[ "https://stats.stackexchange.com/questions/6122", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/2719/" ]
I have almost two questions. I need a single covariate logistic regression (LR) for each of my variables. Should I do it manually in SPSS, selecting each variable and do logistic regression? Is there a "for each" cycle to do it? I should switch to R language to have what I want. In the multivariables (multi covariate...
If I understand you correctly, you want to fit two successive simple logistic regression model. I don't know if there's a specific instruction in SPSS that allows to switch the covariate of interest or cycle through them, but I guess you can run the two models in succession. In R, if your data are organized in a matrix...
Here is some SPSS code to loop through each of your models. <pre><code>*creating a simulated dataset. input program. loop #i = 1 to 100. compute yvar = RV.BERNOULLI(.5). compute xvar1 = RV.NORMAL(100,10). compute xvar2 = RV.NORMAL(100,10). compute xvar3 = RV.NORMAL(100,10). compute listwise = RV.BERNOULLI(.1). end cas...
https://stats.stackexchange.com
258,090
[ "https://softwareengineering.stackexchange.com/questions/258090", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/151100/" ]
I am writing a class that wraps (the parts of) an external API I am using. Let's take the GitHub API as an example. My imaginary <code>GitHub</code> class now has a <code>fetchUser()</code> and <code>fetchRepository()</code> method. When GitHub decides to host their API at github-api.com I only have to change it once....
Adapter pattern will have the same method name. X.DoSomething() will do different thing when it applies to different object. Façade pattern accesses different functions in separate different classes. Example of façade class should be when you want to create a validator class. My guess is that it may be Observer patte...
Some alternative suggestions because sometimes things need to 'sound right' It could be considered a <strong>ClientProxy</strong>. Depends how things will be packaged. Will this become a stand-alone DLL? If so, it's possibly a client proxy. Perhaps it is only a <em>convenience</em> class of a larger application (i...
https://softwareengineering.stackexchange.com
141,215
[ "https://softwareengineering.stackexchange.com/questions/141215", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/43961/" ]
In an oriented-services enterprise application, isn't it an antipattern to mix Service APIs (containing interface that external users depends on) with Model objects (entities, custom exceptions objects etc...) ? According to me, Services should only depends on Model layer but never mixed with it. In fact, my colleag...
Yes, you could do this: <pre><code>var myClassInstance = function(){ return MyClass.apply(Object.create(MyClass.prototype), arguments); }('an A value', 'a B value'); </code></pre>
Yes it is. However, I had to rewrite your code a bit, as the method you're currently using appears to put the function calls into the global scope. <pre><code>function MyClass(a, b){ this.a = a; this.b = b; }; function myClassInstance(){ //The apply function will apply MyClass attributes to this object....
https://softwareengineering.stackexchange.com
574,217
[ "https://physics.stackexchange.com/questions/574217", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/156987/" ]
For rigid bodies, all the particles can have different linear velocities but the same angular velocity, so it makes it convenient to talk about the angular velocity instead. From there, we get to ideas like angular momentum and torque, which work the same way for angular motion as momentum and force do for linear motio...
Going off of WillO's answer, while this scheme would work it would be no more effective than using a printer and two pieces of paper. Yes, your scheme is different in that it involves quantum nonlocality, but nevertheless it does not constitute faster-than-light communication because no information is being transferred...
Alternatively, they could have a computer print out two copies of the same random number, stuff the copies in their pockets, consult them when it's time to attack, and attack from one direction or another depending on whether the number is odd or even. Why does this not constitute FTL communication? If the answer to t...
https://physics.stackexchange.com