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 |
|---|---|---|---|---|---|
67,387 | [
"https://mathoverflow.net/questions/67387",
"https://mathoverflow.net",
"https://mathoverflow.net/users/15692/"
] | Let $X$ and $Y$ be varieties. Let $E$ be a locally free sheaf over $X$. Let $f: X \to Y$. Is there some nice criteria which ensures that $f_\ast E$ is still locally free? Sorry, if this is a very standard question.
| Under reasonable hypotheses on <span class="math-container">$X$</span>, <span class="math-container">$Y$</span> and <span class="math-container">$f$</span>, the answer is that <span class="math-container">$f_*E$</span> is locally free if and only if <span class="math-container">$\dim H^0(X_y, \, E_y)$</span> is a <em>c... | Check out Grauert's Theorem, in Hartshorne III.12.
| https://mathoverflow.net |
61,979 | [
"https://security.stackexchange.com/questions/61979",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/50033/"
] | I have a dispute with my father about the following ...
I want to make a website (with MySql database) and use the root/index - page for BOTH the log in entry for normal visitors AND log in for admins.
My father does not agree as he said the following ...
You should NEVER use the same page for both visitors and admi... | If you protect the log-in page with HTTP authentication or hide it behind a “secret” URL, really all you're doing is add extra passwords. Instead of one admin password, there are effectively three: The “secret” part of the URL, the HTTP authentication password and finally the admin password itself.
While this may soun... | Most web applications use a single login page to handle all logins. Having two login pages implemented differently just doubles your attack surface, and provides two opportunities to get it wrong.
What threat are you protecting against by separating the login pages? There's better ways to protect against threats:
<... | https://security.stackexchange.com |
96,857 | [
"https://electronics.stackexchange.com/questions/96857",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/35083/"
] | I have a question on 8085 instruction set.
A program to add 6 bytes of data stored in memory starting from 4500h. must use b register to save any carries and finally store the sum and carry at two consecutive memory locations 3000h and 3001h.
I wrote the following for it.
<pre><code>ACI 4500h
ACI 4501h
ACI 4502h
ACI ... | Ah, more computer archaeology! I'm just going to give you a solution here, since it would take too long to address the misconceptions in your code. Study it and make sure you know exactly what each instruction is doing and why.
<pre><code> ;; HL points to array of bytes to be added
;; DE contains 16-bit... | I had this loop which seemed to work for me but only stores the sum in one 8 bit register.
<pre><code> LDA 3200H ;transfers the array value stored in memory location 3200H to the accumulator
MOV C,A ;moves the array value to register C
SUB A ;initializes value 0 in the accumulator by subtracting the previou... | https://electronics.stackexchange.com |
134,386 | [
"https://electronics.stackexchange.com/questions/134386",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/54712/"
] | I have this circuit :
<img src="https://i.stack.imgur.com/SDZhJ.jpg" alt="enter image description here">
I'm trying to write down the logic of every output (W,X,Y,Z), to get a truth table out of it :
<pre><code>W = NOT (A OR B)
X = NOT A AND B
Y = A AND NOT B
Z = A AND B
</code></pre>
But when compares to the ... | If you trace through and label the inputs of each AND gate, it makes thing clearer:
<img src="https://i.stack.imgur.com/d0BGO.jpg" alt="enter image description here">
<pre><code>W = (NOT B) AND (NOT A), same as NOT (B OR A) by De Morgan
X = (NOT B) AND A
Y = B AND (NOT A)
Z = B AND A
</code></pre>
| the output of W is NOT A AND NOT B instead of NOT A OR NOT B
the output of X is NOT B AND A instead of NOT A AND B
the output of Y is NOT A AND B instead of NOT B AND A
maybe the difference of the output of W will solve your problem
| https://electronics.stackexchange.com |
124,645 | [
"https://security.stackexchange.com/questions/124645",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/112045/"
] | I was wondering if I can make an artificial firewall by using two routers (Referred as Router 1 and Router 2). My server will be on router #1 while router #2 hosts all the other devices on my network. I was thinking that router #2 could be a total separate "entity" and appear as a singular device on the network. So if ... | Assuming the routers you are using have stateful access lists then they can be used as basic network firewalls and the design you have will provide some very basic defense in-depth benefits. If it's a possibility you may want to block all inbound packets initiated by the Free-BSD server entering the second router (clie... | Since you have freebsd, you can use ipfw for firewall usage. Though, if you understand how breaches work, they don't start from the outside in, they're mostly inside out.
Firewalls can stop outside scanning to internal networks, but internal hosts get compromised and that is a different kettle of fish.
| https://security.stackexchange.com |
10,990 | [
"https://physics.stackexchange.com/questions/10990",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/3975/"
] | I almost all movies where you could see an animation about an asteroid, they move in a very distinct way.
I don't know how to explain better, but I think what we can see in the movies is that the asteroid is rotating around the x axis with constant speed, around the y axis with constant speed and around the z axis wit... | Euler's rotational theorem only states, that we can determine a unique axis of the rotation for <strong>any given moment</strong>. That does not necessarily mean that the axis of rotation's direction is fixed forever.
Quite opposite, let's suppose that we have body with no external force acting upon it. If axis of r... | Any motion of a rigid object can be decomposed into translation (straight-line motion) of the center of mass, and rotation around the center of mass. In a movie scene, an asteroid would probably be both rotating and translating with respect to the camera, because it makes the motion look more complicated that way. But ... | https://physics.stackexchange.com |
161,444 | [
"https://electronics.stackexchange.com/questions/161444",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/35113/"
] | I am trying to build a portable Geiger-Müller tube that is run on 4x AA batteries. However, the tube runs on 300 volts. What is the most efficient way to do this? I have looked for a transformer that I could drive with a 555 timer, but I couldn't find any transformers meeting my specifications.
| This is a really good question and one that is misunderstood by many.
one key is to realize that it is not electrons that are traveling down the line, its actually a CHANGE in the electric FIELD that is traveling down the line. The electrons themselves travel at a much slower rate as the wire is made up of molecules i... | You can go back to your marbles analog. It's beneificial, since it contains many "aha" experiences which reveal the behavior of electrical transmission lines.
First, improve the marbles so they better match an electric circuit: pack them in solid with no gaps allowed. Then add more marbles to the tube, so theres imm... | https://electronics.stackexchange.com |
300,134 | [
"https://stats.stackexchange.com/questions/300134",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/125481/"
] | <pre><code>dummy_data <- data.frame(
x1 = rnorm(100, 0, 1),
x2 = rnorm(100, 0, 1),
y = round(runif(100, 0, 1), 0)
)
dummy_glm <- glm(y ~ x1 + x2,
data = dummy_data,
family = binomial(link = 'logit')
)
</code></pre>
I get a standard error of the p... | Accuracy is essentially the mean of the Losses under a zero-one loss function, so to answer your question, yes accuracy is just a loss function.
More specifically: For the Zero-one loss function is defined as:
$L(y,y^*) =\begin{cases}
0,& \text{if } y = y*\\
1, & \text{otherwise}
\end{cas... | I want to argue that the premise of your question is flawed.
<blockquote>
In practical problems, where we want to for instance predict if a subject has a certain disease or not, we usually take classification accuracy as a measure [...]
</blockquote>
Maybe some people do, but I think there is a fair perspective tha... | https://stats.stackexchange.com |
69,744 | [
"https://stats.stackexchange.com/questions/69744",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/3077/"
] | Sampling with replacement has two advantages over sampling without replacement as I see it:
1) You don't need to worry about the finite population correction.
2) There is a chance that elements from the population are drawn multiple times - then you can recycle the measurements and save time.
Of course from an acade... | Expanding on the answer of @Scortchi . . .
Suppose the population had 5 members and you have budget to sample 5 individuals. You are interested in the population mean of a variable X, a characteristic of individuals in this population. You could do it your way, and randomly sample with replacement. The variance of... | The precision of estimates is usually higher for sampling without replacement comparing to sampling with replacement.
For example, it is possible to select only one element $n$ times when sampling is done with replacement in an extreme case. That could lead to very imprecise estimate of the population parameter of in... | https://stats.stackexchange.com |
25,572 | [
"https://mathoverflow.net/questions/25572",
"https://mathoverflow.net",
"https://mathoverflow.net/users/3233/"
] | Given a smooth projective variety $X$ over some algebraically closed field $k$
and a locally free sheaf $R$ of $O_X$-algebras, e.g. central simple algebras or orders.
If $M$ is a left $R$-module which is locally free over $O_X$, is it true that $M$ is locally projective over $R$? For example if $X$ is a curve a torsio... | It is true for locally free sheaves of algebras that are central simple algebras at every point, though. These are known as sheaves of Azumaya algebras; I mention them since they were brought up in the question. I don't have a reference here, but the proof is not hard.
| The answer to your first question is a resounding no. An example (among many) is
given by $X=\mathrm{Spec} k$, $R=k[x]/(x^2)$ and $M=k$ considered as an
$R$-module through the $k$-algebra homomorphism given by $x\mapsto 0$.
As for the second question, the reason is that in general there are correction
terms to this fo... | https://mathoverflow.net |
189,253 | [
"https://electronics.stackexchange.com/questions/189253",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/71672/"
] | When I use my tablet on my balcony I would like to have it connected to the charger, but using a long (3m) USB cable seems to drop the voltage so that it doesn't charge.
I am wondering whether I can modify a wall-wart to give (say) 5.5V, thus compensating the voltage drop. I reckon I can open a wall-wart with a hacksa... | Honestly, I would not bother trying to open up the wallwart. Why?
<ul>
<li>it's likely to be in a snap-fit or ultrasonically welded plastic case, which will take some opening and not want to go back together</li>
<li>the circuitry inside will be cost optimised - not optimised for easy modification or repair</li>
</ul>... | Buy a 3m 120/240v extion lead and shorten your usb lead. ie move the charger closer to your tablet.
| https://electronics.stackexchange.com |
69,308 | [
"https://softwareengineering.stackexchange.com/questions/69308",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/12750/"
] | I know, and use, two version control systems: Subversion and git. Subversion, as of now, gets used for personal projects where I am the only developer and git gets used for open source projects and projects where I believe others will also work on the project. This is mostly because of git's amazing forking and merging... | It's not overkill. The main reason why I started using Git and Mercurial over Subversion for personal projects is that initiating a repository is so much more easier.
Wanna start a new project?
<pre><code>> git init
</code></pre>
<strong>BAM!</strong> No need to set up a repository server nor check in a folder st... | I would contend that using Subversion for local personal projects is overkill, whereas Git is decidedly not. Git will take up less space (because of SVN's inefficient "revisions" concept versus Git's object snapshots), requires less setup (<code>git init</code> versus a dozen <code>svnadmin</code> commands and setting ... | https://softwareengineering.stackexchange.com |
6,707 | [
"https://stats.stackexchange.com/questions/6707",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/2669/"
] | I've seen at least 3 sources on time series* state that the component of a series that is variously called random, stochastic, or noise (something clearly separate from any deterministic, patterned component) itself consists of 2 parts, a systematic part and an unsystematic part. I can't for the life of me figure out ... | The Burns reference that you are quoting seems to dividing the stochastic part into autocorrelation error, which is a byproduct of any time series analysis (and is systematic), vs. truly random error which is uncontrollable.
-Ralph Winters
| "random" is often used as if it was a real property of the data under study, where it should be replaced with "uncertain". To give an example, if I ask you what how much money you earned over the past month, and you don't tell me, it is not "random", but just uncertain. However, treating the uncertainty as if it was ... | https://stats.stackexchange.com |
108,601 | [
"https://mathoverflow.net/questions/108601",
"https://mathoverflow.net",
"https://mathoverflow.net/users/10251/"
] | The answer to my question is probably well-known, but I was unable to find a reference.
The Bezout's identity states that for any positive non-zero integers $a_1, \ldots , a_n$ there exist integers $x_1, \ldots , x_n$ such that
$$
a_1x_1+ \cdots + a_nx_n=gcd(a_1, \ldots, a_n) .
$$
What is the best estimate for $|x_1... | We can prove $b(a_1,\ldots,a_n) \leq a_1+\cdots+a_n$ (and thus $f(k) \leq k$) by elementary means as follows.
We may assume $\operatorname{gcd}(a_1,\ldots,a_n)=1$ and $1 < a_1< \cdots <a_n$.
Start with any Bézout identity $x_1 a_1+ \cdots + x_n a_n = 1$. Using the transformations $x_n \leftarrow x_n + ka_1, ... | I'm sure that <span class="math-container">$2\sum|x_i| \lt \sum|a_i|$</span> is about best possible. That is certainly true in case <span class="math-container">$n=2.$</span> Then there will be two solutions with <span class="math-container">$|x_1| \le a_2$</span> and <span class="math-container">$|x_2|\le a_1$</span>... | https://mathoverflow.net |
139,377 | [
"https://security.stackexchange.com/questions/139377",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/127069/"
] | I was going to do port-forwarding to create a gaming server with an old PC. I the found out that it makes more things visible to the internet. Is port-forwarding a bad choice considering its insecurities? Also, how will I able to protect my internet and computer if I were to port-forward?
| <strong>Tehcnically, yes..</strong>
Port forwarding allows external internet connections to contact your router, which then will FORWARD the connection to your computer's internal IP address. After the connection reaches your IP address, it will give input to the server you're running on your computer. So the security... | <strong>Port forwarding</strong> should only make visible the <em>port</em> or <em>ports</em> you are forwarding to the inside.
With this said, you can <strong>block/firewall those ports</strong> to <strong>only allow</strong>:
<ul>
<li>your <em>work IP or work subnet</em></li>
<li>your friends</li>
<li>whatever cafe... | https://security.stackexchange.com |
591,738 | [
"https://electronics.stackexchange.com/questions/591738",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/43699/"
] | Would the old series 4000 CMOS logic series have evolved over time?
The manufacturers surely have bought new machines and are not using the same machines from some odd 40 years back.
Would they have adapted the 4000 logic series to a smaller scale (nanometre) transistors / FETs / diodes / Zeners and what not to reduce ... | One practical difficulty is that modern logic processes can't tolerate the 12V supply voltage (and usually 18V abs max rating) for classic 4000 series devices.
Anything breaks down (including silicon dioxide and other insulators) in a sufficiently high electric field (measured in volts/metre), and as you scale features... | Usually, IC's built 40 years apart with the exact same part number have the exact same circuit inside (sometimes, something very close). This is because reverse-compatibility is <strong>critical</strong>. An LM358 built last month has the same high noise and crossover distortion as one built in the 1970's. And a CD40... | https://electronics.stackexchange.com |
6,791 | [
"https://stats.stackexchange.com/questions/6791",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/776/"
] | Let Year 1 be last year's data and Year 2 be this year's data.
Suppose that in Year 1, you had a likert scale that was 1-9 (Categorical/Ordinal) and that in Year 2, for the same question you had a likert scale that was 1-5 (Categorical/Ordinal).
What would be some of the things that you would try (if at all) to com... | This is not a complete answer; just a few points:
<ul>
<li>If you can administer both versions of the scale to a subsample, you could estimate what corresponding scores are on the two response formats.
Then you could apply a conversion formula that is empirically justified.
I can think of a number of ways of doing thi... | [Technically you've got survey items, not Likert scales; the latter are fashioned from multiple items. See, for example, Paul Spector's <em>Summated Rating Scale Construction</em> {Sage}.]
The steps you take will need to depend on the audience for which you're reporting. If it's academic and rigorous, like a disse... | https://stats.stackexchange.com |
22,719 | [
"https://mathoverflow.net/questions/22719",
"https://mathoverflow.net",
"https://mathoverflow.net/users/391/"
] | Given a real manifold $M$ with symplectic $2$-form $\omega$,
one can ask whether the cohomology class $[\omega] \in H^2(M;{\mathbb R})$ lies in the image of
$H^2(M;{\mathbb Z})$. If so, one can ask for a line bundle ${\mathcal L}$
with $c_1({\mathcal L}) = [\omega]$ (or even better,
a connection $\alpha$ on $\mathcal... | If L_1 and L_2 are two line bundles on a manifold $M$ that differ by torsion, then their Chern characters
$$ch(L_1) = 1 + c_1(L_1) + \frac{1}{2}c_1(L_1)^2 + \cdots$$
$$ch(L_2) = 1 + c_1(L_2) + \frac{1}{2}c_1(L_2)^2 + \cdots$$
agree, if only because the right-hand sides of these formulas are taking place in $H^*(M;\math... | It is the <em>group of periods</em> of a closed 2-form $\omega$ which plays a role on the different <em>quantizations</em>. Every closed 2-form $\omega$ on a manifold $M$ (more generally on a diffeological space) is the curvature of a connexion on an <em>integration bundle</em>, a principal bundle with group the <em>to... | https://mathoverflow.net |
205,017 | [
"https://dba.stackexchange.com/questions/205017",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/150002/"
] | I have a table with a column of numbers like <code>789</code>. I want to pad them with 0 to equal 9 digits. For example, <code>789</code> should be <code>789000000</code>
I have tried this code, but there are some numbers more than 3 digits and less than 3 digits.
<pre><code>UPDATE
Table
SET
MyCol = MyCol+'000... | The following code does what you need, the bit you need is the REPLICATE section:
<pre><code>declare @var nvarchar(10);
set @var = '321'
select @var + REPLICATE('0',9-LEN(@var))
</code></pre>
RESULT:
<pre><code>321000000
</code></pre>
| Your question would be a better fit in stackoverflow, but I think you are after this:
<pre><code>UPDATE
Table
SET
MyCol = left(MyCol + '000000000', 9)
WHERE
LEN(MyCol) < 9;
</code></pre>
| https://dba.stackexchange.com |
105,287 | [
"https://cs.stackexchange.com/questions/105287",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/101355/"
] | Is the number of final states in a DFA at least the number of final states in its minimal DFA?
Is the answer even yes? Any help would be appreciated.
| No. An easy counterexample to think about is a line of states that are all final states and they transition to the right on 0 or 1. So like A ->(0,1) B -> (0,1) -> C -> (0,1) C where the final node simply loops on itself for 0 and 1.
Using Myhill-Nerode this would simplify down to a single start state that loops on its... | Yes, the number of final states in a DFA is at least the number of final states in its minimal DFA. Your proof is correct at some level of formality.
<hr>
Intuitively, as you have noticed, any DFA for <span class="math-container">$L$</span> can be reduced to the minimal DFA for <span class="math-container">$L$</span>... | https://cs.stackexchange.com |
184,586 | [
"https://softwareengineering.stackexchange.com/questions/184586",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/79286/"
] | In imperative languages, it is trivial to devise a programming test of language's use of "value semantics" or "reference semantics". One could do the following and check the value of <code>a</code> (where <code>Vertex {one, two, three :: Integer}</code>):
<pre><code>a := Vertex 3 4 5
b := a
one b := 6
two b := ... | There is no such test, because, without mutability, the distinction isn't meaningful (as you demonstrated).
| It is <em>impossible</em> to distinguish between them. What this means is that the compiler is free to choose to use whatever semantics it sees fit for optimum performance.
In particular, functional languages are typically <em>described</em> as having value semantics, because that matches our conceptual model of them,... | https://softwareengineering.stackexchange.com |
33,860 | [
"https://electronics.stackexchange.com/questions/33860",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/5542/"
] | <img src="https://i.stack.imgur.com/CVe25.png" alt="enter image description here">
L<sub>p</sub>: Self inductance of the primary winding.<br>
L<sub>s</sub>: Self inductance of the secondary winding.<br>
L<sub>m</sub>: Mutual inductance between the primary and secondary windings.
Assume that I need an iron core indu... | <blockquote>
How do I obtain an inductor from the given transformer in the image? ... So that the inductance of the resulting inductor must be maximum.
</blockquote>
<ul>
<li>Connect the undotted end of one winding to the dotted end of the other.<br>
eg P<sub>2</sub> to S<sub>1</sub> (or P<sub>1</sub> to S<sub>2</s... | <strike>Just use the primary or the secondary with the other winding open-circuit. If you use the primary, the inductance will be \$L_P\$, and if you use the secondary it will be \$L_S\$ - <em>by definition</em>.
But I'm not sure what you are expecting to do with this (you say you don't want to use any other circuit e... | https://electronics.stackexchange.com |
496 | [
"https://dsp.stackexchange.com/questions/496",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/480/"
] | It has been a long time since I studied engineering, please forgive my mistakes.
I got data sampled from a digital accelerometer. It is sampled at 20 hz, then collapsed into 1 second epochs. The data is then filtered to remove noise. The system outputs 0 at rest, a lot more during activity.
I'm looking at the fourie... | My guess: nothing to see here. Move along.
You mention that "the signal appears to be a helix in [the] frequency domain". I assert that what this helix <em>really</em> is, is a complex exponential. And there is nothing wrong with that, because complex exponentials are what you get when you time-delay a signal: $f(x-a)... | <strong>Possible thought starters:</strong>
Ensure that input to ADC is low pass filtered to well below half sampling rate to avoid aliasing. At 20 Hz sample you need either a "barn door" infinite cutoff low pass filter at 10 Hz or something real at somewhat lower. Sheet 21 has a feel of aliasing components, but mayb... | https://dsp.stackexchange.com |
276,217 | [
"https://dba.stackexchange.com/questions/276217",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/216349/"
] | So, I have these two tables
<pre><code>CREATE TABLE IF NOT EXISTS `inart_ps_categories` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`inart_ps_category_id` int(11) UNSIGNED NOT NULL,
`parent_id` int(11) UNSIGNED DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`path` varchar(255) DEFAULT NULL,
`num_child... | Without seeing your categories table, your only problem is that the referenced columns like <code>inart_ps_category_id</code> need an index, which you can achieve by using <code>KEY(inart_ps_category_id)</code>:
<pre><code>CREATE TABLE IF NOT EXISTS `inart_ps_categories` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMEN... | A Foreign Key should only reference the <strong>Primary Key</strong> of another table.
The one causing you difficulties <em>does not</em>.
<pre><code>CREATE TABLE inart_ps_categories
( id int(11) UNSIGNED NOT NULL AUTO_INCREMENT
, inart_ps_category_id int(11) UNSIGNED NOT NULL
. . .
, PRIMARY KEY ( id ) ... | https://dba.stackexchange.com |
315,452 | [
"https://softwareengineering.stackexchange.com/questions/315452",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/223004/"
] | <blockquote>
<h1>Compare Database #1 and Database #2 below</h1>
</blockquote>
<pre><code>DATABASE #1
POSTS---------------------------------
|___Id________Category_Id______Body__|
| 1 "For Sale" "...." |
| 2 "Requests" "...." |
| 3 "Mi... | <h2>DATABASE #1</h2>
<strong>There's not a master table</strong>. It means that there's no repository of categories. <em>Category</em> is a mere description field.
Doesn't matter if we get repeated values (it seems). May be because these values are informed by the client or the customer and it's out of our control. ... | I strongly advice against DATABASE #1, for the following reasons :
<ul>
<li>There is no integrity constraint. Invalid values may be created.</li>
<li>Changing a description, will require changing all rows with that description. And also all programs that use that value (i.e. you may have an if statement)</li>
<li>You ... | https://softwareengineering.stackexchange.com |
571,973 | [
"https://math.stackexchange.com/questions/571973",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/34920/"
] | The question was: Evaluate, ${\textstyle {\displaystyle \sum_{n=1}^{\infty}\frac{n}{n^{4}+n^{2}+1}}}.$
And I go, since $\frac{n}{n^{4}+n^{2}+1}\sim\frac{1}{n^{3}}$ and we know that ${\displaystyle \sum_{n=}^{\infty}\frac{1}{n^{3}}}$ converges. so ${\displaystyle \sum_{n=1}^{\infty}\frac{n}{n^{4}+n^{2}+1}}$ is converge... | HINT:
As $n^4+n^2+1=(n^2+1)^2-n^2=(n^2+1-n)(n^2+1+n)$
and $(n^2+1+n)-(n^2+1-n)=2n$
$$\frac n{n^4+n^2+1}=\frac12\left(\frac{2n}{(n^2+1-n)(n^2+1+n)}\right)$$
$$=\frac12\left(\frac{(n^2+1+n)-(n^2+1-n)}{(n^2+1-n)(n^2+1+n)}\right)$$
$$=\frac12\left(\frac1{n^2-n+1}-\frac1{n^2+n+1}\right)$$
Also observe that $: (n+1)^2-(n... | Use this equation$$\frac{2n}{n^4+n^2+1}=\frac{1}{n^2-n+1}-\frac{1}{n^2+n+1}.$$
| https://math.stackexchange.com |
3,431,659 | [
"https://math.stackexchange.com/questions/3431659",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/722373/"
] | <blockquote>
What is the coefficient of <span class="math-container">$x^6$</span> in the development of <span class="math-container">$A$</span>, where <span class="math-container">$A=(x^2-3x-1)^4$</span>.
</blockquote>
| With the new edit, the answer is the sum over all contributions, which are <span class="math-container">$\binom{4}{3}(x^2)^3(-1)$</span> and <span class="math-container">$\binom{4}{2}(x^2)^2(-3x)^2(-1)^2$</span>, giving <span class="math-container">$-4+54=50$</span>.
| <strong>Hint</strong>:
You can use the <code>multinomial formula</code>: as the expansion is
<span class="math-container">$$\sum_{\substack{i,j,k\: \text{ s. t.}\\i+j+k=4}}\!\!\!\frac{4!}{i!\,j!\,k!}(x^2)^i(-3x)^j(-1)^k,$$</span>
the coefficient will be
<span class="math-container">$$\sum_{\substack{i,j,k\: \text{ s. ... | https://math.stackexchange.com |
77,784 | [
"https://softwareengineering.stackexchange.com/questions/77784",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/25740/"
] | Do you have any kind of update process?
Let's assume you are an "in-house" development shop for php inside your company. You are creating an bunch of applications for other units.
Do you have something like "Support ends in 2 years" ? What happens if you develop an app for php 5.3, and this app can't run with php "6... | <strong>Support should be no different in-house</strong>.
I've always felt users in an organization should be treated like customers. You must <strong>delight</strong> them. You will sleep well every night.
The problem you specifically address should be discussed with the business owner that ordered the application.
... | Depends on the reasons for which it is being built in house. Most of the time it is to save money and utilize existing talent. Usually if it is built in house, it stays in house, and it is supported in house until it is rebuilt (again in house). It would be supported indefinitely.
| https://softwareengineering.stackexchange.com |
29,464 | [
"https://electronics.stackexchange.com/questions/29464",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/7041/"
] | I am currently reading about Pulsed Latch Circuit. And there is a frequent mention of "hold time violation". Like:
<blockquote>
For latch, "...data must be held for a longer period of time,
increasing the likely number of hold time violations".
</blockquote>
Please explain what <strong>hold time violation</stro... | A edge-triggered latch (flipflop) ideally samples the data line instantaneously on one of the edges of the clock. However, nothing is truly instantaneous, so the data must be valid for some finite amount of time around the clock edge. The time it must be fixed before the clock edge is called the <i>setup time</i>, an... | Olin has been clear, but I would add some details about the Pulsed Latch Register, and why this architecture may have different Hold Time requirements respect to other flip-flops.
<h3>First: the difference between latch and flip-flop</h3>
As you probably know, a latch is a circuit which in the basic form has an input, ... | https://electronics.stackexchange.com |
131,026 | [
"https://cs.stackexchange.com/questions/131026",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/-1/"
] | For example, in real life, you're working with real time data that is constantly appended to. Computer science assumes a static problem, like traveling salesman. In reality you would start with a set of cities and add and remove them over time, so the solution at the individual step is trivial, and it's easier to store... | Your question takes a very narrow and untrue view of what computer science is. Computer science doesn't "assume a static problem" -- there is an entire subfield studying Online Algorithms, which take input problems piece-by-piece, as just one example.
Computer science is the system of methods for analyzing co... | Even though computer science can be understood as a science of problem solving, <em>as a science</em>, it is above all interested in framing (answerable) questions. Questions about problem solving methods, whose answers can then be applied to the "real world" (whatever that is), sometimes by scientists themse... | https://cs.stackexchange.com |
27,080 | [
"https://dba.stackexchange.com/questions/27080",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/3940/"
] | I have a virtual box with 2 installed instances of MySQL.
First instance:
<pre><code>- /etc/mysql/my.cnf
- /var/lib/mysql
- port = 3306
</code></pre>
Second instance:
<pre><code>- /etc/mysql2/my.cnf
- /var/lib/mysql2
- port = 3307
</code></pre>
I can connect to both. The first instance is fine. The second is not.
... | Thanks to all.
Issue is resolved. The problem was in permissions:
<pre><code>- `mysql` doesn't have a permission to read my.cnf;
- I started up instance with sudo user;
- while connected without it.
</code></pre>
| I had a similar problem with a box I was diagnosing for performance issues, it turned out that there was an incorrect / misplaced heading entry within the my.cnf for that server, so MySQL was ignoring all the settings within that section...
For example, if you had the following;
<pre><code>[mysqld]
##################... | https://dba.stackexchange.com |
1,466 | [
"https://computergraphics.stackexchange.com/questions/1466",
"https://computergraphics.stackexchange.com",
"https://computergraphics.stackexchange.com/users/1605/"
] | I've got a lot of confusion and I need to clarify some terminology and put together the knowledge.<br>
If I say that an engine is a ray tracer (so it uses the ray tracing algorithm to render the scene), is it automatically a physically based engine? I mean, ray tracing is by its definition physically based or there cou... | "Physically based" is not a very well defined term, so it's difficult to answer this question exactly.
In general, "physically based" refers to the fact that the algorithm in question is derived from physically based principles. It's not physically correct (because we can't afford that) and some approximations usually... | No, simply:
<ul>
<li>Physically based rendering does not necessitate raytracing. One can use other means.*</li>
<li>Raytracing can be used to do other effects than physically based rendering. </li>
</ul>
Raytracing is often easiest to implement and think out. Therefore its widely deployed for physically based renderi... | https://computergraphics.stackexchange.com |
213,874 | [
"https://stats.stackexchange.com/questions/213874",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/61705/"
] | Suppose $X_1,X_2,...,X_n$ be iid random variables with $N(\mu,\sigma^2)$ distribution.
We know that $X_i-\mu$ has a $N(0,\sigma^2)$ distribution.
My question is what is the distribution for $X_i-\bar{X}$? where ($\bar{X}=\frac{\Sigma_1^n X_i}{n}$)
I try to do as below.
Since $X_i\sim N(\mu, \sigma^2)$ and $\bar{X}\si... | <strong>Updated with full solution since OP has now solved it.</strong>
<hr>
For a complete solution, one needs to first show that $ Y_i:= X_i - \bar{X}$ is a Gaussian random variable, whence it suffices to find its mean and variance to characterize the distribution. Knowing something about Gaussian random vectors ma... | Staying in the univarite case, since $X_i, i=1$ ,$\dots ,N$ are iid Normally distributed with mean $\mu$ and variance $\sigma^2$, we have, as you mentioned,
$E[X_i -\bar X] = E[X_i- \frac{1}{n}\sum_j^N X_j] = E[X_i] - \frac{1}{n}\sum_j^N E[X_j] = \mu - \frac{1}{n}n\mu =0$
For the variance, notice that
$Var[X_i-\bar ... | https://stats.stackexchange.com |
1,483,741 | [
"https://math.stackexchange.com/questions/1483741",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/279872/"
] | Let $x = 0.2154154\overline{154}$ , I have to prove that it is a rational number just by writing it as a fraction with the proper steps.
I note that the repeating part, $154$, is composed by 3 digits. Thus, using a trick that I have learnt, I can write an equation of this type:
$$1000x = ?$$
I am not sure about what... | <strong>First Method</strong>
What you basically do in this method is find a multiple of $x$ that will get rid of the repeating part when you subtract it from x itself. (HINT: $10x$, $100x$, it all depends on the number of digits in the repeating part.)
$$x=0.2154154154...$$
$$10x=2.154154154...$$
$$10000x = 2154.15... | First, ignore the 2, and find a fraction that represents $y = 0.\overline{154}$. Since
$$y = 0.\overline{154},$$
$$1000y = 154.\overline{154} = 154 + y.$$
Solving for $y$, we get $999y = 154$, so $y = 154/999$. Now $x = y/10 + 1/5$, so
$$x = 154/9990 + 1998/9990 = 2152/9990.$$
| https://math.stackexchange.com |
415,981 | [
"https://softwareengineering.stackexchange.com/questions/415981",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/17728/"
] | For example if you have a single UUID with a collision probability of x, if you concatenate 2 UUIDs, does the collision probability become x^2?
<pre><code>val0 = generate_uuid()
val1 = generate_uuid()
final_val = val0 + val1
</code></pre>
So with each additional uuid, does it reduce the probability of collision expone... | With version 4 (variant 1) random UUIDs there are 2^122 possible values. If we assume proper random* number generation that means that the chance of any two ids matching is around 1 in 5.32x10^36.
If you use 2 version 4 UUIDs together (let's call it a super UUID), you have 2^244 possible different values. That means... | Version 5 UUIDs are guaranteed to be the same for the same input, which means that it is guaranteed that <code>val0</code> and <code>val1</code> are always the same.
Therefore, concatenating two, three, twenty, thirty, or a trillion UUIDs does not change the probability of a collision at all.
| https://softwareengineering.stackexchange.com |
383,582 | [
"https://mathoverflow.net/questions/383582",
"https://mathoverflow.net",
"https://mathoverflow.net/users/159298/"
] | Given some absolute constant <span class="math-container">$C$</span> (In my case, <span class="math-container">$C=4$</span> would suffice) and an elliptic curve <span class="math-container">$E/\mathbb{Q}$</span>, are there upper bounds on <span class="math-container">$|L(E,s)|$</span> that are uniform for <span class="... | Assuming the modularity theorem, apply the maximum modulus principle to <span class="math-container">$$\Lambda(E,s)=N^{s/2}(2\pi)^{-s}\Gamma(s)L(E,s)$$</span> which is entire and <span class="math-container">$\Lambda(E,s)=\pm \Lambda(E,2-s)$</span> (where <span class="math-container">$N$</span> is the conductor).
The H... | Here is an (I believe optimal) implementation of reuns' answer, for posterity.
<strong>Proposition:</strong> For any <span class="math-container">$\epsilon>0$</span>, we have that <span class="math-container">$|L(E,s)|\ll_{\epsilon,T_0}N^{1/2+\epsilon}$</span> within the open set <span class="math-container">$\frac{... | https://mathoverflow.net |
415,178 | [
"https://softwareengineering.stackexchange.com/questions/415178",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/340098/"
] | (I moved this question here, as StackExchange fits better, originally I posted it on StackOverflow.)
This is not a question about a particular piece of code, rather I ask what is the right design approach in such situations.
More on the situation:
I am developing a sort of exception handling framework for a Spring Boot... | What a public method documents as the exceptions that can be propagated out of it (<code>throws</code> declaration) and where the exception actually gets generated are two completely different and independent things.
As soon as a method or function detects that it cannot fulfil its contract, that is the point where an ... | Ask not why you want to <em>throw</em> an Exception but why would you want to <em>catch</em> one!
The most important part of Structured Exception <strong>Handling</strong> is that <em>last</em> bit - handling the Exception. In my book, that means catching it and doing something "useful" with it.
What's "... | https://softwareengineering.stackexchange.com |
19,425 | [
"https://electronics.stackexchange.com/questions/19425",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/5156/"
] | From what I remember about electricity generation, a varying magnetic field is used, either the magnetic field or the coil moves to generate electricity.
e = dB/dT
where
e = voltage induced
B = magnetic field
T = Time
Would more voltage be induced if both, the magnets and the coil, are mounted and geared to rot... | In theory, yes.
Practically, your idea makes no sense for the following reasons:
Your basic idea is right, faster variation of flux means bigger induced current, quite simply. Of course in reality this is way more complicated and there are a huge number of restraints. Also, the mechanical power input must always exc... | Induced voltage is proportional to the rate of change of magnetic flux, so to get more voltage, you can either use faster rotation, stronger magnets, or both.
Be aware that a number of things can go wrong with rotating a machine faster than its design spec. The insulation on the windings may not be able to withstand ... | https://electronics.stackexchange.com |
326,206 | [
"https://physics.stackexchange.com/questions/326206",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/97775/"
] | I know that in SR, the 4-velovity $$ u^\mu = (d t/d \tau,d x/d \tau,d y/d \tau,d z/d \tau ) $$ and $$p^\mu = m u^\mu.$$ How do these generalize to GR? I imagine there are new complications, particularly by what we let $p^0$ be. And are these only defined for geodesics, or in general?
| Are you mentioning $p^0$ because you think of it as the energy?
If that is where your question is coming from, then perhaps this answer may be of use. Energy is something that an observer measures about an object. Let me explain.
The observer has a 4-velocity, $u^\mu_{\text{obs}}$, and the object has a 4-momentum, $... | On a general Lorentzian manifold with a time-positive metric, $d\tau^2 = g_{\mu\nu}dx^{\mu}dx^{\nu}$. In SR $g_{\mu\nu} = \eta_{\mu\nu}$ which gives the familiar relation:
$$
d\tau^2 = dt^2 - dx_idx^i
$$
In GR the Einstein Field Equations tell you what $g_{\mu\nu}$ is so you can compute the altered line element.
Oth... | https://physics.stackexchange.com |
24,321 | [
"https://cs.stackexchange.com/questions/24321",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/8508/"
] | People usually say Coq does not allow writing non-terminating functions. I have a question regarding that.
Does Coq allow writing exactly <strong>all</strong> terminating functions? In other words, what are the completeness and soundness properties of Coq's procedure for checking well-foundness of fixpoint definitions... | Coq cannot always know whether a program will terminate, because that would be a solution to the halting problem.
Coq is able to notice that a certain class of programs will terminate. The main heuristic it uses is that if one of the arguments to the function must get smaller on each recursive call, the program must t... | There is no effective enumeration of all decidable languages. For suppose that $P_i$ was an effective sequence of programs (meaning that the mapping $i \mapsto P_i$ is computable) such that each $P_i$ always halts, and every decidable language is $L(P_i)$ for some $i$. Consider the program $P$ which, on input $i$, runs... | https://cs.stackexchange.com |
193,470 | [
"https://security.stackexchange.com/questions/193470",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/184205/"
] | Let's assume there is a website with an API that supports the following REST call in which authenticated user Alice can send registered user Bob a message to his cell phone which he registered on our site (hypothetically speaking, for the sake of this example):
<pre><code>curl --header "Authorization: JWT $someTokenF... | So the vulnerability is that returning an error code allows enumeration of the registered phone numbers. If allowing the registered numbers to be disclosed is bad, then this is a security issue.
<blockquote>
A more general 401 - not authorized error
</blockquote>
No, you've just changed the text - you haven't chang... | Your frontend could tell the user only status messages referring to the frontend. Request received? If so, tell. If the validation fails, inform them. Nothing else. If the backend cannot deliver the message for any reason, the frontend should not be informed.
Returning only something like <code>{"status": "success", "... | https://security.stackexchange.com |
176,050 | [
"https://physics.stackexchange.com/questions/176050",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/45557/"
] | Can batteries be used instead of capacitors? I am trying to figure out a basic, superficial and any obvious difference between the two.
| <blockquote>
<strong>Why do we use capacitors when batteries can very well store charges?</strong>
</blockquote>
There's an important point that, so far, I don't see in other answers.
<strong>Neither of these devices store charge!</strong>
A "discharged" battery or capacitor contain the same <em>net quantity</em> ... | While a capacitor can be used to store charge, usually we are interested in other properties. Most notably, it has a voltage proportional to the amount of charge stored ($Q=CV$) which means it acts as an <em>integrator</em> of current. There are many circuit applications where you use this property - which incidentally... | https://physics.stackexchange.com |
19,893 | [
"https://astronomy.stackexchange.com/questions/19893",
"https://astronomy.stackexchange.com",
"https://astronomy.stackexchange.com/users/15637/"
] | If you were flying along in your spacecraft somewhere in our solar system and then a large, stable wormhole suddenly opened and you flew into it and were whisked away to some distant location in the galaxy, would you be able to figure out where you were?
Obviously, a large stable wormhole is exceedingly unlikely, and... | Assuming you had access to the relevant astronomical catalogues and data, then yes it would.
Looking at constellations would of course be hopeless and most stellar catalogues only contain star positions for a relatively small volume in our Galaxy. However, there are classes of object inside and outside the Galaxy that... | If a spaceship travels through a space warp into an unknown region of space or gets lost some other way the navigators should look for familiar objects. Fortunately space is transparent. Very transparent. Very, very, very transparent. The thinnest and most transparent vacuum made on Earth is like a sheet of lead compar... | https://astronomy.stackexchange.com |
557,887 | [
"https://physics.stackexchange.com/questions/557887",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/262268/"
] | If we take a satellite rotating around the earth, then the earth applies centripetal force to the satellite, but what if the satellite suddenly looses kinetic energy, maybe because of collision, the point is that now it goes slower. The gravitational force is the same, but the velocity is less, so does that mean that t... | Your metric (2) is just a coordinate reparametrization of Minkowski space. Writing it with a different time variable <span class="math-container">$ds^2 = -c(T)^2 dT^2 + d{\bf x}^2$</span> to avoid confusion, they're equivalent when <span class="math-container">$t = \int_{T_0}^T c(T) dT/c_0$</span> (for some arbitrary c... | It makes perfect sense when you think about it this way: your equation implies that the maximum permitted speed of causality, <span class="math-container">$c$</span>, is slowing down with time. That means that <em>everything</em> is confined to move "slower and slower" - shorter distances, longer times.
Every... | https://physics.stackexchange.com |
64,976 | [
"https://cs.stackexchange.com/questions/64976",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/60246/"
] | Suppose you have three states in an DFA $q_{1}$, $q_{2}$ and $q_{3}$, all non-accepting. Suppose $a$ and $b$ are two symbols, such that:
$\delta(q_{1},a)=q_{2}\\ \delta(q_{2},a)=q_{1}$
and
$\delta(q_{1},b)=q_{3}\\ \delta(q_{2},b)=q_{3}$
Are the states $q_{1}$ and $q_{2}$ considered equivalent?
| Not necessarily. If there is another symbol in the alphabet, $c$, such that $q_1$ transitions to $q_4$ on $c$ but $q_2$ transitions to $q_5$ then they are clearly not equivalent.
| <blockquote>
"We say that states $p$ and $q$ are <em>equivalent</em> if:
<ul>
<li>For all input strings $w$, $\hat{\delta}(p,w)$ is an accepting state if and only if $\hat{\delta}(q,w)$ is an accepting state."</li>
</ul>
(John E. Hopcroft, Rajeev Motwani, and Jeffrey D. Ullman. 2001. Introduction to aut... | https://cs.stackexchange.com |
86,361 | [
"https://physics.stackexchange.com/questions/86361",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/9942/"
] | I am wondering whether an object which has been wet with hot water always dries up more easily and more quickly than one wet with cold water. How much do the shape, roughness, material, structure of the object matter?
Practically: if for example I needed to wash a can and a sweater, would in both cases hot water allo... | <blockquote>
I am wondering whether an object which has been wet with hot water always dries up more easily and more quickly than one wet with cold water.
</blockquote>
Yes, it will. The more important question is, "How much better will it dry?".
Some simple intuition may be garnered from dishwashers. When a thick ... | Hotter fluid molecules have more kinetic energy and can more easily transition from fluid state to vapor state (aka evaporate). With all other things equal, the hotter fluid will evaporate from the solid quicker (allowing the solid to 'dry') than the cooler fluid.
Cheers,
Paul Safier
| https://physics.stackexchange.com |
1,258,041 | [
"https://math.stackexchange.com/questions/1258041",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/235541/"
] | I'm doing some discrete mathematics exercises, but I can't seem to wrap my head around this relation:
$$R(x, y) \text{ if } \exists z(\text{LiesInPart}\circ\text{LiesInCountry}(x,z) \wedge \text{LiesInPart}\circ\text{LiesInCountry}(y,z))$$
These are the sets and relations used in the relation:
$\begin{align*}
\text{... | To answer my own question after I read through that section again last weekend.
I believe Hoffman's book has a typo that when defining positive matrix:
<blockquote>
If $A$ is an $n \times n$ matrix with complex entries and if $A$
satisfies (9.9) we shall call $A$ a <strong>positive matrix</strong>.
</blockquote>
... | In my opinion there is a misprint, either in the book or in your "cut-and-paste". Indeed, the condition
$$X^TAX>0\quad \forall X\in\mathbb R^n$$
gives information only on the symmetric part of $A$. In particular, you can add any asymmetric matrix you want and you preserve that property. For instance
$$A=\begin{pm... | https://math.stackexchange.com |
541,000 | [
"https://stats.stackexchange.com/questions/541000",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/332893/"
] | I am about to commence data analysis, but am slightly unsure about which test to use.
My experiment concerns persuasion where participants view figures on screen making speeches. Thus must choose which figure won the argument. My design is 2 x 2 (left vs right) x (first vs second). All participants view the same argume... | <span class="math-container">$P(E|H)$</span>is what you mentioned the distribution of <span class="math-container">$E$</span> given <span class="math-container">$H$</span>.
The likelihood is the same distribution <span class="math-container">$P(E|H)$</span> but viewed as function of the variable <span class="math-conta... | The simple reason that they are the same is that <span class="math-container">$L(H\mid E)$</span> is <em>defined</em> to be <span class="math-container">$P(E \mid H)$</span>
| https://stats.stackexchange.com |
13,089 | [
"https://engineering.stackexchange.com/questions/13089",
"https://engineering.stackexchange.com",
"https://engineering.stackexchange.com/users/9470/"
] | Being a mechanical engineering novice (I stick closer to solid state electronics), when I look inside of any toy-grade RC car, I see a series of different-sized gears between the motor shaft and the drive axle.
<ul>
<li>Why does a single-speed RC car require a gearbox? </li>
<li>Instead, why can't a gear on the motor... | Your first guess covers it fairly well.
Small DC motors work best at high speeds, the gearbox is needed to reduce the higher motor speed down to something more reasonable for the wheels.
Why use a series of gears rather than a single one? Because there are practical limitations on gear ratios, especially when you nee... | While it is certainly possible to connect input and output shafts with gears there are a number of reasons why having a separate gearbox might be desirable.
<ul>
<li>For more complex compound gear systems the gearbox casing provides mounting points for shaft bearings for intermediate gears. For larger gear rations co... | https://engineering.stackexchange.com |
2,051,753 | [
"https://math.stackexchange.com/questions/2051753",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/238447/"
] | Is the function $f(t)=\int_{0}^{\infty}\frac{cos \ tx}{x^{2}+1}dx$ not differentiable at $t=0$, but differentiable everywhere else?
This may have some explanation using Fourier Transforms, but I wanted to see a more "basic" explanation for it.
Thanks a lot.
| For the right-derivative at zero you may write for $t>0$ (and substitute $u=xt$):
$$ \frac{f(0)-f(t)}{t} =
\int_0^\infty \frac{1 - \cos(tx)}{x^2+1} \frac{dx}{t} =
\int_0^\infty \frac{2\sin^2(u/2)}{u^2+t^2} du \rightarrow -f'_+(0)=\int_0^\infty \frac{2\sin^2(u/2)}{u^2} du >0 $$
as $t$ goes to zero. On the other ... | With some contour integration, this is a fairly straightforward integration. We can find that:
$$f(t) = \frac{\pi e^{-|t|}}{2}$$
Then, taking the derivative of that:
$$f'(t) = \frac{-\pi t e^{-|t|}}{2|t|}$$
By taking the limits of the derivative, we find the derivative doesn't exist at $t = 0$.
| https://math.stackexchange.com |
1,894,097 | [
"https://math.stackexchange.com/questions/1894097",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | Does there exist any injective group homomorphism from $(\mathbb Q^+,.)$ ( the multiplicative group of positive rational numbers ) to $(\mathbb R,+)$ ? I know that $(\mathbb Q^+,.) \cong (\mathbb Z[x] , +)$ but I am still getting no idea ... I have tried like checking divisibility , essential subgroups , elements of fi... | You may want to try
$$ x\mapsto \ln x$$
| The subgroup $\mathbb{Z}[\pi]$ of $(\mathbb{R},+)$ (with respect to addition) is a free abelian group over a countable basis. So it is isomorphic to $(\mathbb{Q}^+,\cdot)$. Any transcendental number instead of $\pi$ is good as well.
Alternatively, $(\mathbb{R},+)$ is isomorphic to $\mathbb{Q}^{(\mathfrak{c})}$ (direct... | https://math.stackexchange.com |
1,540,038 | [
"https://math.stackexchange.com/questions/1540038",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/291314/"
] | <blockquote>
In how many ways can $5$ marbles be chosen out of $100$ identical marbles?
</blockquote>
Why does my book say there is only one way to make this selection?
| As you say in comments that the answer to your problem is $1$. I think it depends on the conception we have of the wording. Two possibilities:
<ol>
<li>"Identical" is there to indicate the order in which you take the marbles is not important. In this case, it is like you asked to take $5$ people out of a group of $100... | Well, if each marble can be chosen once, we can choose 5 out of 100. So we have $$\frac{n*(n-1)*(n-2)*(n-3)*(n-4)}{5!}$$ choices where $n=100$. This can also be described as $$100\choose{5}$$ which is equivalent to 75287520.
| https://math.stackexchange.com |
132,030 | [
"https://physics.stackexchange.com/questions/132030",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/56829/"
] | I was reading some of the other questions, and I found this one about a glass rod and how it gains a net charge when rubbed with a silk scarf. I learned from working in a shop one summer that most solids are insulators, because their electrons are tightly bound, so it is hard to knock them off. Why would such a simple ... | Conductivity is not just about how tightly bound electrons are, but equally about how easy it is for them to travel.
Example: a bunch of islands in a shark-infested sea. You cannot swim from one island to the next although it is close. At low tide you can walk across no problem. The first example is an insulator, the ... | An informal definition of insulator is that electrons are bounded enough so that they cannot flow all over the material, they remain next to the atom where they belong. In a conductor electrons can move freely and flow to different parts of the solid, detached from the original atoms. Why that happens depends on many f... | https://physics.stackexchange.com |
4,516,054 | [
"https://math.stackexchange.com/questions/4516054",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/960082/"
] | <blockquote>
Let <span class="math-container">$G$</span> be a group, <span class="math-container">$|G|=12$</span>, <span class="math-container">$H\leq G, |H|=6, \exists x\in G,x\notin H$</span> such that <span class="math-container">$o(x)=2$</span>. Prove <span class="math-container">$|Z(G)|=12$</span> or <span class="... | Remember that <span class="math-container">$H$</span> is either isomorphic to <span class="math-container">$\Bbb Z_6$</span> or to <span class="math-container">$S_3$</span>.
Just observe that if <span class="math-container">$H$</span> is cyclic then <span class="math-container">$G\cong H\rtimes \langle x\rangle$</span>... | We have that <span class="math-container">$|G|=12$</span> and <span class="math-container">$H\le G$</span> with <span class="math-container">$|H|=6$</span> imply <span class="math-container">$H\triangleleft G$</span>.
Since <span class="math-container">$H$</span> contains an element of order <span class="math-container... | https://math.stackexchange.com |
65,852 | [
"https://electronics.stackexchange.com/questions/65852",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/11970/"
] | Alright, I will try to formulate this as a non-shopping question... let's hope I can make it so.
I do have a board (which I can still change) which basically has 1 hole in each corner. This board, features some (user-accessible) connectors on one side (USB, ...) and now I'm looking for a way to fix this board to some ... | If the requirement is "as few additional components as possible", then the answer is probably some kind of <em>edgecard connector</em>. This requires only one additional component, probably a connector mounted on the main card. Connection to the daughter card is made through a pattern etched in copper on the daughter c... | You might use a short ribbon cable for the electronic connection, allowing the board to rotate 90 degrees while staying connected. Then the mechanical connection could be made via any other method, including standoffs or spacers or some other structure.
| https://electronics.stackexchange.com |
348,232 | [
"https://physics.stackexchange.com/questions/348232",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/263243/"
] | I have been told to think of vectors as existing independent of a coordinate system. This means that the magnitude of a vector should be independent of any coordinate system we choose. Galilean transformations of the form
$$ x' = x - vt $$
do not preserve the magnitude of the velocity vectors however. How is it poss... | <blockquote>
I have been told to think of vectors as existing independent of a coordinate system.
</blockquote>
Yes. Because vectors represent physical facts. That thing is halfway between those two things. This other object is moving directly toward Toledo. And so on.
But not things like 'it's x-coordinate is +7 m... | A coordinate system is not the same as a frame of reference.
A frame of reference is basically a solid considered immobile, so a point and three axes.
A coordinate system relies on a frame, and is used to determine the position of a point.
As Steeve explained, once a frame is chosen,
<blockquote>
Choosing a diffe... | https://physics.stackexchange.com |
91,332 | [
"https://mathoverflow.net/questions/91332",
"https://mathoverflow.net",
"https://mathoverflow.net/users/22170/"
] | It is common to construct principal series by induction from Borel subgroup. Say $H_1$ and $H_2$ are dual representations. Both are induced representation from Borel subgroups.
Is the integration $(f_1,f_2)=\int_K f_1(k)f_2(k)dk$ the only way to construct the dual between $H_1$ and $H_2$?
| The representations are isomorphic, if they are dual and irreducible. Given unitary representation on a Hilbert space, you are asking how many scalar products are there after identifying them.
<blockquote>
Up to scaling, there is only at most one inner product, which makes an irreducible representation unitary.
</bl... | Perhaps some unasked or restated questions surrounding the literal question are as significant as the thing itself.
First, though perhaps some of this is merely English syntax rather than mathematical, "principal series" seems to refer to induction from a minimal parabolic _by_definition_, not "can". Induction of dat... | https://mathoverflow.net |
223,774 | [
"https://electronics.stackexchange.com/questions/223774",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/103634/"
] | I am trying to understand UART synchronization.
In a UART, the default state is high, and it starts the reception process when it receives a start bit (high-to-low transition)
In some scenarios any spike, noise or interrupt may
change the state from high to low, which is enough for the UART to detect it as a start bit... | UART Receiver samples the Rx line 16 times(most uC's) before confirming the value of each bit. For example, if the baud is 9600,each bit time will be 104uS. Now to correctly detect the value of each bit(i.e whether its high or low), the UART receiver samples the bus every 104uS/16 seconds. The majority voting of these ... | The UART will not start receiving a character simply because the line went low. It needs to be low for a certain period of time (30 to 50 percent of one bit time, and on some devices this may even be selectable). A glitch won't be long enough to trigger the reception of a character.
If noise does trigger this oper... | https://electronics.stackexchange.com |
252,852 | [
"https://electronics.stackexchange.com/questions/252852",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/69481/"
] | I have a question regarding SPI communications. I feel like I have a good understanding fundamentally of how SPI works. However, I'm often confused when implementing the slave select line of SPI.
Is the slave select line on a microcontroller, in general, enhanced via hardware? That is, is there anything different betw... | No difference, as far as drive strength or transition speed are concerned.
Some uC's I've worked with don't even have a dedicated SS pin. You can implement it in code using whichever pin is convenient.
However, some microcontrollers will toggle the SS line for you (without you having to toggle the pin in code). Thi... | It depends on the microcontroller. In most SPI peripherals that I have seen the slave-select management is doing the exact same thing as a GPIO. I tend to use the GPIO interface in these cases as it allows for more flexible routing.
But I've also seen SPI controllers that do more advanced stuff like managing the SS li... | https://electronics.stackexchange.com |
351,255 | [
"https://physics.stackexchange.com/questions/351255",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/165666/"
] | I can understand that if its a string, then since it is tired there should be a node. Also, for sound waves, since the particle near the wall cannot oscillate, there should be a node. But, in electromagnetic waves, it just has a varying electric and magnetic field. Why it should form a node at the walls ( like in radia... | The electric field parallel to a conductor must be zero. That's like "holding the string" but for electric fields.
| Because at wall electric field and magnetic field becomes will pass through inter space between molecules so it make node with low amplitude
| https://physics.stackexchange.com |
132,348 | [
"https://chemistry.stackexchange.com/questions/132348",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/92430/"
] | <strong>Exothermic Reactions</strong> are those chemical reactions in which heat is released.
How does this happen?
<br>
What I mean is where does the heat energy come from? Which form of energy is converted to heat energy? What makes some reactions release heat? What affects the amount of heat energy released?
Than... | <blockquote>
What happens in an exothermic reaction at the atomic level?
</blockquote>
In a chemical reaction, bonds are broken and bonds are formed. For example, when elemental oxygen and hydrogen form water, we are breaking bonds in the elements and making heteroatomic bonds connecting hydrogen and oxygen atoms:
<... | An exothermic reaction is one which results in heat or light being released by the system and absorbed into the surroundings, usually referred to as a change in enthalpy. Enthalpy <span class="math-container">$H$</span> is the energy contained within the bonds of a molecule. This amount, the bond energy, is roughly th... | https://chemistry.stackexchange.com |
4,383 | [
"https://mechanics.stackexchange.com/questions/4383",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/2240/"
] | I'm wondering if it is better for your suspension to drive across a speed bump at a right angle (so that the two front tires and the two rear tires hit the bump at the same time, respectively), or at a skewed angle so that only one tire at a time hits the bump?
I've seen folks do both things and I'm wondering if ther... | Driving at a right angle will make the front and then the rear move further up and down than travelling over one wheel at a time, but that movement will be in one plane.
Driving diagonally puts more stress on the chassis as it tries to twist first one corner then then next. The car will not move up and down so much, b... | There are several reasons why you should be approaching the bump at an angle.
<h2>Mechanical stress on the chassis</h2>
Let's take two approaches and study how they affect the chassis:
<ol>
<li>Let's drive at the right angle (frontal). The chassis will always be stressed in one direction: front to back. The chassis ... | https://mechanics.stackexchange.com |
1,462,577 | [
"https://math.stackexchange.com/questions/1462577",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/169790/"
] | <blockquote>
Is the series: <span class="math-container">$$\frac{\pi}{p_{1}!}+\frac{\pi}{p_{2}!}+...+\frac{\pi}{p_{n}!}$$</span> convergent or divergent, where <span class="math-container">$p_n$</span> is the <span class="math-container">$n$</span>th odd prime?
And also why it is (the partial sums) transcendental?
</bl... | It is divergent. When $R>1$, $a_n\not\to0$. This is also true for $R=\infty$.
| If $\lim_{n\to\infty}\frac{a_{n+1}}{a_n}=\infty$, then you can find $\bar{n}$ such that, for all $n\ge\bar{n}$, $\frac{a_{n+1}}{a_n}\ge2$. Therefore $a_{\bar{n}+k}\ge2^ka_{\bar{n}}$ and the series diverges by comparison with a clearly divergent series.
| https://math.stackexchange.com |
131,802 | [
"https://electronics.stackexchange.com/questions/131802",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/22959/"
] | I have been working to redesign a faulty circuit board.
One of the problems I have identified is the power supply on the board.
The input voltage is nominally 13.8V DC from an AC switchmode powersupply but can drop sharply by about 1.5V when a number of solenoids that are connected to the same voltage activate and dr... | There are several problems here.
Turning on the solenoids causes a significant short term drop on the supply voltage. The actual voltage level doesn't seem to be a problem, but the rapid dip is. The obvious fix is to make less of a dip with slower edges. Put a bulk capacitor accross the power input right where it e... | Instead of replacing the onboard 7805, you could try using an intermediate (linear or switching) regulator to drop the supply to 8 - 9 V or so - still high enough to give the 7805 sufficient headroom but only requiring it to dissipate half the power. That should also reduce the dip you see on the 5 V rail by an order o... | https://electronics.stackexchange.com |
21,842 | [
"https://chemistry.stackexchange.com/questions/21842",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/7448/"
] | I was unsure to the largest extent about whether I should post this question in chemistry Q & A or bio Q & A until I just read that sunscreens "absorb" UV rays, not allowing the most of those rays from penetrating into the skin. So when this is about the combination, it must be chemistry.<br/> Anyhow, is there ... | Apart from titanium dioxide, the active species in sunscreens are organic compounds from different substance classes, such as cinnamates, benzophenones, benzimidazoles, and triazines.
The do absorb in the 280-315 (UVB) and/or 315-380 nm (UVA) range. This "uptake" of energy results in an electronic excitation, the comp... | Just to add, Zinc (like Titanium) is another UV filter that reflects UV light rather than absorbing it. I believe ever other UV filter, at least those approved in the U.S., absorb the UV rays.
| https://chemistry.stackexchange.com |
3,761,222 | [
"https://math.stackexchange.com/questions/3761222",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/809674/"
] | I am trying to understand the use of quantifiers within the definition of a subset. The definition of a subset is:
<span class="math-container">$$ A \subseteq B \equiv \forall x(x \in A \rightarrow x \in B) $$</span>
I am confused about, when you negate the statement of a subset, to an existential quantifier:
<span cla... | Answer: My understanding was incorrect. When you negate a statement that has a quantifier, you look to say the opposite of the original meaning. Quite surprise how I forgot about this. Please refer to the comments below.
| Well, the general representation of an all-quantified statement is <span class="math-container">$\forall x (P(x)\Rightarrow Q(x))$</span>, i.e. <span class="math-container">$\forall$</span> combined with <span class="math-container">$\Rightarrow$</span>, while the general representation of an existential quantified sta... | https://math.stackexchange.com |
300,008 | [
"https://electronics.stackexchange.com/questions/300008",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/89489/"
] | Is there a practical reason that the roles of the primary and secondary of a simple single-phase transformer cannot be swapped?
Say you have a transformer (from the old vacuum tube days) that has rated for primary 120 VAC 1 A and secondary 12.6 VAC 10 A (so there is about 0.120 kVA for this transformer).
Is there any... | A simple answer is not always right.
The first problem you have is your quoted ratings. 120 V @ 1 A - 120 VA. If the load is entirely resistive, ie, there is no reactive load, then the maximum you can get out of the secondary will be about 12.6 V @ 9 A, if the efficiency is 95% - not 10 A.
Brian Drummond's answer is c... | You can do exactly that.
Respect the maximum voltage on each winding. Transformers cannot be over-volted and still behave themselves.
Due to the various small non-idealities, winding resistance and leakage inductance being the major ones, you will notice that the voltage ratio one way when under load is slightly less... | https://electronics.stackexchange.com |
3,985,103 | [
"https://math.stackexchange.com/questions/3985103",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/841046/"
] | Setting our integral to <span class="math-container">$I$</span> and squaring it:
<span class="math-container">$$
I = \int_0^\infty e^{-(ax^2+bx+c)} dx
$$</span>
<span class="math-container">$$
I^2 = e^{-2c}\iint_{\mathbb{R}^2} e^{-(a(x^2+y^2) + b(x+y))}dxdy
$$</span>
I want to convert to polar co-ordinates but I get an... | I'm confused as to whether your bounds are <span class="math-container">$[0,\infty)^2$</span> or <span class="math-container">$(-\infty,\infty)^2$</span> so I will assume it is the former. We shall say:
<span class="math-container">$$I=\int_{0}^\infty \exp(-(ax^2+bx+c))dx$$</span>
now notice that:
<span class="math-con... | <em>Hint.</em> First let <span class="math-container">$x=y-b/2a$</span> in the original integral <span class="math-container">$I$</span> before squaring.
| https://math.stackexchange.com |
77,125 | [
"https://dba.stackexchange.com/questions/77125",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/47800/"
] | I'm creating a codex that will store example of functions and examples on how to use functions. Can I store this information in a database? Also, is there a proper way of displaying code on a page?
| Below is my final working solution. It turns out that moving this...
<pre><code>date_modified = (CASE
WHEN name <> values(name)
OR description <> values(description)
OR status <> values(status)
OR type <> values(type)
... | I would suggest pulling out the in-line sql. Then, create a procedure / trigger that you can apply the proper <code>IF</code> blocks to catch the absolute values you are looking to UPDATE. For instance:
<pre><code>IF (date_modified = _this_ ) THEN
SET _new_var_for_date_ := _this_desired_timestamp_;
ELSEIF (date_modi... | https://dba.stackexchange.com |
1,630,686 | [
"https://math.stackexchange.com/questions/1630686",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/304329/"
] | I'm trying to prove the non-existance of three positive integers $x,y,z$ with $x\geq z$ such that\begin{align}
(x-z)^2+y^2 &\text{ is a perfect square,}\\
x^2+y^2 &\text{ is a perfect square,}\\
(x+z)^2+y^2 &\text{ is a perfect square.}
\end{align}
I failed tying to find such triple numerically. I tried to ... | $$(1904-1040)^2+990^2=1314^2\\
1904^2+990^2=2146^2\\
(1904+1040)^2+990^2=3106^2$$
Found using a computer search.
| It is impossible that non-existance because there are infinitely many counterexamples. In fact, we must have by the Pythagorean triples
$$x-z=t^2-s^2;\space y=2ts\qquad (*)$$ $$x=t_1^2-s_1^2; \space y=2t_1s_1$$ $$x+z=t_2^2-s_2^2;\space \space y=2t_2s_2\qquad (**)$$ so we have from $(*)$ and $(**)$ $$x=\frac{t^2-s^2+t_... | https://math.stackexchange.com |
425,872 | [
"https://physics.stackexchange.com/questions/425872",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/205373/"
] | I'm developing some python code that controls an end effector moving in a two-dimensional plane (XY). It moves through a list of points sequentially and I'd like to estimate the time it will take as precisely as possible.
My constant variables are:
<pre><code>Max_Speed: 30 mm/s
Max_Acceleration: 60 mm/s^2
Max_Jerk: 2... | Based on information in the comments, we are going to assume that the acceleration increases linearly with time, where the slope of this line is given by the maximum jerk $j_{max}$. Therefore:
$$a(t)=j_{max}t$$
Since $a=\dot v$, and $v=\dot x$, we can solve for $v(t)$ and $x(t)$ assuming the end-effector is moving in ... | Assuming you need to stop at $P_2$ and that de-acceleration and de-jerk are of the same magnitude as acceleration and jerk than you need to find time to midway between $P_1$ and $P_2$ and multiply by two.
By integrating jerk to obtain acceleration, integrating acceleration to obtain velocity and integrating velocity ... | https://physics.stackexchange.com |
51,142 | [
"https://quant.stackexchange.com/questions/51142",
"https://quant.stackexchange.com",
"https://quant.stackexchange.com/users/44378/"
] | How would I calculate the abitrage profit from a combination of buying the $10 European call option and short selling X number of shares at t=0 and the coming out with a profit at expiry no matter what happens.
portfolio at time 0
Any guidance would be greatly appreciated. Thank you
| Implied volatility is obtained by taking the observed market price of an option and solving for the necessary volatility in the Black Scholes formula to give that price. The finite difference method is just a numerical method to solve PDEs like the Black Scholes equation on a computer.
| The BS implied vol is the vol parameter in the BS formula that makes it hit the observed price of an European option.
To price an American option you need an assumption on the underlying dynamics, say geometric Brownian motion with constant diffusion coefficient (which happens to be also named BS dynamics). Then you ... | https://quant.stackexchange.com |
277,722 | [
"https://mathoverflow.net/questions/277722",
"https://mathoverflow.net",
"https://mathoverflow.net/users/2811/"
] | A Grothendieck topos $\mathcal{E}$ is equivalent to the category of sheaves on some site $Q$. We say a sheaf $X\colon Q^{\text{op}}\to\mathsf{Set}$ is <em>constant</em> if it is the sheafification of a constant presheaf, i.e. one that factors through the terminal map $Q^{\text{op}}\to \{*\}$.
But what if we forget the... | For the first question: no, the notion of "constant object" doesn't depend on the site. The reason is in Anton's comment: every Grothendieck topos comes with a unique geometric morphism $p : \mathcal{E} \leftrightarrows \mathrm{Set}$, and the constant objects are those in the essential image of $p^* : \mathrm{Set} \to... | The answer to your second question is also no: only local properties can be characterised in the internal language of a topos, and it is possible to have locally constant (pre)sheaves that are not constant.
A simple, and well-known, example runs as follows: let $\mathbb C$ be the poset with four elements $n$, $e$, $s... | https://mathoverflow.net |
3,500 | [
"https://physics.stackexchange.com/questions/3500",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | It is an usual practice that any quantum field theory starts with a suitable Lagrangian density. It has been proved enormously successful. I understand, it automatically ensures valuable symmetries of physics to be preserved. But nevertheless the question about the generality of this approach keeps coming to my mind. M... | That's an excellent question, which has a few aspects:
<ol>
<li>Can you quantize any given Lagrangian? The answer is no. There are classical Lagrangians which do not correspond to a valid field theory, for example those with anomalies.</li>
<li>Do you have field theories with no Lagrangians? Yes, there are some field ... | As far as you're wondering about 'quantum' field theories, all bets are off - just take a look at the arXiv or on Google. However, most of those theories seem (to me) less well studied than regular QFT. They do have a lot of structure in common with normal field theory (you can still have a Hamiltonian, for example).
... | https://physics.stackexchange.com |
101,831 | [
"https://softwareengineering.stackexchange.com/questions/101831",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/30026/"
] | I have been familiarizing myself with LISP for self improvement purposes. One of the things I have noticed is that LISP is much more within the paradigm of Mathematics than say C. The syntax and design structure seems to echo directly the actual mathematical model of an algorithm. It doesn't make sense to me why even g... | OK. So, the boring answer is that, in the end, most schools teach what the professors are comfortable with, and most professors did not grow up hacking Lisp; they spent their early years in the field with Algol-based languages. Because of this, years later, when they are building curriculum, you wind up with schools t... | This really depends on the university. Scheme (a dialect of lisp) has been the language for the introductory course in computer science at MIT for ages, although it has been replaced by python recently. I got my BS in CS at an engineering school, where I was exposed to C, Scheme, Prolog, and C++ during my first year.... | https://softwareengineering.stackexchange.com |
2,952 | [
"https://physics.stackexchange.com/questions/2952",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/1247/"
] | For example: the role it might play in a theory of quantum gravity (ie causing space-time curvature)?
I realize that inertial mass can result from binding energy alone. Has the equivalence principle been tested on elementary particles (like the electron) whose mass would be entirely due to the Higgs coupling?
It seem... | Dear user,
the equivalence between the inertial mass and gravitational mass tells us the following thing about the Higgs mechanism:
<em>Any inertial mass produced or modified by the Higgs mechanism also has to produce or modify a source of gravity of the same magnitude. And vice versa, a gravitational mass produced by... | The equivalence between inertial and gravitational masses (the weak equivalence principle) strictly holds only in metric theories of gravitation, such as Einstein's General Relativity. It may be violated e.g. in scalar-tensor theories of gravity (generalized Brans-Dicke theories) provided the scalar component non-unive... | https://physics.stackexchange.com |
1,992,303 | [
"https://math.stackexchange.com/questions/1992303",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/380550/"
] | I know how to find all the elements up till $S_3$ but for $S_4$ I am not sure how to do that systematically.
| You are correct that for $x^2\leq y^2$ to be true, we must have $|x|\leq|y|$, since $x^2=|x|^2$ and the square function is strictly increasing for positive inputs. As others have pointed out, this is the case for the expression you gave, since
$$
2|ab|\leq (a^2+b^2)
$$
IS in fact true. As others have pointed out, the a... | One has
$$
(a \pm b)^2 = a^2 \pm 2ab + b^2 \geq 0 \quad \Longrightarrow \quad a^2 + b^2 \geq \mp 2ab
$$
and so $2|ab| \leq a^2 + b^2$.
| https://math.stackexchange.com |
3,019,363 | [
"https://math.stackexchange.com/questions/3019363",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/233132/"
] | So I have this question here which says:
<span class="math-container">$a)$</span> Find the standard matrix of the linear operator <span class="math-container">$T:R^2\rightarrow R^2$</span> given by the orthogonal projection onto the vector <span class="math-container">$(1,-2)$</span>.
<span class="math-container">$b)... | a) The projection of <span class="math-container">$v$</span> on the vector <span class="math-container">$w$</span> is <span class="math-container">$\displaystyle\frac{v.w}{\lVert w\rVert^2}w$</span>. So, the projection of <span class="math-container">$(1,0)$</span> is <span class="math-container">$\displaystyle\left(\f... | The formula fir the orthogonal projection of <span class="math-container">$e_1$</span> along <span class="math-container">$(1,-2) $</span> as you have written is incorrect (a length should be squared, check).
In part two, since <span class="math-container">$T$</span> is linear,
<span class="math-container">$T (0,1)=T... | https://math.stackexchange.com |
7,513 | [
"https://stats.stackexchange.com/questions/7513",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/3320/"
] | Could anyone offer some pointers on how to use the <code>weights</code> argument in R's <code>lm</code> function? Say, for instance you were trying to fit a model on traffic data, and you had several hundred rows, each of which represented a city (with a different population). If you wanted the model to adjust the re... | I think R help page of <code>lm</code> answers your question pretty well. The only requirement for weights is that the vector supplied must be the same length as the data. You can even supply only the name of the variable in the data set, R will take care of the rest, NA management, etc. You can also use formulas in th... | What you suggest should work. See if this makes sense:
<pre><code>lm(c(8000, 50000, 116000) ~ c(6, 7, 8))
lm(c(8000, 50000, 116000) ~ c(6, 7, 8), weight = c(123, 123, 246))
lm(c(8000, 50000, 116000, 116000) ~ c(6, 7, 8, 8))
</code></pre>
The second line produces the same intercept and slope as the third line (distin... | https://stats.stackexchange.com |
224,981 | [
"https://security.stackexchange.com/questions/224981",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/163099/"
] | I am building a web app that allows login with an email and password. I understand that I need to use a timing safe function to compare the passwords to prevent timing attacks. However I realized that the emails might be vulnerable to the same attack. I am unsure how to prevent timing attacks on the emails.
The email... | This is not really a technical problem but a usability problem. If you have a password policy which requires unique and unguessable passwords and maybe regular changes then users need to find a way to somehow remember the current password. A typical way is to write this down and put under the keyboard or something like... | Disabling and re-enabling the scanner can be needed in many more cases. For instance, if you use Office 365 or some other applications that use domain login, such applications will periodically ask user for password even when user is already logged in in Windows. If you disable scanner each time, it may be break the us... | https://security.stackexchange.com |
691,680 | [
"https://math.stackexchange.com/questions/691680",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/122510/"
] | Given $a$, $b$, $d$ natural numbers.
Suppose $(a, b)$ are two legs of a Pythagorean triple.
Also suppose $(a, b+d)$ are two legs of another Pythagorean triple.
I'm looking for a way to show that given the above:
$(a+d,b)$ cannot be the legs of a Pythagorean triple. (I don't know if this is true... But I'd like to g... | Primitive pythagorean triples are generated by positive integers $p,q$, where $\gcd{(p,q)}=1$ and $p,q$ are of opposite parity. In particular, if $(a,b,c)$ form a primitive pythagorean triple, then we must have $a=2pq, b=p^2-q^2$ and $c=p^2+q^2$.
For example, if $p=1, q=2$, then $a=2\cdot 2\cdot 1=4, b=2^2-1^2=3$ and... | Problems like this can often be solve by scaling. Your two larger triangles have legs that sum to the same total. If we start with $3,4,5$ and $5,12,13$ we can multiply the first by $17$ and the second by $7$ giving $51,68,85$ and $35,84,91$ as two triples with common leg sum. Unfortunately, $35,68$ don't make two l... | https://math.stackexchange.com |
369,473 | [
"https://electronics.stackexchange.com/questions/369473",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/186302/"
] | Suppose there are two identical capacitors of capacitance C and one of them is charged to a potential V and gets a charge q. The energy stored in this capacitor is \$1/2cv^2\$ or \$q^2/2c\$ . Now this capacitor is connected with the uncharged capacitor. Now the net energy of this system will be \$q^2/4c\$ . How is the ... | To expand on Spehro's answer, let's assume a superconducting capacitor and wires. Then, when connection is made, charge will start flowing from the first cap to the second. When the voltage is equal, current will not, due to the inductance of the wires. Instead, the first cap will completely discharge, and the second w... | Mostly heat, typically in a real situation. Consider a non-zero resistance between the capacitors (and internal to them) and analyze what happens after the instant of connection. There will be a spark and some EM emission.
Even if the capacitors literally had zero resistance (superconducting) the energy would slop ar... | https://electronics.stackexchange.com |
404,705 | [
"https://mathoverflow.net/questions/404705",
"https://mathoverflow.net",
"https://mathoverflow.net/users/169583/"
] | How can we from <span class="math-container">$\sum_{n\leqslant x}\mu (n)=o(x)$</span> deduce <span class="math-container">$\sum_{n\leqslant x}(-1)^{\omega(n)}=o(x)$</span>, where <span class="math-container">$\omega(n)$</span> is the number of different primes dividing <span class="math-container">$n$</span> and
<sp... | Yes, that deduction is possible, but somewhat indirectly.
The estimate <span class="math-container">$\sum_{n \leq x} \mu(n) = o(x)$</span> is equivalent to the nonvanishing of <span class="math-container">$\zeta(s)$</span> on <span class="math-container">${\rm Re}(s) = 1$</span> since both conditions are known to be eq... | Let <span class="math-container">$f(n)$</span> be the multiplicative function with <span class="math-container">$f(p^k) = 1-k$</span>. Then
<span class="math-container">$$(-1)^{\omega(n)} = \sum_{d|n} f(d) \mu(n/d).$$</span>
(Proof: Both sides are multiplicative, so we just need to check prime powers, which is easy.)
T... | https://mathoverflow.net |
677,024 | [
"https://physics.stackexchange.com/questions/677024",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/251805/"
] | I'm experiencing extreme confusion. We are taught that centripetal acceleration exists when an object is in <em>uniform</em> circular motion, and that implies that the object has a <em>constant</em> speed. How then, could centripetal acceleration actually exist if the object is going through an arc?
Say, an arched ramp... | There is indeed centripetal acceleration for a body travelling in a circle at constant speed, but there is also centripetal acceleration for a body travelling in a circle at a smoothly varying speed, such as for a pendulum swinging through an arc of a circle.
The magnitude of the acceleration is constant in the former ... | You forget that there are other forces acting than just gravity.
Sure, if only gravity acted then on the way up you would slow down and on the way down you would speed up. Like a roller-coaster cart in a circular loop.
But what if you with your car engine apply a force forwards when going up and brake when going down? ... | https://physics.stackexchange.com |
62,617 | [
"https://cs.stackexchange.com/questions/62617",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/57123/"
] | The function:
<pre><code>double sum1(std::vector& v)
{
if (v.empty()) {
return 0.0;
}
for(size_t i = 0; i < v.size() - 1; ++i) {
std::sort(v.begin()+i, v.end());
v[i+1] += v[i];
}
return v.back();
}
</code></pre>
There are <code>n-1</code> sorts each one shorter ... | There are only three high level abstractions in the network stack.
<strong>Link Layer</strong>: Knows how to transfer data (physically*) across <strong>one</strong> hop. This layer with deals encoding and framing bits, controlling channel access, detecting and recovering from collisions in the transfer medium. Eg: Eth... | Network layer is required for routing purposes. The network layer at router takes the destination IP address of the packet and compares it with its routing table. <strong>Next hop of the packet</strong> is decided by seeing the routing table.<br>
<blockquote>
The table helps to decide the router whether the packet b... | https://cs.stackexchange.com |
89,646 | [
"https://mathoverflow.net/questions/89646",
"https://mathoverflow.net",
"https://mathoverflow.net/users/18970/"
] | Is it true that:
Let $R$ be a local ring and $\dim R= d$. If $b\subset a$ be two proper ideals of $R$ then for $ n\in {\Bbb N}$, $\varinjlim Ext^d_R(a^n/b^n,R)=0$
| I prove your question.
Since the short exact sequence
$$0 \to \mathfrak{a}^n/\mathfrak{b}^n \to R/\mathfrak{b}^n \to R/\mathfrak{a}^n \to 0$$
we have the following exact sequence
$$\cdots \to \mathrm{Ext}^d_R(R/\mathfrak{a}^n,R) \to \mathrm{Ext}^d_R(R/\mathfrak{b}^n,R) \to \mathrm{Ext}^d_R(\mathfrak{a}^n/\mathfrak{b}^n... | Assume $R$ is a noetherian ring (not necessarily local).
As mentioned in the comments, there is a short exact sequence:
$ 0 \to a^n/b^n \to R/b^n \to R/a^n \to 0$
Let $R \to I$ be an injective resolution. Then we get an exact sequence of complexes
$0 \to Hom_R(R/a^n,I) \to Hom_R(R/b^n,I) \to Hom_R(a^n/b^n,I) \to 0$... | https://mathoverflow.net |
63,390 | [
"https://chemistry.stackexchange.com/questions/63390",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/22448/"
] | <blockquote>
If four orbitals on one atom overlap with four orbitals on another atom, how many molecular orbitals will form?
</blockquote>
Why are there eight molecular orbitals and not four? Is not, in molecular orbital theory, each atom's orbital overlaps with another atom's orbital to form a bond?
| Any acid-base reaction is always an equilibrium:
$$\ce{HA^1 + (A^2)- <=> (A^1)- + HA2}\tag{1}$$
and for each pair of acids $\ce{HA^1}$ and $\ce{HA^2}$ you could calculate a $K_\mathrm{a}$ value to determine one acid’s strength with respect to the other. This $K_\mathrm{a}$ value is typically calculated accordin... | You pretty much answered your own question, but perhaps I can help clarify: (1) Two very (but not equally) strong acids will both be effectively 100% dissociated in water, so the concentration of hydronium ion will be equal to the starting concentration of acid for either acid. Hence, the measured pH will be the same f... | https://chemistry.stackexchange.com |
333,978 | [
"https://physics.stackexchange.com/questions/333978",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/110235/"
] | In Mo, Frank van den Bosch and Simon White's book, 'Galaxy Formation and evolution', for the Press Schrecter formalism, we introduce a filter/window function to smooth the density perturbation field. We assume the primordial perturbation is Gaussian, and thus is fully describable via its mean and variance:
$$\left\lan... | Intensity is the total amount of energy falling (or going through) per unit area per unit time i.e, $\frac{J}{m^2.s}$.
For monochromatic radiation,
$Total\space energy = Number\space of\space photons\space \times Energy\space of\space one\space \space photon$
and $E_{photon}=h\nu$
$Intensity = \frac{Number\space... | You are correct. Increasing frequency , in no matter increases the rate of ejection of photo electrons because one photon is responsible for one photo electron's ejection only , while increasing the intensity guarantee you an increase in electron ejection <strong>provided that</strong> the frequency of incident light i... | https://physics.stackexchange.com |
21,692 | [
"https://electronics.stackexchange.com/questions/21692",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/3552/"
] | Today I saw a Sony camera charger that claimed to provide 8.4V/1.7A output but had a cable going to the device being powered with 18AWG (0.824mm<sup>2</sup>) cross-section and insulation rated at 300V (yeap, three hundred volts). It was composed of two single-wire components each insulated separately and being about 3 ... | Because they had such cables in stock at the moment? Maybe they were able to buy them cheaply. Some manufacturer may have overproduced them and was looking to get rid of the stock or they were designed for another product that turned out to be a failure. They may have same power supply case for several products and jus... | Two things come immediately to mind - the first is that larger diameter cables give less voltage drop. I've got some really crummy USB cables, for instance, which have enough voltage drop that my USB powered HDs won't work with them. There may be some reason that they wanted to keep the voltage up, and therefore they w... | https://electronics.stackexchange.com |
9,873 | [
"https://cardano.stackexchange.com/questions/9873",
"https://cardano.stackexchange.com",
"https://cardano.stackexchange.com/users/8188/"
] | I’m trying to build a multi-sig transaction to mint an NFT. The transaction will take some input from users wallet via coin selection and add an additional NFT as output.
The problem begans, when the wallet have some ada but all of them are locked with some tokens. We all know that you can’t just send a token alone; th... | Ok, I think I have it...
<pre><code>oref_1 = TxOutRef
{ txOutRefId = TxId "9c087132a325f6483aca8398bab1a56eda1390e762984ba054c25cafd738486c"
, txOutRefIdx = 1
}
</code></pre>
This is not doing what you expect... you must do some conversions, if not its converting your hex string into something else.
You... | Did you try to have at least two utxos and use one for the mint and one different for collateral?
--tx-in $(cat oref1.tmp) <br />
--tx-in-collateral $(cat oref2.tmp)
| https://cardano.stackexchange.com |
215,117 | [
"https://security.stackexchange.com/questions/215117",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/214390/"
] | I've recently started using a password manager (1Password). I have a really good master password (using diceware) but I'm worried that if I forget it then I can't access 1P and all my passwords.
One solution is just to write it down on a piece of paper (they suggest I do this), but I don't have a safe and live in sha... | Since you don't have a safe, I think it's fair to assume that you are not a likely candidate for a seasoned cyber criminal to need/want to come to your home to try to steal your paper password. Paper is pretty darn secure compared to anything digital, not just because you need physical access to take it, but because th... | <blockquote>
How can I encrypt a password for storage without having to remember another password?
</blockquote>
You cannot. But you can reduce the risk associated with the loss of this "master password".
Here are my private and professional method (which I wouldn't sell as perfect).
As the person in charge of som... | https://security.stackexchange.com |
287,407 | [
"https://physics.stackexchange.com/questions/287407",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/133529/"
] | My body weight is about 85-90 kg and I take a deep breath so my lungs with be full of oxygen. In a swimmingpool I need to hold myself down on the bottom without going up to the surface (I will solve a cube underwater).
I will use 2 hand weights - one for each leg to hold me down.
I need to know how how many kg there ... | The <strong><em>average</em></strong> density of the human body is around $965 \text{ kg/m}^3$, varying with body type and state of inhalation among other factors.
So your 87 kg will occupy 90.2 litres and displace 90.2 kg of fresh water. So you'll need about $3.2$ kg of weights for neutral buoyancy (don't forget the... | I am 159 lbs. male with approximate 30% fat index. Kind of a normal to fit man. If I inhale to maximum of my lungs capacity of 5 liters I can barely stay afloat by tilting my head up. My body density is a bit more then 1 kg/ liters.
Buoyancy has to do with many factors:
How fat you are, fat floats.<br>
How much g... | https://physics.stackexchange.com |
265,740 | [
"https://electronics.stackexchange.com/questions/265740",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/43026/"
] | I'm currently building a battery testing rig which drains a battery and then charges it continuously and monitors/logs all associated data (voltage, run time, and instantaneous current discharged/charged).
I'd like to determine the current discharged over time, but not sure how to calculate that.
<blockquote>
<pre><c... | For system power consumption it's more normal to write things as either peak or average power consumption in either Watts or amps.
Total power/current is then calculated by multiplying the average power/current by the operating time.
If however you are sure what you want is total current over time then that would be m... | <ul>
<li>If you import into a spreadsheet.</li>
<li>C=Q/V and dQ/dt=I</li>
<li>"CURRENT OVER TIME" = integral of Idt = Q
<ul>
<li>or the sum of all your I*t readings in seconds and converted to amp-hours.</li>
</ul></li>
<li>Power,P over time= V* I* t = Energy [Joules]
<ul>
<li>E=[watt-seconds]=[Volt*Amp-hour*3600s/h... | https://electronics.stackexchange.com |
177,712 | [
"https://electronics.stackexchange.com/questions/177712",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/79851/"
] | I am trying to interface switch and led. I want to write a program in which if I press and release the switch led should glow and if I again press the switch led should turn off. I am not able to write logic for it as I am newbie to embedded system. Can anyone just help me writing the logic for it.?
Thanks.
This is my... | I am not a programmer but after reading your question on solution came in to my mind which I am going to explain below.
For the below logic your LED and Switch both should be controlled with a controller's different I/O pin. First controller should sense the switch pressed logic and based on the switch logic controlle... | The only change to be done might be from this to
<pre><code>if(PIND & (1<<PD0) == 1) //If switch is pressed
{
PORTC |= (1<<PC0); //Turns ON LED
_delay_ms(3000); //3 second delay
PORTC &= ~(1<<PC0); //Turns OFF LED
}
</code></pre>
this:
<pr... | https://electronics.stackexchange.com |
110,663 | [
"https://security.stackexchange.com/questions/110663",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/96945/"
] | <strong>Short background</strong>
I am currently in the process of designing a web-application where the user uploads some files to the server and then asks the server to do some calculations based on these files (task may be queued if the current workload is high). Then the server stores the result and makes it avail... | The <strong>idea behind an offline OpenPGP primary (master) key is that an attacker getting access to your computer will not be able to perform key management operations</strong> (creating/revoking new user IDs and subkeys, revoking your key, certifying other's keys). Furthermore, the primary key is the target of certi... | Your second idea is the right one. You generally should back up all your important data, and your GnuPG keys definitely are important.
The idea is not about keeping just the master key, but about making sure an attacker is unable to get the master key while you are still able to do your daily business with GnuPG on th... | https://security.stackexchange.com |
84,187 | [
"https://dba.stackexchange.com/questions/84187",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/53343/"
] | Assume that I'm modelling a Blog engine. <strong>Blogs</strong> have <code>n</code> <strong>Posts</strong>. Each <strong>User</strong> can be granted a role on different <strong>Blogs</strong> (<code>Admin</code>, <code>Approver</code> or <code>Editor</code> stored as enums/ints). Each <strong>Post</strong> can have a ... | Exists and IN will give the same query plan because they are both "LEFT SEMI JOINs" internally. I prefer EXISTS generally because of consistency. NOT EXISTS is safer then NOT IN.
Caching does not apply and don't think about it. This is a set based operation and the SQL Server optimiser will work out the best way: It m... | On principle, I would always use <code>EXISTS</code> rather than <code>IN</code>.
<ol>
<li><code>EXISTS</code> has the <em>opportunity</em> to short circuit, though it won't always.</li>
<li><code>IN</code> has the <em>opportunity</em> to be optimized as an <code>EXISTS</code>, though it won't always.</li>
</ol>
So, ... | https://dba.stackexchange.com |
14,243 | [
"https://security.stackexchange.com/questions/14243",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/9317/"
] | Let's say you use a program like Truecrypt or Keepass which allows you to have a password + key file. I understand that passwords can be brute-forced/dictionary-attacked but is the same true for key files?
| Yes, it is the same: keyfiles can be brute-forced.
A key file is like typing your password and storing it somewhere, instead of typing it everytime.
To the program (in your example, TrueCrypt), passwords and keyfiles and every other information is used to feed the encrypt / decrypt algorithm. It doesn't matter where ... | In addition to woliveirajr's answer and dr jimbobs statistical comment, keep in mind that a key file isn't memorized by the user. The key file <em>must</em> be stored somewhere accessible. An attacker, under the appropriate conditions, can use this fact to potentially significantly reduce the attack space from <em>what... | https://security.stackexchange.com |
3,303,713 | [
"https://math.stackexchange.com/questions/3303713",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/674049/"
] | <span class="math-container">$U$</span> is a subset of a topological space X.
If <span class="math-container">$U$</span> is open, is <span class="math-container">$$ U=\operatorname{int}(\operatorname{cl}(U)) ? $$</span>
<span class="math-container">$\operatorname{int}$</span> is the interior and <span class="math-conta... | It does not work in general, this kind of sets are called regular open sets. It is easy to prove that all regular open sets are open, but the converse is not true. Consider <span class="math-container">$\mathbb{R}$</span> with the usual topology and the set <span class="math-container">$U=(0,1)\cup (1,2)$</span>. It is... | Not necessarily. Consider the topological space <span class="math-container">$X = [0, 1]$</span> (with the usual topology), and <span class="math-container">$U = (0, 1)$</span>.
| https://math.stackexchange.com |
420,423 | [
"https://mathoverflow.net/questions/420423",
"https://mathoverflow.net",
"https://mathoverflow.net/users/480636/"
] | Suppose that <span class="math-container">$A\subseteq \mathbb{N}$</span> and suppose that you have an estimate of the form
<span class="math-container">$$
\sum_{\substack{a\le x \\ a\in A}}f(a) \sim g(x).
$$</span>
With this information is it possible to get an asymptotic estimate for <span class="math-container">$\sum... | I address your first (general) question, but I am sure it is applicable to your second (specialized) question. (Please restrict to one question per post to avoid confusion and frustration.)
You can try to apply Dirichlet's hyperbola method. First, you can forget about <span class="math-container">$A$</span>, since you ... | Yes, and you get what should be expected (that is, <span class="math-container">$\sum_{\substack{|D_1D_2|\le x \\ D_1,D_2 \in A}}1\sim \frac{x\log x}{\zeta(2)^2}$</span>.)
For proving this you may choose <span class="math-container">$\rho>1$</span> (close to 1) and partition <span class="math-container">$A=\sqcup_{k... | https://mathoverflow.net |
46,302 | [
"https://stats.stackexchange.com/questions/46302",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/16175/"
] | How to add noise to an object, regardless of the amount of dimensions?
I would expect to try to use some sort of <code>apply</code> to add noise of the type:
<code>runif(1, -0.00001, 0.0001)</code> for each cell.
What I tried before was to have a matrix of r * c, and then creating a matrix with noise, and add them t... | This is my answer so far, though I do not think it's the best code ever written.
<pre><code>Noisify <- function(data) {
if (is.vector(data)) {
noise <- runif(length(data), -0.00001, 0.00001)
noisified <- data + noise
} else {
length <- dim(data)[1] * dim(data)[2]
noise <- matrix(ru... | @whuber makes excellent point regarding the goal of this endeavour, but here's a idea of how to proceed. The idea is to add each cell a corresponding amount of generated noise.
<pre><code>> my.data <- matrix(1:9, nrow = 3)
> my.data
[,1] [,2] [,3]
[1,] 1 4 7
[2,] 2 5 8
[3,] 3 6 ... | https://stats.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.