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 |
|---|---|---|---|---|---|
318,819 | [
"https://physics.stackexchange.com/questions/318819",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | Given that the position of a one-dimensional harmonic oscillator is given by
<blockquote>
$$x(t) = Acos(\omega t + \phi)$$
</blockquote>
where $A,\phi,\omega \geq 0$ are constants of real numbers I'm trying in some sense
<blockquote>
<em>find the $p(x)\mathrm dx$ probability of finding the oscillator between p... | Start with energy conservation
$$
\frac{1}{2} m \left(\frac{dx}{dt}\right)^2 + \frac{1}{2} k x^2 = E
$$
Note that the amplitude $A$ can be found from setting $dx/dt = 0$ in the above and solving for $x$.
Now solve the above for $dt$ and consider the motion from $x=-A$ to $x=+A$.
You should find that the probability d... | This can also be solved using the standard microcanonical method given in statistical mechanics textbooks. Start with the Hamiltonian:
<span class="math-container">$$ H = \frac{p^2}{2m} + \frac{1}{2} k x^2 $$</span>
It gives us an ellipse in phase space as the phase trajectory. Calculate the total number of microstates... | https://physics.stackexchange.com |
366,164 | [
"https://mathoverflow.net/questions/366164",
"https://mathoverflow.net",
"https://mathoverflow.net/users/36886/"
] | Let <span class="math-container">$X$</span> be a metric space, <span class="math-container">$\nu,\mu$</span> be Borel measures on <span class="math-container">$X$</span>, <span class="math-container">$f:X\times \mathbb{R}\rightarrow [0,\infty)$</span> be a measurable function. Under what conditions is the integral fun... | Besides some condition ensuring that the map is well defined a simple and natural condition for the continuity is a Lipschitz condition with respect to the second variable, i.e., <span class="math-container">$$|f(x,y)-f(x,z)|\le c|y-z|$$</span> for some constant <span class="math-container">$c$</span> independent of <s... | Since <span class="math-container">$\nu$</span> does not appear anywhere else in the question, I suppose that <span class="math-container">$L^1(X)=L^1(\nu)$</span>.
In order that the functional be defined, one should then assume (probably without loss of generality) that <span class="math-container">$\mu$</span> is abs... | https://mathoverflow.net |
585,261 | [
"https://physics.stackexchange.com/questions/585261",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/152379/"
] | (For context, I originally thought of this question in the context of electromagnetic Doppler shift, but I'm also curious if the same logic applies for acoustic Doppler shift.)
Assume you are watching an object approaching you at relativistic speeds, for example fast enough that the measured frequency of its emissions ... | The instantaneous change occurs when you consider the Doppler shift in only one dimension. In three dimensions you can consider the correction when the velocity vector and the separation vector are not parallel. Usually such corrections go like <span class="math-container">$\cos\theta$</span>, where <span class="math... | The object cannot occupy your same place as he passes you, so let us assume that the trajectory is a straight line that passes next to you. As the object approaches, the component of the velocity in your direction diminishes, to the point of being zero when the object is next to you. Thus the doppler effect will change... | https://physics.stackexchange.com |
52,041 | [
"https://engineering.stackexchange.com/questions/52041",
"https://engineering.stackexchange.com",
"https://engineering.stackexchange.com/users/38885/"
] | In general, a kitchen refrigerator is essentially a heat pump. The vapor compression cycle creates a temperature difference, and the insulated compartment stays cold. But how can I determine the heat output of such a heat pump or its COP?
The user manuals only give the average energy consumption per day, but because of... | I like the answer by @Transistor better but if you don't have the option of turning off the refrigerator, you could get an idea of the COP by measuring the power consumption of the device under somewhat controlled conditions and measuring again after putting in a known thermal load.
Since COP is Q<sub>cooling</sub>/P<s... | I think you're going to have to start by measuring the heat loss / gain / quality of insulation of the fridge. The easiest way I can think of is to put a heater (incandescent lamp) - maybe 200 W - in the unpowered fridge, measure the power input and the temperature at which the air inside the fridge stabilises.
<ul>
<l... | https://engineering.stackexchange.com |
762,251 | [
"https://math.stackexchange.com/questions/762251",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/93836/"
] | Let $A$ be a square matrix of order $n$ and let $x$ be an $n$-vector.
Prove that if $Ax=x$ for all $x$, then $A=I$.
Thanks in advance
| It can be kind of difficult to get started with a proof for "for all..."- or "there exists..."-type statements, as straightforward algebraic manipulation usually won't lead to the answer directly. Instead, some kind of insight or theorem usually has to be used.
When we want to prove that A = B, it's sometimes wise to ... | Suppose a matrix $A$ is <em>not</em> zero. Without loss of generality, it's first column $C_1$ is nonzero. Then $Ae_1=C_1\neq 0$.
| https://math.stackexchange.com |
8,871 | [
"https://chemistry.stackexchange.com/questions/8871",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/2595/"
] | <blockquote>
All substitution reactions of benzene must be carried out in dry conditions with a catalyst that produces a powerful electrophile.
</blockquote>
This was a statement from my book. My question is, why must it be carried out in <strong><em>dry conditions</em></strong>?
What will occur if moisture is pr... | Benzene and other aromatic hydrocarbons are immisible with water. So, probably there is no problem with benzene if we there is moisture.
In most of the substitution reactions which benzene undergo, requires Lewis acid catalyst, like ferric halide or aluminium halide. Most commonly used catalysts are Anhyd. $\ce{AlCl... | Electrophiles
are reactive cations, they will react with water to form
eg an alcohol (or some weak acid etc) and protons.
No reaction with benzene.
| https://chemistry.stackexchange.com |
8,952 | [
"https://dba.stackexchange.com/questions/8952",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/4984/"
] | I have a user table that controls access to a website. We currently have a few hundred users and this might eventually grow to a few 10,000s. We have a requirement to allow in "temporary" users. These temporary users will have a token that times out, never to be used again. These tokens will likely outnumber the genera... | Why don't you just store it in the main <code>user</code> table (keeping a unique ID will be a nightmare otherwise), and have an <code>ACTIVE</code> bit field that you include in your indexes (you can filter if you like).
It won't really slow down access to the table since your indexes will be able to very quickly sor... | Put an expiry date into your user table, then every week shift all old expired users to an archive table. You don't have to break your data model for temporary users, and you keep a reasonably small users table.
| https://dba.stackexchange.com |
25,976 | [
"https://security.stackexchange.com/questions/25976",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/16084/"
] | Some merchants provide the ability to chat over the web for customer service or help.
Are there any risks in using these online chat channels? If so, what are the primary risks? Can the chat website view any of our private information, and if so, what?
Also, is it secure to share private and confidential information... | This question is too vague to answer accurately.
An website that is not known to you could potentially be the most secure website on the net that offers a chat feature in a very secure and privacy aware way. Or vice-versa: its chat feature might have poor security.
There are too many variables. The popularity of a ... | This is indeed a complex question, but here's a brief set of answers:
<blockquote>
Are there any risks in using these online chat channels?
</blockquote>
Whenever anything is implemented over the Web, there are always risks associated. One of the risks you will encounter with chats sessions for uses as described is... | https://security.stackexchange.com |
173,110 | [
"https://security.stackexchange.com/questions/173110",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/163426/"
] | I'm thinking about a client-side encryption concept where only the client knows the master secret (a user password). A correct implementation assumed, with KDF and authenticated encryption solutions it should be possible to ensure confidentiality and integrity without submitting the secret (from password derived key) t... | Sadly most of them do not use https at all.
If no https is used no certificate check needs to be done. This is actually more insecure than having TLS with manually verified certificates, but I guess the vendors try to avoid scaring people and getting support backlash.
In the future when Browser will alert form submis... | The other answer is not completely right, hence I‘ll try and fix that.
There are two different types of web interfaces for routers:
The internal and the external web interface.
While the external should be disabled for many reasons, the internal one does not need https to be deployed: as you are accessing the router ... | https://security.stackexchange.com |
41,502 | [
"https://physics.stackexchange.com/questions/41502",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/14222/"
] | I have a circuit where resistor is parallel to capacitor, which is charged with voltage U. How to compute line integral around closed loop to get the result of Kirchhof second law - $U_{capacitor}+I\cdot R=0$?
For beginning I splited it in two parts, starting from the capacitor positive plate through resistor:<br>
$$\... | Here's a step-by-step analysis:
Assign potential $V=0$ to node "-", and potential $V_+$ to node "+". $V_+$ could be either positive or negative, but I'll be assuming positive for definiteness. Clearly, if you compute the line integral $\boldsymbol{E}$ around the circuit, you get a result of 0. I'll use the directio... | Choose the negative plate of the capacitor as ground, $V=0$. The usual convention is that the electric field lines are drawn in the direction that a <em>positive</em> test charge would move if placed in the field. Then $\int_{-C+} d\vec{l}\cdot \vec{E}_C > 0$ if I traverse the circuit from the negative plate to the ... | https://physics.stackexchange.com |
26,565 | [
"https://mechanics.stackexchange.com/questions/26565",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/15337/"
] | I have a 1998 Honda Accord. I am driving today and I know that I need new brakes. They make a metal on metal screeching sound when I brake. Today as I go to brake at an intersection I hear a loud pop and my brakes stop working. I was able to avoid an accident and pulled over. I try driving on the small streets slowing ... | Yes. One of your brake pads on the caliper side of the brakes had been worn so far down it popped out of place. Now you are stopping using the caliper piston against the brake rotor. You will now have to not only get the brake pads and rotors replaced, but the caliper as well. If you cannot fix this yourself, you shoul... | It sounds like the brake pads have either completely worn through or otherwise failed, your car is not safe to drive at all.
In this case you will certainly need new pads on both sides and possibly new rotors (disks) if they have been scored by metal/metal contact.
Depending on exactly what has failed the calipers ... | https://mechanics.stackexchange.com |
79,586 | [
"https://softwareengineering.stackexchange.com/questions/79586",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/19799/"
] | Where I work developers are always telling me that "I added this just in case for the future" or "I think it's a good idea to do this because they'll probably want it some day". I think it's great that they're proactive in trying to anticipate future changes but I can't help thinking that it's unnecessary and risks wri... | Well first of all, there are some things that need clarification:
<ul>
<li>Future proofing is <strong>not</strong> adding stuff.</li>
<li>Future proofing is making sure you can <strong>easily</strong> add code/features without breaking existing functionality.</li>
</ul>
This means is that writing "future proof" code,... | It is important to realise that making code <strong>future proof</strong>, and writing code <strong>in case it is needed in the future</strong> are two very different things. The former is crucial to a good application, the lesser is usually not good coding practice.
<ul>
<li>For me, future proofing the code, is writ... | https://softwareengineering.stackexchange.com |
60,711 | [
"https://security.stackexchange.com/questions/60711",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/21582/"
] | I have two WebServices that are hosted by two different applications. Both Applications access each other's webservices:
<img src="https://i.stack.imgur.com/1vejd.png" alt="2 Webservices">
Now both WebServices have to authenticate with each other. Different solutions came to mind.
<ul>
<li>Create a Authentification... | It's possible that at some point in the future we might have a dedicated volatile memory designed for storing encryption keys, much like we use TPMs for long-term storage of keys. Perhaps a portion of the TPM could be memory mapped by the kernel and used for ephemeral key storage. This might even give rise to devices... | It seems to me that the goal here is to make the data unreadable once we are done with it. This could be achieved to a large degree by securely overwriting the data during shutdown. Granted, this is not ideal as it leaves the question as to what would happen in he event that power is interrupted.
| https://security.stackexchange.com |
250,617 | [
"https://softwareengineering.stackexchange.com/questions/250617",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/143501/"
] | The database I'm currently building is pretty traditional relational database stuff, but there is one requirement that is not clear to me how model appropriately.
There are many business rules which are translated into database consistency checks (i.e. date A must be between date B and C or this field must be not null... | This is going to sound crazy but I'd create a separate service that stored the data in another set of tables, but this other set of tables had no integrity checking. The user would do all the partial work there, and when they were ready you could move their data into the checked schema in a single transaction.
| Use some sort of identification field for draft mode (IsFinal) on your records. This value can then be taken into consideration when applying any finalization criteria:
<pre><code>If IsFinal then //do a bunch of checks
</code></pre>
You can do this in your code, database constraints or triggers.
| https://softwareengineering.stackexchange.com |
667,134 | [
"https://physics.stackexchange.com/questions/667134",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/273475/"
] | In a viscoelastic medium, the total strain is the sum of elastic strain and inelastic strain:
<span class="math-container">\begin{align}
\mathcal{E}^t_{ij}= \mathcal{E}^e_{ij}+\mathcal{E}^i_{ij}
\end{align}</span>
The elastic stress (Cauchy stress) can then be derived linearly as:
<span class="math-container">\begin{al... | No.
If a metal for example is forced to assume a given geometry, supposing small deformation, we can know the strain tensor as a function of the material coordinates.
Applying the elastic relation between stress and strain tensor, a trial stress tensor can be known. But it is possible that for some points, when the com... | Viscoelastic materials usually does not undergo irreversible strain. So these materials do not admit a decomposition of strain similar to that of plastic or viscoplastic materials.
For viscoelastic materials we have the following stress decomposition:
<span class="math-container">$$\sigma_{ij}^{(t)} = \sigma_{ij}^{(e)}... | https://physics.stackexchange.com |
239,565 | [
"https://electronics.stackexchange.com/questions/239565",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/4436/"
] | I'm having trouble getting full torque out of a DC motor at anything other than full speed with a PWM driving circuit.
Assuming the problem is inductance of the coils, what can be done besides decrease the driving frequency?
<strong>What is usually done?</strong> Nothing? If something, what?
I was thinking of using... | @Mark is correct, you can run from a higher voltage if it is available. This will mean running with PWM all of the time.
However, if you are wanting to run near full torque and still be able to run at the top speed at a given voltage, try using a fixed "off" time in your PWM instead of playing with the duty cycle. Tr... | Torque is directly proportional to current. So if you want to control the torque, you need to close the current-loop.
Higher than the rated voltage is fine, as long as you don't exceed the breakdown voltage (determined by the insulation). I typically drive motors from a 160 VDC bus, regardless of their rating. I just ... | https://electronics.stackexchange.com |
133,485 | [
"https://softwareengineering.stackexchange.com/questions/133485",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/25221/"
] | Do you find it easier to keep a branch for each company that uses software you support/develop? Each company will want "customizations" and I am just trying to figure out the best way to handle those changes. A branch for each company makes sense in the short term but I could see how this could cause issues with upgrad... | Supporting a product that is customized for multiple customers is not a version control problem. It is a design and distribution problem.
Maintaining multiple code bases is a real pain. It's bad enough to need to duplicate the code base to support multiple platforms and languages, let alone multiple customers. Bette... | The last thing you want is different versions of your source code for different clients. Keeping all those versions synchronized as you add features and fix bugs is going to be a huge pain, and the longer you operate that way, the more difficult it'll be to fix the problem.
A much better solution is to make you softwa... | https://softwareengineering.stackexchange.com |
351,454 | [
"https://physics.stackexchange.com/questions/351454",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/165890/"
] | <img src="https://i.stack.imgur.com/Dtg16.jpg" alt="enter image description here">
2 problems here: What is the force pulling $m_2$ when $m_1$ falls? I can only think of tension. When $m_1$ does fall (maybe a height $H$), does $m_2$ move $H/2$ to the right? Since the other end of the rope is attached to the support of... | Try a static analysis: the tension in the rope is $m_1g$--as this is required to keep the mass hanging there. Since there a 2 pieces of rope pulling on mass 2, the total force is $2m_1g$.
The answer to the second question is "yes": Mass 2 moves half the distance that Mass 1 does.
Moving over a distance, the work does... | I think the most easy way to solve these problem is by power method . In these whole system the net power will be equal to zero.<br>
so,
for block m1 let the tension force on it be T and velocity be v1 , and for m2 the tension force will be 2T and let velocity be v2.<br>
now the net power will be equal to zero
Tv1=2T... | https://physics.stackexchange.com |
875,647 | [
"https://math.stackexchange.com/questions/875647",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/159617/"
] | Am I right to write:
If q is incongruent to p modulo n, then $q\equiv -p$ (mod n)
Thanks for helping
| No. The relation $q\equiv -p \pmod{n}$ means that $p + q\equiv 0\pmod{n}$. To say that $q$ is inequivalent to $p$ means that $q\not\equiv p\pmod{n}$; here, $q$ could be any of the $n-1$ values aside from $p\pmod{n}$.
| Consider this:
<code>3</code> is not cong. to <code>-1</code> mode <code>6</code> and <code>3</code> is not cong. to <code>+1</code> mode <code>6</code>.
| https://math.stackexchange.com |
10,659 | [
"https://cstheory.stackexchange.com/questions/10659",
"https://cstheory.stackexchange.com",
"https://cstheory.stackexchange.com/users/6665/"
] | There is a linear program for which I want not merely a solution but a solution that's as central as possible on the face of the polytope that assumes the minimal value.
A priori, we expect the minimizing face should be high dimensional for various reasons, including that the objective function being minimized is the ... | I have a few observations which are too long for comments. Here's a summary.
<ol>
<li>Any algorithm to solve your problem exactly can be used to solve linear programs exactly (i.e., "strong linear programming", which is used in Sariel's solution, and presently does not have a polynomial time algorithm).</li>
<li>The ... | First find the optimal solution, then add the linear constraint that the solution must have value equal to the optimal you want, and restate your LP as the one looking for the largest ball inside the feasible region. Solve this modiefied LP, and you have what you want.
Why the second problem can be solved using LP is... | https://cstheory.stackexchange.com |
528,230 | [
"https://physics.stackexchange.com/questions/528230",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/252927/"
] | When a solute dissolves spontaneously in a solvent, the distribution of the solute tends to become homogenous.
For a truly homogenous mixture, there is uniform distribution of the solute in the solvent. But, only if the solute particles are equidistantly distributed, there will be perfect homogenity. That is, if there... | Your question is based on a chain of implications, most of them containing some quite common misunderstanding in statistical thermodynamics.
<blockquote>
For a truly homogeneous mixture, there is uniform distribution of the solute in the solvent. But, only if the solute particles are equidistantly distributed, there... | <blockquote>
But if there is equidistant distribution of the solute to attain homogenous, the system will be in a highly ordered state, implying the system has minimum entropy.
</blockquote>
It is confusing how "ordered" is used when describing entropy. What makes something ordered? That could be a matter of opinion... | https://physics.stackexchange.com |
94,091 | [
"https://cs.stackexchange.com/questions/94091",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/90500/"
] | I'm going through Cormen et al.'s Introduction to Algorithms and I am a little thrown off by some of the subtleties of solving recurrences with the substitution method. Given the recurrence:
$$ T(n) = T(\lfloor n/2 \rfloor) + T(\lceil n/2 \rceil) + 1, $$
We guess that the solution is $T(n) = O(n)$. Thus we try to sh... | Assuming for simplicity that $n$ is even, if we guess that $T(n) \leq C^2n$ then we can prove our guess by induction (for powers of 2) for an appropriate value of $C$ since
$$
T(n) = 2T(n/2) + 1 \leq C(n/2)^2 + 1 = \frac{C}{4} n^2 + 1
$$
is smaller than $Cn^2$ as long as $C \geq 4/3$ (assuming $n \ge 1$).
| It's worth noting that the substitution method is a alternative name for proof by induction. So, in the end, <strong>(1)</strong> you need to get exactly the same hypotheses. Also, it needs to <strong>(2)</strong> work for all $n$.
For example, using the hypoteses $T(n) \leq cn^2$,
\begin{eqnarray*}
T(n)
&=&... | https://cs.stackexchange.com |
2,839,960 | [
"https://math.stackexchange.com/questions/2839960",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/563920/"
] | 1.5.1 Suppose that we roll four fair six-sided dice.
(a) What is the conditional probability that the first die shows $2$, conditional on the
event that exactly three dice show $2$?
<hr>
My attempt:
Let A be the event that first die shows 2
Let B be the event that exactly three die shows 2
There is a $\frac{1}{6}$... | You don't need to know anything about dice (including their number of sides) to solve this. You know that exactly three dice show $2$. How many ways are there of choosing $3$ out of $4$ dice? These are all equiprobable. In how many of them does the first die show a $2$?
| Following @joriki: There is <em>some</em> probability of getting exactly three $2$s, and each of the configurations is equally likely. This means that the non-$2$ can be in one of four positions. In $1/4$ of the cases, then, the first die is the non-$2$ and in $3/4$ of the cases the first die <em>is</em> a $2$. So ... | https://math.stackexchange.com |
552,050 | [
"https://electronics.stackexchange.com/questions/552050",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/183348/"
] | I am using an A7-100T FPGA development board used for a project. Up to this point, I have only been doing simulations on Vivado with simulated clocks or when I have been using the board, I have not had to create any clock signals due to only having basic combinational logic designs.
What is the simplest way to create c... | Basically you have (a) calculated the kVA loading correctly when the power factor is 0.65. In simple terms it's 55 kW ÷ 0.65 = 84.615 kVA.
You have also (b) calculated the current correctly i.e. 84.615 kVA ÷ 415 = 203.89 amps.
And, for (c) it looks like the set question is wrong because, when you have unity power facto... | It looks like in the last question, you keep the current (203.89) and only change the power factor to 1. May be that is for showing that with same current and different power factor, KVA will not change.
| https://electronics.stackexchange.com |
594,857 | [
"https://electronics.stackexchange.com/questions/594857",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/77858/"
] | I have an electronic system design with lots of off-board data/power connections to various peripheral components (sensors, LEDs, motors). This is all contained within a large enclosure that is intended to be the "primary" EMC/EMI shielding.
Since no enclosure is perfect, to help with EMC and EMI adherence we... | You have not provided any details on the target requirements and very few on the actual design of "the machine". From what I see so far, it looks more like you are afraid of shadows than trying to solve any real problem.
Let's start with basic. The FCC part 15 in US and IEC 61000 / CISPR 32 standards in Europ... | If you use a shielded cable to pass through the wall of a conductive enclosure, and EMI is an issue, then you must connect the cable shield to the enclosure wall.
Ideally you would do this while maintaining the full 360 degrees conductive shield around the cable. Typically this is done with a shielded connector, this i... | https://electronics.stackexchange.com |
194,535 | [
"https://dba.stackexchange.com/questions/194535",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/140866/"
] | I need to find our high utilizers. I have this query:
<pre><code>with Visitlist as(
select v.PatientID, a.VisitID, a.AdmitDateTime,
rank() over (partition by PatientID order by AdmitDateTime desc) as VisitNumber
from AdmittingData a
inner join MriPatientVisitEvents v on a.VisitID = v.VisitID
where
a.AdmitDateTime &g... | Here is a possibility for you to look at. It uses the Lag function with the offset option set. It doesn't show what all the visits were or when they occurred, but it does only show the most recent visit date for each patient and then when the fourth prior visit occurred within the year.
<strong>Test Data</strong>
<... | This compares to latest visit only
<pre><code>with cte
as ( select v.PatientID, a.VisitID, a.AdmitDateTime
, rank() over (partition by v.PatientID order by a.AdmitDateTime desc) as VisitNumber
from AdmittingData a
join MriPatientVisitEvents v
on a.VisitID = v.VisitID
and a... | https://dba.stackexchange.com |
275,474 | [
"https://physics.stackexchange.com/questions/275474",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/-1/"
] | If I connect a solar panel to a light emitting diode and point the diode towards the solar panel, shining some light over it, some energy will be given back to the emitting diode.
This will stablish a cycle: the light emitting diode emits light, captured by the solar panel and used to power the light emitting diode, c... | Basically nothing happens. You might expect some exponential decay in the amount of light remaining in your circuit, but the decay is almost instantaneous.
First, if you're seeing it, a lot of light is escaping from this circuit. You could improve this by enclosing your circuit in a mirrored cavity, and using some kin... | No machine has 100% efficiency. The output power is always less than the input power. So the energy will decrease and will be zero at some point. So NO INFINITE ENERGY. How long will it power itself depends on the output power itself.
| https://physics.stackexchange.com |
385,994 | [
"https://physics.stackexchange.com/questions/385994",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/184659/"
] | I do not recall where, but I have read someting about the light approaching a blackhole. In the writing, it was said that an object would gain kinetical energy due to the blackhole's gravity, and would increase its speed. On the other hand, when the light approaches than an object, it would gain kinetical energy as wel... | This not too hard to understand. In fact, applying even Newtonian intuition will give an answer that is a reasonable (qualitative) approximation of the (always complicated) relativistic reality.
Simply put this can be viewed as two processes:
<ol>
<li>The mutual gravitational pull accelerates the two objects. In Newt... | The short answer is that no one knows. When you say mass is turned into energy in the form of gravitational waves, youre talking about mass in the form of nucleons (neutrons) being converted somehow into quanta of gravitational waves (gravitons). Viewed from this perspective, the question turns roughly into, "what is t... | https://physics.stackexchange.com |
406,179 | [
"https://softwareengineering.stackexchange.com/questions/406179",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/96091/"
] | I'm currently working with a very large system and have been asked to add an additional parameter to a method that's called from over 200 different places directly.
The method signature looks something like this:
<pre><code>public static bool SendMessageAndLog(long id, long userId, string message, string cc="", param... | Create a new method with the additional parameter and move all the code from the original method in it, making it use the additional parameter the way you are supposed to. Leave the original method (without the additional parameter) which would just call the new method with some default value of the additional paramete... | While I agree with the accepted answer, there's also another two approaches you could adopt depending on the requirements.
<strong>1. Method Overloading</strong>
You can have multiple methods in a c# class that have the same name and perform the same action but take different parameters. Although admittedly not the b... | https://softwareengineering.stackexchange.com |
43,659 | [
"https://quant.stackexchange.com/questions/43659",
"https://quant.stackexchange.com",
"https://quant.stackexchange.com/users/38466/"
] | How would a long term investor go about evaluating the prospect of investing in a bond ETF vs a long position in a future of equal duration?
<ul>
<li>Let’s asume this investment is in a taxable account.</li>
<li>Let’s asume we are looking at a 2year duration (for simplicity)</li>
<li>How can we estimate if the two opt... | This is a surprisingly complicated question that encompasses many moving parts. Without knowing exactly what your objectives are, it's a bit difficult to offer concrete advice, so I'll provide some general comments below.
Mechanically, you earn the <em>total</em> return when you buy and hold a real bond or a bond ETF.... | The future will not maintain its duration as it approached maturity. The position will need to be rolled as it approaches maturity. The future will also be very sensitive to one or a series of deliverable bonds to settle the future at maturity. The cheapest to deliver bond will be the driver of the sensitivity to th... | https://quant.stackexchange.com |
202,932 | [
"https://softwareengineering.stackexchange.com/questions/202932",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7270/"
] | Which code is better:
<pre><code>// C++
void handle_message(...some input parameters..., bool& wasHandled)
void set_some_value(int newValue, int* oldValue = nullptr)
// C#
void handle_message(...some input parameters..., out bool wasHandled)
void set_some_value(int newValue, out int oldValue)
</code></pre>
or
... | <strong>Edit</strong> (since the question has changed)
If your method only has one output, of course you return that value.
<pre><code>bool DoStuff(...)
</code></pre>
is much more readable when you use it than
<pre><code>void DoStuff(..., out bool success)
</code></pre>
Look at the sample usage:
<pre><code>if(DoS... | Make functions return values. This isn't any sort of functional thing or even relatively modern. If you're unclear about what the function is returning, then your function needs a better name. If your code is doing the wrong things, fix and/or test it.
In a vacuum, the only time that modifying your inputs is acceptabl... | https://softwareengineering.stackexchange.com |
268,123 | [
"https://physics.stackexchange.com/questions/268123",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/52284/"
] | Everyone know the standard Twin Paradox. I have my clock synchronized here on Earth with my twin. I leave Earth, Travel for a time at 0.9c, turn around, come back at .9c and then my clock is slow compared to the twin.
What can I do so that the situation is the same, but my twin's clock is the one that is slow. So, sta... | In special relativity, you can't do it. Much like a straight line is the shortest distance between two points in Euclidean geometry, a straight (nonaccelerating) worldline is the <em>longest</em> distance between two points in Minkowskian geometry (the geometry of spacetime). If one twin accelerates and the other doesn... | There are two very similar question today itself. I am pasting my answer from the other one here -
It is shown in movie "The contact" where it passes just a second or so on earth, but during the same time, the astronaut records many hours of static. What people on earth saw was that the space ship crashed before even... | https://physics.stackexchange.com |
11,827 | [
"https://mathoverflow.net/questions/11827",
"https://mathoverflow.net",
"https://mathoverflow.net/users/3275/"
] | Looked around a bit and couldn't seem to find a similar question. (either that or it was worded with vocabulary above the multivariable calculus I've taken. :))
Roughly worded: I would like to develop an algorithm (either in the form of "action to take each discrete time step" or "do these actions at exactly these tim... | Elements of $SU(2)$ look like this:
$$ x = \begin{pmatrix} a & - \overline{b} \\ b & \overline{a} \end{pmatrix},$$
where $|a|^2 + |b|^2 = 1$. This follows easily from $x^* = x^{-1}$. So you map that matrix to the point $(a,b)$ in $\mathbb{C}^2$, and this is your diffeomorphism.
| Regarding the higher dimensional question:
Please try to figure this out yourself. Just think about the map from SU(n) to $C^n$, mapping each matrix to the first column. What is the image and what is the preimage of each point in the image? Hint: confirm that it suffices to figure out the preimage of (1,0,...,0) and a... | https://mathoverflow.net |
71,807 | [
"https://dba.stackexchange.com/questions/71807",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/36226/"
] | I am trying to write a stored procedure that will take new values from a temp table, merge them into an actual table, giving me the ids of the inserted rows, and the rows that already exist matching its values.
Now, from what I am seeing, the MERGE function doesn't appear to support what I am trying to do, unless I am... | Updates are tracked by MERGE by providing:
<ul>
<li>the $Action value <strong>UPDATE</strong>;</li>
<li>the old values in the memory table <strong>deleted</strong>; and</li>
<li>the new values in the memory table <strong>inserted</strong>.</li>
</ul>
Therefore both in the case where a match is found, and in the case ... | You've done a lot with one night's experience with MERGE statements!
The DELETED column prefix of the OUTPUT clause should contain the values updated in the MERGE UPDATE SET statements, I think you're on the right track with Attempt 2.
| https://dba.stackexchange.com |
260,608 | [
"https://softwareengineering.stackexchange.com/questions/260608",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/153023/"
] | Most of the companies that offer public api these days do it through a web service. What was used before web services were popular? For example, if a company wanted to release a c# public api would it have release the dll files implementing a remote database connection? Or did they do something different from my assump... | There are a variety of ways that it could be done. First, don't blindly assume web services are a recent idea. The idea of putting a service for other computers to consume on a web server seems to have been invented multiple times, some quite early in the history of the web.
Other alternatives included defining a pro... | Even today, the overwhelming majority of APIs are <em>not</em> webservices. The MS Word API, for example looked pretty much exactly like it does today both before and after webservices became popular.
| https://softwareengineering.stackexchange.com |
336,070 | [
"https://softwareengineering.stackexchange.com/questions/336070",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/253676/"
] | I'm trying to decide whether to change IDEs as I've read promising things about both NetBeans and IntelliJ, but I have two interrelated (perhaps dumb) questions:
<ol>
<li>Is there any difference in the final application produced by all 3 IDE's, assuming that all 3 use identical code (Java)? In other words, do IDE's pa... | <blockquote>
Is there any difference in the final application produced by all 3 IDE's, assuming that all 3 use identical code (Java)? In other words, do IDE's package the final app in different ways, or add a watermark/signature file of sorts?
</blockquote>
IDE != compiler.
Some few IDE's have a built in compiler t... | I have been working for years with teams that allow each developer to choose which IDE to use, IntelliJ, NetBeans, Eclipse.
Builds (in our case) are done by Gradle, Maven, or Ant, using Jenkins or Circle CI. The IDE is not even present on the build instances.
This should give some idea how independent IDE can be from... | https://softwareengineering.stackexchange.com |
400,745 | [
"https://softwareengineering.stackexchange.com/questions/400745",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/326954/"
] | I am adding unit tests to some existing code which initially was not tested at all.
I have set up my CI system to fail builds where the code coverage percentage is reduced compared to previous build - mainly to set a path of continuing improvement.
I then encountered an unexpected and annoying (although mathematicall... | You can mitigate the effect to some degree by allowing the relative code coverage to reduce when the total number of uncovered lines also reduces, or when the total number of lines reduces, since this are pretty clear signs of a refactoring which sets a new base line for your coverage metrics.
In your example, the tot... | The problem I see here is that you have made the code coverage <strong>a trigger for build failure</strong>. I do believe that code coverage should be something that is routinely reviewed, but as you have experienced, you can have temporary reductions in your pursuit of higher code coverage.
In general, <strong>build... | https://softwareengineering.stackexchange.com |
54,774 | [
"https://chemistry.stackexchange.com/questions/54774",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/31801/"
] | I know buffer capacity is the following:
$$β=\frac{Δ(\ce{H+})}{Δ(\mathrm{pH})}$$ specifically the amount of acid/base that needs to be added to change pH by 1 unit.
<ol>
<li>If I have data about how pH of a protein has changed upon adding specific amounts of acid, how do I calculate buffer capacity?</li>
<li>Is there ... | The buffer capacity of a weak acid-conjugate base buffer is defined as the number of moles of strong acid needed to change the <span class="math-container">$\ce{pH}$</span> by 1 unit.
<span class="math-container">$$\beta = \frac{\mathrm{d}[A]}{\mathrm{dpH}} $$</span>
and the acid is present as <span class="math-contai... | You can't just willy nilly add acid or base to measure a pH change of 1.1 and then back calculate how much acid/base would be needed to change the pH by 1.0 pH units.
In order to do the back calculation you'd need to know what pH you started at, what pH you finished at, and the pKa and pKb values for all the species ... | https://chemistry.stackexchange.com |
22,256 | [
"https://mechanics.stackexchange.com/questions/22256",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/13024/"
] | I know a "bad" starter can drain battery, but am unsure what constitutes "bad enough" to allow a starter to drain the battery. Suppose a hypothetical coolant leak has corroded one's starter. Would that cause a drain on the battery?
| A 'bad' starter wont drain the battery while it is not being used to start the car, if that is what you mean. If the starter has a damaged commutator, it will not run at full power and so could mean that you have to turn the engine over longer to get the engine to start which will use more energy from the battery. Ev... | Yes starter will drain battery n ruin battery n some time ruin alternator ..I have ran into this few times . Once cops mechanic kept replacing battery's n alternators when was starter frying them . I told parts store . They thanked me for clearing it up . With new starter 14 years later no more problem n few same many ... | https://mechanics.stackexchange.com |
68,657 | [
"https://mathoverflow.net/questions/68657",
"https://mathoverflow.net",
"https://mathoverflow.net/users/11765/"
] | Q1.Given a quasi-projective variety $X$ over $\mathbf{C}$, is it always possible to find a $\Delta$-complex structure on $X$?
Q2. What is a good reference which gives a survey about what we know of $CW$-complex structures of quasi-projective varieties over $\mathbf{C}$?
| There are very general triangulability results for real (semi)algebraic sets (sets cut out by inequalities of real polynomials), and even for semianalytic and subanalytic sets. Lojasiewicz has some papers from the 60s on semianalytic sets; Hironaka and Hardt also have papers on the subject; and the book Real Algebraic... | Actually, any complex algebraic variety can be triangulated as a <strong>pseudomanifold</strong>, which is a simplicial complex such that, if the variety has real dimension $n$, then any simplex is contained in an $n$-simplex, any $(n-1)$-simplex is contained in exactly two $n$-simplexes, and any two $n$-simplexes can ... | https://mathoverflow.net |
117,370 | [
"https://physics.stackexchange.com/questions/117370",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/35837/"
] | Now consider parallel rays travelling towards the convex lens. After emerging they get converged at the focus. Won't this lead to interference between light rays? Practically it should but I would like to know why this does not happen.
<img src="https://i.stack.imgur.com/bwiBG.jpg" alt="http://www.passmyexams.co.uk/GC... | Yes you get interference - but a well constructed lens has introduced just enough phase shift in the wave front at every point that the interference is constructive. Because the lens is finite in size there will be some interference pattern observed at the focus - something known as <em>"Airy's rings"</em>
In fact - t... | We don't have to assume that light goes in straight lines when it is in a uniform material like air or water; even that is explainable by the general principle of quantum theory. It <em>appears</em> that light goes in a straight line.$_1$
Light doesn't really travel only in a straight line; it 'smells' the neighbor... | https://physics.stackexchange.com |
142,138 | [
"https://dba.stackexchange.com/questions/142138",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/98613/"
] | Suppose, there are some tasks and some sub-tasks under those tasks<br>
For example:
<pre>
Task 1
Sub task 1.1
Sub task 1.2
Sub task 1.3
Sub task 1.4
Task 2
Sub task 2.1
Sub task 2.2
Sub task 2.3
</pre>
what is the best way to design the schema in this situation?
First way... | This is a bit late, but the previous answers don't provide the third alternative which is both flexible and normalized.
All tasks should be kept in a Task table, because subtasks after all are just tasks.
The relationship between tasks should be stored in a second table that has columns to identify the parent/sub t... | It depends.
If your model is fixed as that which you state in the example data, <em>and always will be</em>, then the first way will work and will enforce that model.
If you might later want, or already want to support, a deeper model (i.e. splitting sub-tasks into smaller units of work) then you need the more generi... | https://dba.stackexchange.com |
138,948 | [
"https://softwareengineering.stackexchange.com/questions/138948",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/13967/"
] | Say you have an interface <code>IFoo</code>:
<pre><code>public interface IFoo {
void Bar(string s);
int Quux(object o);
}
</code></pre>
In version 2 of your API, you need to add a method <code>Glarg</code> to this interface. How do you do so without breaking your existing API users and maintaining backwards c... | <blockquote>
In version 2 of your API, you need to add a method <code>Glarg</code> to this interface.
</blockquote>
Why?
The interfaces defined for use with an API have two entirely different roles:
<ol>
<li>Dependency inversion - such interfaces are consumed by your API. They allow client code to create plugins e... | DirectX added version numbers to its interfaces. In your case, the solution would be something like
<pre><code>public interface IFoo2 : IFoo
{
void Glarg();
}
</code></pre>
The API would still refer to IFoo, and to IFoo2 only in methods etc where IFoo2 functionality is required.
API implementation should check i... | https://softwareengineering.stackexchange.com |
389,338 | [
"https://softwareengineering.stackexchange.com/questions/389338",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/132856/"
] | I am working on a Rails + React application and investigating frontend testing. Unlike the backend tests this doesn't seem to be a straightforward process with one obvious path. There are a list of possible ways to go about this and they all seem to test in very different ways.
The methods I have found are:
<ul>
<li>... | It depends on what you are testing for... A Website is itself an application that executes on the Browser platform family. So testing an application...
Static Analysers can reveal brittle, broken, badly written, security and other issues across a range of files such as: html, css, and js. These issues are usually low ... | My experience is with testing React Native. I have had a lot of success using the tools I am listing. I have experimented with Selenium Grid as well. I would recommend using:
<strong>Unit Testing</strong>
<pre><code>[Jest][1]
[Enzyme][1]
</code></pre>
and
<strong>E2E</strong>
<pre><code>[Detox][1]
</code></pre>... | https://softwareengineering.stackexchange.com |
109,607 | [
"https://cs.stackexchange.com/questions/109607",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/105487/"
] | Since there is only a constant between bases of logarithms, isn't it just alright to write <span class="math-container">$f(n) = \Omega(\log{n})$</span>, as opposed to <span class="math-container">$\Omega(\log_2{n})$</span>, or whatever the base might be?
| It depends where the logarithm is. If it is just a factor, then it doesn't make a difference, because big-O or <span class="math-container">$\theta$</span> allows you to multiply by any constant.
If you take <span class="math-container">$O(2^{\log n})$</span> then the base is important. In base 2 you would have just ... | Because asymptotic notation is oblivious of constant factors, and any two logarithms differ by a constant factor, the base makes no difference: <span class="math-container">$\log_a n = \Theta(\log_b n)$</span> for all <span class="math-container">$a,b > 1$</span>. So there is no need to specify the base of a logarit... | https://cs.stackexchange.com |
107,483 | [
"https://mathoverflow.net/questions/107483",
"https://mathoverflow.net",
"https://mathoverflow.net/users/7599/"
] | So $X$ and $Y$ are Hermitian matrices (or just symmetric real) of size $n$ by $n$ and suppose $Y\succeq X$, namely $Y-X$ is positive-semidefinite. Now write the eigenvalues of $Y$ as $\alpha_1\leq\ldots\leq \alpha_n$, and the eigenvalues of $X$ as $\beta_1\leq\ldots\leq \beta_n$. Is is necessarily true that $\alpha_i\g... | This is true and well known. By the minimax principle, $\alpha_k$ is the minimum over all $k$-dimensional subspaces of the norm of the quadratic form $v\mapsto(v,Yv)$ restricted to the subspace. And similarly for $\beta_k$ and $(v,Xv)$. Since $(v,Yv)\ge(v,Xv)$ for every vector $v$, the same inequality holds for the nor... | At this point I find it worth mentioning the following facts. Let $X$ and $Y$ be arbitrary square complex matrices. Let $|X|=(X^*X)^{1/2}$ be the <em>matrix absolute value</em>. Then, we may have the following inequalities (in decreasing order of strength, i.e., a higher one in the list implies a lower one):
<ol>
<li>... | https://mathoverflow.net |
780,158 | [
"https://math.stackexchange.com/questions/780158",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/60739/"
] | In page 298 of Jaynes' Probability Theory: the Logic of Science, equation (9.97), Jaynes says:
<blockquote>
We expect that, if hypothesis <span class="math-container">$H$</span> is true, then <span class="math-container">$n_k$</span> will be close to <span class="math-container">$np_k$</span>, in the sense that the dif... | Given that $\{a,b\}$ is a basis for $U$, you know that $a$ and $b$ are linearly independent. In order for $\{a+2b,b\}$ to be a basis for $U$, we must also have $a+2b$ and $b$ linearly independent. If this is the case, then if
$$
c_1(a+2b)+c_2(2b)=0
$$
for some scalars $c_1,c_2$, then we must have $c_1=c_2=0$ (by the de... | You check that $(a+2b,b)$ are linear independent generators:
they are genartors since they generate a basis:
$$
a= (a+2b) - 2*b\\
b=b
$$
and independent since, if you consider a linear combination
$0=m*(a+2b) + n*b= ma + (n+2m)b$ this gives you n=m=0 since $a$ and $b$ are independent.
| https://math.stackexchange.com |
2,306,808 | [
"https://math.stackexchange.com/questions/2306808",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/386652/"
] | The statement "If $[G:H]=2$, the $H$ is normal in $G$", has the following proof:
$G= N \cup g N = N \cup Ng $ for any $g\in G \setminus N$.
Therefore $Ng=gN$.
I don't understand why $G= N \cup g N = N \cup Ng $ is the case.
| If the index is $2$, there are two cosets (they can be identified with $1$ and $g$, picking any $g$ not in $N$).
Since $G$ is the disjoint union of its left cosets, you have that $G=N \cup gN$, and since $G$ is also the disjoint union of its right cosets, $G= N \cup Ng$.
Ps: I am guessing that $H=N$ here.
| Since index of $H$ is $2$ in $G$, that means there are only two <strong>distinct</strong> left(and right) cosets of $H$ in $G$. i.e. $H$ and $aH$ for all $a \notin G-H$ (and $H$ and $Ha$ for all $a \notin G-H$ (for right cosets)).
As you know these cosets partition the group $G$, hence $G=H \cup aH$ and $G=H \cup Ha$.... | https://math.stackexchange.com |
100,655 | [
"https://chemistry.stackexchange.com/questions/100655",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/66124/"
] | I have read in some books that when pressure increases, the number of effective collisions increases. Hence, $k$ depends on pressure. Is it true? If so, then why doesn't $k$ depends on concentration? The number of effective collisions should increase here also.
| According to hard-sphere collision theory of gas-phase reactions, the rate constant ($k$) for the elementary bimolecular reaction $\ce{B + C -> products}$ is
$$ k = N_\text{A} \pi (r_\text{B} + r_\text{C})^2 \left[ \frac{8RT}{\pi}\left( \frac{1}{M_\text{B}} + \frac{1}{M_\text{C}}\right)\right]^{1/2}e^{-E_\text{thr}/... | According to Arrhenius equation
$$k = A \exp\left\{-\frac{E_\mathrm{a}}{R T}\right\},$$
the rate constant $k$ depends on:
<ol>
<li>Activation energy $E_\mathrm{a}$: $k$ increases with the decrease of $E_\mathrm{a}$</li>
<li>Temperature $T$: $k$ increases with the increase of $T$</li>
<li>Pre-exponential factor $A$: Th... | https://chemistry.stackexchange.com |
129,974 | [
"https://dba.stackexchange.com/questions/129974",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/87763/"
] | I have the following set of MySQL queries:
<pre><code>SET @domain := (
SELECT server_domain
FROM engine.storage
WHERE (size_bytes - bytes_inuse) >= 40000
FOR UPDATE
);
UPDATE engine.storage
SET bytes_inuse = bytes_inuse + 40000
WHERE server_domain = (SELECT @domain);
</code></pre>
The question is ... | <strong>UPDATE</strong>:
I removed the complexness with the SET statement and put the whole query set into a stored procedure (Better for this task anyway).
If you want to test the FOR UPDATE functionality, simply put a SELECT SLEEP(10) statement between the SELECT and UPDATE and run two almost simultaneous queries ... | Unless the MySQL lords know better than me, it's equivalent to the query:
<pre><code>UPDATE engine.storage
SET bytes_inuse = bytes_inuse + 40000
WHERE (size_bytes - bytes_inuse) >= 40000;
</code></pre>
I imagine in your real query you have a more restrictive <code>WHERE</code> clause etc.
| https://dba.stackexchange.com |
220,547 | [
"https://softwareengineering.stackexchange.com/questions/220547",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/105316/"
] | On my form I have an icon which represents whether my entity is locked (shown by a locked padlock) or unlocked (an open padlock). At the model level, this is represented by a boolean property (isLocked). The user can toggle the entity between locked and unlocked by clicking the icon. This also updates the icon tool-tip... | You can actually use angular builtins here AND only have a single DOM element!
<pre><code><img ng-src="{{isLocked ? 'closed-padlock.png' : 'open-padlock.png'}}"
alt="{{isLocked ? 'locked-text' : 'open-text'}}">
</code></pre>
This will conditionally change the image's src and alt properties based on whether... | I like Option 1 better. I feel like when you are showing and hiding things by change classes thus through the CSS it is faster and easier to mange.
This also reduces the amount of elements on the DOM
| https://softwareengineering.stackexchange.com |
3,958,478 | [
"https://math.stackexchange.com/questions/3958478",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/864508/"
] | My professor says the solution is <span class="math-container">$47 \choose 8$</span>, but I don't understand how and why. Could you please explain the solution or say whether it is correct or not?
Thanks in advance!
| Neither can I. Say <span class="math-container">$A$</span> is a set of selection of 13 cards with exactly 5 diamonds and similary for <span class="math-container">$B,C$</span> and <span class="math-container">$D$</span>. Then <span class="math-container">$$|A|= |B|= |C|= |D| = {13\choose 5}\cdot {39\choose 8}$$</span> ... | This is an answer for an IMV reasonable interpretation.
Let <span class="math-container">$H$</span> denote the selections that contain <strong>exactly</strong> <span class="math-container">$5$</span> hearts and let there be similar definitions for <span class="math-container">$D$</span>, <span class="math-container">$S... | https://math.stackexchange.com |
187,378 | [
"https://security.stackexchange.com/questions/187378",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/176564/"
] | Does anyone know of any good Risk Registers to start logging security risk that are found on the fly?
The problem that I am having is that we find so much in a day, things start to get lost in emails and we tend to forget the risks that was found because of multiple fires.
| Something is wrong in your risk assessment process if you are finding new risks every day. It could also be that your risk identification was done at the wrong level of abstraction.
My guess is that you are doing this on a very low level and you should move up to understanding business impact. Risk is basically someth... | The risk register is a document which helps you to understand the risks within your organisation and help you plan out methods to resolve them. Often, you find many documents on the internet which give you some results, but most of it, is understood by very few people. As a result, the core issue, that is to resolve th... | https://security.stackexchange.com |
644,494 | [
"https://math.stackexchange.com/questions/644494",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/32756/"
] | <strong>Question</strong>
<blockquote>
If for some real number $a$, $\lim_{x\to 0}\frac{\sin 2x + a\sin x}{x^3}$ exists, then the limit is equal to:
</blockquote>
Here what i have done
since it is of $0/0$ form applying L' Hospital's rule$$\implies\lim_{x\to0}\frac{\sin 2x + a \sin x}{x^3} = \frac{2\cos 2x + a\cos... | Since $3x^2\to 0,$ the numerator also has to go to $0$ when $x\to 0$.
Hence, $2+a=0\iff a=-2.$
So, you'll have
$$\lim_{x\to 0}\frac{2\cos{2x}-2\cos x}{3x^2}.$$
You can use L' Hospital's rule twice.
| Using no L'Hospital's Rule or Maclaurin series, but instead trig identities and that $\lim_{x\to0}\frac{\sin(x)}{x}=1$:
$$\begin{align}
\lim_{x\to0}\frac{\sin(2x)+a\sin(x)}{x^3}&=\lim_{x\to0}\frac{2\sin(x)\cos(x)+a\sin(x)}{x^3}\\
&=\lim_{x\to0}\frac{\sin{x}}{x}\frac{2\cos(x)+a}{x^2}\\
&=\lim_{x\to0}\frac{2... | https://math.stackexchange.com |
150,243 | [
"https://physics.stackexchange.com/questions/150243",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/63394/"
] | In an induction coil, When I supply a constant DC voltage of $10 V$ the current goes increasing with time.
Why is this phenomenon taking place in an inductor ?
How much is the lag between the supplied voltage and the back emf produced in an inductor ?
How is this helpful in eliminating fluctuations in current in a ... | The back emf is created by changing current, not steady state current, and is created instantly when the current changes. When you put $10V$ across the coil with its $L$ and $R$, the current starts increasing. The $10V$ gets split between the $L\frac {di}{dt}$ and the $iR$, which is why there is an exponential approa... | The base equation for a RL circuit is:
$$U=Ri+L\frac{di}{dt}$$
If you solve the diff. equation(assuming $i(0)=0$) you get:
$$i(t)=\frac{U}{R}(1-e^\frac{t}{T})$$
$$ T=\frac{L}{R}-\text{This is the time required to get 63% of}\frac{U}{R}$$
Let's assume you already have a current $i(0)=i_1<\frac{U}{R}$, the solutio... | https://physics.stackexchange.com |
153,511 | [
"https://dba.stackexchange.com/questions/153511",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/55769/"
] | I'm in a bit of a predicament. There are over 1,000 views and stored procedures in a handful of databases that are hard-coded to go after another database.
In my example, the database names in SQL Server are <code>HOST_1</code> and <code>LOYALTY_1</code>. The views and procedures are trying to go after <code>HOST_PROD... | This could be done using the sys.objects table and the OBJECT_DEFINITION() function.
<pre><code>SELECT OBJECT_DEFINITION(id) AS ORIGINAL,
REPLACE(OBJECT_DEFINITION(id),'VALUE_TO_BE_REPLACED', 'VALUE_TO_REPLACE_WITH') AS UPDATED
,*
FROM sys.sysobjects o
WHERE xtype = 'V'
</code></pre>
The 'UPDATED' column f... | The following would probably give you what you need:
<pre><code>SELECT
'-------------------------------------' + CHAR(13) + CHAR(10) +
'DROP ' + IIF(o.type = 'P', 'PROCEDURE', 'VIEW') + ' [' + s.name + '].[' + o.name + ']' + CHAR(13) + CHAR(10) +
'GO' + CHAR(13) + CHAR(10) +
REPLACE(REPLACE([definit... | https://dba.stackexchange.com |
46,502 | [
"https://stats.stackexchange.com/questions/46502",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/18086/"
] | The title is my whole question. FPR is the false positive rate. TPR is the true positive rate.
| If you classify a fraction $k$ of your cases as positive then, because of the randomness, the same fraction $k$ of cases which should be positive will be classified positive (true positives), and the same fraction $k$ of cases which should be negative will be classified positive (false positives).
So the true positiv... | <h1>Identity</h1>
Let <span class="math-container">$T$</span> be the event that a case is positive, and <span class="math-container">$R$</span> the event a case is predicted to be positive by a classifier.
Since <span class="math-container">$T$</span> and <span class="math-container">$T^c$</span> are mutually exclusive... | https://stats.stackexchange.com |
165,315 | [
"https://security.stackexchange.com/questions/165315",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/147250/"
] | Port <code>25</code> of a web server is open. We dont have any email server, since we use google mail server, but still port <code>25</code> is open. Is it dangerous to keep it open?
If it can be attacked then how it can be attacked?
| I think sometimes people are confused with the word <em>open</em> (in a similar context), maybe imagining like having an open door in the house. Or maybe thinking that if something is open, than for hacker it must be easy to get into the system.
Having an open port doesn't necessarily mean that hacker can simply hac... | The rule is: if you do not use it, it should not be kept open. Without more info, it is hard to say whether it can cause harm to the web server. The risk is that as you do not use it, you will not audit and patch it. So if if vulnerability is later discovered, it will affect the machine hosting the web server.
TL/DR: ... | https://security.stackexchange.com |
227,654 | [
"https://softwareengineering.stackexchange.com/questions/227654",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/92509/"
] | Before forming a class in Java or other programming languages that support OOP, should I use underscore (_) in each (<strong>local</strong> or <strong>private</strong>) field declaration.
More precisely:
<blockquote>
private String _customername;
</blockquote>
Is this a correct declaration?
| There is a strong convention in java circles of <em>not</em> using <code>_</code> for member names (as opposed to C++ circles, where there is a strong convention <em>for</em> using them). This is largely an arbitrary difference that probably has more to do with the desire to reinforce a sense of community than with mea... | I think this is a matter of personal preference. I use underscores on private fields because I feel it makes it easier to read and identify the scope of the fields quickly. As far as I am aware, there are no rules defining which style you should use.
Note: I develop in C# primarily.
| https://softwareengineering.stackexchange.com |
44,187 | [
"https://cs.stackexchange.com/questions/44187",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/1342/"
] | I am working on an algorithm which approximates a certain optimal quantity. The approximation becomes better when the size of the problem ($n$) becomes larger: the difference from the optimum is approximately $1/n$.
Initially, I wrote that the algorithm achieves an approximation of:
$$\Omega(1-1/n)$$
But, now I am... | Both of the options you listed are acceptable. They have the same meaning; $f\in O(1/n)$ if and only if $1/f \in \Omega(n)$.
Let $f\in O(1/n)$. Then there exist $n_0,M>0$ such that for all $n>n_0$, $f\leq M/n$. Then $1/f\geq n/M$ for all $n>n_0$, thus $1/f\in \Omega(n)$, since for $n>n_0$, $1/f \geq 1/M \c... | What you want to write, I think, is $1 - \Theta(1/n)$, unless you want to be more detailed and fill in the particular value $c$ so that you can write $1 - c/n + O(1/n^2)$.
While $1 - O(1/n)$ is accurate, it's kinda weird because $1 \in 1 - O(1/n)$, and even $1 + 1/n \in 1 - O(1/n)$, but I think it's still saying what ... | https://cs.stackexchange.com |
343,597 | [
"https://physics.stackexchange.com/questions/343597",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/74/"
] | Without calculating it, it isn't obvious to me that if you take Planck's Law for the spectral radiance as a function of temperature of a black body and shift all the frequencies by the same factor, you will get a curve that is also a blackbody curve, but at lower temperature.
But because the blackbody curve is entrop... | This is a neat fact! I think the first time it's usually encountered is in a cosmology course, where the expansion of the universe keeps the CMB temperature well-defined. Here's an argument why.
Consider adiabatic expansion of a photon gas at temperature $T$ from the standpoint of kinetic theory. In this point of view... | What does it mean that blackbody curve is entropy maximizing? It means that a black 1000W radiator radiates cooler, more entropic radiation, than a 1000W pink radiator.
When a black object cools by radiating, the radiation has some entropy. If we paint said body blue, does the entropy of the radiation change? No. If i... | https://physics.stackexchange.com |
29,469 | [
"https://physics.stackexchange.com/questions/29469",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/4864/"
] | It is known that you can break P spontaneously--- look at any chiral molecule for an example. Spontaneous T breaking is harder for me to visualize. Is there a well known condensed matter system which is uncontroversial example where T is broken spontaneously?
I remember vaguely articles of Wen, Wilczek, and Zee from 1... | The simplest example in condensed matter physics that spontaneously breaks time reversal symmetry is a ferromagnet. Because spins (angular momentum) change sign under time reversal, the spontaneous magnetization in the ferromagnet breaks the symmetry. This is a macroscopic example.
The chiral spin liquid (Wen-Wilczek... | Perhaps chiral superfluids and superconductors are also good examples. The A-phase of liquid 3-He, for instance, is known to be a TRSB superfluid with pairing $p_x + i p_y$.
| https://physics.stackexchange.com |
278,831 | [
"https://stats.stackexchange.com/questions/278831",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/160920/"
] | I'm new to P-Values and Hypothesis testing and I noticed that p-values are explained differently everywhere I go. In my lecture notes it has a method for hypothesis testing and the last part says that "if the p-value is not small enough to rule out chance, we fail to reject null hypothesis". A p-value is stated as: th... | Let's use a simple example. You obtain a group mean of 10. Your H0 hypothesized or reference mean is 0. Is 10 sufficiently <em>different</em> from 0 to declare statistical significance? Well that depends on the variability (and possibly other factors like N) inherent in your data, and that then dictates your p-value.... | Many people attempt to simplify the definition of a p-value, and inevitably subtle errors or misunderstandings seep into their discussions. It's best to resist the urge, and speak precisely as possible:
<blockquote>
A <strong>p-value</strong> is the conditional probability of observing a statistic equal or more ext... | https://stats.stackexchange.com |
145,074 | [
"https://softwareengineering.stackexchange.com/questions/145074",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/52289/"
] | I am assuming the implementations/compilers/generated C code (referred to hereinafter as generic, 'interpreter') for most functional programming languages are written in non-pure functional languages.
If this is the case, the underlying interpreter for any given functional programming language exhibits destructive up... | Everything in your machine runs on a CPU which loads and stores memory words, and performs comparisons and goto-like branches.
Functional programming means that mutation is hidden under the rug, not that it goes away.
It is not feasible, with current technology, for a functional language to be implemented purely all ... | By way of illustration, let's walk through a trivial example of a computer language called "ALL-CAPS." This language has the peculiar quality (and language rule) of only being writable in all capital letters.
Can I write my compiler or interpreter in a language like C#? Of course I can. Does C# use lower-case lette... | https://softwareengineering.stackexchange.com |
204,726 | [
"https://softwareengineering.stackexchange.com/questions/204726",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/96581/"
] | When it is necessary to integrate with a web application, and an API is unavailable, is it a viable solution to simulate a web browser interacting with the web application as a real user would interact with it?
UPDATE
Some context.
Web App belongs to a vendor/partner. Their timeline for building a proper API will no... | If the problem is with a third-party vendor/partner that your company has a solid relationship with, then the best person to ask is the vendor. Get in contact with someone at their company, preferably someone associated with the team building the API, and ask their opinion; they will probably know the ins and outs of t... | When there is no API, ask the owner of the website for a suggestion.
For example, let's say you're interested in a list of movies published by a website which collected a large database of nearly every released movie for decades. There is no API.
If you ask the owner:
<ul>
<li>Maybe he can sell you the raw data,</li... | https://softwareengineering.stackexchange.com |
15,610 | [
"https://softwareengineering.stackexchange.com/questions/15610",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/2329/"
] | In the Java world, we often talk about the JVM, and when Java was new it had the supposedly killer feature of "Write Once, Run Anywhere."
From the way people talk and write, this seems different from the way that Python, for example, works. Yet I've not been aware of any way that Python code that I've written would w... | Java does a very good job on isolating you from the underlying OS and gives you the same exact tools on most platforms it works on to talk to things in the underlying OS.
Python on the other hand does not do as good of a job in isolating you from the underlying OS, It does not have a standard way of handling between... | Topically and just from a language runtime, there is little difference. The JVM in particular is designed not just as an interpreter but also a runtime compiler, code inference, an instrumental virtualization layer that can have dynamic hooks applied, various GC semantics and the ability to describe virtualization erg... | https://softwareengineering.stackexchange.com |
134,581 | [
"https://chemistry.stackexchange.com/questions/134581",
"https://chemistry.stackexchange.com",
"https://chemistry.stackexchange.com/users/59804/"
] | When <span class="math-container">$\ce{NaCl}$</span> salt is dissolved in water the <span class="math-container">$\ce{Cl-}$</span> and <span class="math-container">$\ce{Na+}$</span> ions and the polar <span class="math-container">$\ce{H2O}$</span> molecules are attracted to each other such that each <span class="math-c... | You can make a quick estimate yourself based on observable bulk physical properties:
According to “Aqueous Solubility of Inorganic Compounds at Various
Temperatures”, in <em>CRC Handbook of Chemistry and Physics, 97th Edition (2016),</em> William M. Haynes, ed., CRC Press/Taylor and Francis, Boca Raton, FL., the solub... | When NaCl is dissolved in water, the sodium ions are surrounded by several water molecules which are all oriented with their oxygen atoms touching the sodium ion. But this number may fluctuate, as these water molecules are not chemically attached by covalent bonds and they are often bumped and even ejected by other wat... | https://chemistry.stackexchange.com |
266,552 | [
"https://physics.stackexchange.com/questions/266552",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/111507/"
] | I'm getting ready for my classes to start next semester in Grad school, and I'm reading over Fourier Transforms and their applications. I came across the Convolution Theorem, namely, that if we have a convolution $$ \int_{-\infty}^\infty f(x)g(z-x)\, dx = h(z) ,$$ then the Fourier transform $${\hat f}[f(x)g(x)] = \left... | <ol>
<li>Fourier transforms occur very often in most fields of physics.</li>
<li>Products of functions occur very often in most fields of physics. </li>
</ol>
As a consequence of points 1 and 2, it is common to encounter Fourier transforms of products when manipulating an algebraic expression. To move forward algebrai... | A measurement typically involves the convolution of the thing being measured with the response function of the instrument. Now if the Fourier Transform of your response function has zeros in it, the convolution theorem tells you that <strong>information at the corresponding frequencies will be destroyed by the measurem... | https://physics.stackexchange.com |
2,678 | [
"https://quant.stackexchange.com/questions/2678",
"https://quant.stackexchange.com",
"https://quant.stackexchange.com/users/703/"
] | Since if the option's price is lower than its intrinsic value (eg. strike price - current stock price for puts), then an arbitrage opportunity arises from buying the option at bargain and then exercising it...
Consequently, an option's price will always be greater than or equal to its intrinsic value
Am I right or wr... | You answered your own question with the statement it began with:
"Since if the option's price is lower than its intrinsic value (eg. strike price - current stock price for puts), then an arbitrage opportunity arises from buying the option at bargain and then exercising it..."
An options price cannot be lower than it... | In kamikaze_pilot's defense, the question is not that naive or simple.
First of all, you need to define what options you are talking about. Consider a digital option for example (which is really fairly vanilla since you can proxy it as a combination of two European calls), which pays 1 of the stock is beyond a certain... | https://quant.stackexchange.com |
255,934 | [
"https://physics.stackexchange.com/questions/255934",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/117341/"
] | Given the following equations:
$100$ m = $0$ m + ($50 \cos\theta$ m/s)$t_1$
$0$ m = $0$ m + ($50 \sin\theta$ m/s)$t_1$ - $\frac{1}{2}(9.80$ m/s<sup>2</sup>$) t_1^2$
I am supposed to make up/create a real-life problem in which these equations are true.
<h2>-------------------------------------------</h2>
The only ... | These are a couple of classical equations of motion derived from Newton's laws, dealing with the motion of a body with initial velocity of 50 m/s at an angle of $\theta$ degrees (or radians) with respect to the horizontal/ground/$x$-axis, assuming that the coordinate system is flat. The object is subject to a downwards... | The equations look like the displacement of an object subject to zero acceleration (first equation) or the acceleration of gravity (second equation). If we assume that the first equation represents horizontal motion and the second, vertical motion (suggested by the 9.80 m/s$^2$), we can try to come up with a scenario.
... | https://physics.stackexchange.com |
3,016,176 | [
"https://math.stackexchange.com/questions/3016176",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/620336/"
] | So A ={2,4,7,9}
R = {(2,2), (2,4), (2,7), (2,9), (4,7), (4,9), (7,9)}
not reflexive because not all the elements from A are related to one another in R
is symmetric because 2,2 can relate to itself
is anti-symmetric because similarly, 2,2 is symmetric can give 2=2
is transitive because 2,2 can be paired with its... | There's a standard theorem that for any Banach space <span class="math-container">$X$</span>, if <span class="math-container">$X'$</span> is separable then so is <span class="math-container">$X$</span>. Hence, if <span class="math-container">$X''$</span> is separable then so is <span class="math-container">$X'$</span>... | We can embed <span class="math-container">$Y = C([a,b],\mathbb R)$</span> into <span class="math-container">$X = C^1([a,b], \mathbb R^n)$</span> by
<span class="math-container">$T(f)(x) = \int_a^x f(t)\; dt\; {\bf u}$</span> where <span class="math-container">$\bf u$</span> is some nonzero vector in <span class="math-... | https://math.stackexchange.com |
28,073 | [
"https://mathoverflow.net/questions/28073",
"https://mathoverflow.net",
"https://mathoverflow.net/users/6094/"
] | Take three noncollinear points (<em>a,b,c</em>), compute the center of their circumcircle <em>x</em>, and replace a random one of <em>a,b,c</em> with <em>x</em>. Repeat. It seems this process may converge to a point, assuming no collinearities ever develop along the way. But the dynamics seem complicated, with interm... | This problem may be reduced to computation of the Lyapunov exponent of a simple stochastic sequence.
Clearly, all triangles so generated are isosceles. Let $a_n$ be the common length of two equal sides and $2\phi_n$ the angle between them ($0\leq\phi_n\leq\pi/2).$ Then by elementary trigonometry,
$$a_{n+1}=R_n=a_n/2... | "Similar"? Let's see, how much license does that word give us? Within the past year or so an article appeared in the <em>Monthly</em> that studied a problem like this: take finitely many points in the plane. Form their Voronoi diagram. Look at the set of points where three or more edges of the Voronoi diagram meet.... | https://mathoverflow.net |
172,597 | [
"https://math.stackexchange.com/questions/172597",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/35795/"
] | Space of ordinal numbers are one of the favorite examples of my professor in general topology. I quite understand the idea at the base of ordinal numbers (few things or nothing about the concept of ordinal itself in set theory). What we were told was just about constructing bigger and bigger ordinals like putting boxes... | I’m going to use the more standard notation <span class="math-container">$\omega_1$</span> for the first uncountable ordinal.
The most important thing to understand is that the linear order <span class="math-container">$\le$</span> on the set <span class="math-container">$[0,\omega_1]$</span> is a well-order: if <span ... | Ordinals are naturally ordered, and this ordering is a well-ordering. Namely, every non-empty set of ordinal has a least element. You can think about them as a continuation of the natural numbers. First we add $\omega$ which is the supremum of $\mathbb N$, then we add another point, $\omega+1$, etc. etc.
Linear order... | https://math.stackexchange.com |
47,533 | [
"https://mathoverflow.net/questions/47533",
"https://mathoverflow.net",
"https://mathoverflow.net/users/4298/"
] | Let $f:[0,1]\to [0,1]$ be a continuous function. Must it have a point $x$ that $f^{-1}(x)$ is at most countable?
Added: Must it have a point $x$ that $dim_H(f^{-1}(x))=0$ ? ($dim_H$ means the Hausdorff dimension)
| A simple modification of the ideas of André Henriques, Sergei Ivanov and others shows that it is possible that all fibers have Hausdorff dimension $1$. For completeness I write down a complete proof.
Form a Cantor set as follows: let $I_0 = [0,1/3]$, $I_1=[2/3,1]$. If $I_{i_1,\ldots, i_n}$ has been defined, let $I_{i_... | No. For example, let $g : [0, 1] \to [0, 1] \times [0, 1]$ be a continuous surjective map (space-filling curve) and let $p : [0, 1] \times [0, 1] \to [0, 1]$ be the projection onto the first coordinate. Then $p \circ g$ is continuous and the preimage of every point is uncountable.
| https://mathoverflow.net |
2,322,209 | [
"https://math.stackexchange.com/questions/2322209",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/454968/"
] | I need some reference with a simple proof for the fact that:
SL(2,$\mathbb{R}$) is unimodular.
Thank you so much.
| The best reference is probably the book
<blockquote>
Lang, Serge. $SL_2(R)$. Addison-Wesley Publishing Co., Reading, Mass.-London-Amsterdam, 1975. xvi+428 pp.
</blockquote>
| The link in the comments is dead and the accepted answer is not particularly satisfying for me, so I might as well post another answer for future reference.
Fact 1: <span class="math-container">$\mathfrak{sl}(2, \mathbb{R})$</span> is semisimple.
Fact 2: Semisimple Lie algebra is perfect (i.e. <span class="math-contain... | https://math.stackexchange.com |
15,805 | [
"https://mathoverflow.net/questions/15805",
"https://mathoverflow.net",
"https://mathoverflow.net/users/3969/"
] | Given any CAT(0) space $X$, we can define a map $s:X\times X\times [0;1]\rightarrow X$, such that $s(x,y,-)$ is the constant speed geodesic from $x$ to $y$ . Any isometry $f$ of $X$ is compatible with that map in the sense, that $s(f(x),f(y),t)=f(s(x,y,t))$. Then one can ask, whether any self-homeomorphism of $X$, whic... | The map which you call "geodesic preserving" is usually called "affine".
It seems that affine maps to the real line are well understood even for general length space.
For your later edit: you may always take two spaces which admit self-similar maps and consider map on the product which move each coordinate with diffe... | If $Y$ is any CAT(0)-space, $X:=R^n \times Y$ will give another counterexample, so you might want to restrict to indecomposable $X$.<br>
The next remark is that the union of the coordinate axes in $R^2$ gives another example, as does an arbitrary union of lines through the origin in $R^n$ with the induced length metric... | https://mathoverflow.net |
1,941 | [
"https://dsp.stackexchange.com/questions/1941",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/333/"
] | I'm trying to figure out how exactly an auto correlation corresponds to a time domain signal.
Now I'm trying to find pitch periods in an audio file and 99% of the time I'm getting it spot on. Unfortunately however that 1% of the time is throwing me some annoying issues.
Now at present I scan through my window for th... | One useful way of thinking about how autocorrelation relates to the original time domain signal is to consider that autocorrelation is equivalent to the inverse FFT of the power spectrum of the original signal. In physical terms this can be thought of as breaking down the time domain signal into its constituent sinusoi... | Autocorrelation is not about finding the distance between individual peaks. It is more about finding those lag distances that minimize the averaged squared delta between everything, all the peaks, all the valleys, all the flat spots, all in combination, and etc. Because of this averaging over the entire window, the l... | https://dsp.stackexchange.com |
37,086 | [
"https://mechanics.stackexchange.com/questions/37086",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/22890/"
] | How long should it take to replace a crankshaft seal and camshaft adjuster magnet on 2001 slk230 mercedes? And, wouldn"t you notice a oil pan gasket leak when you saw other 2 leaks?
| "Mineral water", for this purpose, is equivalent to using tap water. It won't immediately destroy the battery, but you are disturbing the chemistry by adding some kind which don't belong there. You may have shortened the battery's life a bit.
But there isn't much you can do about it now short of draining and replacin... | The acid in the battery has attacked the minerals in the water, essentially neutralizing a proportionate amount of acid and leaving some salts in the bottom of the battery. It is probably a negligible amount, and won't affect capacity or lifetime <strong>if you do it once</strong>. Making a habit of it will shorten ... | https://mechanics.stackexchange.com |
39,363 | [
"https://softwareengineering.stackexchange.com/questions/39363",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/7702/"
] | How to remove hesitation of interacting with client ?
As a Devloper i want to develop my career but this require the better Client Interaction,but as now i haven't done any major client interaction , and i want to do major client interaction, how i can proceed in this way ?
| So there are a few things here:
<ul>
<li>You've got to find the opportunities. Often these aren't something you can control as your manager will decide who gets put in front of the client. What you can do is (a) make it clear to your manager that this is something you're interested in (don't be pushy but be sure he ... | <blockquote>
<strong>You must be interested by your client</strong>. The rest will comes naturally.
</blockquote>
Be interested he thinks, how he thinks, why he (really) needs your application, his history, his culture, his side needs, ... and you should like him as it is. You are going to work with him for a while.... | https://softwareengineering.stackexchange.com |
469,746 | [
"https://physics.stackexchange.com/questions/469746",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/193832/"
] | So I am having real trouble understanding what equations of state are and how we form them. My issue stems from reading multiple sources. So I understand that an equation of state is used to build a relationship between variables to describe a state of a system.
For example <span class="math-container">$P=P(V,T)$</span... | Equations of state are literally just equations relating state variables. State variables are values that just depend on the current state of the system and not on how the system got to that state. Contrast this with things like work done on the system or heat leaving the system, which depend on the process a system un... | I think you might be confusing two different concepts.
<ol>
<li>Thermodynamic potentials (Helmholtz, Gibbs, enthalpy etc.) describe the available energy of a system subject to certain external factors. A system maintained at constant temperature by a heat bath can be described by the Helmholtz potential (<span class="m... | https://physics.stackexchange.com |
961,728 | [
"https://math.stackexchange.com/questions/961728",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/174680/"
] | I need just a little bit of help. I feel like I'm making a simple mistake. Given:
$$\sqrt{x^2+y^2}=\tan{[\frac{\pi}{4}(x+y)]}$$
and $P(0,1)$. I need to find the equation of the tangent line at point $P$.
I differentiated the entire equation, and y'(x) came out to be a ridiculous fraction, which in the end, when I p... | If we regard $y$ as a function of $x$ in some neighborhood around $x_0=0$ and derive both sides we get
$$\left(x^2+y^2\right)^{-1/2}(x+y')=\sec^2\left[\frac{\pi}{4}\left(x+y\right)\right]\cdot\frac{\pi}{4}(1+y')...(*)$$
In order to find the slope of tangent line at $P$ we need $y'(x_0)=y'(0)$, so we set $x=0$ and $y=1$... | Implicitly:
$$\frac{x\,dx+y\,dy}{\sqrt{x^2+y^2}}=\frac \pi4\left(\frac{dx+dy}{\cos^2\left[\frac\pi4(x+y)\right]}\right)\iff$$
$$\left(\frac y{\sqrt{x^2+y^2}}-\frac\pi{4\cos^2\left[\frac\pi4(x+y)\right]}\right)dy=\left(-\frac x{\sqrt{x^2+y^2}}+\frac\pi{4\cos^2\left[\frac\pi4(x+y)\right]}\right)dx$$
And from here, on ... | https://math.stackexchange.com |
6,210 | [
"https://mechanics.stackexchange.com/questions/6210",
"https://mechanics.stackexchange.com",
"https://mechanics.stackexchange.com/users/3218/"
] | I have a 2000 GMC Savanna, and I've had this problem twice.
If we have a particularly cold few days, then a warm humid front moves through overnight, the engine won't start. I can see quite a bit of condensation all over the engine block, wiring, etc.
The engine turns over, the fuel rail is pressurized, and there is... | It's not required that you replace your brake rotors at the same time you replace your brake pads, but there are many reasons why it's highly recommended.
Primarily, it's not the rust you should worry about, there most likely always going to be some rust around the edges, that's not at all out of the ordinary. The mai... | If your rotors are thick enough and there are no defects in pads area (big grooves, buldgy edges) I would not worry at all. There's no need to replace rotors each time.
If there are some defects that can be removed and the rotors are thick enough - consider resurfacing the rotors, that might be cheaper.
All-in-all, g... | https://mechanics.stackexchange.com |
149,256 | [
"https://cs.stackexchange.com/questions/149256",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/141758/"
] | I came across factorial semantics using lambda calculus:
<span class="math-container">$$fact = \lambda n. if(iszero~n) (1) (mult~n(fact(pred~n)))$$</span>
I am not sure why the above <strong>does not make sense</strong>. Why we just can not keep substituting <span class="math-container">$fact $</span> please?
Other sem... | As modified by your edit, your grammar is unambiguous. Unfortunately, it is not deterministic; no limited lookahead is sufficient to decide whether when the parser reaches a comma: <span class="math-container">$$\bf{ID}\;\bf{(}\;\bf{ID}\;\bullet\;\bf{,}\;\cdots$$</span> it should predict <span class="math-container">$\... | The problem occurs with the parsing prefixes having the form <code>f(id, id, ...</code>, so that your grammar cannot determine by any means what do they denote: either the function definition or an expression starting with the function call.
Thinking in terms of PDAs, it is natural to parse such prefixes uniformly unti... | https://cs.stackexchange.com |
338,455 | [
"https://physics.stackexchange.com/questions/338455",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/158680/"
] | What is the derivative of an angle? I don't understand
<img src="https://i.stack.imgur.com/8p1hx.png" alt="enter image description here">
| Let's consider a 2-dimensional case. In a simple circular motion, the angular velocity is
$$v_{\theta} \equiv \omega = r \frac{d\theta}{dt} = r \dot{\theta}~.$$
I called this velocity $v_{\theta}$ because it's a velocity connected to the change in the coordinate $\theta$.
OK, so that's a simple circular motion, like t... | $\dot{\phi}\equiv\frac{d\phi}{dt}$ (same thing for $\dot{\theta}$) is only the time derivative of the angle $\phi$ (or $\theta$). The coordinates of a particle can be described in cartesiant, spherical or cylindrical coordinates. In spherical or cylindrical coordinates, the evolution of the particle's position is given... | https://physics.stackexchange.com |
224,857 | [
"https://softwareengineering.stackexchange.com/questions/224857",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/115491/"
] | I currently work as a .net developer and have coming up to 3 years experience in the industry as well as a degree in computer science specifically software engineering (I know that means nothing but just wanted to explain that I'm not your general back bedroom programmer).
When I finished Uni, I started contracting f... | There are a couple of ways to tackle this problem. None of them are perfect, but you can find a workable solution. The key is that your team needs to come up with a standard approach to resolving this and to stick with it.
Here are some of the options:
<ul>
<li>Different capitalization</li>
</ul>
The singularly na... | My suggestion would be to try to use a more meaningful name for the list variables. I know this is sometimes hard to do, though.
For example, instead of <code>List<Car> cars</code>, use something like <code>List<Car> parkedCars</code>. Instead of <code>Fish[] fish</code>, use something like <code>Fish[] ... | https://softwareengineering.stackexchange.com |
375,528 | [
"https://physics.stackexchange.com/questions/375528",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/179237/"
] | If you pumped water into the top of a water tower and vents were added to the top of the water tower to separate the tower reservoir from the pump to make two different but related systems. The tower would feed a tube of with internal turbines every few feet or less. the flow rate of the pump would have to be adjusted ... | <blockquote>
the [sheer] volume of water in the tower would provide potentially hundreds of times more the the pressure provided by the pump.
</blockquote>
Nope. The volume has nothing to do with it. The pressure in a body of water depends only on the depth at which you measure it. The pressure at the bottom of a... | The pump always has to supply enough energy to the water to overcome the force of gravity and reach the final height. The work required for the pump to do so is always going to be the same or less than the work you get out of the turbines.
This is conservation of energy.
When you factor in efficiencies of the pumps ... | https://physics.stackexchange.com |
91,675 | [
"https://dba.stackexchange.com/questions/91675",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/56050/"
] | I have 2 tables, <code>Tblservicedesk</code> and <code>Tblservicedesk_temp</code>
Columns:
<ul>
<li>CodServiceDesk </li>
<li>ID_Solicitacao</li>
<li>Solicitante</li>
<li>Departamento</li>
<li>Tecnico</li>
<li>Grupo</li>
<li>Status</li>
<li>Prioridade</li>
<li>Data_Abertura_Chamado</li>
<li>Data_Vencimento_Chamado</li... | Assuming both <code>Tblservicedesk</code> & <code>Tblservicedesk_temp</code> having same columns. You can write update statement to update the three columns (FlagEmailNota, FlagEmailSLA, FlagEmailFechado ).
<pre><code>UPDATE tsd
SET
tsd.FlagEmailNota = tsdt.FlagEmailNota ,
tsd.FlagEmailSLA = tsdt.FlagEmailS... | <pre><code>UPDATE sd
SET sd.FlagEmailNota = sdt.FlagEmailNota,
sd.FlagEmailSLA = sdt.FlagEmailSLA,
sd.FlagEmailFechado = sdt.FlagEmailFechado
FROM dbo.Tblservicedesk AS sd INNER JOIN dbo.Tblservicedesk_temp AS sdt ON sd.ID_Solicitacao = sdt.ID_Solicitacao
</code></pre>
| https://dba.stackexchange.com |
91,590 | [
"https://physics.stackexchange.com/questions/91590",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/4855/"
] | Sorry if this is a stupid question, but I have often been told that air conditioners are more efficient than an electric heater, because, the story goes, if you put say 1 kW of electricity in the electric heater, you get 1 kW worth of heat, but if you put 1 kW worth of electricity into the air conditioner, you can get ... | When using AC to cool a room, you are moving heat from inside the room to outside of it (lets say 3kW worth of heat flow), at the cost of electricity of course (1kW). The machine itself cannot be 100% efficient, meaning a portion of that 1kW cannot and did not actually do work, e.g. 0.8kW of power was used to pump that... | I am not sure I can really come up with a simple answer to this. But the key concept is something called Latent heat.This is where heat is going into say the Evaporator outside a room but notice it is very cold. You would think that heat going in would raise the temp of the evaporator, but what is happening is that a f... | https://physics.stackexchange.com |
129,135 | [
"https://cs.stackexchange.com/questions/129135",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/112887/"
] | <span class="math-container">$L = {a^n + b^m + a^{n+m}}$</span>
This is the language I want to show is not regular.
Now my problem is to choose p correctly.
Can I just set it as p=2*(n+m) ?
That's the problem I am facing now.
Thanks for any help I am starting to learn it to use the pumping lemma.
Edit:
In the meantime ... | It seems that you are trying to force the string length to be <span class="math-container">$p$</span>, which is not necessary. What is required is that <span class="math-container">$|xy| \leq p$</span>. The length of <span class="math-container">$w$</span> can be greater than <span class="math-container">$p$</span>. Al... | You can't "set" the pumping length.
The pumping lemma states that if <span class="math-container">$L$</span> is a regular language, then there is a constant <span class="math-container">$N > 0$</span> such that if <span class="math-container">$\sigma \in L$</span> and <span class="math-container">$\lvert \... | https://cs.stackexchange.com |
165,295 | [
"https://physics.stackexchange.com/questions/165295",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/73255/"
] | I believe that the heat source is the spark plug because it heats up the fuel-air mixture and that the working substance is the fuel-gas mixture. Then, I know that the explosion created by the fuel forces the piston down, turning the wheels. However, I cannot identify the heat sink in an internal combustion. What does ... | The spark plug merely initiates the chemical reaction of gasoline combining with oxygen. This reaction is what produces the heat. The combustion inside of the engine is typically $800-1200 ^\circ \text{C}$. The surrounding environment is the heat sink, whatever the outside temperature is. Some small engines are cooled ... | The spark plug is not a significant heat source. Imagine a cube in an incline barely holding. A little push and the cube goes tumbling down. The spark plug gives the little push. The chemical energy in the fuel + oxygen system will become thermal energy. The sink is everything else. Imagine that you are driving in hell... | https://physics.stackexchange.com |
133,356 | [
"https://softwareengineering.stackexchange.com/questions/133356",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/73/"
] | For 3 tables that are in 3NF, a many-to-many relationship, is there a standard name or term to describe the 3rd table, the one that associates the other tables? Basically, I'm looking for a semantic way to name the 3rd table.
<strong>Example</strong>
You have two tables: <em>users</em> and <em>widgets</em>. A user ca... | I hope you could bear with me in the next few lines. I don't agree with the naming conventions you have provided. Data Modeling has a purpose of making us think in more detail about the business and not only generate DDLs. If we use the effort and time spent in constructing the model to learn more about the business we... | I've seen just using the two. Just keep the same standard you use for everything else.
If your tables are users and widgets and you use camelCase, then userWidgets is fine. (I prefer that to usersWidgets because each userWidget is an individual item) The key is to be consistent every time you do it. This is more i... | https://softwareengineering.stackexchange.com |
45,827 | [
"https://datascience.stackexchange.com/questions/45827",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/50862/"
] | What do data scientists do at investment banks? What tools are they using? What kind of analysis are they doing? Why are they doing it? Etc.
| I'll be honest, I haven't thoroughly checked your code. However, I can see that the range of values of your dataset is approx <strong>[0,12000]</strong>. As an engineer, I see that:
<ol>
<li>sqrt(MSE) = sqrt(437000) = 661 units.</li>
<li>MAE = 400 units.</li>
<li>MAPE = 2.5 which means that MAE can be up to 0.025*1200... | You are stating something that is by definition the case. A Mean Absolute Percentage Error (MAPE) is typically a small number expressed in percentage, hopefully in the single digit. Meanwhile the Mean Squared Error (MSE) and Mean Absolute Error) are expressed in square of units and units respectively. If your units ... | https://datascience.stackexchange.com |
21,690 | [
"https://dba.stackexchange.com/questions/21690",
"https://dba.stackexchange.com",
"https://dba.stackexchange.com/users/3734/"
] | I have a table that has the following column definitions:
<pre><code>ID (INT, PK)
Name (VarChar)
Active (Bit)
Bunch_of (Other_columns)
</code></pre>
<strong>Question:</strong> I want to have a Constraint on <code>Name/Active</code> such that we can only have 1 record with a given <code>Name</code> that is <code>Activ... | To enforce this declaratively in 2005 you can use an indexed view.
<pre><code>CREATE VIEW dbo.ActiveNames
WITH SCHEMABINDING
AS
SELECT Name
FROM dbo.YourTable
WHERE Active = 1
GO
CREATE UNIQUE CLUSTERED INDEX UQ_ActiveNames ON dbo.ActiveNames(Name)
</code></pre>
| This can be done using CHECK constraint which execute function. Didn't test it completely but it works fine in my initial tests. Here is working eg.
<pre><code>CREATE function fn_checkNA(
@name varchar(6) )
Returns smallint
as
Begin
Declare @c smallint
if (select count(1) from dbo.chktest where Name = @nam... | https://dba.stackexchange.com |
122,684 | [
"https://softwareengineering.stackexchange.com/questions/122684",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/33582/"
] | I currently work with Zend Framework, but I also know about CodeIgniter and Kohana. I've just wonder that should I stick to a framework or depend on my purposes? Because I think I cannot master everything.
| As long as your current framework does what you need it to do, stick with it. Switching frameworks takes some time and once you master the new framework, you will have a hard time to maintain older projects because your have already forgotten how that other framework worked.
Of course, if your current framework become... | If you already worked with Zend, stick with it. There are other Frameworks and (depending on your case) some might fit better than others. But if you dont have any major showstopper whithin Zend, then why switch? Dont switch because "you have read in some blog that said X".
Writing (and maintaining!) your own framewo... | https://softwareengineering.stackexchange.com |
108,871 | [
"https://softwareengineering.stackexchange.com/questions/108871",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/30000/"
] | Often it is not obvious how to implement a given design pattern in a language. Sometimes it is difficult or cumbersome. Are there any languages built to make using design patterns easy and effective?
| Consider these points:
<ol>
<li>Design patterns indicate disconnect between the desired functionality and what the programming language provide</li>
<li>This disconnect can be easily created artificially by taking some concept from one language and trying to implement it in different language</li>
<li>Most of the exis... | The important thing is that a design pattern isn’t intrinsic to a language; it’s quite literally <em>just</em> a code pattern at which many developers have independently arrived. The design patterns that emerge in a particular language are considered the idiomatic, preferred way of solving certain kinds of problems.
S... | https://softwareengineering.stackexchange.com |
151,404 | [
"https://security.stackexchange.com/questions/151404",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/134612/"
] | What is more secure? An RSA-2048 key or a cryptographic 64 characters-long random HEX password?
I am asking this because as far as I understand, since the RSA-2048 key is a mathematical key, a quantum computer can crack it pretty easily. But, I believe it would be almost impossible for it to guess or crack a 64 chars... | Quantum computing is not yet a reality, so it is premature for you to invest resources in combating this ahead of the SSH standard.
Assuming identity of the server is verified, both options are equally secure, as they are both stored in a file on the client computer, and both have a sufficiently large amount of entrop... | Passwords should never be used If possible.
Private keys will prevent man in the middle attacks which passwords are susceptible to, amongst other things.
If it's possible to crack a private key, the password is also completely broken since this method of authentication relies on the servers public key to initiate the s... | https://security.stackexchange.com |
161,759 | [
"https://physics.stackexchange.com/questions/161759",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/57948/"
] | Suppose I have the power of Jean's (X-Men). If I separate the all the atoms in the water in a water bottle, would the volume remain the same?
| Imagine you have one litre of water, with the molecular weight of water being 18g/mol, this gives about 56 moles of substance. If you were to seperate <em>all the atoms</em>, you would be left with 56 moles of oxygen and 112 moles of oxygen (both would be gaseous, assuming normal* conditions).
Manipulation of the ideal... | Since the question is rather in-precise, so shall the answer be.
When you talk about separating all the atoms you have to specify in which manner you to this. When you disassociate water you will need to add some energy to break the hydrogen bonds. Afterwards you will have a pile of hydrogen and a pile of oxygen. Ther... | https://physics.stackexchange.com |
128,978 | [
"https://cs.stackexchange.com/questions/128978",
"https://cs.stackexchange.com",
"https://cs.stackexchange.com/users/125155/"
] | Let's say I have a string 0110 and after 011 I reach an accept state (let's call the accept state "q") in an NFA. However, there is no transition mentioned in the diagram from q for the symbol 0. Does this mean the computation dies, or does this mean that the string is accepted?
| It depends on if some variables on dependent on another, or if they are given as parameters in the problem. For example, in many graph-related problems, <span class="math-container">$n$</span> can be the number of vertices, and <span class="math-container">$m$</span> can be the number of edges. In this case, <span clas... | There is no general answer. By the way, if you want to simplify the <span class="math-container">$O(\max(n\log(n), m\log(m)))$</span>, you can rewrite it as as <span class="math-container">$O((n+m) \log(n+m))$</span>.
Moreover, if <span class="math-container">$g_1$</span> and <span class="math-container">$g_2$</span> a... | https://cs.stackexchange.com |
126,070 | [
"https://softwareengineering.stackexchange.com/questions/126070",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/31705/"
] | Ok, I hope this is not too much confusing (with my poor English). I want to build a small .Net 4.0 app which monitors several other applications on a Windows Server OR on a regular Windows PC. It will have a WPF GUI with a variety of graphical controls.
The app will be used in the following scenarios:
<ol>
<li>If ins... | You will need to write two separate parts: the service back end (which has no GUI) and the front end controller (the GUI). They will need to communicate using some form of windows interprocess communication.
Doing this as a single application may be possible, but in the windows service case it would have no GUI so sti... | Not sure this will be so difficult. Do your front end code as Silverlight or WPF, back end in WCF. The Silverlight oriented WCF-RIA will make most of the data plumbing fairly simple.
| https://softwareengineering.stackexchange.com |
2,656,179 | [
"https://math.stackexchange.com/questions/2656179",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/493389/"
] | $$\frac {8}{x^{a-b}+1}+\frac {8}{x^{b-a}+1} = ?$$
<strong>My attempt:</strong>
$$\frac {8}{x^{a-b} + 1} = 8. x^{-a+b}-1 \tag 1$$
$$\frac {8}{x^{b-a} + 1} = 8. x^{a-b}-1 \tag 2$$
I think I've gone too wrong.
| $\cfrac 8{x^{b-a}+1}=\cfrac8{\frac{x^{b}}{x^a}+1}=\cfrac {8x^a}{x^b+x^a}$ after multiplying both numerator and denominator by $x^a$
$\cfrac 8{x^{a-b}+1}=\cfrac8{\frac{x^{a}}{x^b}+1}=\cfrac {8x^b}{x^a+x^b}$ after multiplying both numerator and denominator by $x^b$
$$\cfrac {8x^b}{x^a+x^b}+\cfrac {8x^a}{x^b+x^a}=?$$
| let $n=a-b$
\begin{eqnarray*}
\frac{8}{x^n+1}+ \frac{8}{x^{-n}+1} =\frac{8}{x^n+1}+ \frac{8x^n}{x^{n}+1} =\frac{8(1+x^n)}{1+x^n}=\color{red}{8}.
\end{eqnarray*}
| https://math.stackexchange.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.