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 |
|---|---|---|---|---|---|
460,669 | [
"https://electronics.stackexchange.com/questions/460669",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/50416/"
] | I need to connect two circuit boards - one with a microcontroller, power circuitry, display, etc to another with several sensors on. The connection will require somewhere between 4-10 lines - 5V power, ground, I2C data and clock, possibly plus some interrupts. The circuit boards will be mounted at right angles with res... | If you need frequent motion you should specify FPC designed for <strong>dynamic</strong> applications. The treatment of the copper is different from ordinary FPCs to keep it from cracking and there are constraints on the copper thickness and there are other constraints (single-sided is best, gentle radius that spreads ... | Automotive has this problem for the ABS wheel sensors. Their solution is a long lobe of thin, stranded copper wire in a thick rubber hose. That way most of the force is applied to the rubber instead of the conductors.
I would cut down the actual conductors to the power ones and do all else through radio. Or use a sche... | https://electronics.stackexchange.com |
193,620 | [
"https://softwareengineering.stackexchange.com/questions/193620",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/38200/"
] | I work on a C++ project that generates bajillions of warnings. Most of the warnings appeared after the code was written:
<ul>
<li>Initially the project used Visual C++ 8, soon switching to 9, but there is little difference in the generated warnings. Warnings were either fixed or silenced, so there were no warnings the... | Don't touch any of the legacy code. Find a way to suppress the warnings for now. Making seemingly innocuous changes to the code can introduce bugs in code which, I assume, has already been tested and is relatively bug free.
By suppressing all of the warnings that are currently in the codebase, you can pretend to have ... | I think warnings, which are not treated as errors, are useless. You get tons of them, therefore nobody bothers to look at them, and they miss their purpose.
My suggestion is to fix them all, and start treating them as errors.<br>
Fixing them looks scary, but I think it can be done. A good programmer that would pick up... | https://softwareengineering.stackexchange.com |
2,892,787 | [
"https://math.stackexchange.com/questions/2892787",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/382629/"
] | Let $f:(0,\infty)\rightarrow (0,\infty) $, $f (x)+f (y)\geq 2f (x+y), \forall x, y>0$.
Is $f $ decreasing?
I need to show that $f (x)+f (y)+f (z)\geq 3f (x+y+z) $ and it's enough to show that $f$ is decreasing.
| Here is an alternative way to prove your property.
Note that $4f(x+y+z)\le2f(x)+2f(y+z)\le2f(x)+f(y)+f(z)$.
By symmetry $4f(x+y+z)\le2f(y)+f(x)+f(z)$ and $4f(x+y+z)\le2f(z)+f(x)+f(y)$.
Summing up the inequalities give $12f(x+y+z)\le4f(x)+4f(y)+4f(z)$,
dividing by four gives $3f(x+y+z)\le f(x)+f(y)+f(z).$
| We have:
$$f(x)+f(y)+f(z) \ge 2f(x+y)+f(z) = f(x+y) +f(z) + f(x+y)+f(z)-f(z) \ge 2f(x+y+z)+2f(x+y+z)-f(z)=4f(x+y+z)-f(z)$$
In the same manner:
$$f(x)+f(y)+f(z) \ge 2f(x+z)+f(y) = f(x+z) +f(y) + f(x+z)+f(y)-f(y) \ge 2f(x+y+z)+2f(x+y+z)-f(y)=4f(x+y+z)-f(y)$$
And:
$$f(x)+f(y)+f(z) \ge 2f(y+z)+f(x) = f(y+z) +f(x) + f(y+z)... | https://math.stackexchange.com |
310,514 | [
"https://softwareengineering.stackexchange.com/questions/310514",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/217050/"
] | I know this might be a very basic question, but I'm new to XML serialization and spent hours trying to read different pages.
PS: this is a programming language independent question.
| Simple answer: you don't.
If you're serializing data as XML then you have to agree the details of the XML vocabulary with the consumers of the data. Perhaps you define it yourself, perhaps your consumers define it, perhaps it's defined by some standards body. Whichever is the case, whoever defines the vocabulary has t... | To build on Michael's answer, namespaces solve conflicts. So, if you have no conflicts you don't need them.
If I had XML from two sources:
<pre><code>Source 1:
<Foobar>
<Name>Foo</Name>
</Foobar>
Source 2:
<Foobar>
<FullName>Foo</FullName>
</Foobar>
</code></pre>
... | https://softwareengineering.stackexchange.com |
302,558 | [
"https://electronics.stackexchange.com/questions/302558",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/147742/"
] | I have an MSP430G2101 and I need to use the Watchdog to trigger an interrupt. The code I am trying to use is the following:
<pre><code>#include <msp430.h>
#include <stdint.h>
unsigned int cycle = 0;
unsigned int pwmred = 1;
void main(void)
{
WDTCTL = WDT_MDLY_0_5; // WDT as interval timer ... | Because you disabled global interrupts.
_BIC_SR(GIE);
Is Bit <strong><em>Clear</em></strong> Special register.
You want
_BIS_SR(GIE);
Bit <strong><em>Set</em></strong> special register.
Or use __enable_interrupt(); as mentioned.
| It seems that you forgot to enable the interrupt in your code. You can enable all the interrupt with <code>__enable_interrupt();</code> or enable specific interrupt with <code>_BIS_SR(name_of_interrupt);</code>
| https://electronics.stackexchange.com |
8,227 | [
"https://quantumcomputing.stackexchange.com/questions/8227",
"https://quantumcomputing.stackexchange.com",
"https://quantumcomputing.stackexchange.com/users/7816/"
] | There's an exercise in Nielsen & Chuang asking us to show that if some third party intercepts Alice's qubit she's sending to Bob while attempting to transmit (2 bits of) classical information, then this third party can't actually infer anything about the information she's trying to communicate. Effectively, this co... | Mathematically, this has nothing to do with the positivity of <span class="math-container">$E$</span>. It doesn't really have anything to do with <span class="math-container">$E$</span> at all - it's a property of the Bell states themselves (you've probably not got there yet, but they have the same reduced density matr... | This happens for any maximally entangled state <span class="math-container">$|\Psi\rangle$</span> and operator <span class="math-container">$E$</span>.
Indeed, a maximally entangled state is, by definition, one whose partial trace is the maximally mixed one. Writing <span class="math-container">$|\Psi\rangle\equiv\sum... | https://quantumcomputing.stackexchange.com |
25,093 | [
"https://electronics.stackexchange.com/questions/25093",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/2473/"
] | Here's what I working with. I'm researching some three terminal potentiometers for use as adjustable voltage dividers. The outer terminals are connected to 0V and 5V respectably, so as I turn the knob, the wiper voltage sweeps from 0 to 5V.
<strong>My question:</strong> Does the tolerance of the potentiometer (5%, 10%... | If you are just taking the voltage into a high-impedance load, then the value of the pot doesn't matter at all. 1k and 10k pots will both give 2.5V at 50% rotation.
It is a common pattern in electronics to make things ratiometric so exact values don't matter. In this case, the tolerance and temperature coefficient o... | The tolerance is a plus/minus percent rating of the total resistance. I.E. A 100 Ohm pot with a rating of 10% could actually be a 90 Ohm pot or a 110 Ohm pot.
As you are using a pot to give your voltage divider fine tuning ability, you won't need to care if you are a little short/long on the top end.
Figure out what ... | https://electronics.stackexchange.com |
10,032 | [
"https://physics.stackexchange.com/questions/10032",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/2843/"
] | Is there a reason that magnetic field lines are drawn from north to south or is this a purely arbitrarily defined protocol (for convenience)? Essentially what I am asking is: without a reference magnet (like the earth) is there a way determining what pole of a magnet is north and which is south?
| Lagerbaer's comment is correct: you can tell which way the magnetic field vectors point (i.e., which end of your bar magnet is "north") using a moving charge rather than a reference magnet.
But it's worth adding one more point: the original decision to draw magnetic field lines going away from "north" poles of magnets... | The direction of the field lines is pure convention. Magnetic field lines are defined with respect to north magnetic "test charges" placed in the field (and how they move in the field). If they were defined with respect to test south magnetic test charges, the field lines would be reversed.
But as Lagerbaer points out... | https://physics.stackexchange.com |
127,617 | [
"https://dba.stackexchange.com/questions/127617",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/85787/"
] | I want to sum a few values using case statements. My problem is compiler complains if I do not add a group by to the end of the query, which then that negates my Distinct, hah. For example, in my sample below this returns 2 entries for <code>red12</code> even though 1 entry does not fit any of the criteria above, but... | You should use the Pivot operator for this query. See the below.
<pre><code>DECLARE @Bobsled TABLE
(
[event] VARCHAR(100)
, [time] DECIMAL(18, 4)
, employeeID VARCHAR(25)
, name VARCHAR(500)
);
INSERT INTO @Bobsled
VALUES ( 'Walk', '16.32', 'red12', 'red arrow' )
, ( 'Eat', '5.12', ... | I think what you're looking for is an aggregate on <code>employeeID</code> where the <code>CASE</code> goes <em>inside</em> the <code>SUM()</code> aggregate function.
<pre><code>SELECT employeeid,
SUM((CASE WHEN [event] = 'Walk' THEN [time] ELSE 0 END)) AS walktime,
SUM((CASE WHEN [event] = 'RUN' THEN [t... | https://dba.stackexchange.com |
238,037 | [
"https://softwareengineering.stackexchange.com/questions/238037",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/125081/"
] | With the latest trends about C and C++ applications, and with latest I mean the latest years, I was expecting to see <code>std::allocator</code>s to be used way more frequently than what it really is.
Modern applications are usually multithreaded or with form of concurrency in them, and they manage a significant amoun... | There are sort of two questions here:
<strong>1) Why isn't <code>std::allocator</code> used more?</strong>
The short answer is because for most uses, using <code>new</code> and <code>delete</code> is sufficient.
First, a brief overview of what the C++11 Allocator concept is intended for. Basically, when you do a <c... | <strong>The popularity of a language or a library concept is in an inverse correlation with its underlying complexity.</strong>
The <code>std::allocator</code> is a low level concept and as such has potential pitfalls. Having a custom allocator upfront is likely to be judged a premature optimisation. Further, similarl... | https://softwareengineering.stackexchange.com |
33,578 | [
"https://softwareengineering.stackexchange.com/questions/33578",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/6509/"
] | The purpose of this question is not to assemble a laundry list of programming language features that you can't live without, or wish was in your main language of choice. The purpose of this question is to bring to light corners of languge design most language designers might not think about. So, instead of thinking a... | <strong>Unicode Support by default</strong>
This day and age, programs are being developed to be used internationally, or under the assumption that they might be used internationally. They <em>must</em> provide support for their character sets or render programs written in that language useless.
| I have a couple:
<ul>
<li>Generics/templates. For example, Java generics are powerful, but not necessarily flexible. Also, because they use type erasure, I have seen problems implementing them abstractly, especially in interfaces. And the compiler shouldn't warn when a non-specific generic is used (Like <code>Hashmap<... | https://softwareengineering.stackexchange.com |
181,042 | [
"https://electronics.stackexchange.com/questions/181042",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/81163/"
] | What it means when we say that some component or device is inductive or capacitive? How these terms are related to capacitors and inductors?
| A component, device or circuit would be said to be inductive if, upon application of DC voltage, the current through or into the component, device or circuit rises with any delay in comparison to the rise of voltage applied to the component, device or circuit.
A component, device or circuit would be said to be capacit... | A capacitor is a device specifically designed to have capacitance; likewise an inductor is specifically designed to have inductance. For a capacitor, this means we are exploiting electrostatics for a useful part, and for an inductor, we are exploiting magnetics for a useful part.
In a real component that is not an ind... | https://electronics.stackexchange.com |
2,972,439 | [
"https://math.stackexchange.com/questions/2972439",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/588922/"
] | Given <span class="math-container">$x$</span> is an <span class="math-container">$n$</span> dimensional vector, if <span class="math-container">$A = I_n- (2/x^Tx)xx^T$</span>, show that it is orthogonal and symmetric.
I know that if <span class="math-container">$A$</span> is orthogonal and symmetric, <span class="math... | Let <span class="math-container">$x$</span> be an <span class="math-container">$(n \times 1)$</span>-matrix and <span class="math-container">$A = I_n - \frac{2}{x^T x} xx^T$</span>.
<strong>Claim 1</strong>: <span class="math-container">$A$</span> is symmetric.
<strong>Proof</strong>: <span class="math-container">$$\... | To prove that <span class="math-container">$A$</span> is symmetric, you can use the fact that sum of symmetric matrices is symmetric.
<strong>Lemma</strong>: Sum of symmetric matrices is symmetric.
<strong>Claim</strong>: <span class="math-container">$A$</span> is symmetric
<strong>Proof</strong>: To establish the c... | https://math.stackexchange.com |
1,407,641 | [
"https://math.stackexchange.com/questions/1407641",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/247619/"
] | If $T$ is a linear transformation and is said to be one to one or onto- this only makes sense when we specify what domain and range is right?
$T: V \rightarrow V$ may not be onto or one to one
but $T: V \rightarrow Im(T)$ is certainly onto and may or may not be one to one.
Is this right?
| Perhaps this needs a bit more clarification:
<ol>
<li>Your question is really about <strong>functions</strong> in general and not related to linear algebra.</li>
<li>Any function should be thought of as a triple $(f, X, Y)$ which is normally denoted by $f\colon X\to Y$. In other words, whenever you're talking about a ... | Yes, you are correct. We can "make" a linear transformation onto by restricting the codomain to the image of the transformation.
| https://math.stackexchange.com |
633,100 | [
"https://physics.stackexchange.com/questions/633100",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/297875/"
] | Acceleration is a deviation from a geodesic so:
If a person is falling on earth that person is weightless (an inertial frame of reference, not accelerating) and he will see the people in the building going upwards with acceleration. So does that mean that the person falling down is following the path of geodesic as acc... | <blockquote>
so does that mean that the person falling down is following the path
of geodesic
</blockquote>
Yes
<blockquote>
as accleration is deviation from geodesic and falling person isn't
acclerating and are the people on the building deviating from path of
geodesics since they are acclerating?
</blockquote>
When w... | Trajectories along geodesics aren't subject to other forces, so being stood on the ground or in a building doesn't constitute as geodesic motion.
| https://physics.stackexchange.com |
742,431 | [
"https://math.stackexchange.com/questions/742431",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/135526/"
] | $\lim_{x\to1}\frac{x^2}{(x-1)^2}$
How do I calculate this limit? I can't use L'Hospital's rule here and dividing by $x^2$ doesn't work either.
Thanks
| I suspect some of OP's confusion may come from the fact that $x$ appears in both the numerator and denominator, so I propose this solution:
Express it as $\left( \frac{x}{x-1} \right )^2$. Notice that we can simplify this to $\left( 1 + \frac{1}{x-1} \right)^2$. Inside the brackets, it approaches $- \infty$ from the l... | The numerator tends to $1$ and the positive denominator to $0$ so the limit is $+\infty$.
| https://math.stackexchange.com |
190,679 | [
"https://physics.stackexchange.com/questions/190679",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/42743/"
] | So here is the standard problem setup of a car turning on an unbanked road:
<blockquote>
A 1000 kg car is going around a curve with radius 30 meters. If the
coefficient of friction between the car's tires and the road is 0.5,
what is the maximum speed at which the car can make the turn?
</blockquote>
You setup ... | The coefficient of static friction and the normal force together allow you to calculate the maximum force that friction can apply, not the actual force.
A block sitting on a shelf with no external horizontal forces will have a friction force of zero. If you apply a force from the side that is less than the maximum fr... | The thing is that you cannot measure friction between the tires of the car and the road and then calculate its speed.There are two kind of friction. The first is the static friction and the other is kinetic friction. the maximum static friction is measured by
$f_s \le f_{smax}\left( = \mu_s mg\right) $
In order for ... | https://physics.stackexchange.com |
175,135 | [
"https://electronics.stackexchange.com/questions/175135",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/68684/"
] | <img src="https://i.stack.imgur.com/8tcE9.png" alt="enter image description here">
At the top, the VCC has arrows on it. What does that mean?
I thought it would be like in other circuits as empty holes that you could attach, but I'm not sure here.
| The arrows have no special pointing significance. The conventional symbols used on schematics include the use of the arrow as a symbol for a power supply connection.
If you look around you will notice that there are a variety of different symbols used for power supply connections on schematics. There are also various ... | Those symbols just represent a source of voltage. The arrow is a common representation, but other typical representations include bars, circles, or just a label.
| https://electronics.stackexchange.com |
97,192 | [
"https://chemistry.stackexchange.com/questions/97192",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/64276/"
] | I have to name $\ce{(NH_4)_2CrO_4}$. I know the answer is ammonium chromate. But I don't understand why it isn't called diammonium chromate.
| You don't need the prefix because you know (or rather are assumed to know) the charges on the constituent ions of an ionic compound, which this is. The ammonium ($\ce{NH4^+}$) cation has a charge of +1 and the chromate ($\ce{CrO4^{2-}}$) anion has a charge of -2. Since the formula unit has to have a net charge of zero,... | Prefixes such as mono-, di-, tri- etc. are typically used in naming covalent/molecular compounds, and not for ionic compounds.
Ammonium chromate is an ionic compound, so the prefix is not used. The ammonium cation has only a 1+ charge and so the Stock system of Roman numerals is not required. Thus, the only correct ... | https://chemistry.stackexchange.com |
703,246 | [
"https://physics.stackexchange.com/questions/703246",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/329584/"
] | I'm reading "The Mechanical Universe" (Frautschi et al.) to brush up my understanding of physics. So far, I can solve all the exercises and I have no problems with the mathematical parts. But, being about half way through the book, I have the impression that I don't really "get" some basic concept... | <blockquote>
Where is (mechanical) energy conserved?
</blockquote>
Mechanical energy is conserved if, for the system,
<span class="math-container">$$\Delta KE+\Delta PE=0$$</span>
The equation only applies when <em>no net external force</em> is applied to the "system". The system can defined in any way. For G... | You have to be aware that "energy" is just an abstract concept that helps us understand and solve some problems in an easier way. Do not think of energy in terms of effort we (humans) do to perform some "work". These are related, but thinking in that terms will probably lead to dead ends.
<blockquot... | https://physics.stackexchange.com |
241,017 | [
"https://softwareengineering.stackexchange.com/questions/241017",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/94755/"
] | I'm really struggling to find a concrete, easy to grasp, explanation of Atomicity.
My understanding thus far is that to ensure an operation is atomic you wrap the critical code in a locker. But that's about as much as I actually understand. Definitions such as the one below make no sense to me at all.
<blockquote>
... | Atomicity is a trait that defines wether an operation can be interrupted or not. In general, it does <em>not</em> refer to a bunch of operations in a <code>lock</code>. A lock doesn't guarantee that nothing else can run during the lock, just nothing else can run <em>that</em> code, on <em>that</em> instance during the ... | As an example, you go to the bathroom, lock the door, do your toilet, wash and dry your hands and then unlock the door.
Absent an emergency (such as a fire alarm) you expect to complete the whole process uninterrupted. It is as single "black box" event from the perspective of some one on the outside who sees A) you go... | https://softwareengineering.stackexchange.com |
117,137 | [
"https://security.stackexchange.com/questions/117137",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/46988/"
] | When I look into my access logs: I find a lot of suspicious activity that looks like attempts to gain administrative access to my system using vulnerabilities from known web software products such as WordPress, Joomla, PhpBB, etc... I have none of these software installed, and are only running my own, un-released (clos... | Looks like normal scanning background noise to me. All of the services targeted were historically known to have security vulnerabilities, resulting in server compromise. Most of these issues have been fixed in later versions, but attackers still regularly scan for them on the off-chance that they can hijack more server... | IMO it's worth to check the log files for that. It gives you a good overview what kind of websites or software is currently under attack.
If you have a Linux server and if you want prevent that kind of access you can use a tool like fail2ban to automatically block related ip addresses.
A look in my webserver logs sho... | https://security.stackexchange.com |
44,604 | [
"https://stats.stackexchange.com/questions/44604",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/13413/"
] | I have a series of points an a single real-valued axis. The points are either good or bad (encoded as 0 or 1). Generally zeros are bigger than ones. But they sometimes overlap. I need to a point which devised the two groups best. What techniques could I use? I thought about logistic regression, but do not know how do f... | If you want to use logistic regression to find the cutpoint the following R-code should work:
<pre><code>df <- data.frame(x <- c(-5, -1, 3, 0, -4, 4,1,-1, 4, 2),
y <- c(0,0,0,0,0,1,1,1,1,1))
fit <- glm(y ~ x, family="binomial", data=df)
# This gives you the cutpoint:
-fit$coefficients[1] /... | @Rasmus's answer in Python: (upvote him)
<pre><code>import statsmodels.api as sm
import numpy as np
y = [0,0,0,0,0,1,1,1,1,1]
x = [-5, -1, 3, 0, -4, 4,1,-1, 4, 2]
X = np.array([[1 for _ in range(len(x))], x])
result = sm.GLM(y, X.T, family=sm.families.Binomial() ).fit()
result.summary()
print -result.params[0]/result.... | https://stats.stackexchange.com |
221,728 | [
"https://stats.stackexchange.com/questions/221728",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/119431/"
] | I have a basic probability doubt. If I have 5 different vehicles backstage, out of which 3 random can be showcased to the public. What is the probability of each vehicle to get to showcase? Once a car is in a showcase, it will not be returned to backstage.
I thought by doing the calculating the combinations- ${5 \cho... | I assume that all cars are equally likely to be chosen.
Suppose without loss of generality the cars are labeled 1 through 5. The probability of <em>not</em> choosing car 1 is (4/5) * (3/4) * (2/3) = 2/5, so the probability of choosing it is 1 - 2/5 = 3/5. Of course, by my assumption above, the same argument applies to... | You asked for alternative approaches. Here is one you might find useful.
Let's begin by stating the obvious: you are implicitly assuming the five probabilities are equal. The expected total in the showcase equals the sum of those probabilities, whence it is five times any one of them. Yet the expected total is the ... | https://stats.stackexchange.com |
11,951 | [
"https://softwareengineering.stackexchange.com/questions/11951",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/3526/"
] | We have an enormous number of nested SQL stored procedures, and a number of different ways of debugging them (varying from developer to developer).
So far, our methods include:
<ol>
<li>An optional <code>@debug</code> parameter, that
causes the procedure to
<code>print</code>messages as it runs (passing
the variable ... | You should also consider <strong>SQL Server Profiler</strong>. In SQL Server Management Studio, select Tools -> SQL Server Profiler. When the profiler window opens, select File -> New Trace... (I don't know specifics about other RDBMSs, but they've got to have tools with similar functionality.)
As the long-term sol... | I prefer #1 personally. With an <code>@debug</code> flag you can specify if production code gets run or not, and I find <code>print</code> messages are one of the most helpful things to use when trying to figure out what is going on.
| https://softwareengineering.stackexchange.com |
576,959 | [
"https://stats.stackexchange.com/questions/576959",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/357305/"
] | I'm trying to do an exercise but I can't figure out how to proceed. OLS is run for this model, with 100 observations.
<span class="math-container">$$
y_i=b_0+b_1x_i+\epsilon_i
$$</span>
The results are <span class="math-container">$$
\hat\beta =\begin{pmatrix} 9 \\1 \end{pmatrix}
$$</span>
<span class="math-container">... | Notice that
<span class="math-container">$X'X = \begin{pmatrix}
n & \sum x_i\\
\sum x_i & \sum x_i^2
\end{pmatrix}$</span>
since you know <span class="math-container">$n$</span>, there are three unknowns that determine the elements of the matrix <span class="math-container">$\text{Var}(\hat \beta)$</span> - <... | This is how you would calculate the sum of squared residuals -
<ol>
<li>Use the value of your coefficients to come up with a prediction for all 100 values, <span class="math-container">$\hat{y}$</span>
</li>
<li>Next compute the difference, for all observations, between the real <span class="math-container">$y$</span> ... | https://stats.stackexchange.com |
9,376 | [
"https://dba.stackexchange.com/questions/9376",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/2319/"
] | The following excerpt is from <strong>Oracle concepts</strong>. Maybe this is a stupid question, but I really need your help to understand it.
My question is:
<ul>
<li>What's does the <strong><em>thread</em></strong> mean in the context <strong><em>thread checkpoints</em></strong>?</li>
<li>Does it means redo log thr... | Yes, a thread in this case is the redo generated by an instance. If you had a 4-node RAC, you would have 4 redo threads. This is <code>thread#</code> in <code>v$archived_log</code>. The certain target is almost certainly referring to an SCN.
| I'm not completely certain, but I believe the "thread" in "thread checkpoint" refers to a DBWR thread/process.
The "certain target" referenced is configurable; several init.ora parameters influence it, including:
<pre><code>FAST_START_MTTR_TARGET
LOG_CHECKPOINT_INTERVAL
LOG_CHECKPOINT_TIMEOUT
</code></pre>
| https://dba.stackexchange.com |
347,585 | [
"https://math.stackexchange.com/questions/347585",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/70322/"
] | Is there a formula for the following sum?
$S_n = 1\cdot2 + 2\cdot 3 + 3\cdot 4 + 4\cdot 5 +\ldots + n\cdot (n+1)$
| $S_n = \sum_{k=1}^n k(k+1) = \sum_{k=1}^n k^2 + \sum_{k=1}^n k = \frac{n(n+1)(2n+1)}{6}+\frac{n(n+1)}{2} = \frac{n(n+1)(n+2)}{3}$
| Divide each term of the series by $2$. The result is
$$\binom{2}{2}+\binom{3}{2}+\cdots+\binom{n+1}{2}.\tag{$1$}$$
We give a combinatorial argument that the sum $(1)$ is equal to $\binom{n+2}{3}$.
Now how many ways are there to choose <strong>three</strong> numbers from the numbers $1$ to $n+2$? The smallest number c... | https://math.stackexchange.com |
70,525 | [
"https://chemistry.stackexchange.com/questions/70525",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/402/"
] | What does it mean when there is a negative delta <span class="math-container">$S$</span> <span class="math-container">$(-\Delta S)$</span>? One person asked if this implied negative entropy, but I don't see how this could be possible.
Does this imply a negative change in entropy? If the former, how can negative entrop... | Negative delta S (<span class="math-container">$\Delta S <0$</span>) is a decrease in entropy in regard to the system.
For <strong>physical processes</strong> the entropy of the universe still goes up but within the confines of the system being studied entropy decreases.
One example is a freezer with a cup of liq... | If a quantity <span class="math-container">$q$</span> is smaller than zero, we say that it is negative. Mathematically, we would write: <span class="math-container">$$q < 0$$</span>
When we write <span class="math-container">$-q$</span>, it instructs us to change the sign of <span class="math-container">$q$</span>.... | https://chemistry.stackexchange.com |
440,540 | [
"https://physics.stackexchange.com/questions/440540",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | When a metal sphere with charge q is enclosed by a spherical conducting shell, and both are connected by a wire, Whole charge q will reside on the outer shell. <strong>Why does this happen?</strong>
| You can reason this is the right configuration using the following facts:
<ol>
<li>Any conductors that are touching have the same potential, otherwise charge would flow to the region with the lowest potential</li>
<li>The charge on a metal sphere is always located on the edge, in a spherical shell.</li>
<li>The field ... | You can understand this if you ponder over the fact that whenever two charges bodies are connected with conducting wires charges residing on them redistribute themselves so as to make the potential of the conductors equal. When the charged sphere and the shell are connected assume that some charge say <em>X</em> fl... | https://physics.stackexchange.com |
2,287 | [
"https://astronomy.stackexchange.com/questions/2287",
"https://astronomy.stackexchange.com",
"https://astronomy.stackexchange.com/users/1497/"
] | Assuming you could be standing inside a black hole, would it be light or dark around you?
| The only light you would see, would be from the stars outside the black hole. Any light that is generated inside the event horizon would be refracted towards the singularity. You wouldn't see the object in front of you since the light would not reach your eye.
| As said above, you'd see the light coming into the black hole but you mught also see a dim light from Hawking radiation.
| https://astronomy.stackexchange.com |
178,455 | [
"https://physics.stackexchange.com/questions/178455",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/78777/"
] | <blockquote>
A block slides across a table horizontally with an initial velocity $V$. The frictional force $F$ brings it to rest after its Centre of Mass covers distance $S$.
What is the work done by the frictional force?
</blockquote>
According to me, it should be zero because the point of contact of the b... | No the point of contact is not at rest. It moves with the block. You are probably confusing with rolling motion in which the point of contact is always at rest. There the point of contact is rest because the lowest point on the disk has two contributions, one due to forward motion of disk as a whole (v) and one in the ... | According to Newtonian mechanics, it is true that the table exerts an equal but opposite force against gravity that results in $\Delta y = 0$, where $y$ is the up/down dimension. However, sliding block is clearly moving in the $x$ dimension (i.e. horizontally across the table). And it is also acted on by a force, namel... | https://physics.stackexchange.com |
80,335 | [
"https://datascience.stackexchange.com/questions/80335",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/101157/"
] | I'm building a machine learning model in Python to predict soccer player values. Consider the following feature columns of the dataframe:
<pre><code> [features]
---------------------------------
position | goals | goals_conceded
-------- |-------|---------------
Forward | 23 | NaN
Defender | 2... | To me the data in the current form seems wrong fro training a model for all players, it is like trying to tell whether an apple is better than a tennis ball. They have completely different characteristics.
what you could do instead is group players with similar features in different sets and train the models to predict... | Its an interesting question.
In this case I am doubting if training data is even correct. Because two different observations are themselves not comparable. For a ML model to say or understand how two observations are different they both should be comparable. Its a different thing that one value is unknown and one value... | https://datascience.stackexchange.com |
99,799 | [
"https://electronics.stackexchange.com/questions/99799",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/37199/"
] | Being the most technically proficient person in my office I was asked to answer this, but not being sure of myself, I wanted to make sure I explained this well.
A customer asked of the device "how many watts is it". The only technical data I had onit was it's mAH (2200). Our guess is that they might not really be askin... | Actually, almost all those USB battery packs are based on a single lithium-polymer/ion/something cell. Marketing being what it is, most of the time the capacity advertised on the box is actually the cell capacity. Since those battery cells have a ~3.7V output, the battery pack have to convert the 3.7V into 5V with a bo... | The question "how many watts is it" cannot be answered. At best one can try to answer the question "How many Wh (watt-hours) is it?" That would <em>approximately</em> be $$2200\text{mAh} × 5\text{V} \approx 10\text{Wh}$$
This means the battery can supply a 10W load for the duration of 1 hour. Or 5W for 2hrs, ... Theor... | https://electronics.stackexchange.com |
260,787 | [
"https://physics.stackexchange.com/questions/260787",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/120230/"
] | I need to design a procedure for an experiment to determine the concentration and sign of the charge carriers in copper. I'm given:
<ol>
<li>A slab of copper 2.0 mm thick, 1.5 cm wide, and 4 cm long</li>
<li>One very sensitive digital multimeter</li>
<li>One standard digital multimeter</li>
<li>A DC power supply (any ... | When you throw a ball, you push it and it pushes you back. It just weighs slightly less than a wall (or the entire earth) so you don't need to push as much to move it.
You push a ball with enough force to move by acceleration $a$. This force is $F= m a$. This force is also exerted by the ground as a reaction to keep y... | The third law does not say that you have to move backwards. All it says is that the force that you exert on the ball (or the wall) is the same as the force that the ball (or the wall) exerts on you, but in the opposite direction. In the case where you are throwing a ball, the force that the ball exerts back on you is... | https://physics.stackexchange.com |
416,976 | [
"https://mathoverflow.net/questions/416976",
"https://mathoverflow.net",
"https://mathoverflow.net/users/146942/"
] | Let <span class="math-container">$\tau_X$</span> denote the collection of open subsets of a topological space <span class="math-container">$X$</span> and let <span class="math-container">$\mathsf{RO}(X)$</span> be the subset of <span class="math-container">$\tau_X$</span> made up of regular open subsets. With this ter... | The compact Hausdorff space <span class="math-container">$X = \beta\mathbb{N}$</span> is another example. Every regular open subset is the closure of a subset of <span class="math-container">$\mathbb{N}$</span> and there are only <span class="math-container">$\frak{c}$</span> such subsets but <span class="math-contai... | An answer to the first question: the Niemytzki plane, <span class="math-container">$N$</span>, is an example. Note first that, in general, if <span class="math-container">$U$</span> and <span class="math-container">$V$</span> are regular open and <span class="math-container">$D$</span> is dense then <span class="math-c... | https://mathoverflow.net |
432,290 | [
"https://physics.stackexchange.com/questions/432290",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/126373/"
] | My book says that there are two forces two objects experience when they're in contact with each other. (it uses an example of a cylinder and a parallelepiped that are in contact with eachother) The chapter is about statics.
1) The normal force.
2) A tangential force, tangential to both surfaces that are in contact wi... | Yes, you are correct. Let's take the simplest example of a block resting on a rough table. In this case, only the normal force exists. Now, apply a very small force (which doesn't exceed static friction) to one side of the block. The block won't slide because the static friction exactly opposes your applied force. This... | The tangential force acts tangentially to the surface of objects when two objects are in contact with each other. This tangential force balances forces associated with their masses. However, this force acts only when the surfaces of both objects are rough enough. In order for the system to be in equilibrium, this force... | https://physics.stackexchange.com |
1,040,981 | [
"https://math.stackexchange.com/questions/1040981",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/195088/"
] | Suppose that $(x_n)$ is a sequence in $\Bbb{R}$ and that $$\lim_{n\to\infty}\dfrac{x_{n+1}}{x_n}=l$$ for some $l\in(-1,1)$. How do I show that $x_n\to 0$?
For any $\epsilon>0$ we have an $N$ such that for all $n>N$ $$-\epsilon<\dfrac{x_{n+1}-lx_n}{x_n}<\epsilon$$. Now what should I use?
| Since for some reason there is no yet an answer that you'd find useful, and despite of the danger of the downvote spree, let me elaborate on my comment. You know that $|x_{n+1}|/|x_n| \to |l| < 1$, so for $n>N$ ith $N$ big enough $|x_{n+1}|/|x_n|\leq |l| + \frac12(1-|l|) = \frac{1+|l|}2$ and hence
$$
|x_n|\le... | $$\left|\lim_{n\rightarrow\infty} \frac{x_{n+1}}{x_n}\right| = |l| < 1$$
is a positive answer to the ratio test for convergence of series
$$\sum_{n \in \mathbb{N}} x_n \ .$$
And a series can only be convergent if the associated sequence is a null sequence. Therefore $x_n$ is a null sequence.
| https://math.stackexchange.com |
3,231,807 | [
"https://math.stackexchange.com/questions/3231807",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/585505/"
] | For an entire function <span class="math-container">$f(z)$</span>, Which of the following condition implies that <span class="math-container">$f(z)$</span> is a constant?
(A) If <span class="math-container">$f(z)=u+iv$</span> and <span class="math-container">$u^2\leq v^2+2004$</span>
(B) If <span class="math-contain... | Your integral converges because<span class="math-container">$$\lim_{x\to\infty}\frac{\frac{2^x+1}{3^x+1}}{\left(\frac23\right)^x}=1$$</span>and the integral <span class="math-container">$\int_0^\infty\left(\frac23\right)^x\,\mathrm dx$</span> converges, since, for each <span class="math-container">$M>0$</span>,<span... | Bound it above with <span class="math-container">$\int_0^\infty\frac{2^xdx}{3^x}$</span>, which converges by the same logic.
| https://math.stackexchange.com |
639,260 | [
"https://physics.stackexchange.com/questions/639260",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/280414/"
] | I learned that all material objects emit electromagnetic (light) radiation. But, we can only "see" visible light. I'm aware that non-visible light is 'invisible' to us; however, I was wondering about this. Doesn't the sun emit UV light, and isn't it visible to us? Rather, I should ask, isn't the <em>source</e... | Yes, any object that emits any form of radiation is visible to us. However, since humans are capable of directly observing, only the visible light wavelengths, so, we'll ofcourse need special devices to observe said radiation. The sun emits UV radiation, as well as visible light and other forms of radiation. We are jus... | Our eyes can only detect EM radiation in a narrow range. But devices that detect lower ranges as IR detectors, can process the information and display it as visible light (the range our retinas can see).
All bodies above absolute zero emit EM radiation.
| https://physics.stackexchange.com |
83,716 | [
"https://electronics.stackexchange.com/questions/83716",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/29775/"
] | The purpose of this is to show images to mice, which have one UV shifted cone relative to humans. An ideal solution would be a monitor that had 3 wavelengths : 365nm, 410nm, and 500nm. But, the 410nm wavelength is optional and a projector would be usable in a limited context.
The easiest way I can think of is swapping... | I think you're on the right path with DLP idea. There are DLP sets that use HID or High pressure discharge lamps that are broad spectrum, but also have UV content. There will be UV cut filters in the optical path to prevent premature aging of components, organic die based filters and the polymer based back illuminated... | Interesting application.
I think your idea might be the easiest. But I would swap the red led with a UV 365 nm LED. then you would have UV, blue (405 nm) and green (550 nm) which is close to what you want.
Alternatively you could find a filter wheel based projector and try to replace the filters for your three color... | https://electronics.stackexchange.com |
4,854 | [
"https://chemistry.stackexchange.com/questions/4854",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/1565/"
] | My textbook, <em>Organic Chemistry</em> (6th edition) by Brown, Foote, Iverson, and Anslyn, states:
<blockquote>
Alkynes in which the triple bond is between carbons 1 and 2 are commonly referred to as <strong>terminal alkynes</strong>.
</blockquote>
Is not this definition incomplete? I can imagine scenarios where w... | You are correct about the absolute numbering of <span class="math-container">$\ce{CH2=CH-C#CH}$</span>. By the IUPAC priority rules, the alkene has the lower absolute numbering.
However, numbering can also be <em>relative</em>. In your case, the relative numbering 1,2 refer to either of the following:
<ul>
<li>relative... | You're right; the definition in your book is simplistic. A terminal alkyne would be better defined as "an alkyne with the formula $\ce{RC_2H}$", differentiating from an internal alkyne, which would have the formula $\ce{RC_2R'}$ and the added stipulation that neither R nor R' can be a hydrogen. Equivalently stated as i... | https://chemistry.stackexchange.com |
223,579 | [
"https://dba.stackexchange.com/questions/223579",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/165843/"
] | Indexing will fasten the INSERT and UPDATE commands
and will slow down the search operation.
a. True
b. False
| We can use <code>mysqldump --replace --where "..." db table</code>. It will output the <code>REPLACE</code> statement. It remains to edit this <code>REPLACE</code> to change the table name and then execute this SQL code.
| <pre><code>UPDATE table1, table2
SET table1.field1 = table2.field1,
table1.field2 = table2.field2,
-- .....
table1.fieldN = table2.fieldN
WHERE table1.id = table2.id
AND table1.id IN ('id1', 'id2', /* ... */ 'idN' )
</code></pre>
Or you can use
<pre><code>REPLACE table1
SELECT *
FROM table2
WHERE table... | https://dba.stackexchange.com |
236,918 | [
"https://dba.stackexchange.com/questions/236918",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/164945/"
] | We've created a non-production environment for SQL Server.<br>
This environment uses the SQL Server Always-On Availability Groups as a HA-solution.
To work with SQL Server AG's you have to set the recovery model to full so the log can be synced with the other replicas, but setting the recovery model to full also impli... | Why not just back up the database once a week and the log every n minutes (a good balance of frequency and keeping the log in check), and have a sweeper job delete new files as they come in (or after some age)? The nice thing about this is that if you decide at some point that backups in this environment actually are i... | So as a preface for this answer, please consider the following points:
<ul>
<li>If your system is meant to be <strong>HIGHLY AVAILABLE</strong>, what are your plans for inevitable down-time and data loss? Will the time taken to recover this environment mean it will simply be faster to keep backups?</li>
<li>If your sy... | https://dba.stackexchange.com |
3,864 | [
"https://mathoverflow.net/questions/3864",
"https://mathoverflow.net",
"https://mathoverflow.net/users/1401/"
] | I know the interior point method works both for Linear Programming (LP) and semidefinite programming (SDP). My question is, can the other popular method for solving LP, namely the simplex method, be extended to SDP? If not, what is the barrier?
| <em>[the first part of this answer is similar to Dinakar Muthiah's]</em>
When optimizing a linear function on a convex set, it can always be assumed that the optimal solution lies on an extreme point of the feasible region (if there are several optimal solutions, at least one is an extreme point).
In the case of lin... | I believe as of now simplex methods have not been extended to SDP. The problem is that the feasible region of an SDP has a curved boundary. So for any point on the boundary I can cook up a linear function that is minimized there. So there are infinite set of possible candidates for the minimizing point.
For LP the bou... | https://mathoverflow.net |
105,766 | [
"https://softwareengineering.stackexchange.com/questions/105766",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/29374/"
] | I have an object oriented programming with c++ course this semester at college and we were learning about friend functions.
I instinctively dislike them for their ability to bypass the security that Encapsulation and Data hiding provide, I read a few articles on the internet and some people thought that it was a good ... | It is not always convenient to make all the functions related to a C++ class members of that class. For example, imagine an implementation of vector algebra with scalar multiplication. We want to write:
<pre><code> double a;
Vector v, w;
w = v * a;
</code></pre>
We can do this with a member function:
<pre><code... | Friend functions are no different to member functions in terms of encapsulation. They can, however, offer other advantages- such as being more generic, especially where templates are concerned. In addition, some operators can only be specified as free functions, so if you want them to have member access, you must <code... | https://softwareengineering.stackexchange.com |
942 | [
"https://quant.stackexchange.com/questions/942",
"https://quant.stackexchange.com",
"https://quant.stackexchange.com/users/627/"
] | Yahoo Finance allows you to download tables of their daily historical stock price data.
The data includes an adjusted closing price that I thought I might use to calculate daily log returns as a first step to other kinds of analyses.
To calculate the adj. close you need to know all the splits and dividends, and ex-di... | Yahoo rounds the adjusted price to 2 decimals even though dividend amounts often have 3 decimal places. Since they apply the adjustment formula to adjusted prices, if you go far enough back in time, the value they give for Adjusted Price will be different than it would be if there were no rounding.
edit: For example,... | Do not passively use Yahoo where you need reliable historical data; it will just fail at one point (from what I have seen due to corporate actions/dividends not properly implemented). Paying for a single alternative data source will not save you either (Bloomberg sometimes reports crazy intraday prices); the only way i... | https://quant.stackexchange.com |
315,074 | [
"https://dba.stackexchange.com/questions/315074",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/28508/"
] | I installed MongoDB 4.4 on Ubuntu 20.04. Then, I created a user:
<pre><code>$ mongo
use admin
db.createUser({user:"admin",pwd:"foo",roles:[{role:"userAdminAnyDatabase",db:"admin"}]})
</code></pre>
Then, I configured <code>security.authorization: enabled</code> in <code>/etc/mongo... | All authentication information is at admin -database.
When you use authentication and need to login to a different DB than the default, you need to tell mongo what is the authentication DB. This is done with parameter <code>--authenticationDatabase admin</code>.
So, in your case:
<pre><code>mongo localhost:27017/test -... | I solved this by running:
<pre><code>$ mongo
use test
db.createUser({user:"admin",pwd:"foo",roles:[{role:"dbOwner",db:"test"}]})
</code></pre>
I still don't understand the logic...
| https://dba.stackexchange.com |
160,158 | [
"https://softwareengineering.stackexchange.com/questions/160158",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/3170/"
] | I suppose there's no straight answer to this, but what ideas come to mind for determining how much each programmer would get for participation in a collaborative project if it were to be sold?
| I think there is only one good answer: What you agreed upon before you started the work. If such things are clear from the start and people know what to expect there will be much less bad blood then if you make up some arbitrary rules when the product launches and you suddenly find out you have a pile of money to divid... | It is basically <strong>depend on task(s) complexity</strong>, assigned to each developers.
Each task has difference or similarity in terms of completion time and complexity. Thus, you may need to have a complexity level determined for each task with some rough hours of expected completion. That will guide you over th... | https://softwareengineering.stackexchange.com |
81,198 | [
"https://cs.stackexchange.com/questions/81198",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/76619/"
] | I know that such sets exist and they are called sets that are not m-complete, but I am not sure how to find them. Can someone give examples?
| I post my comment, as an extended note, which shows a small "formal trick".
A trivial example over natural numbers $\mathbb{N} = \{n > 0 \}$, is:
$A = \{ n\} = \mathbb{N}$ and $B = \{2n \}$ (even numbers).
According to the definition of many-one reduction: a many-one reduction from $B$ to $A$ is a total computabl... | Let $A$ be a computable set of all even nonnegative integers, and $H$ be the language of the Halting problem. Assume also that $w_1 \in H$ and $w_2 \notin H$. Then define a mapping as following:
$$f(x) = w_1 \text{ if } x \text{ is even}, w_2 \text{ if } x \text{ is odd } $$
This function is clearly computable and $x$... | https://cs.stackexchange.com |
83,690 | [
"https://mechanics.stackexchange.com/questions/83690",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/65504/"
] | This is for a 2018 VW Tiguan Allspace with 49,000 km (34500 miles). Living in a pretty mild climate (ie no snow and no extreme heat), but near the coast. The pad wear light came on and I scheduled the service with the dealer. I got a call later to say that the rotors should be replaced and they always recommend repla... | You are right to be skeptical, the 'softer metals in european rotors' is complete horsedung. A bit of rust is completely normal, the rest of your criteria for replacing rotors is right on the money, if the dealership is trying to pull that line on you then they are either incompetent or trying to run up your bill.
| No, rotors can go through 2 or 3 sets of pads.
But if a stone or piece of grit causes scoring then they need replacing. Sometimes resurfacing is sufficient but often the time needed is more than replacing with new.
Also the rotor thickness should be checked - workshop manuals will give the minimum acceptable thickness ... | https://mechanics.stackexchange.com |
628,430 | [
"https://math.stackexchange.com/questions/628430",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/76802/"
] | Short easy question, I just want someone to double check what I did.
We are given that $T$ is an invertible, normal matrix.
We are asked to show that $T^{-1}$ is also normal, and find it's unitary diagonlization.
<strong>What I did:</strong>
$T$ is normal if and only if there is a unitary matrix $U$ and diagonal mat... | Your answer is almost correct (though uses a nontrivial theorem about normal matrices). Two missing/incorrect points:
<ul>
<li>If $T=UDU^{-1}$ then $T^{-1}=(UDU^{-1})^{-1}=UD^{-1}U^{-1}$ (taking inverse changes order of multiplication).</li>
<li>As imj noted, we should also argue for the invertibility of $D$ before (o... | You can go also directly from the definition.
$$TT^*=T^*T$$
Invert both sides.
$$(T^*)^{-1}T^{-1}=T^{-1}(T^{*})^{-1}$$
Use that $(T^{*})^{-1}=(T^{-1})^*$, which also folows directly from the definition.
| https://math.stackexchange.com |
45,779 | [
"https://electronics.stackexchange.com/questions/45779",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/13681/"
] | I have the following circuit:
<img src="https://i.stack.imgur.com/qHHSU.png" alt="circuit">
What the circuit should do:
<ol>
<li>When switch SW1 is open, D1 is OFF and D2 is ON</li>
<li>When switch SW1 is closed, D1 is ON and D2 is OFF</li>
</ol>
The circuit works almost well. The only problem is, when switch is op... | <blockquote>
What can be the problem ?
</blockquote>
With SW1 open, the path for Q2 emitter-base current is through R2, <strong>D1</strong> and R3.
<blockquote>
Any ideas on how can I fix it ?
</blockquote>
<img src="https://i.stack.imgur.com/Pr9y0.png" alt="enter image description here">
The above circuit uses... | <em>"What the circuit should do:</em>
<ol>
<li><em>When switch SW1 is open, D1 is OFF and D2 is ON</em></li>
<li><em>When switch SW1 is closed, D1 is ON and D2 is OFF"</em></li>
</ol>
This problem specification can be implemented with single-pole, double-throw switch, and only passive components, since the current wh... | https://electronics.stackexchange.com |
348,655 | [
"https://stats.stackexchange.com/questions/348655",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/209403/"
] | This may seem like a really simple question but I think my data straddles the line between interval and ordinal and I'm not sure quite how to treat it.
Simply, participants have to estimate the time between two events by selecting 1 of 4 intervals which they have been previously trained to identify. The 4 options are... | Well, this may be a different way of thinking about your problem, but what if you exploit the fact that:
<pre><code>200 = fx200 where f = 1
400 = fx200 where f = 2
600 = fx200 where f = 3
800 = fx200 where f = 4?
</code></pre>
If I understand your problem correctly, each of your subjects will have to choose 8 diff... | That there are only a few legal options doesn't seem to invalidate the interval scale of the variable. In particular, the mean of this variable still makes sense to compute, because e.g. 612 ms is an understandable value.
Still, be sure not to take Stephens's levels of measurement to be stricter than they are. You can... | https://stats.stackexchange.com |
182,693 | [
"https://dba.stackexchange.com/questions/182693",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/41868/"
] | I have a table like this:
<pre>
Lat1 Lng1 Lat2 Lng2
---- ---- ---- ----
1 1 2 2
2 2 5 5
3 3 4 4
4 4 3 3
5 5 4 4
</pre>
Is it possible to return the rows in the following order?
<pre>
Lat1 Lng1 Lat2 Lng2
---- ---- ---- ----
1 1 2 2
2 ... | You can do this with a hierarchical recursive CTE.
The only problem is that you have a loop in your data, due to there being <code>3,3</code>,<code>4,4</code> and <code>4,4</code>, <code>3,3</code>.
<pre><code>drop table #tmp;
create table #tmp
(
lat1 int,
lng1 int,
lat2 int,
lng2 int
);
insert into #tmp values (1,... | Try my script with diff sample data.
I don't think you need <code>Recursive CTE</code> to do so.
It work in <code>Sql server 2012+</code>
<pre><code>create table #tmp
(
lat1 int,
lng1 int,
lat2 int,
lng2 int
);
insert into #tmp values (1,1,2,2);
insert into #tmp values (2,2,5,5);
insert into #tmp values (3,3,4,4);
... | https://dba.stackexchange.com |
19,502 | [
"https://chemistry.stackexchange.com/questions/19502",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/9757/"
] | In my science class, I have been taught that silica (silicon dioxide/sand) has three properties, namely
<ol>
<li>It does not react with water. </li>
<li>It does not decompose with heat. </li>
<li>It does not react with acid. </li>
</ol>
However I think that if it does not react with acid, will it react with bases? I ... | It really does react:
\begin{align}
\ce{4HF + SiO2 &-> SiF4 + 2 H2O}\\
\ce{SiF4 + 2 HF &-> H2[SiF6]}\\
\ce{SiO2 + 2 NaOH &-> Na2SiO3 + H2O}\\
\ce{SiO2 + 2 F2 &-> SiF4 + O2}\\
\ce{SiO2 + 2 C &-> Si + 2 CO}\\
\ce{(2,1)Na2O + (1,1)SiO2 &-> Na4SiO4/Na2SiO3}\\
\ce{SiO2 + Si &-&g... | $\ce{SiO2}$ definitely reacts with strong bases like $\ce{NaOH}$ or $\ce{KOH}$ which is why such solutions should not be stored in glass bottles.
Concentrated and hot aqueous solution of $\ce{NaOH}$ can damage glassware in the course of several days. $\ce{KOH}$ or $\ce{NaOH}$ in methanol is even more potent. Reaction... | https://chemistry.stackexchange.com |
55,837 | [
"https://mechanics.stackexchange.com/questions/55837",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/38887/"
] | I was riding my 2017 Husqvarna 701 Supermoto hard for about an hour today when all of a sudden the bike started losing power during hard acceleration. I first noticed it when I tried to power wheelie in 3rd gear and the bike refused to lift the front, which it normally does eagerly. I tried a few more times and it seem... | Turned out to be the fuel pump. It's getting replaced on warranty :D
| Check the colour of the coolant. Is it still green, or is it murky. I'm not familiar with your make and model of bike but on my bike, it tends to overheat whenever I hit traffic as the cooling system is dependent on me moving as to funnel cool air into the radiator. The fans just aren't large enough to funnel enough ai... | https://mechanics.stackexchange.com |
4,397,259 | [
"https://math.stackexchange.com/questions/4397259",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/742733/"
] | I want to prove the following equality:
<span class="math-container">$${n \choose 1} - 2{n \choose 2} + 3{n \choose 3} + \dots + (-1)^{n - 1}n{n \choose n} = 0$$</span>
I tried taking the negative terms to the right hand side. The term <span class="math-container">$k{n \choose k}$</span> is equal to the number of teams... | Notice that this is not true for <span class="math-container">$n=1$</span>.
Following your attempt, picking a team with captain is just picking a captain, and then adding players from the remaining <span class="math-container">$n-1$</span> players (this is a combinatorial proof of the equality <span class="math-contain... | Note that <span class="math-container">$k{n \choose k} = n {n-1 \choose k-1}$</span>
Then you have <span class="math-container">$$\sum_{k = 1}^{n}(-1)^{k-1} k{n \choose k} =\sum_{k = 1}^{n} (-1)^{k-1}n {n-1 \choose k-1} = n\sum_{k = 1}^{n} (-1)^{k-1} {n-1 \choose k-1}= n\sum_{k = 0}^{n-1} (-1)^{k}{n-1 \choose k}= $$</s... | https://math.stackexchange.com |
487,729 | [
"https://physics.stackexchange.com/questions/487729",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/226311/"
] | If we want to describe a static spherically symmetric star we can use a metric which matches the Schwarzschild solution with correct mass on the outside of the star but differs from Schwartzschild in the inside of the matter distribution.
Basically we solve the Einstein equations with a source <span class="math-contai... | Normally the <span class="math-container">$D$</span> would be the covariant derivative in the adjoint representation (because <span class="math-container">$F$</span> and <span class="math-container">$\star F$</span> transform in the adjoint of the gauge group).
For abelian gauge theories the adjoint representation is ... | We don't "replace" the gauge covariant derivative by the ordinary differential, it is simply that case that <span class="math-container">$DF = \mathrm{d}F$</span>, since the adjoint representation of <span class="math-container">$\mathrm{U}(1)$</span> is trivial.
| https://physics.stackexchange.com |
103,093 | [
"https://electronics.stackexchange.com/questions/103093",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/38769/"
] | why do dc machines always have double layer winding?is it possible to create a single layered winding dc machine?
More generic Question: Can anyone explain the logical evolution of dc machine from the prototype (single coil) to the actual double layer-distributed winding case?
Usually in text books they use single co... | The double layer windings are the most widely used class of windings. Though both lap and wave types are possible, because of inherent problems of a wave windings, it is now an accepted practice to use the lap type for double layer ac windings. Double layer windings fall into two main classes depending upon the value o... | Physical size of the device.
You wind a coil because you want to create a magnetic field by running a current through the coil. The field strength is determined primarily by the amount of current doing loop-de-loops, times the number of loop-de-loops it makes, around the coil's reference axis. If you want a stronger... | https://electronics.stackexchange.com |
203,198 | [
"https://dba.stackexchange.com/questions/203198",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/148519/"
] | I am designing a MySQL 5.7 database for a mobile platform. This platform has activities that users can add to 'to-do' and 'completed' lists.
I have 3 tables, one for activities where it has an auto incrementing primary key called 'activityID' and two tables for each list. Users are not stored in the MySQL DB for seve... | As Kumar said, using a composit primary key will prevent you from having two entries with the same userID and activityID - you have to decide if this is the desirable configuration. Logically, I would say that a user can complete the same activity twice, so the "completed" list would have two entries, both with the sam... | You may get your required output by <code>activityID</code> as a foreign key with auto incremented primary key. But there is possibility of duplicate entry in this case. So this is the best option to use composite primary key of the <code>userID + activityID</code> for the list tables.
| https://dba.stackexchange.com |
177,732 | [
"https://security.stackexchange.com/questions/177732",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/168617/"
] | Cloud images of some popular operating systems do not let the user to log in as <code>root</code>, yet they use a very standard user name (for example <code>ec2-user</code>, <code>ubuntu</code>) and allow these users to use passwordless <code>sudo</code>.
What is the reason for this choice? Is it more secure than run... | Honestly, this is probably largely an attempt to protect the user against themselves. One of the biggest benefits of "don't run as root" is that mistakes don't (usually) destroy the whole system. (On desktops, this is of limited value -- I'd rather destroy my Apache configuration than all the data in my home director... | As a good practice, those services won't allow SSH login with <strong>user/pass</strong>, so instead they use <strong>user/private</strong> key. The reason for the <strong>passwordless sudo</strong> is that you already own the machine, why not give you full access?
| https://security.stackexchange.com |
449,320 | [
"https://physics.stackexchange.com/questions/449320",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/7988/"
] | The free field Lagrangian is
<span class="math-container">$$\mathcal{L}=\frac 1 2 \partial^\mu\phi\partial_\mu\phi-\frac 1 2m^2\phi^2$$</span>
with sign convention <span class="math-container">$(+,-,-,-)$</span>.
Plugging this into the Euler-Lagrange equations gives the KG equation.
In class we were given the semi-int... | In field theory, the degrees of freedom are the field, and its first derivative with respect to some parameter (time <span class="math-container">$t$</span> in classical theory, a space-time event <span class="math-container">$x^\mu$</span> in relativistic field theory);
1) Hence, your lagrangian will have to be a fun... | The Lagrangian for a real scalar field <span class="math-container">$\phi\left(\mathbf x,t\right)$</span> given by OP with the sign convention <span class="math-container">$(+,-,-,-)$</span> is expressed alternatively as<br>
<span class="math-container">\begin{equation}
\mathcal{L}\left(\phi,\boldsymbol{\nabla}\phi,\ov... | https://physics.stackexchange.com |
13,017 | [
"https://astronomy.stackexchange.com/questions/13017",
"https://astronomy.stackexchange.com",
"https://astronomy.stackexchange.com/users/9301/"
] | If I travelled near a black hole, my time would progress slower relative to someone on Earth. This is clear enough. However, what if we sent a probe with a camera to a black hole? When we watch the screen, would we see time through the camera's perspective — that is, would the Universe appear to progress faster as the ... | <blockquote>
If I travelled near a black hole, my time would progress slower relative to someone on Earth. This is clear enough.
</blockquote>
Yes, no problem with the gravitational time dilation.
<blockquote>
However, what if we sent a probe with a camera to a black hole? When we watch the screen, would we see... | For simplicity, let's say that the black hole is isolated and non-rotating (and uncharged), so that the situation is described by the comparatively simple Schwarzschild spacetime. Let's also suppose that the camera free-falls radially into the black hole.
What is the camera looking at? Suppose it is looking at some st... | https://astronomy.stackexchange.com |
442,276 | [
"https://softwareengineering.stackexchange.com/questions/442276",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/423138/"
] | Section 4.6.3 of ISO 13849-1 concerning "safety-related application software" has following provisions:
<blockquote>
c) Software design shall feature:
<ol>
<li>semi-formal methods to describe data and control flow, e.g. state diagram or program flow chart,</li>
<li>modular and structured programming predomina... | I don't have this ISO standard at hand, so my answer is based on your citation and some publicly available information (such as the table of contents).
What I found out about the standard is
<ul>
<li>Its title/ topic is "Safety of machinery — Safety-related parts of control systems" - so it is not specificall... | It means that you should have a standard for how many lines of code are allowed to be in a function before it has to be broken into sub-functions. It means you're not allowed to have a 10,000 line function that's just spaghetti logic.
| https://softwareengineering.stackexchange.com |
110,502 | [
"https://electronics.stackexchange.com/questions/110502",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/34760/"
] | <strong>Background:</strong> I have a normal CCTV camera (650 TVL) . It requires a BNC cable in order to feed video signal from camera to DVR.
<strong>Problem</strong> The problem is I have only a single copper wire from CCTV to DVR. The wire which is to be used for the transmission has no shield. It is normal spare c... | The two wires of BNC are <em>not</em> different signals, they are "signal" and "shield". The shield is connected to "ground", and serves to keep the signal clean and inside the cable.
For <em>short distances</em>, you can tie the shield to mains earth at both ends and use your single bare cable. This may introduce int... | No, you can't do that. Electricity <em>always</em> needs a complete circuit, or loop, to flow around, which means that to connect two locations you always need at least two separate conductors.
| https://electronics.stackexchange.com |
163,216 | [
"https://softwareengineering.stackexchange.com/questions/163216",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/63097/"
] | When there are no arguments, we have these two options:
<pre><code>$obj = new MyClass;
</code></pre>
vs.
<pre><code>$obj = new MyClass();
</code></pre>
I always pick the former, just because.
Any thoughts?
| Include them. It isn't much extra work and it won't confuse people that don't know that leaving them off the parenthesis is an option.
| Include them; with PHP, you want to be as specific and unambiguous as you can.
| https://softwareengineering.stackexchange.com |
259,637 | [
"https://physics.stackexchange.com/questions/259637",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/11456/"
] | A beam(maybe multiple beams from ground crossing at, or just some very high alternating potential, something like focused haarp) on tip of rocket targeting at path of it, ionizing just the closest molecules that are about to add friction to rocket.
Rocket having same signed static electrical charge so ionized particle... | When you're considering hydrodynamic forces there are always two things to consider. One is the viscosity of the fluid, i.e. how much energy it takes to make it flow, and the other is the inertia of the object, i.e. how much energy it takes to make it move out of your way.
At high velocities the drag is dominated by t... | Watch a video of a rocket launch, say the space shuttle. Within a minute of the flight the launch director might make a statement about maximum dynamic pressure. The launch vehicle is producing a supersonic shock wave and the interaction of the atmosphere is at its peak. Within another $30$ seconds to a minute the dyna... | https://physics.stackexchange.com |
81,705 | [
"https://stats.stackexchange.com/questions/81705",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/35430/"
] | I'm trying to understand standard deviation. I understand how to determine standard deviation across a group, but I am not understanding using standard deviation to compare groups. Am I attempting to use the correct tool?
For example,
group 1, 2011, for 10 people, these are the results:
<pre><code>99 98 91 89 88 74 7... | No, that is not ok. The FDR looks at the entire distribution of all your p-values to make the correction. If it does not see the right side of the distribution it will give much too optimistic estimates.
Options to still use Benjamini-Hochberg:
<ol>
<li>Replace all the missing p-values with 1. This would be conservat... | All reasonable multiple testing procedures necessarily need the number of tests. Multiplicity correction always depends on the number of (possibly true) Null hypotheses tested: The more hypotheses, the lower your local significance level must be to counter type I error inflation and in order to meet your global FDR or ... | https://stats.stackexchange.com |
91,755 | [
"https://electronics.stackexchange.com/questions/91755",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/23669/"
] | When routing an I2C (SDA, SCL) bus or SPI (SCLK, MOSI, MISO) bus to multiple slaves is it preferred to wire the slaves in parallel or series? Below are two diagrams with distances labeled to help with answering. In all schematics I see people seem to wire in series, but why is this the case - what if capacitance of the... | I don't agree with Madmanguruman's statement: "For both 'normal' I2C and 'normal' SPI, each slave needs a direct connection to the master, so all the slaves are in parallel regardless of the physical placement of the devices." Shift registers are very often wired in series, which makes a big loop that requires several ... | I'm not sure what you mean by wiring the busses in series. For both 'normal' I2C and 'normal' SPI, each slave needs a direct connection to the master, so all the slaves are in parallel regardless of the physical placement of the devices.
Your series diagram implies that slave 3 somehow has to go 'through' slave 2 and ... | https://electronics.stackexchange.com |
126,603 | [
"https://physics.stackexchange.com/questions/126603",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/55492/"
] | Pardon my no-knowledge of the topic but I am curious about following characteristics of sea water evaporation:
<ol>
<li>is it more efficient to have thinner ponds to which water is re-added or deeper ponds?</li>
<li>as the salinity of water dictates the evaporation is it more efficient to arrange ponds based on salini... | 1: If you have the real estate available, then it is more efficient to have large, shallow ponds. This way you maximize the surface area that is irradiated by the sun. Thus, more heat is transferred to the water.
2: The pond layout you describe seems complex and it would definitely require some level of control. The s... | <ol>
<li>Already answered.</li>
<li>a) Speaking purely theoretically, yes, low salinity water should evaporate faster, but the shape of the pool may be factor. Dry salt at the edges of the pool will draw water out of the pool and into the sun. Because of this, its hard to say which would dry fast.
you'd want to spread... | https://physics.stackexchange.com |
423,640 | [
"https://physics.stackexchange.com/questions/423640",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/202843/"
] | If you where directly above the North/South pole and set up Foucault's pendulum, why does it show the Earth's spin even though the Earth isn't spinning there? This is also where it takes the shortest amount of time.
And now you set up Foucault's pendulum exactly on the equator it doesn't show you that the Earth is spi... | The teacher is assuming that the bullet passes through instantaneously. In other words, the bullet moves so quickly that there is no time for friction to act. Hence, the momentum that the bullet loses is entirely transferred to the block, and none is transferred to the ground via friction.
An appropriate follow-up que... | You are right: you should treat the momentum transfer as an impulse. Assume that the bullet takes no time at all to get through the block, and that the momentum it loses is transferred instantaneously to the block. Then, you need to solve the rest of the problem.
The way I would approach the rest of the problem is... | https://physics.stackexchange.com |
815,628 | [
"https://math.stackexchange.com/questions/815628",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/154373/"
] | Can you arrange four $9$'s and use of at most $2$ math symbols , make the total be $100$?
Is this really possible? If it is possible can you help me out?
| Simple one.
The answer is,
99/.99 =100
this symbols equals to 99/0.99 we can also represent is as 99/.99. Both equals the same.
| A just-for-fun solution (with no mathematical symbols!):
$\begin{matrix}
N & & & N & & & & N & \\
I & & I & & N & & N & & I\\
N & & N & & I & & E & & N\\
E & & & E & & & &... | https://math.stackexchange.com |
299,090 | [
"https://mathoverflow.net/questions/299090",
"https://mathoverflow.net",
"https://mathoverflow.net/users/-1/"
] | In a projective space $\mathbb{P}^{k+2}$ consider two complementary subspaces $\mathbb{P}^1,\mathbb{P}^k$, and let $C\subset\mathbb{P}^k$ be a degree $k$ rational normal curve. Fixed an isomorphism $\phi:\mathbb{P}^1\rightarrow C$ we consider the rational normal scroll
$$S_{(1,k)} = \bigcup_{p\in \mathbb{P}^1}\left\la... | The scroll $S_{(1,k)}$ can be locally parametrized by the map
$$
\begin{array}{cccc}
\phi: & \mathbb{A}^1\times\mathbb{P}^1 & \longrightarrow & \mathbb{P}^{k+2}\\
& (u,[\alpha_0:\alpha_1]) & \mapsto & [\alpha_0 u:\alpha_0:\alpha_1 u^k:\alpha_1 u^{k-1}:\dots:\alpha_1 u:\alpha_1].
\end{array}
$... | Consider a linear section of codimension $k-1$ of $\mathbb{P}^1 \times \mathbb{P}^k$. It is equal to the projectivization over $\mathbb{P}^1$ of the vector bundle
$$
\mathcal{O}(-1)^{\oplus k+1} \to \mathcal{O}^{\oplus k-1}.
$$
In general the kernel is $\mathcal{O}(-(k+1)/2)^{\oplus 2}$ or $\mathcal{O}(-k/2) \oplus \ma... | https://mathoverflow.net |
581,045 | [
"https://electronics.stackexchange.com/questions/581045",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/281744/"
] | Let's say I want to drive a SPI peripheral using bit-banging with a ESP8266 module. So I have the datasheet for that peripheral telling me it has this setup time and that hold time etc. The question is, how do I know how much time (approximately even) passes between one line of code that pulls the MOSI HIGH for example... | Let's discuss bit-bang, and only the SPI Master side (though the slave side is similar) and in C language.
<hr />
The first simple approach,<br/>
Create functions that has critical timing area written in assembly language. Number of clock cycles taken for each instruction is usually in the datasheet with instruction se... | I can think of three options:
<ol>
<li>Tear into the assembly code used to execute the function of pulling the MOSI pin high and count the clock cycles used to execute each line.
</li>
<li>Run the code on some of the header pins and probe them on an oscilloscope.
</li>
<li>Use a dedicated SPI interface so you don’t hav... | https://electronics.stackexchange.com |
21,209 | [
"https://softwareengineering.stackexchange.com/questions/21209",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7427/"
] | The main language that I use at the moment is C# and I am the most comfortable with it. However, I have started dabbling in F# and Haskell and really enjoy those langauges. I would love to improve my skills in either of those languages over time since it truly is fun for me to use them (as opposed to Ruby, which is hyp... | I was the technical guy helping with interviews for C# / ASP.NET developers recently, and I can tell you that if any of them were dabbling with functional languages - or indeed anything clearly removed from their work experience - that it would have earned them a definite tick from me. I think there's a huge correlatio... | Knowing the functional paradigm makes you a better programmer. Dabbling in languages like Haskell shows that you're interested in having more than one instrument in your mental toolbox.
That should have a concrete boost in your attractiveness as a hire. (If it doesn't, I wouldn't be interested in working for that comp... | https://softwareengineering.stackexchange.com |
196,389 | [
"https://softwareengineering.stackexchange.com/questions/196389",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/89453/"
] | I am building an application which, at the moment, consists of many small Python scripts.
Each Python script processes items from one Amazon SQS queue. Emails come into an initial queue and are processed by a script, and typically the script will do a small unit of processing (for example, parse email and store some d... | If this application needs to stay running for a long time then build in resilience but kill it at random times (the monitor too - but less frequently), and have a monitor restart it. That way you are constantly exercising the monitor and restart capability of the system so when some true system failure shafts your syst... | I think this all depends much on your own goals and constraints. Does it run fast enough this way? Is it flexible enough for your use cases? Is it too brittle/Does it fail often? Does it seem well organized and easy to update/maintain/enhance?
If it works, do it. If it fails to meet your requirements, change it. You m... | https://softwareengineering.stackexchange.com |
168,534 | [
"https://softwareengineering.stackexchange.com/questions/168534",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/50440/"
] | I'm trying to provide a mechanism for validating my object like this:
<pre><code>class SomeObject {
private $_inputString;
private $_errors=array();
public function __construct($inputString) {
$this->_inputString = $inputString;
}
public function getErrors() {
return $thi... | There are two ways to get around this issue:
<ol>
<li>To set <code>$_errors</code> to an error indicating that the validation has not happened yet, or</li>
<li>To go "completely stateless": make <code>isValid</code> return the array of errors, and check the size of the array to determine if the validation succeeded or... | Why would you let a consumer of your class create an object in an invalid state? I would design the class such that if it is ever asked to enter an invalid state (either by bad constructor parameters, or asking for an invalid mutation) it throws an exception and does not change the state.
| https://softwareengineering.stackexchange.com |
478,309 | [
"https://stats.stackexchange.com/questions/478309",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/291984/"
] | I am studying the topic of regression for the first time and some questions arise. First, linear regression is a estimation of conditional expectation? And also the conditional expectation estimate is the so-called <span class="math-container">$y ̂$</span> estimate? This is:
<span class="math-container">$$y=E(Y|X)+e$$<... | Suppose you true matrix is <span class="math-container">$X^*=\begin{bmatrix} x_1^{*} & x_2 \end{bmatrix}$</span>, but you observe <span class="math-container">$x_1=x_1^*+v$</span>.
Then the OLS coefficient on <span class="math-container">$x_1$</span> has the following probability limit:
<span class="math-container"... | The solution to this problem is in Wooldridge's "Introductory Econometrics" (Chapter 9 Section "Measurement Error in an Explanatory Variable", p320 in the 2012 version) and in Wooldridge's "Econometric analysis of cross-section and_panel data" (Section 4.4.2, p73 in the 2002 version). Here... | https://stats.stackexchange.com |
115,814 | [
"https://electronics.stackexchange.com/questions/115814",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/8647/"
] | I seem to have a little confusion regarding changing the fuse bits on a new ATmega8 AVR.
A brand new AVR comes with 1 MHz internal RC setting and there's no CKDIV8 fuse bit. Also since ISP programming should be done at less than 1/4th the speed of MCU, initially I have to program at < 250 kHz.
Now my question is ... | <blockquote>
[order]
</blockquote>
Shouldn't matter. The AVR won't use the crystal until nRST is released, so you may as well hook it up first.
<blockquote>
[power]
</blockquote>
That depends on whether or not the programmer provides power. If it doesn't then you'll need to do so.
| Wire the crystal and caps to the virgin AtMega. Then make sure your ISP frequency is set to less than 1/4 the clock frequency as you suggest. Next program the appropriate oscillator select fuse. The AtMega will begin running at 12 MHz as soon as you program the fuse. Then you can boost the ISP frequency to 2 or 3 MHz t... | https://electronics.stackexchange.com |
466,011 | [
"https://physics.stackexchange.com/questions/466011",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/83452/"
] | In quantum computing, we can always create an arbitrary superposition of states by rotation of <span class="math-container">$|0\rangle$</span> state for one qubit. This raises a question: for arbitrary superposition of states, is there always a Hermitian operator other than the identity such that this superposition of ... | Yes. A state <span class="math-container">$|\Psi\rangle=|\Phi\rangle$</span> is always observable as the non-zero eigenvalue of the Hermitian observable <span class="math-container">$$\hat O=|\Phi\rangle\langle\Phi|.$$</span>
Furthermore you can explicitly construct the mapping that you are talking about by falling ba... | Given two vectors of the same length, there is always a linear isometry taking one to the other. So let <span class="math-container">$w_1$</span> be any element of your favorite orthogonal basis <span class="math-container">$\{w_i\}$</span>, find an isometry <span class="math-container">$L$</span> that takes <span clas... | https://physics.stackexchange.com |
201,571 | [
"https://security.stackexchange.com/questions/201571",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/196943/"
] | Few years back I hosted my website on godaddy but I was not that tech savy so they (customer care people) assisted me on hosting the website on their shared hosting server. Since then I am on a constant endeavor to educate myself in tech area and now I feel to it is pretty easy to host a website and make it up and runn... | <blockquote>
is it possible to prevent hosting providers getting access to my website files and data
</blockquote>
Short answer: no.
You are uploading your files to someone else's computer, so they have access to every single file there. You have a database? They have access to the database too, and its contents, a... | If you use shared hosting (as it seemed to be the case here) your data are on a server owned and maintained by the hosting provider. This means that the provider can read all the data on the system. It would also not be possible to encrypt the data to remove control from the hoster since in order to make your web site ... | https://security.stackexchange.com |
26,193 | [
"https://physics.stackexchange.com/questions/26193",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | Observations:
<ol>
<li>I have read that for a free-falling observer within the event
horizon of a black hole that all lines of sight will end at the
singularity which is black.</li>
<li>I also look up and see that the sky is mostly black.</li>
<li>I also know that by measuring the red-shifts of the galaxies that
they ... | This is a case of an unwisely chosen simile taken waaaay too far. This idea, that the entire universe could be inside the event horizon of not a supermassive, but rather a superduperultrahypermegastupendouslymassive black hole, is usually introduced in introductory classes about general relativity. The instructor in th... | <blockquote>
The light from the universe outside the event horizon of the black hole should be visible as a small disc or point light source in the direction facing away from the singularity.
</blockquote>
This will happen even before you reached the event horizon. You do not need to cross the horizon to see this ef... | https://physics.stackexchange.com |
447,604 | [
"https://stats.stackexchange.com/questions/447604",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/267395/"
] | Suppose we have the following data in the Phase III study.
numeric value of endpoint (n)
Arm A: 1 (100), 7(100), 8(100), 9(100)
Arm B: 4 (100), 5(100), 6(100),12(100)
arm N Min median mean max variance<br>
A 400 1.0000000 7.5000000 6.2500000 9.0000000 9.7117794<br>
B 400 4.0000000... | This is our objective function, composed of a loss function and a regularizer.
<span class="math-container">$$\mathcal O(w,x,y) = \mathcal L(w,x,y)+\mathcal R(w)$$</span>
So <span class="math-container">$\mathcal R(w)=\|w\|_2^2=\sum{w_i^2}$</span> in the case of <span class="math-container">$\ell_2$</span> regulariza... | L2 regularization adds <span class="math-container">$w_i^2$</span> term to the loss function. In iterative approaches using gradients, we subtract the gradient of the loss function not the magnitude of the weight itself. And in the loss function, the regularization part's derivative with respect to <span class="math-co... | https://stats.stackexchange.com |
167,628 | [
"https://stats.stackexchange.com/questions/167628",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/84431/"
] | Suppose I have a panel of explanatory variables $X_{it}$, for $i = 1 ... N$, $t = 1 ... T$, as well as a vector of binary outcome dependent variables $Y_{iT}$. So $Y$ is only observed at the final time $T$ and not at any earlier time. The fully general case is to have multiple $X_{ijt}$ for $j=1...K$ for each unit $i$ ... | The description of the problem is not entirely clear to me so I try to guess some assumptions. If this does not answer your question, it might at least help to clarify the issues further.
The first thing which is not clear to me is the data you want to base your prediction on. If you would like to predict $Y_T$ based ... | The advantage of temporal differences is that they allow you to learn from incomplete episodes. So, sequences where you haven't got to the the final Y can be still be used to fit the model; subsequent estimates are used instead. The effect is similar to hidden data imputation; implicitly you are imputing the remainder ... | https://stats.stackexchange.com |
81,881 | [
"https://datascience.stackexchange.com/questions/81881",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/89639/"
] | What is meant by when someone says face recognition on wild dataset and on static dataset?
| <strong>Very likely no!</strong>
Machine learning algorithms aren't magic, they cannot see or find stuff that is not there.
We know for a fact that some trends and hints exist that link a companies exterior communication to it's industry e.g. social media companies like blue logos (think Twitter, Facebook, linkedin, et... | Basically in machine learning, you can't take a dataset and want to "find any info". You have to specify which kind of info you want. In your case, you could do a complete model trying to predict, using the logo as entry, if the company is recent or old for example. Here you defined your problem. Then you'll ... | https://datascience.stackexchange.com |
90,281 | [
"https://dba.stackexchange.com/questions/90281",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/40876/"
] | I've just installed a copy of MySQL 5.7 for testing, and I love the fact that it now only creates a single root account, and puts the password into a file called .mysql_secret.
There's just one problem. Where can I find the above mentioned file. On Linux it is apparently found in $HOME, but my test DB is on Windows.
... | My blind guess would be to look in <code>%APPDATA%\MySQL</code> on your system as follows:
<pre><code>cd %APPDATA%
cd MySQL
dir .my_secret
</code></pre>
For those who use the MySQL no-install Zip File (such as myself), you will not see one.
If .my_secret is not on your Windows servers, I have an alternative. You cou... | The <code>.mysql_secret</code> file is only used by <code>mysql_install_db</code> (which is deprecated).
The new way to bootstrap a server (<code>mysqld --initialize</code>) writes the randomly generated password to the error log.
| https://dba.stackexchange.com |
139,776 | [
"https://electronics.stackexchange.com/questions/139776",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/58089/"
] | I am in the 6th week in Navy school and we are on voltage regulators or circuits that have components that maintain a constant voltage output. I need an explanation on how to work out this problem here:
Find \$V_o\$ and the zener current where \$R_L = 1 k\Omega\$:
<img src="https://i.stack.imgur.com/geDpO.png" alt=... | You have an error in your equation. The calculation of \$I_e\$ is:
$$I_e=I_b+I_c = (1+\beta)\color{red}{I_b}$$
Not
$$I_e=I_b+I_c = (1+\beta)\color{red}{I_c}$$
To solve this particular problem, however, rote application of memorized equations is not the best path. Here's the thought sequence that will guide you to the ... | First, there is a mistake in your initial equations. Ic = Beta * Ib and therefore Ib + Ic = (1 + Beta)I<strong>b</strong>, NOT (1 + Beta)I<strong>c</strong> - which will make for a huge difference quantitatively !
Furthermore, I would like to answer this with some added commentary that applies to real world design. F... | https://electronics.stackexchange.com |
47,874 | [
"https://mechanics.stackexchange.com/questions/47874",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/32297/"
] | I want to turn steering wheel my 2017 Honda Civic LX (without Honda Sensing) by sending commands via CAN bus (OBD ii port), My car has Electronic power steering.
I am doing this because I need to some experiments with self-driving software which will send steering angle as the output.
I will use panda OBD dongle from ... | No not directly through the OBDII port. There is no way of sending steering activations through OBD even with dealer level diagnostic equipment. Imagine the safety implications if this was possible.
Even if you accessed the steering CAN bus directly I doubt there is any data that you could send to activate the steerin... | Not sure about the Civic, but using openpilot from comma.ai, friend in Taiwan was able to get L2 on his prius w/o LKAS function (no camera module on his car at all).
| https://mechanics.stackexchange.com |
42,075 | [
"https://math.stackexchange.com/questions/42075",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/7920/"
] | I read this proposition in a book, which was not proved.
And I cannot verify it myself.
Could anyone help me out here?
If $$X_{n}\rightarrow X$$ in probability and $$X_{n}\rightarrow Y$$ almost surely,
then $$P(X=Y)=1.$$
An alternative version is that the p-limit of a sequence is almost surely unique.
Thanks for you... | <em>Back to basics:</em> Assume that $X_n\to X$ in probability and that $X_n\to Y$ in probability. Then, for every positive $x$, $P(|X_n-X|\geqslant x)+P(|X_n-Y|\geqslant x)$ converges to zero since both terms do. Now, $$[|X-Y|\geqslant 2x]\subseteq[|X_n-X|\geqslant x]\cup[|X_n-Y|\geqslant x],$$ hence, for every $n$,
... | For the sake of having an answer:
We know the following fact:
<blockquote>
If $X_n \to Y$ in probability then there is a subsequence $X_{n_k} \to Y$ almost surely.
</blockquote>
So take such a subsequence. As $X_{n} \to X$ a.s. we also have $X_{n_k} \to X$ a.s. and thus $X = Y$ a.s. because the almost sure limit o... | https://math.stackexchange.com |
54,550 | [
"https://mathoverflow.net/questions/54550",
"https://mathoverflow.net",
"https://mathoverflow.net/users/12774/"
] | Serge Lang's <em>Differential and Riemannian Manifolds</em> is a no doubt the best available reference for the theory of not-necessarily-finite-dimensional differential manifolds, but unfortunately it suffers the defect of containing no exercises and few examples. This makes it difficult to learn the subject from this ... | I would refer you to the remark B in supplement 3.4A on Manifolds, Tensor Analysis and Applications of Abraham Marsden Ratiu.
It hope it could be useful, and so I quote:
<blockquote>
"The following counterexample is due to A.J. Tromba. Let $h: [0, 1]\times L^2[0, 1]\rightarrow L^2[0, 1]$ be given by $h(x,\phi)=(h'(x... | The main reason for including condition VB3 obviously is to make it possible to obtain various associated tensor bundles from a given vector bundle $\mathcal E\to M$ . The simplest case probably is the formation of the dual bundle $\mathcal E'\to M$ . Suppose that we are given a chart overlap $U=U_1\cap U_2$ on the bas... | https://mathoverflow.net |
41,854 | [
"https://softwareengineering.stackexchange.com/questions/41854",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/4534/"
] | I know to check for/use asserts and carefully examine any assembly components, but I didn't know if anyone out there has a fairly comprehensive or industry standard check-list of specific things at which to look? I am looking more at C and C++.
note: There are some really helpful answers, I'm just leaving the quest... | Not a comprehensive list, but some of the things I ran into when converting a large C++ codebase:
Libraries, of course. Find all of them, and see what they've got. In my case, we decided to move to Open Source libraries for JPEG handling and data compression, and so we compile our own. Commercial libraries may give... | One thing to be careful with is third-party libraries you depend on. Some may not have been ported to x64 or have a separate version for x86 and x64 projects, so you will have to do some extra work to manage dependencies and make sure you're building against the correct library for your target platform.
<hr>
<blockqu... | https://softwareengineering.stackexchange.com |
66,372 | [
"https://mathoverflow.net/questions/66372",
"https://mathoverflow.net",
"https://mathoverflow.net/users/35353/"
] | Background:
I want to consider relative group cohomology: the construction is as follows. I have a subgroup $H\subseteq G$ (and note that I <em>don't</em> want to assume that $H$ is normal in $G$), and a $\mathbb Z[G]$-module $M$. Then we have the standard chain complxes $C^\ast(G;M)$ and $C^\ast(H,M)$, and there is... | Your argument is correct, and you do get that the relative group cohomology in your terms is a shift of these Ext-groups.
One reason why the dimension-shifting behavior occurs is that, with original gradings, you can't possibly have that $H^i(G,H;M)$ are the derived functors of $H^0(G,H;M)$. In fact, $C^0(G,H;M)$ is ... | Here are some remarks: the situation we would like to model algebraically is this: suppose $H$ is a subgroup of a group $G$ and $M$ is a $G$-module. Let $L_M$ be the corresponding local system on $BG$. Then we have a map of classifying spaces $f:BH\to BG$ obtained as follows: take $EG$, a contractible space on which $... | https://mathoverflow.net |
22,725 | [
"https://engineering.stackexchange.com/questions/22725",
"https://engineering.stackexchange.com",
"https://engineering.stackexchange.com/users/13372/"
] | I'm studying Euler's work on structural engineering from a book out of curiosity and it is mentioned that he developed a mathematical theory describing the buckling of columns under a parallel load (the weight-force of the load is directed down along the column). The theory is covered quickly without much motivation.
... | Euler buckling occurs because the world isn't perfect. So that theory assumes that there is an initial infinitesimal deviation along the column (assuming the column is in fact not perfectly vertical*). This deviation causes a bending moment along the beam, which increases the deviation, which increases the bending mome... | Think about a "thin" beam, for example a strip of springy steel. It is very easy to bend the strip into a curve, compared with stretching or compressing it along its length.
When it is bent into a curve, the length of the strip <em>measured around the curve</em> does not change significantly, and that means the strai... | https://engineering.stackexchange.com |
120,095 | [
"https://dba.stackexchange.com/questions/120095",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/79777/"
] | I have some huge DBF files (about 35 GB) to import to Postgres.
Whats the best and fast way to do it?
OBS: I have 300 GB of free disk space and 8 GB RAM.
| We faced a similar problem but our solution involved some coding. I don't know if that's an option for you.
We followed the usual phases:
<ol>
<li>We read the DBF metadata and created an analogous SQL 'create table' statement. The mapping is fairly straightforward except that we checked the number of digits for numer... | If the database files that you have come from database servers that you control or otherwise have access to, then you will find it a lot easier to use some form of ETL tool to pull the data from those servers and pump it into your postgres instance(s), instead of trying to decode the data files directly.
Even a manual... | https://dba.stackexchange.com |
484,033 | [
"https://stats.stackexchange.com/questions/484033",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/294561/"
] | I am having trouble understanding the implications for this kind of conditional probability:
<span class="math-container">$$E(X \mid X , Y).$$</span>
What does the above simplify to?
| If your output is binary (for example, a 0 or 1 classification), then an accuracy around 50% is meaningless because, since you have two outputs, a correct classification of 50% is merely random.
If your output is not binary, a good accuracy really depends on what is the meaning of your output and what you expect to ach... | You mean train set, or test set performance? On train set this can be anything up to 100% accuracy. On test set, if you have no data leaks, it cannot be anything better than what you got from random guessing. Of course, this assumes that “irrelevant” labels are random and give really no information. If the labels are j... | https://stats.stackexchange.com |
613,651 | [
"https://physics.stackexchange.com/questions/613651",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/288624/"
] | Do valence electrons literally break free of their bonds and jump from substance(1) to substance(2) in case of charging by conduction? If so, how? Do these electrons remain suspended amongst other atoms in substance(2) P.S. I'm in middle school so I would prefer a simplified explanation and/or links to certain concepts... | Formula <span class="math-container">$W=Fs$</span> is the formula for work, that is the energy transferred to the body by the force. It is the difference of kinetic energies between the final and initial state. If you're starting from <span class="math-container">$v=0$</span> and assume <span class="math-container">$E_... | The <span class="math-container">$s$</span> in equation <span class="math-container">$W=mas$</span> can be replaced from 3rd equation of motion.
<span class="math-container">$$W=\frac{ma(v^2-u^2)}{2a}$$</span>
<span class="math-container">$$W=\frac{1}{2}m(v^2-u^2) \rightarrow K.E.=\frac{1}{2}m(v^2-u^2)$$</span>
Or else... | https://physics.stackexchange.com |
49,906 | [
"https://mathoverflow.net/questions/49906",
"https://mathoverflow.net",
"https://mathoverflow.net/users/11697/"
] | I'm interested in $\theta(N):=\int_0^1 (1-x)^{N-1} e^{xN} dx$. I'd like to show that $\theta(N)\sim c/\sqrt{N}$ as $N\to\infty$ and determine $c$. Any ideas?
| Denote by $I$ your integral. Then,
$I = e^N \int_0^1 {x^{N - 1} e^{ - xN} \,{\rm d}x} = \frac{{\Gamma (N)e^N }}{{N^N }}\int_0^N {\frac{{x^{N - 1} e^{ - x} }}{{\Gamma (N)}}\,{\rm d}x}.$
Now, if $X_1,\ldots,X_N$ are independent and identically distributed exponential(1) random variables, then their sum $X_1 + \cdots + X... | Or just type Series[Integrate[(1 - x)^N Exp[x N], {x, 0, 1}], {N, Infinity, 1}] into Mathematica, and preserve those valuable neurons.
| https://mathoverflow.net |
66,733 | [
"https://stats.stackexchange.com/questions/66733",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/19759/"
] | I am currently doing visualization on my project and I need to know whether the visualization I have done is BI visualization or not.
So is there any difference between Visualization and BI Visualization? If yes, then what are the differences?
| BI is obsolete term used as marketing umbrella for various companies (like IBM, Oracle or SAP) to create illusion that they are relevant.
Data Visualization (DV) is a more specific and modern term: DV allowing users to see, explore, drilldown and interact with their data. It is a huge variety of DV vendors, but 3 of t... | A lift chart (and the measurement of uplift in general) is a decent example of a business-centric visualization: they seem to be used mostly for marketing and related applications. I can <em>imagine</em> some non-business situations where a lift chart would be an effective tool, but I don't think I've ever come across ... | https://stats.stackexchange.com |
699,223 | [
"https://physics.stackexchange.com/questions/699223",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/60683/"
] | I have a pretty good intuitive understanding of quantum mechanics. But one thing that I don't really intuitively understand is why electrons end up in bound states.
An electron might have some positional uncertainty, but no matter what that position is, it still experiences a force towards the nucleus. I would have exp... | I think your confusion really comes from a misunderstanding at the classical level – that attractive forces work like vacuum cleaners.
A vacuum cleaner creates a wind with a certain velocity that tends to make objects move with that velocity. It's an Aristotelian force, more or less. Electromagnetism and gravity cause ... | The basic response here must be that your "intuition" already fails at the classical level - if you take a classical probability density in phase space (i.e. classical statistical mechanics) and let it orbit around a star, it doesn't get "pulled into" the star, either - just every dot in that "... | https://physics.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.