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
430,257
[ "https://electronics.stackexchange.com/questions/430257", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/214836/" ]
Why is the frequency of the response same as that of the forcing function in a linear circuit? What's the case when the circuit isn't linear?
If a circuit (or any system) is linear, then the output is governed by a linear differential equation. This means that the input signal and all its derivatives are not cubed, squared or anything like that. So if out input is <span class="math-container">\$x(t)\$</span> and the output is <span class="math-container">\$...
'Forcing function' is the generic term for an input signal. If the forcing function is the unit impulse then it's response is the transfer function, since the Laplace transform of the unit impulse is unity. A transfer function must be a linear representation of a system for this to apply.
https://electronics.stackexchange.com
191,209
[ "https://dba.stackexchange.com/questions/191209", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/138816/" ]
Let say that I have a table as below : <pre><code>day | Qty --------------- Sunday | 10 Monday | 5 Tuesday | 20 Sunday | 17 </code></pre> as I have another table that day value could only be 'Sunday' till 'Saturday', I would like to have a resume table as below: <pre><code>day | Sum(Qty) ----...
There are different ways to achieve the goal. <pre><code>SQL&gt; select to_char(trunc(add_months(sysdate,-12*5),'YEAR'),'YYYYMM') from dual; </code></pre> OR <pre><code>SQL&gt; select to_char(trunc(SYSDATE - interval '5' year,'YEAR'),'YYYYMM') from dual; </code></pre> Regarding the second one, what happens if the SYSD...
SQL&gt; <pre><code>select trunc(sysdate)AS TODAY, 2 ADD_MONTHS(TRUNC(SYSDATE), 12 * 5 * -1) AS minus_5_year from dual; </code></pre> Result: <pre><code>TODAY MINUS_5_YEAR ----------- ------------ 04/03/2021 04/03/2016 </code></pre> <h2><strong>for leap day</strong></h2> SQL&gt; <pre><code>select to_date('29/02/...
https://dba.stackexchange.com
45,240
[ "https://softwareengineering.stackexchange.com/questions/45240", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/9667/" ]
I'm creating a website for an event that is coming up. It has some functionality related to the event (such as "send me a reminder"), other stuff that takes place during the event, and finally some stuff that comes after the event. I need to start working on code that takes place during the event and after the event, ...
If the three versions of your website are quite different, it would probably be easier to indeed have them ready as three different packages. The major disadvantage of that method is that you will have to promptly replace a version with the next at a specific moment, which could prove more or less difficult to do. Ano...
Me personally I would use the second solution you stated... if (currentDate &lt; eventDay) { reminder.show();}. That would certainly help keep your butt covered from any hiccups or data problems.
https://softwareengineering.stackexchange.com
22,638
[ "https://datascience.stackexchange.com/questions/22638", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/24119/" ]
Is there any difference if we predict two variables vs predict one variable with two models (so we have two variables predicted)?
I think OP meant a <em>multi-class</em> model that predicts an outcome variable with multiple classes versus building multiple separate binary classification models for <em>each</em> class. Indeed these two modeling techniques are different, and should be used differently according to the problem. <h2>Multi-class Clas...
You should specify what exactly the model you're thinking. Of course there're differences. For example: <ul> <li>Multiple comparisons (inflate Type 1 error)</li> <li>Loss in statistical power</li> <li>Different probability mass function</li> <li>Marginal distribution vs joint distribution</li> </ul> In general, we're...
https://datascience.stackexchange.com
324,200
[ "https://softwareengineering.stackexchange.com/questions/324200", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/217255/" ]
I'm learning about paradigms of functional languages. So I've read that while Subtype polymorphism is typical for OO languages, Parametric polymorphism is typical for functional languages. But I wonder if there is Subtype polymorphism in functional languages. The functional language I know best is Haskell, and I know ...
To answer your question more explicitly: no, this is not subtype polymorphism, and the reason is simply this: each type that has an instance of a typeclass is distinct. Each has different functions with (potentially) different signatures, for example if we have the following types: <pre><code>data First = First Strin...
Typeclasses instances are effectively implicit parameters containing a dictionary of functions. This makes them different from interfaces in a few ways. One is that you don't need an actual instance on which to invoke operations, and resolution can happen at the type level instead of the value level. The <code>Read</c...
https://softwareengineering.stackexchange.com
131,514
[ "https://cs.stackexchange.com/questions/131514", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/123018/" ]
Can we prove the following, or find a counterexample? <blockquote> <span class="math-container">$$f(n) = O(g(n)) \Longrightarrow f(h(n)) = O(g(h(n)))$$</span> </blockquote> I should figure out whether <span class="math-container">$\log(n^{\log n}) = O(a^{\log n})$</span>, and this will be facilitated if the above holds...
Let's assume for simplicity that <span class="math-container">$f(n),g(n)$</span> both take positive integer values. Then <span class="math-container">$f(n) = O(g(n))$</span> iff there exists <span class="math-container">$C&gt;0$</span> such that <span class="math-container">$f(n) \leq Cg(n)$</span> for all <span class=...
Definitely no. <span class="math-container">$f(n) = O(g(n))$</span> is correct by <span class="math-container">$f(n) = n$</span> and <span class="math-container">$g(n) = n^2$</span>. As <span class="math-container">$f(n) \neq g(n)$</span>, hence, <span class="math-container">$f(h(n)) \neq g(h(n))$</span> for <span clas...
https://cs.stackexchange.com
66,036
[ "https://electronics.stackexchange.com/questions/66036", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/4436/" ]
I need to make an adjustable power controller for a 3kW heater that will run off single-phase 240V AC power. How should it be done? Maybe a triac circuit similar to that used for dimming lights. Could this work? (Household heaters don't seem to ever be 'dimmable', is this just a cost saver, or is there another reaso...
No need for phase angle modulation like on a dimmer for lighting, no need for PWM nor for switching on/off every second. It will introduce interference and the thermal capacity of the heater will be so large that you can easily switch on and off for full mains cycles and even every so many seconds (if your neighbors do...
Two thoughts: The traditional way is to use a solid-state relay. It won't be particularly cheap, but it will be properly heatsinked and will have a zero-crossing circuit built in. Once you get that, you can easily do PWM on it. In either case, you will get the same effect as if you were turning it off and on with a sw...
https://electronics.stackexchange.com
16,327
[ "https://stats.stackexchange.com/questions/16327", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/8101/" ]
I have a correlation matrix of security returns whose determinant is zero. (This is a bit surprising since the sample correlation matrix and the corresponding covariance matrix should theoretically be positive definite.) My hypothesis is that at least one security is linearly dependent on other securities. Is there a ...
You seem to ask a really provoking question: how to detect, given a singular correlation (or covariance, or sum-of-squares-and-cross-product) matrix, which column is linearly dependent on which. I tentatively suppose that <strong>sweep operation</strong> could help. Here is my probe in SPSS (not R) to illustrate. Let'...
Here's a straightforward approach: compute the rank of the matrix that results from removing each of the columns. The columns which, when removed, result in the highest rank are the linearly dependent ones (since removing those does not decrease rank, while removing a linearly independent column does). In R: <pre><c...
https://stats.stackexchange.com
609,773
[ "https://physics.stackexchange.com/questions/609773", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/276583/" ]
I'm new to QFT so it's not obvious to me why there is no quadratic interaction terms in Lagrangians. For example, the Lagrangian for a real scalar field is <span class="math-container">$$L=\frac{1}{2}\partial_\mu \phi \partial^\mu \phi-\frac{1}{2}m^2\phi^2-\sum_{n\geq 3}\frac{\lambda_n}{n!}\phi^n.$$</span> What's the r...
<blockquote> ...why does the degree of the interaction terms in Lagrangian start from 3? </blockquote> <blockquote> ...What's the reason that we can't add terms like <span class="math-container">$g\phi^2$</span> to the free field Lagrangian? </blockquote> You can add such a <span class="math-container">$g\phi^2$</span>...
Such a term can be absorbed into a redefinition of the propagator.
https://physics.stackexchange.com
500,481
[ "https://physics.stackexchange.com/questions/500481", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/240768/" ]
From definition of Diffusion coefficient: <span class="math-container">$$D = c/3(\mu_a+\mu_s),$$</span> where <span class="math-container">$c$</span> is the speed of light front, <span class="math-container">$\mu_a$</span> is absorption coefficient and <span class="math-container">$\mu_s$</span> is scattering coefficie...
<strong>Yes</strong> - to an extent. If you had an unlimited energy reserve you could draw from with a machine, no matter the form, you have effectively a machine that is capable of doing unlimited work. It'd be a perpetual motion machine but without violating energy conservation, because it draws the energy from the ...
Infinities aren't physically real, so I have difficulty even entertaining a thermodynamics question that includes "infinite energy". I really did read your whole question, and I just don't see any modern interpretation of thermodynamics where your idea could be tested. Could a "very high" amount of energy reverse ent...
https://physics.stackexchange.com
65,353
[ "https://security.stackexchange.com/questions/65353", "https://security.stackexchange.com", "https://security.stackexchange.com/users/47824/" ]
We run Exchange 2010. Our edge servers run "passive opportunistic TLS" for 99% of the domains we communicate with. For a handful of domains, we have forced TLS on both our end and the other domain's end. We're in the process of deploying a secure email gateway appliance. It will basically park your email message on...
I work for a large company and hear many many many complaints about Portal Based Email (PBE). It is the cause of many issues, namely: <ul> <li>Logging into a portal slows down the email transaction. If you're taking in orders or need to read PII data, this extra step or steps may negatively affect productivity</li> <...
If gives you the assurance that the email, and the sensitive data it contains, never transits over an unencrypted channel, with a side-benefit of allows you to audit access. Generally with SMTP, you don't know what happens after it leaves the edge of your network to the edge of the next. It could be insecurely tran...
https://security.stackexchange.com
466,957
[ "https://physics.stackexchange.com/questions/466957", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/223974/" ]
For the pressure exerted by compressed gas, its stated in my textbook: "The result is that at high pressures the molecules of a gas are so compressed that their volume becomes a significant fraction of the total volume of the gas. Since this reduces the volume available for molecular motion, collision occur more freque...
Assuming no air resistance, the Earth not rotating, the bus moving at constant velocity etc. If you are looking at the motion of the ball relative to the bus, ie sitting inside the bus, what would you observe?<br> You would observe the ball going vertically upwards and then coming down vertically downwards.<br> How ...
Because when you hold the ball, it is accelerated just like you are whether it is in the bus or standing on Earth's surface. Let's take the example of the bus: You, the ball, and the bus are moving at the same speed. So when you throw the ball upwards, it still retains that motion that it had before. As it is only in t...
https://physics.stackexchange.com
181,032
[ "https://security.stackexchange.com/questions/181032", "https://security.stackexchange.com", "https://security.stackexchange.com/users/61822/" ]
When I send a non-gmail email to someone (company email) for the first time, there's a chance it will get filtered into the ether, never to be heard from again. However, if I use their website's contact form and fill in the same email, it reaches them. I've had this happen a few times. What is the difference in usi...
A contact form is setup by the company to explicitly get feedback. Contact forms are also often somehow protected against automatic submissions or at least any automatic submission need to be specifically adapted to the companies specific contact form. That's why such contact forms are not much used to deliver spam, at...
Email address is not the only signal used by email spam filtering. (In fact, it's far from the main signal.) Other signals that would vary between a contact form and sending an email include: <ul> <li>SPF/DKIM (in fact, these suggest your email may not be being used as the 'From')</li> <li>Server reputation (if you'...
https://security.stackexchange.com
646,429
[ "https://physics.stackexchange.com/questions/646429", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/265836/" ]
In quantum mechanics usually we write the momentum operator <span class="math-container">$\hat{p}$</span> as: <span class="math-container">$$\hat{p} = \hbar \hat{k}. \tag{1}$$</span> with of course: <span class="math-container">$$\hat{p}|p\rangle = p |p\rangle \tag{2}$$</span> <span class="math-container">$$\hat{k}|k\r...
You can normalize your continuous spectrum (and hence unnormalizable) eigenstates as you like provided you keep the <em>completeness relation</em> correct. I always normalize my momentum states as <span class="math-container">$\langle x|k\rangle= e^{ikx}$</span> with no inverse square roots. Then the completeness inte...
This is a question of units. Many physicists choose to use units in which <span class="math-container">$\hbar=1$</span> such that the two expressions will be the same. Inside of an exponential, the argument must be unitless, which is why we must have <span class="math-container">$$\exp(i px/\hbar)=\exp(ikx).$$</span> H...
https://physics.stackexchange.com
1,490
[ "https://dba.stackexchange.com/questions/1490", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/1054/" ]
Lets say I have the follow insert statements. <pre><code>INSERT INTO E_PRODUCT VALUES ('PCD2', 'PC Dual Core', 499, 22, 475, 'PC', NULL); INSERT INTO E_PRODUCT VALUES ('PCL4', 'Laptop PC', 599, 9, 225, 'PC', NULL); INSERT INTO E_PRODUCT VALUES ('PCQ5', 'PC Quad Core', 699, 25, 41, 'PC', NULL); INSERT INTO E_PRODUCT VA...
I suspect you want to put the whole thing in an anonymous PL/SQL block and run that, i.e. <pre><code>BEGIN INSERT INTO E_PRODUCT VALUES ('PCD2', 'PC Dual Core', 499, 22, 475, 'PC', NULL); INSERT INTO E_PRODUCT VALUES ('PCL4', 'Laptop PC', 599, 9, 225, 'PC', NULL); INSERT INTO E_PRODUCT VALUES ('PCQ5', 'PC Quad C...
A bit late, but maybe helpful nevertheless: The dreaded XE web interface (APEX) does not support running multiple statements or a complete script. You need to use a different tool (e.g. SQL Developer) or run one statement at a time.
https://dba.stackexchange.com
418,829
[ "https://mathoverflow.net/questions/418829", "https://mathoverflow.net", "https://mathoverflow.net/users/45242/" ]
There is so much literature on the relation between the multiplicative structure of a finite field and elements having zero trace, that I am hoping that the following is known. Let <span class="math-container">$q$</span> be a prime power, let <span class="math-container">$n$</span> be an odd prime number, let <span cla...
I can show that exceptions occur at most for <span class="math-container">$n=3$</span>. (Primality of <span class="math-container">$n$</span> is never used.) Since <span class="math-container">$n$</span> is odd, <span class="math-container">$\mathbb F_{q^{2n}} = \mathbb F_{q^2} \otimes_{\mathbb F_q} \mathbb F_{q^n}$</s...
Note that <span class="math-container">$\mathcal{A}$</span> is contained in <span class="math-container">$\def\F{\mathbb{F}}\F_{q^2}$</span> if and only if <span class="math-container">$(q^n+1)/(q+1)$</span> divides <span class="math-container">$q^2-1$</span>, and it is easy to check with a bit of case analysis that th...
https://mathoverflow.net
18,577
[ "https://cs.stackexchange.com/questions/18577", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/11713/" ]
when converting an NFA to DFA, we create sub-sets of states in the NFA. does it mean that every DFA-converted-from-NFA contain 2^Q states? or if some sub-sets are unreachable then they are not included in it?
As per suggestion, I'm posting this as an answer. Any DFA already is an NFA. Determinizing it will not change the number of states it has, so there are NFA that do not have fewer states than the equivalent minimal DFA. Maybe also a non-trivial example: Take the NFA with states $\{q_o, q_1\}$, alphabet $\Sigma = \{a\...
The answer to the question depends on its precise meaning. <blockquote> when converting an NFA to DFA, we create sub-sets of states in the NFA. does it mean that every DFA-converted-from-NFA contain 2^Q states? </blockquote> Yes, when applying the standard construction for DFA constrution the new automaton obtains ...
https://cs.stackexchange.com
141,767
[ "https://physics.stackexchange.com/questions/141767", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/62297/" ]
I'm afraid the title here was unclear, so I'll attempt to make things a bit more clear. I am conceptually confused about the physical meaning of line integrals over a vector field, so I'll pick an arbitrary example here to illustrate my confusion. Suppose we have the vector field $\mathbf{F} (0, x)$ and the curve pa...
If the particle is moving along some constrained curve then there must be some external force, $\mathbf{F_e}$, acting to constrain it to the curve. So the net force on the particle is: $$ \mathbf{F_{net}} = \mathbf{F} - \mathbf{F_e} $$ and the work done <strong>on the particle</strong> is: $$ W_{net} = \int (\mathbf...
If we consider Newton's laws, then $$m\ddot{ \vec x}=\sum_i \vec F_i,\tag1$$ where $\vec F_i$ is force from $i$th source. When you calculate work of force $\vec F_i$, you have $$W_i=\int_C \vec F_i d\vec s.\tag2$$ Actual motion, whatever you set it to, results from the sum of all the forces acting on the partice, ...
https://physics.stackexchange.com
351,390
[ "https://softwareengineering.stackexchange.com/questions/351390", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/165064/" ]
I have a function that I can implement in two different ways. Each way has its own advantages, and performance depends on the arguments it will be given. Since each implementation has several short circuits, performance can be dramatically different compared to the other one, so I thought to wrap the two implementation...
The standard approach for, say, sorting a list is to use quicksort for lists greater than a threshold <em>k</em> and insertion sort otherwise. So partitioned lists using quicksort of a certain dimension are not handled using quicksort through and through because insertion sort actually beats quicksort for smaller arra...
This is an interesting idea but largely echoing Neil's answer, I think you need to investigate why one function is faster than the other and vice versa for certain types of inputs, ideally with a profiler in hand. The idea of trying to make the code generate a time estimate on the fly of how quickly both functions mig...
https://softwareengineering.stackexchange.com
10,974
[ "https://mathoverflow.net/questions/10974", "https://mathoverflow.net", "https://mathoverflow.net/users/3046/" ]
Is the following true: If two chain complexes of free abelian groups have isomorphic homology modules then they are chain homotopy equivalent.
Yes, this is true. Suppose $C_*$ is such a chain complex of free abelian groups. For each $n$, choose a splitting of the boundary map $C_n \to B_{n-1}$, so that $C_n \cong Z_n \oplus B_{n-1}$. (You can do this because $B_{n-1}$, as a subgroup of a free group, is free.) For all $n$, you then have a sub-chain-complex...
Yes, this is true, and it does not matter whether the complexes are bounded from any side (nor of course does it matter whether the homology is finitely generated). This is so because: <ol> <li>The homotopy category of free abelian groups is equivalent to the derived category of abelian groups. This holds even for u...
https://mathoverflow.net
5,987
[ "https://stats.stackexchange.com/questions/5987", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/2599/" ]
What is the worst classier that learns badly in practical problems? Edit: Especially bad on test data.. Thanks
It is usually the statistician using the classifier that is the problem (for picking the wrong tool for the particular problem at hand, or for using it incorrectly). The "no free lunch" theorems show there is no a-priori distinction between classifiers (which works best/worst depends on the data), so I'd say there isn...
Consider the binary case. If you don't know the proportions of the two classes, then the worst you can do is to <strong>flip a fair coin</strong> in each case: the expected error rate is $1/2$. If you do know the proportions, and the smaller of the two is $p$, say, then you should always classify objects in that cate...
https://stats.stackexchange.com
89,216
[ "https://dba.stackexchange.com/questions/89216", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/81999/" ]
I need to calculate the average score of a <strong>list of userId.</strong> I have a table <code>user_place_score</code>: <pre><code>(user_id, place_id, score) </code></pre> Sometimes I do not have the score (no row for <code>(user_id,place_id)</code> in the table) so I need to fetch a "default" score from the table...
It seemed you need a simple <code>LEFT JOIN</code> but with the added comments, it gets a bit more complicated: <pre><code>SELECT u.user_id, p.place_id, COALECSE(ups.score, d.score) AS score FROM user AS u CROSS JOIN -- the places we are (VALUES (1),(2),...
You could use COALESCE() .. it returns the first non-null value in the list passed to it.. <code>COALESCE((QUERY TO GET SCORE FOR USERID),(QUERY TO GET DEFAULT SCORE))</code> <em>EDIT</em> oh - you added "list" requirement ... see @ypercube's answer, then. <em>EDIT2</em> If the place_ids exist in a separate table,...
https://dba.stackexchange.com
136,495
[ "https://cs.stackexchange.com/questions/136495", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/132962/" ]
Recall floating-point representation: Suppose <span class="math-container">$f$</span> is a floating-point number then we can express f as, If <span class="math-container">$f$</span> is normal: <span class="math-container">$$(-1)^{s}\cdot2^{e-127}(1 + \sum\limits_{k=1}^{23} b_{23-k}\cdot 2^{-k})$$</span> If <span class=...
Let's assume the length is even for now. Split the word up into two equal parts, <span class="math-container">$w = lr$</span>. Let <span class="math-container">$l^R$</span> be the reverse of <span class="math-container">$l$</span>. If <span class="math-container">$l^R = r$</span>, we are done immediately. Otherwise, if...
This is a very interesting problem, here is my implementation in Python Maybe we can combine those 2 cases in 1 scenario : <pre><code> def increase_one(input_): s = list(input_) for i in range(len(s)-1,-1,-1): if s[i]=='z': s[i]='a' else: s[i]=chr(ord(s[i])+1) ...
https://cs.stackexchange.com
7,581
[ "https://softwareengineering.stackexchange.com/questions/7581", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/2527/" ]
Is Java becoming the de facto standard from Linux application development in the same way .NET is the standard for Windows application development? If not why not?
In short: No. It really depends on what sort of application you are writing. For many the answer is still regular old C/C++ (if doing, say Qt or GTK+ GUI development). Many doing GTK+ development may also be using Python + PyGTK. If doing web or web services development, you see lots of Ruby, Python, PHP, and Java.
I don't see Linux having a 'standard' development platform because one of the main differences with Microsoft 'ecosystem' is that is not a single-vendor platform. .NET is the standard platform on Windows only because it is made by the same company that makes the operating system.
https://softwareengineering.stackexchange.com
10,375
[ "https://electronics.stackexchange.com/questions/10375", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1200/" ]
I am trying to interface my ATmega chips to the computer using a serial interface. I have read that this can be done directly by connecting the appropriate pin between the chips and the serial pin. But it is advised that I use a MAX232 chip. What is the purpose of this chip and do I really need to use it? I ask this b...
If you need to connect the AVR to the computer using the serial port and a "standard" DB9-DB9 serial cable, yes, you need to use an RS232 transceiver in circuit. The AVR's UART outputs 0-5V signaling. The RS232 spec is +/-15V signaling, and I believe it's also "inverted" with compared to UART signaling. You don't have ...
The RS232 specification requires a signal voltage of between -3 and -30V for a logical '1', and a signal voltage of between +3V and +30V for a logical 0, input impedance is around 3k and output impedance should be around 300 ohms. If you're going to implement a fully complient interface then yes, you will need somethi...
https://electronics.stackexchange.com
149,092
[ "https://softwareengineering.stackexchange.com/questions/149092", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/31179/" ]
I'm new to Programmers and I am looking to increase my knowledge of programming. Recently, a user on Stack Overflow told me using singletons is a bad idea, that they encourage tight coupling and that they make testing harder. What prompted this discussion was that every class I've ever written accessed any kind of dat...
You won't ever <em>know</em>. Program design is about tradeoffs, and analyzing particular scenarios to produce a solution that is good (not best) given what you know about them. In this particular scenario, the singleton proponent is decidedly incorrect but you're missing the point. In scenarios where the answer is l...
The part that creates coupling isn't the fact that the variable lives in a singleton, but that your client object goes and fetches it from there itself. This means that you could never change the way your object is stored without introducing all kinds of hassle for yourself (assuming, as you say, that many objects beh...
https://softwareengineering.stackexchange.com
10,768
[ "https://stats.stackexchange.com/questions/10768", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/3577/" ]
If $F_Z$ is a CDF, it looks like $F_Z(z)^\alpha$ ($\alpha \gt 0$) is a CDF as well. Q: Is this a standard result? Q: Is there a good way to find a function $g$ with $X \equiv g(Z)$ s.t. $F_X(x) = F_Z(z)^\alpha$, where $ x \equiv g(z)$ Basically, I have another CDF in hand, $F_Z(z)^\alpha$. In some reduced form sens...
I like the other answers, but nobody has mentioned the following yet. The event $\{U \leq t,\ V\leq t \}$ occurs if and only if $\{\mathrm{max}(U,V)\leq t\}$, so if $U$ and $V$ are independent and $W = \mathrm{max}(U,V)$, then $F_{W}(t) = F_{U}(t)*F_{V}(t)$ so for $\alpha$ a positive integer (say, $\alpha = n$) take ...
<h2>Proof without words</h2> <img src="https://i.stack.imgur.com/NHSjO.png" alt="enter image description here" /> The lower blue curve is <span class="math-container">$F$</span>, the upper red curve is <span class="math-container">$F^\alpha$</span> (typifying the case <span class="math-container">$\alpha \lt 1$</span>)...
https://stats.stackexchange.com
11,356
[ "https://dsp.stackexchange.com/questions/11356", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/5815/" ]
I'm just beginning to study Fourier transforms and I'm having trouble getting this concept down. I know what a low/high pass filter does to a signal. <ul> <li>What is the relationship between Fourier magnitudes (dB) and frequency (Hz)? </li> <li>How would Fourier magnitudes get affected when a low/high pass filter is ...
(This explanation is going to be rough around the edges so that I can build your intuition. There are subtleties involved, but this should be good enough to start you off). Forget about the dB scale for a moment. Let us take a step back: Imagine that you have some signal that occupies a bandwidth from say, 50 Hz to ...
fourier magnitudes in dB is just the logarithm of the fourier transform of the signal of interest. For example, Let's say you have an ideal low pass filter which looks like a square function centered at 0, and between -f and f in the fourier domain. (Note: f and -f are the frequencies). Now the fourier magnitudes in db...
https://dsp.stackexchange.com
7,604
[ "https://mathoverflow.net/questions/7604", "https://mathoverflow.net", "https://mathoverflow.net/users/1648/" ]
As is well known, the line bundles over *<em>CP</em>*$^1$ are indexed by the integers. My question is how are the line bundles over *<em>CP</em>*$^n$, $n &gt; 1$, and *<em>Gr</em>*$(n,k)$ indexed? Moreover, do there exist any other interesting classifications of line bundles over spaces (I remember something about Atiy...
Algebraic line bundles on a smooth variety $X$ are classified by the Picard group $Pic(X) = H^1(X, \mathbf O_X^*)$. This is an exercise in Hartshorne's book, basically every line bundle is mapped to it's gluing cocycle. The group $Pic(X)$ is also equal to the group $CH^1(X)$ of divisors modulo rational equivalence. The...
Algebraic line bundles over generalized flag varieties of semisimple groups should be classifiable by characters of the Cartan subgroup of the group modulo the Cartan subgroup of the semisimple part of the parabolic subgroup. This is because all line bundles over a generalized flag variety are equivariant with respect...
https://mathoverflow.net
438,185
[ "https://softwareengineering.stackexchange.com/questions/438185", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/227698/" ]
Feature branch names already contain the issue key (ticket number). Should commit messages also contain them? Pro: <ul> <li>easy to see where a commit belongs to.</li> <li>better for third-party software tracking commits for issues.</li> </ul> Contra: <ul> <li>developer needs to repeat themselves. Issue key is already ...
<h1>DRY meet Reality</h1> <em>Let's just presume that a ticket number into an external system will still have some meaning in 10 years.</em> Now, let me push you on what the difference is between a commit and a branch. <ul> <li>A commit is a durable write-once record representing a single node in a DAG describing the c...
Branches are temporary and arbitrary constructs. Your branch will eventually be gone - the branch name is then gone as well... or, well, it might live on in the default <em>commit message</em> of a merge commit. Furthermore, in most flows the branch is an ownership thing: Your workflow will probably have personal branc...
https://softwareengineering.stackexchange.com
46,172
[ "https://datascience.stackexchange.com/questions/46172", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/68367/" ]
I created a XGBRegressor model with certain encoded 'object' dtypes in the data. Now if I want to run the model with new set of data which is freshly encoded it's giving wrong predictions. How to ensure that the new dataset is encoded in the same way as was the train data? Or any other solution to this problem?
You can perform clustering of your customers based on a distance function. Definition might look like this: <ol> <li>First, calculate euclidean distances between the first item of the first customer's basket and all of the items in the second customer's basket.</li> <li>Then find out, what is the closest item from sec...
Well you could try unsupervised clustering. You may want to leave out the user and item label to start. Depending on how much data you have and guesses at how many "categories" you might end up with you can use K-means or Mean sift clustering. The idea would be you let the similarities be worked out so that you group t...
https://datascience.stackexchange.com
327,494
[ "https://physics.stackexchange.com/questions/327494", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/102243/" ]
In standard quantum mechanics textbooks, the concept of operators is often introduced as linear maps that map a Hilbert space $H$ onto itself: $$ \hat{O}: H \rightarrow H \, . $$ However, directly after, we use the position operator $\hat{\vec{x}}$, which isn't of the said shape, but instead is like a triple of operat...
So there's a natural isomorphism $$ \varphi: H^{\oplus 3} \to H \otimes \mathbb R^3\\ (a, b, c) \mapsto a \otimes e_0 + b \otimes e_1 + c \otimes e_2 $$ where $e_i$ is a basis for $\mathbb R^3$. The definition you're objecting to is $$ \hat{\vec{x}}: H \to H^{\oplus 3}\\ v \mapsto (\hat x(v), ~ \hat y(v) , ~\hat z(v...
No. In three dimensions there are three position operators, $\hat{x}_1$, $\hat{x}_2$, and $\hat{x}_3$, or maybe $\hat{x}$, $\hat{y}$, and $\hat{z}$. Each of these is a linear operator in the first, correct sense. Each one maps states in the Hilbert space onto other maps in the Hilbert space and nothing more. Now, the ...
https://physics.stackexchange.com
38,767
[ "https://mathoverflow.net/questions/38767", "https://mathoverflow.net", "https://mathoverflow.net/users/824/" ]
I heard that De Giorgi-Nash-Moser type regularity arguments fail for elliptic systems, but do not know where to start looking for more substantial information. Why does the regularity fail? Is there some cases where the Moser iteration can be successfully applied to elliptic systems?
Hi. The point is not the ellipticity. In fact the Argument of De Giorgi, Moser and Nash was designed for elliptic problems. The point is that solutions $u: \Omega\to\mathbb{R}^N$ of elliptic problems with $N&gt;1$ just aren't $C^{1,\alpha}$ any more in general. This is no problem with the method, it's intrinsic. The f...
Basically, the De-Giorgi - Moser - Nash regularity result fails for elliptic system. As Johannes pointed out, there is a counter-example in Giusti book. For system, usually, one can get "partial regularity result". What I mean by that is: there exists $\Omega_0 \subset \Omega$ open such that $|\Omega\setminus \Omega_0...
https://mathoverflow.net
184,233
[ "https://mathoverflow.net/questions/184233", "https://mathoverflow.net", "https://mathoverflow.net/users/16183/" ]
Let $\mathcal{A}, \mathcal{B}$ be two abelian categories with sufficiently many injective objects (in my case these are categories of sheaves of vector spaces on a manifold). Let $f_*\colon \mathcal{A}\to\mathcal{B}$ be a left exact functor which commutes with direct sums (in my case it is push-forward on sheaves). Le...
First of all, the functor $Rf_\ast$ is a red herring. Take an injective resolution $I^{\bullet,\bullet}$ of $F^\bullet$ and apply $f_\ast$; then you just have two questions regarding double complexes. E.g. in the first case you're asking about double complexes whose columns have cohomology concentrated in a single degr...
The previous answer may be all you need, but, say, in question one one can also proceed by induction in q, to make the step of induction embed your complex into an acyclic complex of injective objects.
https://mathoverflow.net
201,636
[ "https://physics.stackexchange.com/questions/201636", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/89778/" ]
What is the relationship between the magnitude of Earth's gravity and the distance away from the Earth's surface? Or at what rate does gravity decrease as one moves away from Earth?
The gravity g from a body of mass m at d distance from the center of the body can be found by the equation g = (m × G) / (d<sup>2</sup>), where G is the universal gravitational constant. Usually, g is in meters per second<sup>2</sup>, m is in kilograms, d is in meters, and G is in meters<sup>3</sup> per kilogram per s...
The force of Earth's gravity is inversely proportional to the square of the distance to the Earth.
https://physics.stackexchange.com
3,139
[ "https://ai.stackexchange.com/questions/3139", "https://ai.stackexchange.com", "https://ai.stackexchange.com/users/5351/" ]
In our brain there is an area, near the fusiform gyrus and the occipital area, to recognize the human face. And in speech recognition, there is a technique named keyword spotting. Then I am wondering 1) if there is an area in our brain for the similar function to recognize our names; 2) if a special face recognition fu...
<strong>Will computers be able to understand user emotions?</strong> The term <em>Understand</em> is multidimensional, so characterizing the degree of understanding &mdash; emotional or otherwise &mdash; is a slippery task. Nonetheless, some forms of AI emotional understanding are possible. <strong>An Interesting Si...
I was an Undergraduate Research Scholar - I and my team developed an algorithm to detect Human Emotions from touch Screen - which is under further improvement and development by PHD scholors of my guide . From studying literature I can say that the reverse is a difficult task - Detecting Affect . Even more difficul...
https://ai.stackexchange.com
185,718
[ "https://security.stackexchange.com/questions/185718", "https://security.stackexchange.com", "https://security.stackexchange.com/users/177963/" ]
I'm trying to understand the benefits of DNSSEC. If a user goes to my site <code>example.com</code> and the DNS cache was poisoned redirecting the user to the bad guy's IP, what would happen? I've enabled HSTS. My understanding is the user would see the 'Your connection is not private screen' and would not be able ...
These are very different technologies and they do not really rely on each other. In fact, some arguments find DNSSEC unnecessary in general. I would say no, DNSSEC is not needed if HSTS is used properly (long duration, preloaded). Most clients don't even use DNSSEC, so effects of having it may be minimal. I think you ...
Let's say you are visiting www.mybank.com DNSSEC ensures that the IP address you are going to, for www.mybank.com, actually belongs to MyBank. This happens cryptographically of course. Once you have the correct IP address, now your browser sends an HTTP request to the (trusted) IP. HSTS now ensures that when the HTTP...
https://security.stackexchange.com
111,906
[ "https://electronics.stackexchange.com/questions/111906", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/43365/" ]
I want to glow LED using a 6v AC transformer. I want to add 18 color changing leds (5mm) as series. I cant add too many wires through the rope (pipe). See my plan: <img src="https://i.stack.imgur.com/WebmP.jpg" alt="enter image description here"> <ul> <li>what are the components I need?</li> <li>give a explanation...
It appears that the problem was with the shape of the traces on my PCB. The following PCB design works correctly: <img src="https://i.stack.imgur.com/3Ww8l.png" alt="enter image description here"> Unfortunately I still do not understand the real reasons behind this well enough to explain it, but I think it has to do...
Add an uninterrupted ground plane. Decoupling caps connect to the ground plane. Move input side decoupling cap closer to the input of the IC. Use multiple valued output filter capacitors in parallel, e.g. 100nF, 1uF, etc. Did I mention to add an uninterrupted ground plane!?
https://electronics.stackexchange.com
21,793
[ "https://dsp.stackexchange.com/questions/21793", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/14886/" ]
I'm a newbeginner when it comes to signal processing. I'm reading up about anti-aliasing, Nyquist and band-pass filters. There's something I don't get: Anti-aliasing in analog filters. Lemme try to explain. I use a <strong>8th order analog butterworth band-pass filter (centered at 17.5 Hz with a 25 Hz 3dB bandwidth)<...
Aliasing does not happen in the analog world. It only happens when you sample a signal. If you have an ADC with sampling frequency $f_s$, then you'll have aliasing if the input signal has frequency components larger than $f_N=f_s/2$. To avoid aliasing, it's common to low-pass filter the signal before it is input into ...
Another way to think about it is that aliasing always occurs during sampling. The entire spectrum always gets folded down and aliased with the signal of interest. Even if that spectrum content is zero. The closer you can get the unwanted spectrum to zero, the less aliasing noise you will have contaminating your sign...
https://dsp.stackexchange.com
207,512
[ "https://mathoverflow.net/questions/207512", "https://mathoverflow.net", "https://mathoverflow.net/users/9232/" ]
Define for $n \in \mathbb{N}$ the function $$\tau_1(n):=\sum_{\substack{d|n, \\ d+1|n}}1,$$ i.e. the number of consecutive divisors of an integer. The average of $\tau_1(n)$ is $1$ since $$\sum_{n\leq x}\tau_1(n)=\sum_{d&lt;\sqrt{x}}\Big[\frac{x}{d(d+1)}\Big]=x+O(\sqrt{x}).$$ I was wondering whether more is known about...
Yes, $F(z)$ exists for all $z$. Let $y\ge 2$, and define $\tau_{1,y}(n)$ as the number of $d\le y$ for which both $d,d+1$ divide n. Let $F_y$ denote the analogue of $F$ with $\tau_{1,y}$ replacing $\tau_1$. It's clear that $F_y(z)$ exists for all $z$, since $\tau_y(n)$ is actually a periodic arithmetic function (with p...
See Katalin Gyarmati, On the density of integers with consecutive divisors, Publ. Math. Debrecen 74 (2009), no. 1-2, 1–17, MR2490419 (2010e:11087). The first paragraph of the review: P. Erdős and R. R. Hall [J. Austral. Math. Soc. Ser. A 25 (1978), no. 4, 479–485; MR0506088 (58 #21975)] first studied the number of c...
https://mathoverflow.net
308,261
[ "https://physics.stackexchange.com/questions/308261", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/25289/" ]
Taking the simplest circuit: battery and resistors. If I connect lots of resistors in parallel, wouldn't that increase the current to an extent that it would be technically be very similar to shorting the circuit?
Yes. The equivalent resistance for $n$ equal resistors of value $R$ connected in parallel is $R(n)=\frac{R}{n}$. As $n \to \infty$ then $R(n) \to 0$, provided that $R$ is finite.
If you have $N$ resistors in parallel, all of which have a resistance of $R$, the total equivalent resistance will be $$ \left( \frac 1 R + \cdots + \frac 1 R \right)^{-1} = \left( \frac N R \right)^{-1} = \frac R N \;. $$ So yes, if you take a sufficiently large amount of (identical) resistors in parallel, it's the sa...
https://physics.stackexchange.com
627,885
[ "https://physics.stackexchange.com/questions/627885", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/277769/" ]
<blockquote> Why does the dependence of Coulomb force on the medium not conflict with the superposition principle? </blockquote> As I have been told (and checked myself on the web including this website), the Coulomb force changes by a factor when the medium is changed, due to the polarisation of the medium. But the po...
Your teacher is correct. The force on one charged particle due to another does not change. But the medium (due to polarization) changes the <em>net force</em> on the particles. When the medium becomes polarized due to the presence of the charges, the electric field on each particle will be different compared to the cas...
In simple terms: think about two charges A and B in vacuum, the Coulomb force acts on each charge. If the medium is changed, taking for example dielectric, the electric field of the charges change the orientation of the dipoles of the medium. It means that the medium is polarized. Polarization is the average dipole per...
https://physics.stackexchange.com
65,396
[ "https://mathoverflow.net/questions/65396", "https://mathoverflow.net", "https://mathoverflow.net/users/15212/" ]
I am interested in bounding the following Salie-type ("twisted Kloosterman") sum $$ S(a,b,\beta) = \sum_{x \in \mathbb{Z}/{p^{\beta}}\mathbb{Z}} \left( \frac{x}{p^{\beta}} \right) \chi(ax + bx^{-1}). $$ Here, $\left( \frac{\cdot}{q} \right)$ denotes the Jacobi symbol, $\chi(x) = \exp(2 \pi i x /p^{\beta})$, $p$ is an...
There is a general "elementary" formula for Salié sums for arbitrary modulus, involving roots of quadratic equations, and from which the bound is immediate. A quick derivation is in Sarnak's "Some applications of modular forms" but it can be found in many places.
I beleive this is done in Keith Conrad's paper, On Weil's proof of the bound for Kloosterman sums, J. Number Theory 97 (2002), no. 2, 439–446, MR1942969 (2003j:11087).
https://mathoverflow.net
524,421
[ "https://stats.stackexchange.com/questions/524421", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/35988/" ]
Suppose <span class="math-container">$z_t$</span> is zero mean I(2) process Show that <span class="math-container">$z_t$</span> can be written as <span class="math-container">$$z_t = \sum_{i=1}^t e_i +\sum_{i=1}^{t-1}e_i +\sum_{i=1}^{t-2}e_i +...+e_1 $$</span> where <span class="math-container">$e_i$</span> is white n...
Hi: If <span class="math-container">$z_t$</span> is I(2) with zero mean then that means that <span class="math-container">$(z_{t} - z_{t-1}) = (z_{t-1} - z_{t-2}) + \epsilon_{t}$</span>. So, if you difference the differences, that gives an I(0) process. <span class="math-container">$(z_{t} - z_{t-1}) - (z_{t-1} - z...
<strong>Hint 1:</strong> random walk is a cumulative sum of i.i.d. increments and is I(1). A cumulative sum of a random walk is a cumulative sum of an I(1) process and thus I(2). Your case is where i.i.d. is replaced by something more general, namely, an I(0) process. <blockquote> I will write <span class="math-contain...
https://stats.stackexchange.com
103,227
[ "https://electronics.stackexchange.com/questions/103227", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/37925/" ]
I got an old CRT oscilloscope someone had laying around unused in his garage (an ATAIO AI 751A which seems pretty obscure, not getting any meaningful Google results). Unfortunately the user manual is missing, I couldn't find it online and this is the first CRT oscilloscope I work with, so I'm not sure if I'm operating ...
Pull out the trigger level knob. This will put it into "auto" trigger mode, which basically means it will automatically start a new sweep a short interval after the previous one ends. This will give you a continuous trace even with a DC input signal. On modern scopes that have microprocessors, "auto" now means somethi...
I suspect your scope is fine, and you just need to manually set the trigger mode, channel, and level. Even on today's modern digital scopes, hitting an AUTO button does things you don't want it to do. Further, pretriggering on these dinosaurs is difficult or non existent, so the trigger point will be at the far lef...
https://electronics.stackexchange.com
35,986
[ "https://mathoverflow.net/questions/35986", "https://mathoverflow.net", "https://mathoverflow.net/users/7165/" ]
I use $\dim_H(E)$ to denote the Hausdorff dimension of a set $E \subseteq \mathbb{R}$ and $|E|$ to denote its Lebesgue measure. It is easy to see from the definition of Hausdorff dimension that if $\dim_H(E) &lt; 1$, then $|E| = 0$. The converse is not true, and there are many cases where $\dim_H(E) = 1$ yet $|E| = 0$....
Try a countable union of sets (such as Cantor sets) whose Hausdorff dimension tends to 1.
Perhaps Hausdorff's original paper? He uses gauge functions other than powers of x. And constructs Cantor sets corresponding to them. For example if you take $x |\log x|$ then you get a set of Hausdorff dimension $1$ but measure $0$.
https://mathoverflow.net
142,924
[ "https://dba.stackexchange.com/questions/142924", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/42017/" ]
I'm currently doing my first setup with Distributed Availability groups. This is currently a POC setup but will normally be implemented soon. I have 4 nodes, 2 nodes located together and 2 other also together but with some distance between them. I set up the Distributed AG with the automatic seeding and everything is ...
After a call with someone from Microsoft, I was told that there are no listeners on the Distributed availability level yet. So currently if we want to use DAG, you will have to change your DNS or application connection to connect to the secondary availability group.
You can create a CNAME that points to the primary AG that the applications use to connect. Set the time to live low. Change the CNAME to point to the DR AG on failover.
https://dba.stackexchange.com
1,917
[ "https://mechanics.stackexchange.com/questions/1917", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/1044/" ]
I have a VW Citi Golf, and the Welch plugs on the engine block suddenly started leaking water. The engine sounds fine, but it obviously leaked a lot of water and although I didn't drive far, I'm not sure how long ago this happened. The mechanic seems to think they just need to be replaced, but what would cause this t...
Wikipedia says they can corrode and fail from improper engine maintenance. However, I'm unable to come up with a really good explanation for why. I suppose not servicing the cooling system ever could lead to an issue, but you'd almost certainly see it elsewhere first.
Welsh plugs are mainly made of carbon steel, and with out antifreeze in the coolant water, they corrode quite fast with the engine heating and cooling. My brand new 3 year old Citi Sport has a leaking head welsh plug because I did not top up with antifreeze.
https://mechanics.stackexchange.com
694,830
[ "https://physics.stackexchange.com/questions/694830", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/261605/" ]
The question is in the title, Let's say I have one boson (Mike) somewhere on earth and another one (Fatima) somewhere in proxima centauri. They are identical. My friend argues that whatever the configuration I should write a symmetric wavefunction to describe this system. I argue that it is not the case, and that I sho...
In quantum mechanics, there simply are no unsymmetrized states, in the Hilbert space for identical bosons. By definition, all states are completely symmetric between the exchange of identical bosons. There is no arbitrary rule that says that some states are symmetrized, and others not. Therefore, your friend is correct...
I agree the answer from Andrew: the Hilbert space for identical bosons only has symmetric states. Another point worth making is that if two particles are identical then any Hamiltonian describing their dynamics will be symmetric with respect to exchange of those particles and it follows that the joint state will never ...
https://physics.stackexchange.com
747,141
[ "https://physics.stackexchange.com/questions/747141", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/356637/" ]
Earlier in class today, my professor explained how to derive the momentum operator. His derivation went like this: <span class="math-container">$$\hat{KE} = \frac{-\hbar^2}{2m}\frac{\partial^2}{\partial x^2}$$</span> and <span class="math-container">$$KE=\frac{P^2}{2m} \Rightarrow P = \sqrt{2mKE}$$</span> Hence: <span ...
Because part of the objects mass is further away or closer to the center of rotation. Since the contribution to the kinetic energy is quadratic, not linear, in the distance from the axis of rotation, you don't get the same answer for a point particle moving along the center of mass of the object. That discrepancy is ac...
The kinetic energy (KE) of a system of particles, of which a rigid body is a special case, is the kinetic energy of the center of mass (CM) plus the KE of the system with respect to its center of mass. This is proven in many physics mechanics textbooks, such as Classical Mechanics by Goldstein.
https://physics.stackexchange.com
2,390,053
[ "https://math.stackexchange.com/questions/2390053", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Often, when one deals with limits of sequences, and one has to do a proof using the definition, there appears the nasty $&lt; 2 \epsilon$ in the end. Of course, many people are satisfied by it, but I'm not and I think we should prove that this is sufficient. Therefore, consider the following statement. Can someone veri...
Your proof is indeed correct, but to me it illustrates why people usually aren't bothered by the "$2\varepsilon$"; it's really easy to formally prove they are equivalent, and intuitively, the distance still gets 'arbitrarily small'.
Your proof is correct, and the reason that this works as you'd want it is that $x\mapsto kx$ (for positive $k$) is bijection of $(0,+\infty)$ onto itself. Thus, let me write your proof again, but replacing $\epsilon\mapsto k\epsilon$ with $f\colon (0,+\infty)\to (0+\infty)$ bijective: <blockquote> <strong>Proof</st...
https://math.stackexchange.com
251,310
[ "https://physics.stackexchange.com/questions/251310", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/95075/" ]
i know relation ohm : $$R=\rho\frac{L}{A} $$ i want to know about resistance from view point small particle like <strong>atom,dipole</strong>: when we have a resistor,with a special voltage it has loss power: <strong>whats important factors that causes resistance?</strong> i only know, one of factor ( origin) this ph...
Metals are in solid state. So conductors are basically solids. (Don't take it too much. There are no solids in quantum physics). A conductor is hence characterized by tightly packed atoms with plenty of availability of valence electrons that are ready to get off from what that holds them. Also a good conductor like sil...
In a perfect lattice, the resistance would be zero. The reason for resistance is electrons being scattered by departures from a perfect lattice, for example lattice vibrations or imperfections in the lattice due to, for example, the presence of impurities or irregularities.
https://physics.stackexchange.com
190,554
[ "https://security.stackexchange.com/questions/190554", "https://security.stackexchange.com", "https://security.stackexchange.com/users/166618/" ]
I can understand why you wouldn't want to email someone their password, but on an SSL encrypted web page, I dont understand why websites always require you to reset the password when you'd probably prefer to keep it the same, you just forgot it. SSL is completely secure right? So from a security standpoint, the only r...
Three huge problems with this: <ul> <li>The server must be able to send the password, meaning the server knows the password, meaning the server admin/owner can read it too. This should <strong>never</strong> be possible (see many many topics about hashes, salts, and multiple-round derivation functions). While an adm...
One important issue has not been mentioned, yet:<br> <strong>The (missing) authentication of the Client in SSL/TLS</strong>. While @deviantfan has a few valid points, I would like to add this basic issue, why your proposal is not feasible. <strong>TLS without Client authentication:</strong> Typically SSL/TLS ar...
https://security.stackexchange.com
32,711
[ "https://electronics.stackexchange.com/questions/32711", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/9933/" ]
Nyquist-Shannon sampling theorem states that sufficient condition for sampling is sampling rate higher than twice the highest frequency. By highest frequency, does this refer to the highest frequency content of the signal's Fourier transform?
<strong>Yes.</strong> If the signal contains higher frequency parts, aliasing will occur and the signal will be distorted, this is why all digital recording equipment has filters that remove the signal parts above f/2. It is also why audio is recorded using at least 44kHz and not 40. If you recorded sound using 40kHz s...
Yes, if the signal bandwidth starts at DC (0 Hz). Otherwise, the highest frequency can be much higher as long as the bandwidth of the content is less than the sample rate, and the band doesn't cross N*(Fs/2) for any integer N. If there's no baseband signal, then the high frequency alias has nothing to alias against...
https://electronics.stackexchange.com
4,556,043
[ "https://math.stackexchange.com/questions/4556043", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1015445/" ]
Let <span class="math-container">$S$</span> be an invertible <span class="math-container">$n\times n$</span> matrix in <span class="math-container">$M_{n\times n}(\mathbb C)$</span> if <span class="math-container">$x\in \mathfrak {gl}_S (n,\mathbb C)$</span> then trace of <span class="math-container">$x$</span> is zero...
For the first question, you can take for instance <span class="math-container">$$f(x)=\mathrm{Re}\left(e^{\frac{-1+i\sqrt3}2x}\right)=e^{-\frac x2}\cos\frac{x\sqrt3}2.$$</span> For the generalization, let <span class="math-container">$\omega=e^{i2\pi/n}$</span> and take <span class="math-container">$$f(x)=\mathrm{Re}\l...
Without contradicting Anne Bauval’s answer I’d like to present an alternative approach which explains why solutions of this kind work and provides a more general form. It also makes that pesky <span class="math-container">$e^x$</span> term natural. As before, <span class="math-container">$\omega$</span> is a primitive ...
https://math.stackexchange.com
230,586
[ "https://electronics.stackexchange.com/questions/230586", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/108114/" ]
I have just inherited a piece of equipment that is powered by a 12V DC permanent magnet motor. My hope is to drive it using an Arduino PWM and a H-Bridge to manage the current requirements (7.3A continuous load, peaks at around 10A on start up). That is all fine and good and working, my only concern is that there are t...
If it is an earth wire then it's probably there because the motor windings do not offer full reinforced insulation. This might be because the motor was (or is) intended to be used with a 12V power supply that isn't necessarily isolated from AC mains voltages and, the earth wire will protect users from receiving electri...
It's possible that the third wire is a tacho output, uncommon but not unheard of. Quick way to check, see if you can measure the resistance between the wire and the case, less than a few ohms and it's an earth, a few to a few tens of kohms (may be polarity dependent) and it's some kind of semiconductor device output (t...
https://electronics.stackexchange.com
13,091
[ "https://softwareengineering.stackexchange.com/questions/13091", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/71/" ]
Which of these is better for maintainability? <pre><code>if (byteArrayVariable != null) if (byteArrayVariable .Length != 0) //Do something with byteArrayVariable </code></pre> OR <pre><code>if ((byteArrayVariable != null) &amp;&amp; (byteArrayVariable.Length != 0)) //Do something with byteArrayVariab...
I think the second form is fine, and also more clearly represents what you're trying to do. You say that... <blockquote> I recall reading in code complete that doing things like that is bad for maintainability. This is because you are relying on the language to not evaluate the second part of the if if the first par...
I'm surprised nobody has mentioned it (so hopefully I'm not misreading the question)--<strong>but both kind of suck!</strong> The better alternative would be to use early-exits (placing a return statement early in the code if no other code should execute). This makes the assumption that your code is relatively well r...
https://softwareengineering.stackexchange.com
4,236,241
[ "https://math.stackexchange.com/questions/4236241", "https://math.stackexchange.com", "https://math.stackexchange.com/users/826765/" ]
<blockquote> &quot;Let's define <span class="math-container">$a_n=\sum\limits_{k=0}^{\lfloor n/2 \rfloor} {n-k \choose k}\left(-\frac{1}{4}\right)^k$</span>. Evaluate <span class="math-container">$a_{1997}$</span>.&quot;<br> </blockquote> This problem is from the final round of an old South Korean Mathematical Olympia...
This is a solution which assumes a background in solving homogenous linear recurrences. Perhaps there is a more elementary or clever solution that was intended, but I cannot imagine it. <span class="math-container">\begin{aligned} a_n &amp;=\sum_{k=0}^{\lfloor n/2\rfloor} \binom{n-k}{k}(-1/4)^k \\&amp;=\sum_{k=0}^{\lfl...
Snake oil: <span class="math-container">\begin{align} \sum_{n=0}^\infty a_n z^n &amp;= \sum_{n=0}^\infty \left(\sum_{k=0}^{\lfloor n/2 \rfloor} \binom{n-k}{k}\left(-\frac{1}{4}\right)^k \right) z^n \\ &amp;= \sum_{k=0}^\infty \left(-\frac{1}{4}\right)^k\sum_{n=2k}^\infty \binom{n-k}{k} z^n \\ &amp;= \sum_{k=0}^\infty \...
https://math.stackexchange.com
34,425
[ "https://dsp.stackexchange.com/questions/34425", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/23889/" ]
What is the differences between the two of them? I know that the matched filter is a detection filter because it detect what is the peak of the signal and return the time delay of reflected and transmitted signal. Whereas the Wiener filter is an estimation filter because it estimates the mean-square-error estimation of...
<ul> <li>If you want to maximize the signal-to-noise ratio using a linear filter in the presence of additive random noise, then it can be proved that <strong>matched filter</strong> is the optimal filter. It is usually performed for detection of a <em>known</em> waveform.</li> <li>If you want to minimize the mean squar...
For my understanding, detection is to judge whether a known signal presents in the unknown signal, and the matched filter is indeed the reversal version of known signal itself, thus the matched convolution filtering is indeed the cross correlation between a known signal and a unknown signal. Estimation is to estimate t...
https://dsp.stackexchange.com
111,961
[ "https://softwareengineering.stackexchange.com/questions/111961", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/32109/" ]
<strong>Short Question</strong><br> Is it necessary to add the function header comments for <strong>simple</strong> accessors and mutators? <strong>Example</strong> <pre><code>u8 OBJ_get_state_x(void) {return obj.state_x;} void OBJ_set_state_x(u8 x) {obj.state_x = x;} </code></pre> <strong>Addition Thoughts<...
Only if logic is performed. Its possible to have getters / setters that don't map to specific class variables, so, in this case, yes, if its just returning a class variable then no, why would this be necessary? (except for in a class teaching programming or something)
I think you should have a comment there still, not to explain what the function itself does, which is obvious, but rather what the variable returned by it does. If the name of the variable explains it, then fine - you probably don't need any comments. If the name is something like "state_x" the programmer calling the...
https://softwareengineering.stackexchange.com
258,992
[ "https://physics.stackexchange.com/questions/258992", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/70392/" ]
Let us consider the following matrix element: $$\langle n',m',l'|x| n, m, l \rangle$$ For the corresponding radiative transition we have the selection rule that $\Delta m=\pm 1$. But will the photon emitted be circularly polarized i.e.: $$|\psi \rangle=|\pm m=1 \rangle$$ or linearly polarized (i.e. a combination of two...
Given two states $|n,l,m⟩$ and $|n',l',m'⟩$, the following radiative transition matrix elements are nonzero: $$\left\langle n,l\pm1,m+1 \middle| x+iy \middle| n,l,m \right\rangle,$$ $$\left\langle n,l\pm1,m-1 \middle| x-iy \middle| n,l,m \right\rangle,$$ and $$\left\langle n,l\pm1,m \middle| z\middle| n,l,m \right\rang...
I assume you are talking of the transition dipole element which is typically defined as $$\langle n',m',l'|qx| n, m, l \rangle$$ with q being the charge of the dipole and x its position. As you already said, the linear polarization is a superposition of the two circular polarization Eigenstates. And in addition, horiz...
https://physics.stackexchange.com
60,918
[ "https://electronics.stackexchange.com/questions/60918", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/9518/" ]
<img src="https://i.stack.imgur.com/fNC9c.png" alt="enter image description here"> The input rising and falling edges occur at time <em>t = 0</em>. The propagation delays of the respective gates are 3 and 4 <em>ns</em>, as shown. According to my analysis, the waveforms are as below: <img src="https://i.stack.imgur.c...
A proper propagation-time specification for a gate should state the guaranteed minimum time and the guaranteed maximum time. Although simulators don't usually do so, I would suggest that you should model an OR gate with a 1ns minimum propagation and a 3ns maximum propagation as being: -1- High if, within the last nan...
There is a race; the current test stimuli simply don't find it. Increase the test coverage systematically and it ought to be detected.
https://electronics.stackexchange.com
679,133
[ "https://physics.stackexchange.com/questions/679133", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/312034/" ]
Suppose I have a battery of <span class="math-container">$V$</span> volts and a circuit is made using it. This battery produces a constant electric field which moves the electrons thus establishing current. Now what will happen to the electric field if I increase the length of wire in the circuit (i.e. make it a longer...
<blockquote> Will electric field change ? </blockquote> Yes <blockquote> If yes then why </blockquote> Because you kept the potential the difference the same but increase the distance over which it is dropped. <blockquote> electric field is produced by the battery having some potential difference, it is only related to...
&quot;...here Δr is the distance between higher and lower potential point of the battery.&quot; Not so sure about that? Since you integrated the battery in the wire circuit, the leads of the battery extend now to the ends of the two wires. So, <em>dr</em> must include also the length of the wires.
https://physics.stackexchange.com
224,252
[ "https://dba.stackexchange.com/questions/224252", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/154300/" ]
We are migrating our one of testing servers. <strong>My questions are:</strong> <ol> <li>What is a best way to migrate database from one server to another?</li> <li>If I do data migration through export/import utility (Full database export) then will it create schema and table spaces or it will import whole dump in o...
<ol> <li>There is no best method. It all depends on the circumstances: size of the database, downtime allowed, version difference, platform difference.</li> <li>It will create the tablespaces and schemas. The tablespaces can be changed with the <code>REMAP_TABLESPACE</code> parameter. </li> <li>Yes.</li> </ol>
<blockquote> What is a best way to migrate database from one server to another? </blockquote> When I have done this in the past migrating a production db to another server, where we could only have down time of a matter of minutes. I did it by log shipping. For the final log I cut off all applications etc, did the f...
https://dba.stackexchange.com
12,129
[ "https://mathoverflow.net/questions/12129", "https://mathoverflow.net", "https://mathoverflow.net/users/3338/" ]
Hello, I'm writting something about Malcev categories and monadicity. The fact is that I need to know if Graph is or not complete (have all finite limits). It seems easy but I would like a real answer (not my feelings saying that it is) and I don't find that information anywhere. Thank you for your answers.
First let me just mention that <em>complete</em> usually means "has all small limits". If you want to say "has all finite limits", you could use the term <em>finitely complete</em> or just <em>has finite limits</em>. You did not explain which particular category of graphs you are talking about, but luckily almost any ...
Here's another one: The category of graphs is a topological category over SET an therefore complete and cocomplete.
https://mathoverflow.net
218,279
[ "https://security.stackexchange.com/questions/218279", "https://security.stackexchange.com", "https://security.stackexchange.com/users/-1/" ]
I have a website with a client-side HTML contact form created manually (not as output of an HTML constructor like PHP): <pre><code>&lt;form action="mailto:someone@example.com"&gt; Email Adress:&lt;br&gt; &lt;input type="email" name="email_address" value="" maxlength="100" /&gt; &lt;br&gt; &lt;input typ...
You can't. The question doesn't even make sense on a conceptual level. A <code>mailto:</code> link is simply a convenient way to communicate to an end user where they can send email to. If your mailto link works, the end user will <em>by definition</em> know where the email is going to, the same way the end user will <...
You cannot hide HTML and expect the browser to be able to interpret it. The browser needs full access to the HTML in order to display all parts of the site. As soon as the browser has access to it, the user can also gain access to it. On a further note, JavaScript is also not able to "hide" the content of the site and...
https://security.stackexchange.com
123,746
[ "https://mathoverflow.net/questions/123746", "https://mathoverflow.net", "https://mathoverflow.net/users/31991/" ]
I am trying to show the equality of two complex space germs related to double points of singular map germs $f:(\mathbb C^n,0)\to (\mathbb C^p,0)$. This two spaces are given by two (possibly non reduced) ideals, let's say $I,J$, in $\mathcal O_{2n+s}$. I can show $J\subseteq I$ and, if we call $K$ the ideal wich defines...
This is a partial answer. An ideal $K$ is a cancellation ideal if for any ideals $I$ and $J$, $IK=JK$ implies that $I=J$. Your question (1) says that $K$ is a cancellation ideal. It is known that a principal ideal $K=(a)$ in a commutative ring $R$ is a cancellation ideal if and only if $a$ is not a zero divisor. Also...
There's a good chance you already know this, but $IK\subset JK$ at least implies $I\subset\sqrt{J}$. Proof: Let $k_1,\ldots,k_n$ generate $K$. Then for any $x\in I$, we have $xk_\alpha=\sum j_{\alpha\beta}k_\beta$ for some $j_{\alpha\beta}\in J$. Putting these together gives a matrix equation $$(x\cdot 1-M)k=0$$ ...
https://mathoverflow.net
2,423
[ "https://mechanics.stackexchange.com/questions/2423", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/1262/" ]
My 2003 CTS vibrates pretty bad at idle speed (around 600 RPMs) But If I rev up to 800 or so, it's totally smooth. The real problem is partially due to worn motor mounts, but I dont want to spend $500 to replace them right now. So, is there any way for me to reprogram the idle speed? Would I have to purchase some...
Aftermarket tuners/PCM flashers (such as HP Tuners) will allow you to do this. However, HP Tuners costs about $600, so your best bet would be to find a friend or shop who already has one, unless you see yourself using such a tool often. Also, worn motor mounts will put more stress on other mounts in the driveline (tr...
On some vehicles the Throttle Position Sensor can be adjusted. You can loosen the screws and gently move the TPS until the idle speed changes. <strong>I do not recommend doing this.</strong>
https://mechanics.stackexchange.com
286,612
[ "https://electronics.stackexchange.com/questions/286612", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/23669/" ]
I have a "host" device that does not have a 5V rail for VBUS but has a lithium battery for power.The battery voltage meets alternate mode VCONN specifications (2.7 V to 5.5 V on VCONN). Is it possible to power a "slave" device over VCONN without implementing a PD control scheme and using VBUS?
As I understand, you mean that your host has a 5V internal battery supply that can afford only 200 mA to source (VCONN is 5V @ 1W), right? The USB PD protocol indeed is the correct thing to advertise "Battery Supply Power Data Object" (Table 6-9 of PD specs) with B[9..0] = 0x004. The use of VCONN is not defined/allow...
Normal USB devices are not allowed to be powered by VCONN. The only VCONN-powered accessories that are allowed are direct-attach Alternate-Mode UFPs. If the device doesn't negotiate an Alternate Mode, the DFP is allowed to turn off VCONN. Downstream facing ports (DFPs) with a Type C connector are not required to suppl...
https://electronics.stackexchange.com
464,604
[ "https://electronics.stackexchange.com/questions/464604", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/64720/" ]
I have application which has 3 UARTS (GSM / Debug / GPS) and will be developed under FreeRTOS (not the matter here but STM32F1 will be used). What would be the pattern to use with this setup regarding: GSM: Will be used to receive message commands and send feedback from sensors. GPS: Will be processed to get new loc...
To add to the answer from stiebrs, here's a start for the relevant DMA interrupt handlers to add Idle detection. You need to implement RegisterRemainingBuffer_ISR() yourself, reacting to \r\n etc. Also, you need to distinguish the different UARTs. <pre><code>//Called from interrupt when the buffer is completely filled...
Use DMA with IDLE detection, don't process data in interrupts. Your interrupt handler just signals your tasks, that IDLE has been detected and returns number of characters and pointer to the buffer to task responsible for processing it. Tasks just process the data or sleep, if all is done. Note, that you'll have to i...
https://electronics.stackexchange.com
63,301
[ "https://mathoverflow.net/questions/63301", "https://mathoverflow.net", "https://mathoverflow.net/users/14008/" ]
Let $f:X\rightarrow Y$ be a morphism of schemes. <ol> <li>When $PicY\rightarrow PicX$ is an embedding and $f_{*}\mathscr{O}_{X}$ is invertible, it is the structure sheaf of $Y$.</li> <li>In the proof of Zariski's Main Theorem, we have: If $f$ is birational, finite, integral, and $Y$ is normal, then $f_{*}\mathscr{O}_{...
<strong>Q</strong>: Exactly what information is contained in $f_*\mathscr O_X$? Look at the definition. For any $U\subseteq Y$ open, $f_*\mathscr O_X(U) = \mathscr O_X(f^{-1}(U))$ = regular functions on $f^{-1}(U)$. So the information in $f_*\mathscr O_X$ is related to the sets in $X$ of form $f^{-1}(U)$. Cases whe...
If $f:X\to Y$ is a proper morphism of noetherian shemes, then $f_*O_X=O_Y$ says that the fibers of $f$ are connected. This follows from a general form of Zariski's main theorem (Hartshorne III.11.3). Conversely, if $Y$ is in addition normal, then $f_*O_X=O_X$ holds. Indeed, there is a Stein factorization of the form ...
https://mathoverflow.net
598,355
[ "https://electronics.stackexchange.com/questions/598355", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/301640/" ]
I am routing an 8-layer PCB, and need to have strict impedance control on one of my nets. The signal layer that the sensitive net is on is in between a ground plane and a power plane. Such as: ------- GND<br /> ------- Signal<br /> ------- Vcc My question here is, will the capacitive nature of the two planes have an ef...
Yes, both planes will affect the impedance. Although it it nothing wrong with using a power plane as a reference plane. When having impedance controlled lines between two planes, it is usually referred to as <em>stripline</em>. Can be symmetric (same distance to both reference planes) or asymmetric (not same distance t...
Yes, the added plane will affect the Zo of your trace. But either way (routing on an outer layer or on an internal layer) will work. You need to adjust your trace width (make it narrower) on the inner layer to account for the additional plane, which is a return path for high frequency signals. There are many tools out...
https://electronics.stackexchange.com
1,126,392
[ "https://math.stackexchange.com/questions/1126392", "https://math.stackexchange.com", "https://math.stackexchange.com/users/157012/" ]
I want to plot the level curve for the function $f(x,y)=\frac{y^2-x^4}{y^2+x^4}$ . I tried by substituting $f(x,y)=k$. But I am Unable to draw it using paper and pen. Kindly help me.
In the Gaussian elimination, given a matrix $A$, you apply a sequence of elementary row operations $E_1,\ldots,E_k$ in order to obtain a row echelon form $B$ of $A$: $$\tag{1} B=E_k\cdots E_1A=:EA. $$ Two matrices $A$ and $B$ are similar if and only if there is a nonsingular $X$ such that $$\tag{2}B=XAX^{-1}.$$ So the...
You can use Gauss to take the matrix \begin{equation} \left( \begin{array}{cc} 1 &amp; 0\\ 1 &amp;1 \end{array} \right) \end{equation} To the identity matrix. Since the identity similar only to itself, Gauss elimination does not respect similarity.
https://math.stackexchange.com
136,152
[ "https://softwareengineering.stackexchange.com/questions/136152", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/3250/" ]
Sometimes my QA team reports bugs, but neither I or them have any idea on how to reproduce them. This leads to very long and frustrating debugging sessions which sometimes do not even yield results. My software is tied heavily with proprietary hardware so bugs can come from many directions at once. Should I expect m...
QA should always try and make the bugs as easy for you to reproduce as possible and the bug description should contain the steps taken. However, if they can't easily reproduce the bugs, they should still get entered into the bug database with suitable title/headings and a full description of what they did to cause the...
It looks like your QA department is doing too much exploratory testing (ie. They don't have a good test plan). Exploratory testing is good, and identifies problem areas, but from there they should be defining reproducible test cases (ie. a test plan) to perform that will reveal specific bugs. There's a number of re...
https://softwareengineering.stackexchange.com
1,669,152
[ "https://math.stackexchange.com/questions/1669152", "https://math.stackexchange.com", "https://math.stackexchange.com/users/342906/" ]
If I'm given a linear map $T:\mathbb{R^2\rightarrow R^2}$ which is represented by the matrix $$\left[\matrix{0 &amp; 0 \\ 1 &amp; 1}\right]$$ How would I go about finding the kernel and image of T? Also how would I check that $\mathbb{R^2}=$ Ker$T\oplus$Im$T$?
Hint: The acceleration would be the vector sum of the tangential and radial one, i.e $$|a|=\sqrt{(\frac{v^2}{r})^2+(\frac{dv}{dt})^2}$$ Now you have $a(t)=0.06t$, can you find $v(t)$? and subsequently $x(t)$? then you know $x=524m$, find t from this and then find v at that t and find |a| by the above relation.
Notice that the circular path of the car does not affect the velocity function. We use the radius only to find the distance traveled by the car so that we may use basic calculus to find the velocity and acceleration. The distance is, as you have found, to be $\frac{1}{3} \times 2\pi(250),$ which is about $523.6.$ We ...
https://math.stackexchange.com
200,179
[ "https://softwareengineering.stackexchange.com/questions/200179", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/55045/" ]
Can anyone give an example of instances in which the AF_UNIX i.e unix domain sockets are used for process communication in a unix-based system
X windows uses unix sockets when you run application locally (on the same host as the X server) and tcp for remote application. MySQL programs also uses unix sockets to connect to a local server.
<code>socketpair</code> is great to communicate with a child process. With <code>SEQ_PACKET</code> mode you need to do very little framework, just work on the meat.
https://softwareengineering.stackexchange.com
177,342
[ "https://softwareengineering.stackexchange.com/questions/177342", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/11/" ]
Passwords shouldn't be stored in plain text for obvious security reasons: you have to store hashes, and you should also generate the hash carefully to avoid rainbow table attacks. However, usually you have the requirement to store the last <em>n</em> passwords and to enforce minimal complexity and minimal change betwe...
Store the hashes and verify an entered password against those stored hashes, the same way you verify a password when logging in. You would have to generate 'alternative' passwords from the one given based on numerical patterns to detect your 'minimal' changes. On login, you verify the entered password against a hash a...
When the user changes their password, require them to enter their previous password. You now have access to <em>two</em> plain text passwords, even though you are not storing plain text passwords in your database. Perform whatever verifications you want on these two passwords. This won't prevent the user from altern...
https://softwareengineering.stackexchange.com
2,058
[ "https://mechanics.stackexchange.com/questions/2058", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/514/" ]
Since having my tires changed, I've been hearing a clunking sound from what sounds like the back driver side of my car. This noise only comes when the brakes are applies softly, just enough to slow the car down. Breaking hard, driving normally or accelerating doesn't cause this either. I'm thinking that the changing...
It could be incorrectly torqued wheels, loose disc brake calipers, brake pad shims, suspension pieces loading/unloading from the weight shift. If they just did the tires, take it back and tell them to take a look (for free). Try slowing the car down with the engine. If it's manual, just downshift. If it is automatic, ...
Sounds like either you've got a warped brake disk or some kind of crud (possibly brake pad) stuck to the disk. Is it the same wheel your hand brake is connected to? Just wondering if you possibly got your brakes hot then parked and applied your hand brake. If so, that could have deposited a wad of brake pad on the d...
https://mechanics.stackexchange.com
146,837
[ "https://security.stackexchange.com/questions/146837", "https://security.stackexchange.com", "https://security.stackexchange.com/users/91316/" ]
Would it possible to appear as though a server doesn't exist? Is it possible to have all requests believe host-name could not be resolved unless a specific phrase was provided in the request? Is there some evidence of a servers existence that could not be hidden by the owner of the server? Would there be any practical ...
You can set your server to normally drop all incoming packets and only open a port after it gets/sees a set of packets that specify a specific sequence of ports (this is called port knocking). I use this technique with my server; you cannot normally see the server because it drops all incoming packets. Once the port kn...
<blockquote> Would it possible to appear as though a server doesn't exist ... unless a specific phrase was provided in the request? </blockquote> My guess is that you are talking about HTTP (i.e. "web") and a HTTP request here although you don't specify what kind of request you actually mean. In case of a HTTP requ...
https://security.stackexchange.com
281,610
[ "https://electronics.stackexchange.com/questions/281610", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/86140/" ]
In my aplication I need to use a galvanic isolator DC/DC convertor. One parameter in the datasheet (of DC/DC convertor) specifies that maximum capacitve load is 220uF and maximum mA output is 200 However in my application I need about 900uF. Can I use a DC convertor ---capacitor 100uF--- and then LDO with current lim...
As long as your EEPROM has sufficiently fast IO, I don't see why not. The nvSRAM option is also a possibility, although they're certainly not common parts and you'd likely run into similar design problems as an EEPROM. The primary problem would be the fact that any replacement IC is unlikely to have the same electrica...
Battery backed SRAM can be read and written on an individual location basis at full bus speed. Indeed some games use part of the cart ram as extra workspace and other parts as save space. Flash on the other hand is written in blocks, typically involving a special sequence of operations and relatively long waits. Games...
https://electronics.stackexchange.com
225,835
[ "https://security.stackexchange.com/questions/225835", "https://security.stackexchange.com", "https://security.stackexchange.com/users/227057/" ]
We got a realatively high bounce rate today, because someone decided to spread some links using our mail server. The implementation looked like this: He used the registration form and planted a link in the firstname field, which appears in the email's first line. Then he sent out like 1200 emails like this. And my ques...
Apart from captcha, another way in which the attacker should fail is by applying a character limitation. You can limit to 30 characters for each field or even less if you separate them properly. For example, not just let them place everything in the same “Name” field, and separating it by “First name”, “Middle name”, “...
Find a library you can use to parse out domains. Anything with a dot in it should use this library to look for a domain, and then a matching domain would get rejected from the form. This will at least require some obfuscation (like <code>asuspeci . tk</code>). You'll likely still block some legitimate names (you might ...
https://security.stackexchange.com
52,578
[ "https://mathoverflow.net/questions/52578", "https://mathoverflow.net", "https://mathoverflow.net/users/12341/" ]
Suppose we have a matrix <span class="math-container">$M$</span> such that <span class="math-container">$M$</span> is non-symmetric real and has positive eigenvalues. Do we have a relation between eigenvalues/eigenvectors of <span class="math-container">$(M+M^T)$</span> and those of <span class="math-container">$M$</sp...
Let $N:=(M+M^T)/2$. besides the obvious equality $Tr(N)=Tr(M)$ which is an equality of the sums of eigenvalues, you have the following. Let $\lambda_\pm$ be the smallest/largest eigenvalues of $N$. Then every eigenvalue of $M$ satisfies $\Re\lambda\in[\lambda_-,\lambda_+]$. In addition, if $w(M):=\max\{\lambda_+,-\lamb...
Yes. If $N=(M+M^t)/2,$ then $tr\ M = tr\ N,$ while for any vector $v,$ $(v, M v) = (v, N v).$ An additional remark: if $M$ is <em>normal</em>, then the rank of $N$ is at most twice the rank of $M,$ and the eigenvectors of $N$ are the same as those of $M.$
https://mathoverflow.net
3,678
[ "https://softwareengineering.stackexchange.com/questions/3678", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/712/" ]
I work with C# professionally and I write code like this all the time. <pre><code>private IEnumerable&lt;Something&gt; GetAlotOfSomething() { if (somethingA.IsReady) yield return somethingA; if (somethingB.IsReady) yield return somethingB; if (somethingC.IsReady) yield return some...
Iterators (generators etc) are certainly great features that I use a lot. I don't qualify them as necessary, but I will certainly choose languages that have them when I get a choice.
They're... Handy. But you can always just write your own if necessary. The big wins come from standard library / framework support.
https://softwareengineering.stackexchange.com
152,043
[ "https://math.stackexchange.com/questions/152043", "https://math.stackexchange.com", "https://math.stackexchange.com/users/5904/" ]
Does the non-solvability of the halting problem mean that no program can tell if an arbitrary program halts, or only that if such a program exists then there is no computable proof that it works?
A program that decides it (and works correctly for all input programs) cannot exist at all. Or in other words, <em>every</em> program can be <em>proven</em> not to answer the halting problem correctly. Given a purported halting solver we can construct, through a diagonalization argument, an input program that the purp...
It means the former: there is no program $e$ that computes the characteristic function of the set $K = \{ i : \text{program } i \text{ halts on input } i\}$. Undecidablity has nothing to do with <em>provable</em> computability, it it just about actual computability.
https://math.stackexchange.com
533,845
[ "https://stats.stackexchange.com/questions/533845", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/311445/" ]
Consider the following model. Assume <span class="math-container">$(x_i, u_i)$</span> is sequence of independent identically distributed random vectors in <span class="math-container">$\mathbf{R}^{d+1}:$</span> <ul> <li><span class="math-container">$x_i$</span> are <span class="math-container">$\mathbf{R}^d$</span>-val...
Yes, as long as the input for the outcome is failure (0,1) where 0-No 1-Yes (default), then the predicted probability from your logistic regression model will be the probability of defaulting. For your use case of 0.8 or 80% that person does have a default prediction of 80%, so probably not approved. I would think a ...
For the sake of notation, I am using the model with only one independent variable <span class="math-container">$X$</span>. All of the results hold true with more independent variables as well. In logistic regression, we use the <em>logistic function</em> <span class="math-container">$$ p(X) = \frac{e^{\beta_0 + \beta_1...
https://stats.stackexchange.com
498,614
[ "https://physics.stackexchange.com/questions/498614", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/198725/" ]
I read that the relation between temperature and kinetic energy of an ideal gas is only applicable to a large number of particles so that the mean value for kinetic energy has to be considered, so the temperature concept makes sense only as a statistical quantity. But why is that? Using the aforementioned relation for...
Let us consider a situation where we put one "blue" molecule in a gas of "red" molecules. We allow it to equilibriate with a heat bath of temperature T. In this context the "blue" molecule is certainly a single classical particle and it can be associated with a temperature. The important point here is what informati...
Thermal energy is the energy contained in the internal degrees of freedom of a system, so there are two problems with saying that the KE of a single particle gives its temperature. First, the system’s overall momentum, angular momentum, and so forth are by definition external degrees of freedom. Since they are extern...
https://physics.stackexchange.com
3,235,433
[ "https://math.stackexchange.com/questions/3235433", "https://math.stackexchange.com", "https://math.stackexchange.com/users/417353/" ]
Let <span class="math-container">$ R$</span> be a commutative ring with <span class="math-container">$1$</span> and <span class="math-container">$S$</span> be a subring of <span class="math-container">$R$</span> containing <span class="math-container">$1$</span>. Can we say <span class="math-container">$R=S$</span> al...
If <span class="math-container">$S$</span> is a subring of <span class="math-container">$R$</span> with <span class="math-container">$1$</span> we can't say <span class="math-container">$R=S$</span> in general. Plenty of examples have been given already, for instance <span class="math-container">$1\in \mathbb{Z}$</span...
Certainly not. For example, <span class="math-container">$1\in\mathbb Z\subseteq\mathbb R$</span>. What's more, if <span class="math-container">$Q$</span> is a commutative ring with <span class="math-container">$1$</span>, then <span class="math-container">$R=Q\times Q$</span> (with component-wise operations) is a com...
https://math.stackexchange.com
12,584
[ "https://dba.stackexchange.com/questions/12584", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/3863/" ]
Is it possible to view the maintenance plans created in SQL Server 2000 (also running on the same SQL server 2000) in SQL 2005 Server Manangement Studio? I have the server added in my SSMS, but when I expand the Management folder, I don't see the Maintenance Plans folder like what I'd expect from a 2005 server. For e...
SQL 2000 maintenance plans are just SQL Jobs with a bunch of parameters. You can easily enough just look at the parameters which are passed to sqlmaint.
Figured it out. It's under Legacy->Database Maintenance Plans. Also all the plans, optimizations, integrity, trans log and complete backup are bunched up under one title.
https://dba.stackexchange.com
128,799
[ "https://mathoverflow.net/questions/128799", "https://mathoverflow.net", "https://mathoverflow.net/users/14024/" ]
Any grammar for the language $$L =a^p,\text{ $p$ is prime and }p\in \mathbb{N}?$$ Is such a grammar related to any question of number theory like RH or the conjecture of twin primes?
$L$ is not context free, so has no context-free grammar describing it, but it is decidable, so there is an unrestricted grammar for it (there should also be a context-sensitive grammar, but I haven't thought too hard about that). I can't see why this would have any bearing on number theoretic questions like the Riema...
There is a trival algorithm checking primality using linear space (on a Turing machine). Thus there is a context-sensitive grammar for this language. However, there is no context-free grammar by a pumping argument.
https://mathoverflow.net
167,855
[ "https://security.stackexchange.com/questions/167855", "https://security.stackexchange.com", "https://security.stackexchange.com/users/157232/" ]
I am in the process of setting up some site-to-site VPN connections between our sites. Our new VPN servers at each site have numerous encryption/authentication methods and I want to know which are the best from a security perspective. Our existing VPN servers used DES/SHA1. These are the methods that it supports: <s...
SHA512 and AES256 would be the strongest combination of the options you provided. SHA256 and AES128 should be sufficient, at the time of writing. If that is dedicated hardware, the computational cost benefit is probably minuscule. If you're asking this here, you will probably make other configuration mistakes later o...
For authentication, SHA512 is more than enough for above mention requirement. rather you are going SHA512 you can go with SHA256. If you consider encryption,its time consuming compare to the HASH function. Its better to use some middle stronger encryption mechanism rather going to complex encryption. I also recommen...
https://security.stackexchange.com
398,783
[ "https://stats.stackexchange.com/questions/398783", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/240310/" ]
I'm given a joint pdf <span class="math-container">$f_{X,Y}(x,y)=2e^{-x-y}, 0&lt;x&lt;y, 0&lt;y $</span> and asked to compute <span class="math-container">$P(Y&lt;3X)$</span>. To do this, I let <span class="math-container">$Y=3X$</span> (the boundary) and found that the region of integration is under this line. To f...
Before we even consider <span class="math-container">$P(Y &lt; 3X)$</span>, note that we have the condition <span class="math-container">$0&lt;x&lt;y$</span>. Because this specifies both the upper and lower bounds for <span class="math-container">$x$</span>, the natural way to write the the integral over the support of...
The boundary for <span class="math-container">$y$</span> could actually go from <span class="math-container">$-\infty$</span> to <span class="math-container">$3x$</span>, not just <span class="math-container">$0$</span> if the inside expression was written as <span class="math-container">$f(x,y)$</span>. Then, you’d be...
https://stats.stackexchange.com
288,303
[ "https://physics.stackexchange.com/questions/288303", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/133328/" ]
** EDIT: I think I have completely missed the mark on asking my question. Here is another try. I do not understand what a linear combination means in this situation. My naive desire is to have an expression with all the terms from the basis. Yet this does not work dimensionally. What should I be thinking in this sit...
$$\gamma^\mu \gamma^\nu - \gamma^\nu \gamma^\mu = \frac{2}{i} \sigma^{\mu\nu} $$ but $\gamma^\nu\gamma^\mu = -\gamma^\mu \gamma^\nu + 2g^{\mu\nu} $ so $$2\gamma^\mu \gamma^\nu + 2g^{\mu\nu} = \frac 2 i \sigma^{\mu\nu}.$$ Relevant comment from Robin $\gamma^\mu \gamma^\nu$ is a matrix-valued two-tensor. The 16 listed ...
I would apply the expression for anti-commutators of gamma-matrices to your last line of formulas.
https://physics.stackexchange.com
116,464
[ "https://physics.stackexchange.com/questions/116464", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/36415/" ]
It's a somewhat theoretical question. In special relativity, The energy of a photon is given by $E = pc$. But, my argument is that, since photons have no mass, how can they have a momentum $p$? The energy $E$ turns out to be 0 always. So, why does this equation hold?
Momentum in this case is: $p = h / \lambda$ for a massless particle. The momentum is related to the De Broglie wavelength of the particle with this formula. If you plug it in the equation you have stated you will get back the Energy equation of a massless particle: $E = hc/\lambda = hf$
The relativistically correct relation between momentum $p$ and velocity $v$ is $$c^2 p = E v$$ This holds for non-relativistic massive particles ($E = m c^2$ and hence $p=m v$) as well as for massless particles like photons ($v = c$ and therefore $p=E/c$).
https://physics.stackexchange.com
23,860
[ "https://scicomp.stackexchange.com/questions/23860", "https://scicomp.stackexchange.com", "https://scicomp.stackexchange.com/users/4099/" ]
I have a function <code>f(x,k1,k2)</code> and I am trying to minimize it over <code>x</code> for different values of <code>(k1,k2)</code> on a 2d grid like so <pre><code>for i,k1 in enumerate(np.logspace(-3.3,-1,20)): for j,k2 in enumerate(np.logspace(-3.3,-1,20)): if j==0: initial_guess = best...
One approach is to be strategic about setting the initial values and the order in which the grid values of k1 and k2 are evaluated. In particular, you start with the 2x2 grid of lowest and highest values for k1, k2. Then consider, mid-points between the grid values, use <em>averages</em> of x solutions for the neighbor...
Just a guess, but with a 1d minimization of 2 parameters, the best fit is likely a single global minimum in k1,k2-space shaped like a 2d bowl (depending on the function). If true, that is your only local min. (It may be helpful to look up convex vs concave functions; maxima are negative minima too..) So, guess initial ...
https://scicomp.stackexchange.com
49,834
[ "https://electronics.stackexchange.com/questions/49834", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/6406/" ]
<img src="https://i.stack.imgur.com/DoRLV.jpg" alt="The confusing picture"> Found this, confusing picture on a popular ecommerce site, shows an extremely economical DC-DC (step-down) adjustable voltage converter (based on LM2596S), which apparently works for upto 2Amps of current, and usable on breadboards. The part...
From the text at upper-left, it looks like the 'scope is meant to show that the output ripple is 50 mV peak-peak. (I can't read the Chinese, I'm just guessing from the units). That's a fairly small ac signal, which might be acceptable in many digital applications, or which could be further filtered by the user.
50.4mV p-p if you zoom in on the display at 160.9KHz sounds right for a SMPS. 1% ripple at rated load of 2A is a good result.
https://electronics.stackexchange.com
13,148
[ "https://dba.stackexchange.com/questions/13148", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/157/" ]
I'm trying to get a list of jobs and their most recently completed step from the MSDB database. For a single job, this is pretty straight forward, something like: <pre><code> SELECT TOP 1 j.job_id, j.name, h.step_name, h.run_date, h.run_time, h.step_id FROM msdb.dbo.sysjobs j INNER JOIN msdb.dbo.sysjobhistory h ON j...
Unfortunately because there can be ties (the second-to-last step can take 0 seconds and therefore finish at "exactly" the same time as the last step), this is really not pretty in SQL Server 2000. Rather than calculate all of the datetime stuff multiple times I think the easiest way is to stuff it into a #temp table. Y...
I just noticed that sysjobhistory <em>does</em> have an identity key, "INSTANCE_ID". I don't know why I thought the table didn't have one... Finding the largest INSTANCE_ID for each job (excluding step 0) makes this much easier, and avoids the temp table: <pre><code>SELECT j.job_id, j.name, j.enabled , h1.last_ro...
https://dba.stackexchange.com
112,091
[ "https://mathoverflow.net/questions/112091", "https://mathoverflow.net", "https://mathoverflow.net/users/27742/" ]
Let $(u_1, \ldots, u_n)$ and $(v_1, \ldots, v_n)$ be two ordered bases of $\mathbb R^n$. The orientation of the first basis is defined as the sign of the determinant of $[u_1 \cdots u_n]$, and similarly for the second basis. Prove that the first basis can be continuously transformed into the second one, while remaining...
Basically what you're asking in the first question is whether $SL_n({\mathbb R})$ is pathwise connected. Using the polar decomposition, this follows from the fact that $SO_n({\mathbb R})$ is pathwise connected. That, in turn, follows from the properties of Givens rotations.
About volume: first, I think it is reasonable, especially when addressing beginning students, to admit that we do have a prior notion of "volume", even if it is imprecise. Probably most people would agree that rigid rotations (=$K=SO(n,\mathbb R)$) preserve volume, and that dilation (by positive amounts) of coordinates...
https://mathoverflow.net
101,116
[ "https://physics.stackexchange.com/questions/101116", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/41469/" ]
I am confused as to whether/how capacitance changes when each plate has a different charge. For example, consider a coaxial cable and put $20Q$ on the outer cable, and $-Q$ on the inner. Or how about concentric spheres, grounding either the inner or the outer?
Systems of plates are not typically considered capacitors unless they are globally neutral. Nevertheless, capacitance is a geometric property that is to do with the system more than the actual voltages and charges you apply to it, so that your question still makes sense: the capacitance is the same as it would be with ...
Suppose you have two conductors kept at voltages $V_1$ and $V_2$ and they have charges $Q_1$ and $Q_2$ respectively. Then, one has the relation $$ Q_1 = C_{11}\ V_1 + C_{12}\ V_2\quad \textrm{and}\quad Q_2 = C_{12}\ V_1 + C_{22} \ V_2 \ , $$ which defines a (symmetric) Capacitance matrix that is determined by the geome...
https://physics.stackexchange.com
46,929
[ "https://dba.stackexchange.com/questions/46929", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/26313/" ]
The company I'm working for has a SQL Server with read-only access. They use Crystal Reports hooked up to PostgreSQL for reporting. Is there any way to make it so I can move all the data from the MSSQL DB to PostgreSQL <strong>without</strong> user interaction? That seems to be the caveat to what I'm trying to do. They...
Can you not just hook Crystal Reports to an instance of MS SQL Server? That way the process should be as simple as "backup the live database, restore it into test/snapshot location when needed". If the database is less than 10Gb in size you can use SQL Express so there would be no licensing implications, if it is 10Gb...
This sort of thing is possible, but <em>painful</em>, with ETL tools like Talend Studio, Pentaho Kettle, or CloverETL. Alternately, you could dump each table to CSV then <code>COPY</code> it into PostgreSQL, after manually converting the DDL. Either way, DDL changes will be painful to keep in sync. You'll be way bett...
https://dba.stackexchange.com
93,874
[ "https://stats.stackexchange.com/questions/93874", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/29183/" ]
Consider a variable that can take both negative and positive values, and that has the following density plot: <img src="https://i.stack.imgur.com/e25MP.jpg" alt="enter image description here"> I am trying to identify the distribution of this variable. The density plot resembles that of a Gamma distribution. However, ...
The means coincide with the point where the density is maximized. See en.wikipedia.org/wiki/Multivariate_normal_distribution: the mode of a multivariate normal is $\mu$. The shortcut is therefore to minimize the function ω over $(x, y)$, which gives $\mu = (6, 4)$.
Hint: As Adrian points out, we need to minimize $\omega$ as a function of $x$ and $y$. Now, \begin{align} \omega(x) &amp;= 6x^2 - x(16y+8) + \cdots\\ \omega(y) &amp;= 12y^2 - y(16x) + \cdots \end{align} have minima at $$x = \frac{16y+8}{12} = \frac 43y + \frac 23, \quad y = \frac{16x}{24} = \frac{2}{3}x$$ respectivel...
https://stats.stackexchange.com