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
472,000
[ "https://physics.stackexchange.com/questions/472000", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/227860/" ]
If the nucleus is densely positively charged, why don’t the protons in the nucleus repel from each other and move towards the orbiting electrons? Because each proton is not only being repelled by the other protons, it is also being pulled by the oppositely charged electrons Why don’t these conditions make the atomic...
There is another fundamental force of nature apart from the electromagnetic and the gravitational force. This is the strong nuclear force. Its presence is in between the interactions of protons and neutrons themselves or between protons and neutrons. Unfortunately, the strong force has no <em>macroscopic effect</em> a...
The electrostatic repulsion force is long-distance, and the nuclear attraction is short-distance. So, protons do repel, and this is precisely what makes really large nuclei unstable. Secondly, electrons in the S-wave orbital have nonzero wavefunction at the nucleus, so effectively they are able to penetrate into the ...
https://physics.stackexchange.com
401,882
[ "https://softwareengineering.stackexchange.com/questions/401882", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/352127/" ]
I'm planning an empirical study on function passing - specifically lambdas aka anonymous functions aka arrow functions. Now, although functional or even object-oriented approaches are highly favored over procedural/imperative programming nowadays, there seems to be very little empirical evidence for their superiority. ...
<blockquote> least LOC isn't really what I'm looking for here </blockquote> But, why? Least LOC is what you <strong>should</strong> be looking for here. While lines-of-code does not make for a truly reliable maintainability measure, you will be hard pressed to disagree that it takes you more time to read 20 lines ov...
As a general note, it would be incorrect to say that the "functional" code (or the code using Java streams) is <strong>always</strong> better than the "imperative" code (or the code using Java loops). In some cases it is much better, but in some cases it can make the code less readable. For a detailed analysis, see It...
https://softwareengineering.stackexchange.com
387,552
[ "https://physics.stackexchange.com/questions/387552", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/185492/" ]
If an object absorbs a light, it emits back the same wavelength (if electrons get excited by a particular frequency, surely they must emit back that frequency or several lower frequencies). We say the object has the colour which it does not absorb (or which it reflects). Isn't this contradictory?
There appears to be a confusion here regarding the idea of absorption. In one sense, <em>every</em> photon which interacts with an object or medium is β€œabsorbed”. Some of that absorbed energy is re-emitted, generating the reflected (or transmitted) light, usually of the same color. But some of the energy is not re-emi...
In short, the fact that the absorbed photons can be re-emitted at lower frequency removes the "contradiction". Thermal channels exists other than radiative ones. Moreover, these photons are randomly emitted in all directions. As such, the light reflected to the eye/detector will have a specific spectrum that differs ...
https://physics.stackexchange.com
68,893
[ "https://stats.stackexchange.com/questions/68893", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/14826/" ]
I am a little bit confused about the Area Under Curve (AUC) of ROC and the overall accuracy. <ol> <li>Will the AUC be proportional to the overall accuracy? In other words, when we have a larger overall accuracy will we definitely a get larger AUC? Or are they by definition positively correlated? </li> <li>If they are p...
AUC (based on ROC) and overall accuracy seems not the same concept. Overall accuracy is based on one specific cutpoint, while ROC tries all of the cutpoint and plots the sensitivity and specificity. So when we compare the overall accuracy, we are comparing the accuracy based on some cutpoint. The overall accuracy vari...
While the two statistics measures are likely to be correlated, they measure different qualities of the classifier. <strong>AUROC</strong> The area under the curve (AUC) is equal to the probability that a classifier will rank a randomly chosen positive instance higher than a randomly chosen negative example. It measu...
https://stats.stackexchange.com
46,850
[ "https://electronics.stackexchange.com/questions/46850", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/2203/" ]
Just as the title says, how does this occur? I'm trying to wrap my head around processes vs components and I don't understand how this mechanism works. This may not be a proper question so please help me formulate it to be more specific, but I just really need to understand this concept to keep moving forward in my d...
Signals are always evaluated in a concurrent way. Variables are really just a convenience for making calculations or used as helpers in loops or generates. In general, they contain combinatorial evaluations or are used as iterators. In that sense they produce synthesis, but the sequentiality in their assignment is n...
This is a hard one to answer. Not because the answer is difficult, but because it requires that yo twist your brain in a certain way that is hard to describe. The most important thing to remember is that once it is put into hardware then everything is running concurrently. Even if it is written as if it were sequent...
https://electronics.stackexchange.com
266,582
[ "https://softwareengineering.stackexchange.com/questions/266582", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/7764/" ]
We were having a discussion at my work about the use of enums in Java. A coworker was arguing that when using enums on the server-side, whenever required we should use string to reference to it (for instance when sending data from JS to the server or when storing in the database), arguing that this is much more clear...
Good question. The use of enum in Java is primarily meant to handle information that is somewhat categorical in nature. The classic example being using enum to handle the four types of suits that a card could have. It provides all the performance advantage of using an integer and it is also clear in your program. S...
I agree with Neil's answer, but just an addition: In java enums are Objects, so they can have fields and methods. So you can give each enum some manualy specified value and when referencing it for outside work, use that value instead. It will survive both adding/removing/reordering and changing name of enum instance....
https://softwareengineering.stackexchange.com
284,603
[ "https://electronics.stackexchange.com/questions/284603", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/130553/" ]
I have the question "For the circuit shown find the value of the current I" <img src="https://i.stack.imgur.com/rUb60.jpg" alt="enter image description here"> From the previous question before this I worked out V = 60, Therefore V = IR And so I = V/R = 60/10 = 6A. Is this correct ?
No, it's wrong. Since the current will divide in parallel connections, there are different currents flowing through the branches those are \$I\$1, \$I\$2 and \$I\$3. \$I\$ is the whole current supplied by the source. So you need to calculate all the branch currents and then <strong>add them</strong>. That means you ...
60 V / 10 ohms gives the current through the 10 ohm resistor. Is "I" a current that only flows through a 10 ohm resistor?
https://electronics.stackexchange.com
134,250
[ "https://mathoverflow.net/questions/134250", "https://mathoverflow.net", "https://mathoverflow.net/users/13480/" ]
Let $\tau$ be a linear map on a finite dimensional complex vector space. Clearly, if $\lambda$ is an eigenvalue of $\tau$ then $\lambda^n$ is an eigenvalue of $\tau^n$, for any natural (integer, on condition $\tau$ is invertible) number $n$. It easily follows from Jordan theorem, that <em>every</em> eigenvalue of $\tau...
Perhaps you can use: $$\det(\lambda - \tau^n) = \det((-1)^n\prod_{\omega_i:\text{ nth roots of } \lambda} \omega_i - \tau)= (-1)^n\prod_{\omega_i:\text{ nth roots of } \lambda} \det(\omega_i - \tau) $$ by the multiplicativity of the determinant. This righthand side is only zero if for an $i$ $$\det(\omega_i - \tau)=0$$...
While I agree with the above comments and answers, here is one more approach that may be a little more low-tech. There is an invertible matrix $A$ such that, $\tau = AUA^{-1}$ where $U$ is upper triangular and $A$ is a product of determinant 1 elementary matrices. The eigenvalues for $U$ are the entries along the diag...
https://mathoverflow.net
3,858
[ "https://mathoverflow.net/questions/3858", "https://mathoverflow.net", "https://mathoverflow.net/users/1049/" ]
Can someone indicate me a good introductory text on geometric group theory?
de la Harpe's book is quite nice and has an amazing bibliography, but it doesn't really prove any deep theorems (though it certainly discusses them!). Some other sources. 1) Bridson and Haefliger's book "Metric Spaces of Non-Positive Curvature". Very easy to read and covers a lot of ground. 2) Ghys and de la Harpe'...
Pierre de la Harpe's "Topics in Geometric Group Theory" is, to be fair, the only book I know relatively well so I can't compare it to others. Anyway, I do like it - the writing style is pleasant and it gets to some non-trivial results, including a fairly complete review of the Grigorchuk group.
https://mathoverflow.net
248,691
[ "https://electronics.stackexchange.com/questions/248691", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/88003/" ]
So, as far as I understand, speakers are basically coils coupled with permanent magnets, then when a current is run through the coil it creates a magnetic field, pushing out against the permanent magnet, moving the diaphragm that's attached to the permanent magnet and creating sound waves. What I'm interested in is us...
What you are describing is commonly known as a "solenoid". It's a readily available electrical components something like a relay. Go to www.mcmaster.com and search on "solenoid" and you will see lots of commercially available varieties, though most are probably too large for your specific use. The solenoid is a coil ...
You can either use two coils of wire, or one coil of wire and a permanent magnet. Both will work.
https://electronics.stackexchange.com
240,323
[ "https://dba.stackexchange.com/questions/240323", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/182956/" ]
<h3>Preface</h3> We have been stuck for years using a monolithic program with terrible and inefficient database structure. Now we are finally moving away from it with our own program. The only area we are having difficulties with is the database. Our data is financial and our existing program causes loss of data most...
This sounds like a use-case for temporal tables. AFAIK PostgreSQL does not implement this natively. There are extensions for it. It can be written in user-code, usually with triggers. The basic idea is that the data table has two date/time columns. These define the interval during which the value in a row is applicabl...
I would add a <code>boolean</code> column named <code>active</code> to the table the is <code>TRUE</code> initially and gets changed to <code>FALSE</code> when a row version is deleted or updated. This will make your queries simpler, and you can use partial indexes to efficiently search only the active rows. You coul...
https://dba.stackexchange.com
250,403
[ "https://stats.stackexchange.com/questions/250403", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/120566/" ]
As i am new to statistics and statistical terminology i am struggling a bit with interpreting the results of some of the things i do/have to do. I am using RStudio as a tool for that. More precisely i am using a package nortest to perform normality distribution tests on my data. Running the Anderson-Darling normality ...
The Anderson-Darling test's null hypothesis is that the tested distribution is actually from the distribution specification it is tested against, here the null would be that your distribution is actually normal. In general, a p-value so low suggests that you can safely reject the null hypothesis on all relevant signif...
A good way to make a point about the distribution of data is to just plot it in comparison to plots of data that fit the conventional distributions. A visual display often yields better insights into the data than any test summary can. With a sample of thousands of values you can easily plot a histogram of the values ...
https://stats.stackexchange.com
238,833
[ "https://physics.stackexchange.com/questions/238833", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/87129/" ]
It took me a long time to understand that current is constant throughout the circuit. And now I am stuck at one last thing: The speed of charge. Here is what I am thinking: Current is defined as quantity of charge passing through a point at a given time, and from this we can deduce that current is constant throughout ...
The answer to your question is "yes". The relevant relationship is $I= nqAv_d$ where $I$ is the current, $q$ is the charge on a single charge carrier $n$ is the number of charge carriers per unit volume and $v_d$ is the magnitude of drift velocity. In a series circuit the current is constant as a consequence of the ...
Consider a river, with a constant rate of water flow. We'll start the river at a great dam, which releases water at a steady rate. We begin with the water already flowing at a constant rate, with the channel full. Why is the water flowing? Because it the channel has a constant rate of fall, a slight descent from whe...
https://physics.stackexchange.com
82,948
[ "https://dsp.stackexchange.com/questions/82948", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/34155/" ]
I have an OFDM system. I would like to introduce a fractional delay of (0.2 samples). Therefore, I increase the sampling rate of the OFDM signal by a factor of 10 (via frequency domain zero padding), and then I shift the signal by simply adding 2 zeros at the begining of the signal, and then I downsample the signal by ...
<blockquote> Is that correct? </blockquote> No. This zero padding just leads to interpolation with a (cyclic) sinc kernel. It affects all subcarriers the same (as you can see in your own DFT!). So, this has to be a problem with how well your receiver synchronizes that offset. Typically, higher-frequency subcarriers are...
If you've got it in the frequency domain anyway, why not phase shift it by (delay)(frequency)? It may still do odd things (like, shift whatever's at the end of the sample to the beginning), but you'll use a lot fewer processor cycles.
https://dsp.stackexchange.com
260,180
[ "https://security.stackexchange.com/questions/260180", "https://security.stackexchange.com", "https://security.stackexchange.com/users/201889/" ]
I'm trying to detect refresh token reuse / replay. A typical approach: <ul> <li>send refresh token (on login or refresh) <ul> <li>create refresh token as opaque value (e.g. buffer from a CSPRNG)</li> <li>base64 encode value and send to user</li> <li>salt and hash value, store in database (store hash rather than value, ...
Per request you will only hash what you get from the client, not the whole set in the db. <strong>Prevention</strong>: You do not need to store all refresh tokens of a user. You just store all <strong>valid</strong> tokens. Valid is β€žnot revokedβ€œ and β€žfreshβ€œ. Freshness can be ne handled by setting an expiration date in...
My solution was to send the user a refresh token AND its primary key. It's non-standard, but when I receive it in a refresh request, it avoids all those table lookups.
https://security.stackexchange.com
25,425
[ "https://dba.stackexchange.com/questions/25425", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/4490/" ]
I recently discovered that a large swath of the finance department is using Excel to connect to my SQL Server 2000 instance with an account in the sysadmin role. What are my current risks that I should immediately communicate to the powers that be?
Pretty much everything. I'd start with their potential ability to use <code>xp_cmdshell</code> (and <code>sp_configure</code> if they can't, so then they can ... and whatever the account returned by <code>xp_cmdshell 'whoami.exe'</code> can do....), then move onto their ability to do <code>drop database</code>. Furt...
If a malicious user destroyed your data, you could restore from backup--you should be able to calculate the impact to business for this scenario. What may be worse is that your system no longer has integrity. If a user manipulates data in a non-catastrophic way, you may not discover the damage until after your backups...
https://dba.stackexchange.com
90,529
[ "https://stats.stackexchange.com/questions/90529", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/42188/" ]
I have a survey using a Likert scale and two inverted questions out of twenty. Using R how can I identify (and maybe filter out) the respondents that always tick agree, for example, and thus did not read the questions properly? Thanks.
Copy-Paste of the answer from @Henrik: <blockquote> use <code>afex::mixed</code> as in <code>mixed(acc ~ race + sex + emotion + sex:emotion + race:emotion + score +(1|subj), family=binomial, data=subset, method = &quot;LRT&quot;)</code>. To obtain p-values based on parametric bootstrap, you can use <code>method = &quot...
Use the library <code>car</code> <pre><code>M5 &lt;- glmer(acc ~ race + sex + emotion + sex:emotion + race:emotion + score +(1|subj), family=binomial, data=subset) library(car) Anova(Ms) </code></pre>
https://stats.stackexchange.com
194,686
[ "https://softwareengineering.stackexchange.com/questions/194686", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/35897/" ]
In my opinion, one of the greatest things about Scala is its interoperability with Java and its similar syntax. One thing that I found strange is the use of the <code>_</code> operator for package wilcard imports instead of the <code>*</code> operator that is used in Java. Is there a technical reason for using <code>_...
In Scala, the <code>*</code> is a valid identifier. One could write: <pre><code>val * = "trollin'" println(*) </code></pre> With the result being: <pre><code>trollin' </code></pre> One could write a class named <code>*</code> as such: <pre><code>class * { def test():String = { "trollin'" } } </code></pre> ...
In functional languages, the _ character is commonly used to say, "I don't care about this parameter" or "anything can go here". Extending that value to namespace imports only makes sense.
https://softwareengineering.stackexchange.com
11,853
[ "https://physics.stackexchange.com/questions/11853", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/1916/" ]
If we have an <strong>isolated</strong> system <span class="math-container">$Sb$</span> with thermodynamic entropy <span class="math-container">$Eb=X$</span> (and growing by the 2nd law of thermodynamics), we could define an abstract system <span class="math-container">$Sa$</span> (containing the system <span class="ma...
I think the question you're really trying to ask is: what makes a set of microstates work for thermodynamics. In quantum mechanics, for a set of microstates, you can just take a set of orthogonal states of the system. For classical mechanics, you need to take a set of microstates which all have <strong>equal volume.</s...
The entropy $E_b$ is a <em>macroscopic</em> thermodynamic quantity. Therefore, any quantity derived from it will also be a macroscopic quantity. Therefore, your states are not microstates. The general restriction for a microstates is that once someone tells you what microstate a system is in, you know "everything" th...
https://physics.stackexchange.com
37,209
[ "https://engineering.stackexchange.com/questions/37209", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/14534/" ]
<strong>Current State</strong> Currently I have designed a coffee roaster that mostly uses the stainless steel tri clamps / tubes that many brewers use. The system can get up to 450 degrees F (232Β°C) even with moving air. <strong>Question</strong> I was wondering if someone has come across a cheaper material or system ...
In the food industry not many materials are used because of strict policies. The mostly used ones are definitely stainless steels (AISI304/316 and the even better AISI316/L). The other common material is nylon. For applications where only food contact is required(ie containers mostly) also BOPP or other polyolefins are...
I suggest investigating copper. Copper has historically been used for coffee rosters. Copper is food safe, provided the food in question is not acidic - pH should be &gt; 6. Otherwise copper would dissolve, copper is a heavy metal with some toxicity. Coffee - the drink - is actually more acidic than that, however in ro...
https://engineering.stackexchange.com
24,638
[ "https://physics.stackexchange.com/questions/24638", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/8446/" ]
<blockquote> <strong>A bucket of water is</strong> tied to a rope and <strong>swung in a vertical circle</strong>. The distance from the bucket centre to the axis of rotation is $2.08m$. <strong>Calculate the angular velocity</strong> (in $rad s^{-1}$) <strong>of the swing</strong>, to prevent the water from fa...
I probably would have calculated the angular velocity at the top of the circle. But the question is clearly ambiguous, and I don't think it was unreasonable of you to take "the angular velocity of ... the swing" to mean the <em>initial</em> velocity of the swing, starting from the bottom. The question should have said...
At the base of the circle, the water stays in the bucket without any extra work. The reason is that it is attracted to the Earth by its gravity. Try to get some water into a mug and you may experimentally observe that it will stay there if the mug is oriented in the usual "breakfast mode". (If it is oriented in the opp...
https://physics.stackexchange.com
44,976
[ "https://dba.stackexchange.com/questions/44976", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/9486/" ]
I'm building a DB for someone as a favor and whilst I'm perfectly OK to create a DB in Azure SQL for them and do the requisite TSQL coding they require I do also need to give them a client based way to access the data that involves no non-SQL coding from me. Ideally this would be a light weight alternative to SSMS tha...
I found a way to do this that requires some downtime (DB wasn't in production yet so this was not an issue) and does not allow for easy edits, but it works! <ol> <li>Detach DB from source server and copy to destination server</li> <li>Attach DB on destination server</li> <li>Create the Windows Auth Login and grant db_...
Below steps should work : <ol> <li>Create windows login on ServerA</li> <li>Create user in database mapped to login</li> <li>Drop login on ServerA - (OPTIONAL -if you want to have that login intact then leave it, else drop it).</li> <li>Grant any required permissions to user in database</li> <li>Create login on log sh...
https://dba.stackexchange.com
224,898
[ "https://physics.stackexchange.com/questions/224898", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/26071/" ]
Do light particles come in different sizes if it makes sense to even think about them that way?
No, it doesn't make sense to think of light particles having size. The picture of light as a particle in the everyday sense is a metaphor to give us language to talk about light and its interactions. Like all metaphors and analogies, the idea eventually breaks down. The metaphorical object (particle in this case) ha...
Like other people said, it doesn't make sense to think of the size of photons. It is irrevelant really. All we can say about light particles is its frequency. The greater the frequency, the bigger the energy the photon carries.
https://physics.stackexchange.com
388,272
[ "https://physics.stackexchange.com/questions/388272", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/184533/" ]
As entropy increases, the universe will evolve toward a thermodynamic equilibrium, and I understand that in a macroscopic sense, that is order since the temperature is the same everywhere. However, in a microscopic sense, it is chaotic, because as you increase temperature the movement of the atoms get faster and faster...
Remember that the universe will have expanded to an extremely large size by then. The expansion results in both the cooldown (as the matter/energy density gets diluted) and the increase in entropy (as the energy's positional spread increases). The increase in the positional contribution to the entropy dominates the dec...
I doubt the "heat death" very seriously. First, our Universe is not enclosed system. We cannot ensure somehow that "thermodynamic closeness" could be verified. Even if we assume that, we do not know exact parameters of Universe to verify cosmology assumptions about the evolution of Universe, i.e. intensity of turning s...
https://physics.stackexchange.com
454,013
[ "https://physics.stackexchange.com/questions/454013", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/73900/" ]
I’m studying Hydraulics, and this week we’re talking about viscosity and fluid properties and I came across this question but I can’t find the answer anywhere in my books. Please help.
In the context of petroleum products, that temperature is called the <em>pour point</em>. It varies greatly, depending on the average molecular weight of the product- in general, lower M.W. means a lower pour point temperature.
I believe at 0K temperature and pressures below 25 atm, Helium will still be a fluid.
https://physics.stackexchange.com
270,298
[ "https://electronics.stackexchange.com/questions/270298", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/109413/" ]
I generated USB VCP code for "STM32F103C8T6" with STM32CubeMX. I'm trying to send received data by STM from PC, to an Arduino board using UART. The code works good for data with little size, but when I want to send bigger data the received data in Arduino is corrupted. I'm using "Teraterm" and "Realterm" for sending d...
I used "HAL_UART_Transmit" for sending and it's working good but don't know what is wrong with "HAL_UART_Transmit_DMA" and "HAL_UART_Transmit_IT".
when you use uart dma or interrupt version it is not blocking , the uart function return straight away before data fully send So it happen that you get ready to receive new data from usb before previous sent on uart . As you use same buffer for usb rx and uart tx usb will start refiling buffer as it still getting send...
https://electronics.stackexchange.com
562,478
[ "https://stats.stackexchange.com/questions/562478", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/348157/" ]
If I had 9 coat hangers (for example: 4 green, 3 blue and 2 red), what would be the probability of the first four being [green, green, blue, blue], if I just chuck the coat hangers into the wardrobe at random? I have a feeling this is a permutations question, but I don't have that much experience in statistics to know ...
<em>Comment:</em> Until you show what you have tried, I will not discuss combinatorial answers. But if order is important, then the following simulation in R gives a good approximation of the correct answer: <span class="math-container">$0.0238 \pm 0.0020.$</span> <pre><code> set.seed(2022) pop = c(1,1,1,1,2,2,2,3,3) ...
Think about what's the probability of first hanger being green. There are 9 hangers in total and there are 4 green so it would be <span class="math-container">$\frac{4}{9}$</span> for the second time we have 3 green hanger and 8 total hangers so it would be <span class="math-container">$\frac{3}{8}$</span>. You can app...
https://stats.stackexchange.com
723,580
[ "https://physics.stackexchange.com/questions/723580", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/126382/" ]
I know this question looks very similar to many others but I actually think it is not the same, because I was looking for a possible answer for hours. The question is about the first step in the pp chain (i.e. the following reaction)Β  <span class="math-container">$$\rm^{1}H+{}^{1}H \to {}^{2}H+e^{+}+\nu_{e}$$</span> I ...
I would tweak your description a few different ways. First, it’s fine that you start off with zero kinetic energy. The reaction is exothermic, so it’s technically allowed at zero temperature. The <em>rate</em> of the reaction rapidly approaches zero as the temperature falls, so spontaneous fusion is not a thing in neu...
In completing the answer by rob, in detail to your point 2. <blockquote> <ol start="2"> <li>After the process takes place the two 1H stay together (forming 2H) and due to this a negative potential energy appears i.e. binding energy (like when two bodies come closer in a gravitational field).</li> </ol> </blockquote> I...
https://physics.stackexchange.com
279,497
[ "https://physics.stackexchange.com/questions/279497", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/28273/" ]
This is the part of the equation I do understand: $$ \langle A \rangle_\alpha = \langle \alpha | A | \alpha \rangle = \sum_{a}\sum_{b} \langle \alpha | b\rangle \langle b | A | a\rangle \langle a | \alpha \rangle =\\ $$ Between these lines is the logic I do not understand and need help with. It is not described in the ...
Let me suggest an alternative approach, whereby you model more from first principles, and end up not even needing to consider torque, etc, per se. They just automatically emerge from the first-principles model dynamics, as follows. I'd imagine you're thinking of a dipole as two point charges $+q,-q$ subject to the con...
There's no force "parallel to R" that you care about, and don't project F onto R. You have the torque right, and that you only need to understand the spin of the object. For the acceleration of its center of mass, just use all of F, nothing else-- it never matters where the force is applied to get the acceleration of...
https://physics.stackexchange.com
135,669
[ "https://mathoverflow.net/questions/135669", "https://mathoverflow.net", "https://mathoverflow.net/users/16981/" ]
Recall that two $k$-algebras $A, B$ are Morita equivalent iff their categories of left modules are equivalent. However, this relation turns out to be rather fine and one introduces a coarser equivalence relation of <em>derived Morita equivalence</em> by using (bounded) derived categories of modules, along with their tr...
Derived Morita equivalence is the same as higher derived Morita equivalence. Clearly, $\Leftarrow$ is obvious, and $\Rightarrow$ follows from Theorem 2.6 in Dugger-Shipley's 'K-theory and derived equivalences' Duke Math. J. 124 (2004), no.3, 587--617. This is surprising at a first glance, it follows from the fact that ...
Fernando's answer is excellent, but I can't resist mentioning what is perhaps the simplest counterexample to a generalization to your question. As Fernando says, there are counterexamples if you generalize from rings concentrated in degree 0 to dg-algebras. These examples are somewhat complicated, but if you generali...
https://mathoverflow.net
84,649
[ "https://softwareengineering.stackexchange.com/questions/84649", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/20244/" ]
I would like to become a professional in php, I have learned nearly all about the language syntax and concepts and I have a good knowledge in C and C++, which made it easier to become familiar with PHP. (Of course, I learned MySql too.) But I don't feel like being able to build even a little good website of my own! It...
You'll need lots practice and for website building a strong knowledge of the domain. That means being very comfortable with HTML, CSS, JavaScript, XML, Database Design, cross browser design and functionality issues. Later on, you'll want to add various patterns like client\server caching, delayed loading, and web ser...
<ol> <li>Install a PHP development environment on your pc. <ol> <li>Install a XAMP stack.</li> <li>Install an IDE for PHP, like Eclipse/PDT or Zend Studio.</li> <li>Install a remote debugger, like XDEBUG or Zend Debugger.</li> <li>Learn how to run a remote debugging session for a given URL. Zend Studio has a handy tool...
https://softwareengineering.stackexchange.com
3,398,667
[ "https://math.stackexchange.com/questions/3398667", "https://math.stackexchange.com", "https://math.stackexchange.com/users/710243/" ]
I have the following expressions: <span class="math-container">$x = aβŠ•b , y = cβŠ•d, z = xβŠ•y $</span> So <span class="math-container">$x = ab'+a'b, y = cd'+c'd $</span> <span class="math-container">$z = xy'+x'y = (ab'+a'b) * (cd'+c'd)' + (ab'+a'b)'*(cd'+c'd)$</span> If I take the first term : <span class="math-cont...
<span class="math-container">$|e^{i2\pi n}|=1$</span> for all <span class="math-container">$n$</span> and <span class="math-container">$|i2\pi n| \to \infty$</span>. So it is not true that <span class="math-container">$|e^{z}| \to \infty$</span> as <span class="math-container">$|z| \to \infty$</span>. Of course the l...
<span class="math-container">$e^z$</span> has an essential singularity at <span class="math-container">$z=\infty$</span> so we would not say <span class="math-container">$\lim\limits_{z\to\infty}e^z=\infty$</span>, but instead we say the limit does not exist.
https://math.stackexchange.com
61,530
[ "https://softwareengineering.stackexchange.com/questions/61530", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/10149/" ]
I am a fairly novice programmer - 6 months into an internship. I have decided to sign up to an Open Source project to learn new skills, and I have been accepted onto one. It seems the project is quite early in its life. They accept beginner programmers and I have explained that I am one. Obviously as this is my fir...
For source control, you'll just have to find out what they're using. &nbsp;It'll likely be SVN, if I to guess. As for etiquette, I'll tell you my two biggest pet peeves in my few years of "professional" programming and several years of group projects in school. I'll list them as two things, but they generally go tog...
Good points from all the answers. I will only add... <ol> <li>Start with submitting documentation. Improve the documentation on how to install, and use the software, or how to use APIs. It's amazing how much value you can add here without touching the code. </li> <li>Add test cases to existing code. That will help you...
https://softwareengineering.stackexchange.com
364,922
[ "https://physics.stackexchange.com/questions/364922", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/173300/" ]
Say I have an object sliding down a frictionless curved slide. Then conventional wisdom says that all gravitational potential energy gets converted to Kinetic energy, allowing us to conveniently find velocity. <strong>Question:</strong> Since there is also a normal force (otherwise the object just falls through the sl...
<em>Normal force</em> is a <em>constraint force</em>. The aim of this normal force in your example is to keep the object in contact with the slide. The normal force is always perpendicular to the displacement of the object and hence does no work.
<blockquote> Since there is also a normal force [...] this normal force also contributes to the work done </blockquote> To do work, the force must make something move. There mere fact that a force is present does not imply work being done (a table does no work on the apple it is holding up in spite of the constant n...
https://physics.stackexchange.com
385,689
[ "https://physics.stackexchange.com/questions/385689", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/184426/" ]
A simple maybe 8th or 7th grader question, but I can't really get over it. Elastic collision: momentum is conseved and so is the kinetic energy whereas in an inelastic collision, momentum is conserved but not the energy. Although I don't get it why is momentum of a closed and isolated system is supposed to be constant/...
There is general conservation law - conservation of <em>total</em> energy and momentum. Imagine that two balls of the same mass move towards each other with the same velocity (in opposite directions) and then collide absolutely inelastic so at the end we have one entire body at rest. So momentum is conserved (and equal...
This is not a complete answer to your question, but it may give you some insight… Consider a head-on collision, observed in the laboratory frame of reference, between two spheres of equal mass. There will be another frame, known as the <em>centre of mass</em> (<em>CM</em>) <em>frame</em>, in which the same collision is...
https://physics.stackexchange.com
2,386,730
[ "https://math.stackexchange.com/questions/2386730", "https://math.stackexchange.com", "https://math.stackexchange.com/users/355833/" ]
<blockquote> Let <span class="math-container">$H$</span> and <span class="math-container">$K$</span> be two subgroups of a group <span class="math-container">$G$</span>. Then <span class="math-container">$H \cup K$</span> is a subgroup <span class="math-container">$\iff H\subset K$</span> or <span class="math-container...
I think any such proof would revolve around the same ideas. But here's how we can phrase it to stay close enough to your original proof. After <blockquote> &hellip; we have to prove $H\subset K$ or $K\subset H$ </blockquote> we can insert the following: If $H\subset K$, we're done. So let's assume that $H\not\subs...
We will prove that $(1)\quad K\cup H $ is a subgroup $\implies K\subset H \lor H\subset K$ By contradiction $ (H\not\subset K)\land (K\not\subset H) \iff \left\lbrace\begin{array}l \exists h\in H\backslash K \\\exists k\in K\backslash H \end{array}\right.$ Let $u= k*h\in K\cup H$ $k*h\in K\cup H \implies \left\lbr...
https://math.stackexchange.com
191,358
[ "https://dba.stackexchange.com/questions/191358", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/138928/" ]
I feel like I may of made a mistake with my database design. At the moment I have 73182 tables, 4 days ago I had 72236, and just 2 months ago we only had about 20k tables - so our growth spiked. Essentially, each customer has their own set of tables for the CRM, these tables are almost all very similar, except that i...
73K tables is bad design and bad for performance. If you get it down to 2K, that might be reasonable. There are a few settings that are caches for tables; they would be in the hundreds or a few thousand, but not 73K.
<blockquote> Essentially, each customer has their own set of tables for the CRM, these tables are almost all very similar, except that it just holds data unique to them. With a bit of refactoring, I could very easily copy data across to only a few tables with a huge amount of rows (Which means I could probably drop n...
https://dba.stackexchange.com
92,060
[ "https://electronics.stackexchange.com/questions/92060", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/33373/" ]
My team has verified our logic design on a development board and we are ready to move to a final prototype. Due to the nature of the device, the FPGA board must contain minimal components and be configured via an external programming circuit. The specific technology we have targeted is the Altera Cyclone V but I imagin...
I think from your question you already understand this, but for clarification, this is my usual terminology: <ul> <li>Programming implies altering some non-volatile device</li> <li>Configuration is what the FPGA does when it starts up - it loads its volatile internal memory from non-volatile external memory.</li> </ul...
Normally, you would simply include a normal 8-pin SPI flash memory device on the same board as the FPGA &mdash; are you saying you can't do this for some reason? When the FPGA powers up, it will simply start reading data from the first address in the SPI flash and use this data as its configuration bitstream. To put ...
https://electronics.stackexchange.com
111,287
[ "https://electronics.stackexchange.com/questions/111287", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/37892/" ]
I keep hearing this expression thrown around when talking about or to PCB fab houses. Can someone tell me what it means, or refer to ?
"Turnkey" means that you only provide documentation to someone else to build something. They then source all the parts, get other parts modified or made, etc. Basically you send them specs and money and they send you fully built units. Note that this doesn't really apply to PCB fabrication. Or more accurately, PCB ...
They not only fab the PCB but also buy parts and do assembly.
https://electronics.stackexchange.com
167,242
[ "https://softwareengineering.stackexchange.com/questions/167242", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/63220/" ]
Suppose I have a controller that loads a file and hands it over to the processing. <ul> <li>Should I handle the exception in the file loader and return <code>Null</code> if something is wrong, or should I throw the exception and handle it in the controller? </li> <li>Without the file the rest of the program canΒ΄t wor...
<strong>In layman's words:</strong> <ul> <li>You should not return null. </li> <li>The exception should be handled in the top-most layer.</li> <li>The program should not terminate, but give feedback to the user, unless it is a Unix style command line program where it's ok to terminate after showing an error message.</...
Exceptions should go up until they reach the layer where you need to take care of them (i.e. catch them and act accordingly). In your example, it seems you need to load a file; if the file is not found or is corrupt, you want to close the application. In this case, it seems that you should catch the exception at the ...
https://softwareengineering.stackexchange.com
254,049
[ "https://dba.stackexchange.com/questions/254049", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/194932/" ]
I have a table (refer to below structure) where I track all stock ins and outs. Now I want to generate a report from this table to find the <strong>opening_stock, purchased, purchased_return, sales, sales_returned, damaged_inventory</strong> based on provided date range. Query: <pre><code>SELECT ITEM_ID, (SELECT (...
The index on (item_id, ref_type, entry_date) is mandatory in this case. This would avoid creating a temporary table for the group by: <pre><code> CREATE INDEX INV_ITEM_LEDGER_INDEX02 ON INV_ITEM_LEDGER (ITEM_ID, REF_TYPE, ENTRY_DATE); </code></pre>
As far as I can tell, you can rewrite this to a conditional aggregation for each time range (before 2019-09-31 and after). Typically a "plain" aggregation is faster then multiple scalar sub-queries. <pre class="lang-sql prettyprint-override"><code>SELECT l.item_id, l.opening, x.purchase, x.purc...
https://dba.stackexchange.com
311,111
[ "https://physics.stackexchange.com/questions/311111", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/82822/" ]
According to Wikipedia if the springs connected in series to a block of mass wouldn't be experiencing equal forces then the springs would buckle.What do they mean when it says 'springs would buckle '?Why do they buckle ? How can we understand/accept/feel that springs experience equal forces?
<blockquote> How can we understand/accept/feel that springs experience equal forces? </blockquote> <ul> <li>Place a spring on the table and put a book on top. The spring carries the whole weight: <span class="math-container">$$F_\text{spring}=w_\text{book}$$</span></li> <li>Place a spring on a spring on the table and p...
Steeven's answer is good and accurately gives an example to help clarify. I just want to give an answer that points out the parallels between this spring system and an electric circuit. In series vs. parallel spring configurations, you can compare the force distribution to a current distribution. In series circuits;...
https://physics.stackexchange.com
88,498
[ "https://softwareengineering.stackexchange.com/questions/88498", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/7785/" ]
I am in the process of finally rolling Mercurial as our version control system at work. This is a huge deal for everyone as, shockingly, they have never used a VCS. After months of putting the bug in management's ears, they finally saw the light and now realise how much better it is than working with a network of share...
I use Bitbucket for private repository hosting and one of my clients uses private repository hosting on GitHub. Another company I work with uses private repository hosting of subversion on Jira's servers. Offsite storage of your data, if it's not the only place you have it, can reduce your risk when it comes to disast...
I am not a BitBucket user, but I'd suggest reading their terms and conditions with a fine tooth comb. You need to be really sure about their terms of service, data protection and security/privacy if you're going to be storing your companies private projects on there. I assume you've looked into having a Mecurial 'cen...
https://softwareengineering.stackexchange.com
114,692
[ "https://stats.stackexchange.com/questions/114692", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/1970/" ]
I would like to solve a linear regression (in R) with weights $w$ and a constraint. In other words, I would like to find $x$ that minimizes the sum of squares $$\sum_i w_i(b_i-Ax_i)^2$$ On top of that I have an external vector $d$, which I would like to use in a constraint, such that $d \cdot x \le 5$. Is this somet...
You're looking for the mgcv package. With the toy data we used before, it works just fine. (I'm uncertain why <code>rstan</code> is so confident in its results... I'm still looking into it.) <pre><code>set.seed(1880) N &lt;- 1500 d &lt;- c(1/2, 2/pi, 2/3) x &lt;- c(2, 1, 3) limit &lt;- 5 d%*%x &lt...
Whenever I have a complicated model to fit, I usually just fit it directly in <code>rstan</code> because it's great at fitting highly constrained coefficients, and because it's easy to include penalties and transformations of variables. This is true even when I'm not explicitly fitting a Bayesian model. This is what I...
https://stats.stackexchange.com
152,852
[ "https://cs.stackexchange.com/questions/152852", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/1999/" ]
Suppose that we have a problem in <span class="math-container">$NP \cap coNP$</span>, if we find an algorithm that solves the problem in P, does this mean that <span class="math-container">$NP=P$</span>?
No. <span class="math-container">$P$</span> is a subset op both <span class="math-container">$NP$</span> and <span class="math-container">$coNP$</span> so any problem in <span class="math-container">$P$</span> is in <span class="math-container">$NP\cap coNP$</span>. To show that <span class="math-container">$NP=P$</spa...
Not at all. Take <em>any</em> problem in P. Then the problem is automatically in NP and in co-NP, and therefore in the intersection, so you would conclude that P = NP. Because of one problem in P. That's obviously not correct.
https://cs.stackexchange.com
253,789
[ "https://softwareengineering.stackexchange.com/questions/253789", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/54211/" ]
A couple of weeks ago I delivered some work for a university project. After a code review with some teachers I got some snarky remarks about the fact that I was (still) using Data Access Objects. The teacher in question who said this mentions the use of DAO's in his classes and always says something along the lines of ...
It is more "fashionable" but that doesn't mean it isn't more functional. There are some developers who have only interacted with data storage using an ORM. Determine why you think an ORM is "over-kill" for a simple project. Do a little research and find out why they were created. Does it only make larger/more complex ...
I think it depends on the project. Both have their place. DAOs will give you greater level of control and can do things an ORM cannot do. TVFs in MS SQL Server for example are not available in EF. If you need to work across mulitple databases in one stored procedure, that cannot be done in cleanly in EF. So for low le...
https://softwareengineering.stackexchange.com
450,577
[ "https://electronics.stackexchange.com/questions/450577", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/50310/" ]
My friend and I have an argument and I want to ask the community to say who is right and who is wrong in their beliefs, and explain it with formulas and laws (if possible). We have two different Li-ion cells connected in parallel. Both cells are charged to 4.1V. We put a load of approximately 2A on them and wait for s...
The USB-PD standard allows for multiple output voltages on USB-C devices, but every USB-C power supply must initially output 5V and communicate with the device on the other end. If the other device does not specifically ask the power supply to output more than 5V it will just continue to put out 5V and no more.
A load can always take in less current than than there is available. A source must always provide more current than the load can take. Devices will negotiate over USB-C connection what voltages they should use. So powerbank can be charged with laptop charger. There is missing information how much the laptop can take in...
https://electronics.stackexchange.com
735,981
[ "https://math.stackexchange.com/questions/735981", "https://math.stackexchange.com", "https://math.stackexchange.com/users/134574/" ]
Let $A_1, A_2, \ldots, A_n$ be sets (where $n \ge 2$). Suppose for any two sets $A_i$ and $A_j$ either $A_i \subseteq A_j$ or $A_j \subseteq A_i$. Prove by induction that one of these $n$sets is a subset of all of them. I have no idea where to start, any help would be very useful.
The expression ${12\choose3}{19\choose3}$ would be correct if you were counting the number of ways to form a committe with three <em>leaders</em> who all had to be sophomores. As such, it counts leaderless committees with more than three sophomores multiple times.
It's the sum of all the ways to select an exact number of sophomors, and the remainder in freshmen, when the number is from 3 to 6. $$\sum_{k=3}^6 {12 \choose k}{10-k\choose 6-k}$$ <hr> It has to be done this way to avoid multiple counting of identical sequences. Let us examine a simpler case to demonstrate. Say ...
https://math.stackexchange.com
595,015
[ "https://math.stackexchange.com/questions/595015", "https://math.stackexchange.com", "https://math.stackexchange.com/users/55393/" ]
The goal is to show that $$\int_0^\infty \frac{x^{1/3}\log(x)}{x^2 + 1}dx = \frac{\pi^2}{6}$$ and that $$\int_0^\infty \frac{x^{1/3}}{x^2 + 1}dx = \frac{\pi}{\sqrt{3}}.$$ So, we start with the function $$f(z) = \frac{z^{1/3}\log(z)}{z^2 + 1}.$$ Let $c_r$ be the upper semicircle with radius r such that $r&lt; 1$ and ...
In this case, I would use a keyhole contour about the positive real axis. Consider the contour integral $$\oint_C dz \frac{z^{1/3}}{1+z^2} \log{z}$$ where $C$ is the keyhole contour. As it is clear that the integral about the circular arcs, large and small, vanish as their respective radii go to infinity and zero, ...
$\newcommand{\+}{^{\dagger}}% \newcommand{\angles}[1]{\left\langle #1 \right\rangle}% \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}% \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}% \newcommand{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}% \newcommand{\dd}{{\rm d}}% \newcommand{\ds}[1]{\displaystyle...
https://math.stackexchange.com
173,391
[ "https://electronics.stackexchange.com/questions/173391", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/77794/" ]
I've got a 16 Pixel neopixel ring and a Digispark 2 board. I've also got a 5V 2A USB wall adapter. Ideally what I'd like to do is connect the USB connector of the Digispark to the USB wall charger and use this to power the board, then use the 5V and GND pins of the Digispark to power the neopixel ring. My concern...
When using a wall adapter the most important rating is the one on the adapter. If you are soldering something to another something that had a USB connector it might be a good idea to put a label onto it "Warning, uses more than 500mA" in case in 3 years you think "Hey, plug that in!". That said, any PC/Laptop built 20...
The 5V port on the digispark is connected to the output of an onboard regulator. It has a 500mA max output. They recommend using a heatsink for anything over 200mA. Applying power to the USB connector bypasses the regulator, making it's current limit a non issue. There is a diode between the 5V bus and the USB 5V line...
https://electronics.stackexchange.com
858,576
[ "https://math.stackexchange.com/questions/858576", "https://math.stackexchange.com", "https://math.stackexchange.com/users/160811/" ]
Prove that the union of three subspaces of V is a subspace iff one of the subspaces contains the other two. I can do this problem when I am working in only two subspaces of $V$ but I don't know how to do it with three. What I tried is: If one of the subspaces contains the other two, Then their union is obviously a s...
The statement is false. Consider the following counterexample: Consider the vector space $V=(\mathbb{Z}/2\mathbb{Z})^{2}$ where $F=\mathbb{Z}/2\mathbb{Z}$. Let $V_{1}$ be spanned by $(1,0)$. Let $V_{2}$ be spanned by $(0,1)$. Let $V_{3}$ be spanned by $(1,1)$. Then we have $V=V_{1}\cup V_{2}\cup V_{3}$, but none of t...
Gina's answer is great, but I think we can clean it up a bit. Let <span class="math-container">$U_1,U_2,U_3$</span> be subspaces of <span class="math-container">$V$</span> over a field <span class="math-container">$k\neq \mathbb{F}_2$</span>. <span class="math-container">$(\Leftarrow)$</span> Suppose that one of the su...
https://math.stackexchange.com
43,209
[ "https://mathoverflow.net/questions/43209", "https://mathoverflow.net", "https://mathoverflow.net/users/10264/" ]
Dear all, I have a probably rather simple question: Suppose we have a Matrix $ M\in SL_2(\mathbb{Q}) $. Does the group $ M^{-1} SL_2(\mathbb{Z}) M \cap SL_2(\mathbb{Z})$ then always have finite index in $SL_2(\mathbb{Z})$? Why? Why not? I really was not able to solve this problem! All the best Karl
I, for one, am less than thrilled with snobbish kibitzing in the comments. Just answer the question already instead of dropping hints and passing judgment. The answer is yes for $\text{SL}(n,\mathbb{Z})$. Let $d$ be the product of the denominators in the matrices $M$ and $M^{-1}$. Let $\Gamma_d \subseteq \text{SL}(...
There is a second proof which Tony Scholl hints at in the comments. This is probably secretly equivalent to the argument Greg writes up, but I find it easier to think about. $SL_2(\mathbb{Z})$ is the subgroup of $SL_2(\mathbb{Q})$ preserving the lattice $L_1:=\mathbb{Z}^2$ inside $\mathbb{Q}^2$. Similarly, $M SL_2(\ma...
https://mathoverflow.net
80,302
[ "https://softwareengineering.stackexchange.com/questions/80302", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/26598/" ]
What do you think would be the primary reasons to make APIs with REST or OData instead of just making everything custom (for example only using GET requests, even for setting variables). Reasons for the opposite also welcome. As a bit of background, it's going to be used for a request that is sent once every few minut...
The main reason is because you (attn buzzword bingo) fully leverage HTTP. For example, if you only use GET requests, caches or proxies may get in the way, not (re)sending requests when you want to. Using URLs to identify resources, means you can use all your favorite web-server tools, such as mod_rewrite. Compare t...
<strong>Because REST plays well with others.</strong> When using a rest interface, you may use all the nice things that were invented for http. For example, you get load balancers, command line clients, traffic analysers more or less for free. When implementing a custom protocol on top of TCP/IP, you have to write them...
https://softwareengineering.stackexchange.com
247,240
[ "https://electronics.stackexchange.com/questions/247240", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/117416/" ]
Due to an error in the layouting process a batch of PCBs has to be scrapped. Instead of the standard pin assignments: <ul> <li>1 - Gate</li> <li>2 - Source</li> <li>3 - Drain</li> </ul> we used: <ul> <li>1 - Gate</li> <li>2 - Drain</li> <li>3 - Source</li> </ul> As a last resort before ordering new PCBs I would lik...
Several things:<ol> <li>Unless you were being irresponsible, these are prototypes and you only need a few working units for further testing. No, don't try to get some exotic part that you won't end up using in the production version. Manually fix these few now, continue on with testing, then fix that next rev along ...
Adafruit Feather M4 Express looks like to use such exotic pin swap package SOT 23-R. So most likely the exotic component exists.
https://electronics.stackexchange.com
132,814
[ "https://softwareengineering.stackexchange.com/questions/132814", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/8616/" ]
Following the formal user story style: <blockquote> As <code>&lt;user&gt;</code>, I want <code>&lt;goal&gt;</code> so that <code>&lt;benefit&gt;</code>. </blockquote> How can stories be written when there isn't an obvious user-interaction taking place, as in the case of automated processes like nightly invoicing?
What's wrong with e.g.: <blockquote> As a sales assistant, I want the system to generate my invoices raised during the day, that night without my interaction so that time is saved. </blockquote> Think of who will use the <strong>results</strong> of the process.
Just give the thing a name as "AutomaticInvoicer". See it as a robot that acts as a person. No big difference there. Maybe use "it" instead of "I" to make the distinction clear. <blockquote> <pre><code>As &lt;AutomaticInvoicer&gt;, it wants to search for open invoices so that it can initiate booking. </code></pre> </b...
https://softwareengineering.stackexchange.com
497,418
[ "https://physics.stackexchange.com/questions/497418", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/233481/" ]
We know that, <span class="math-container">$$\begin{align} a&amp;=\frac{\mathrm dv}{\mathrm dt}\\[3pt] &amp;=\frac{\mathrm dv}{\mathrm dx}\cdot\frac{\mathrm dx}{\mathrm dt}\\[3pt] &amp;=v\cdot~\frac{\mathrm dv}{\mathrm dx} \end{align}$$</span> According to this equation, whenever velocity is <span class="math-contain...
It is perhaps worth considering your equation in terms of finite changes rather than infinitesimal changes. If <span class="math-container">$a = \dfrac {\Delta v}{\Delta t}$</span> then for a given interval of time <span class="math-container">$\Delta t$</span> there is a fixed change in the velocity <span class="mat...
Calculus doesn’t work that way. You can’t regroup <span class="math-container">$(dv/dv)(dv/dt)$</span> as you’re trying to. The basic parts of <span class="math-container">$dv/dt$</span> are <span class="math-container">$v$</span>, the velocity, and <span class="math-container">$d/dt$</span>, an operator that forms a...
https://physics.stackexchange.com
230,272
[ "https://security.stackexchange.com/questions/230272", "https://security.stackexchange.com", "https://security.stackexchange.com/users/232855/" ]
My PC running on windows 10 was recently infected with a virus/trojan. I inserted a usb to it at some point , and connected it to my MacBook for clean formatting (I was using my MacBook to wipe it in hopes of getting rid of the virus). I did not transfer any files from the usb to my MacBook, I have transferred a pdf f...
As I understand your question: You used a known thumb drive i.e. not an unknown device that looks like a thumb drive. You <em>may</em> have infected a file on the thumb drive from an infected Windows Machine. You plugged the thumb drive into your Mac and formatted the thumb drive. You wrote a file to the freshly fo...
It would depend on the nature of the malware and the device, and what vulnerability it was targeting. Without knowing any details, I would recommend you not trust the USB Thumb Drive. FWIW, I would not recommend you trust any USB Thumb Drive you did not buy yourself or obtain from a trusted source (you are trusting...
https://security.stackexchange.com
108,026
[ "https://security.stackexchange.com/questions/108026", "https://security.stackexchange.com", "https://security.stackexchange.com/users/55882/" ]
I have a scenario where I have to remember a password / keyphrase, which I will not be able to recover if I forget it, for a long time (probably more than 10 years). The problem is because this password is part of a disaster recovery strategy I will hopefully not need it very often. Are there any techniques or methods...
I use the following system: Hash a string of these three parts <ol> <li>A fixed, long and impossible to guess prefix (I diceware'd a 10-word phrase)</li> <li>The current date to the precision that you can easily recall/depending on the frequency you change it (e.g. use year only if changed once every few years in cas...
Likely the best option in this kind of scenario is to record the password/passphrase in a physically secure location (e.g. bank vault, safe deposit box). Relying on human memory to record this kind of information for 10+ years is an extremely bad idea. For example the person who knows the passphrase leaves the comapn...
https://security.stackexchange.com
14,975
[ "https://softwareengineering.stackexchange.com/questions/14975", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/1554/" ]
I've gotten a bug report from one of my users in a section of the software. The scenario is basically a databinding scenario where the user enters info, and that info is printed to pdf. The problem is, that the functionality: <ul> <li>Is used frequently (about 40 times a week)</li> <li>Hasn't been updated/modified in...
Add some logging to this users code.
depending on your situation you might have success with: <ul> <li>Monitor the user's machine (perfmon, eventlog, etc)</li> <li>Monitor the user (sit with them until they have the issue again)</li> <li>Replace the user's machine temporarily (get them on another desktop to see if it is a hardware/os thing)</li> </ul> k...
https://softwareengineering.stackexchange.com
385,357
[ "https://physics.stackexchange.com/questions/385357", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/57666/" ]
I was recently trying to study, when I became aware that a nearby fluorescent bulb was humming. Because of this, I began thinking about sound from electrical components. In the past I've assembled crystal radios from those "snap together" kits, and I once connected a DC motor in place of the speaker in the name of expe...
The algebraic formulation is more general and takes into account many subtleties that arise in QFT and that are hidden in quantum mechanics. In fact, in quantum mechanics the Stone-von Neumann theorem tells us that the irreducible representation of the algebra of quantum observables (more precisely, of the algebra of ...
The essential mistake in your reasoning is that you contrast the wrong notions of "state" - the algebraic states are not only supposed to be <em>pure</em> vector states, i.e. represented by vectors in the "natural" Hilbert space of the system, but they also include all <em>mixed</em> states, i.e. density matrices. Of c...
https://physics.stackexchange.com
316,432
[ "https://softwareengineering.stackexchange.com/questions/316432", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/219569/" ]
<strong>Background</strong> I am fairly new to unit testing, and have been recently using the Visual Studio Test Manager to create my Unit Tests. The way that I have currently been doing things is as follows: <ol> <li>Create some libraries.</li> <li>Add the libraries to one big solution, along with the application.</...
You should be creating tests for all the code that you write, <em>regardless</em> of whether they're libraries or your application. Why ? <ol> <li>you can assert that the code you write works</li> <li>the tests assert that that code <em>continues</em> to work as you change or add subsequent code.</li> </ol> In short,...
Once you have a rough idea of what a class or function should do, you have enough information to write tests. These tests may fail, due to the thing you're testing being broken, but that is essentially a good thing. If you prefer writing the code before you write the tests for the code (sometimes, having an implementa...
https://softwareengineering.stackexchange.com
2,693,012
[ "https://math.stackexchange.com/questions/2693012", "https://math.stackexchange.com", "https://math.stackexchange.com/users/525586/" ]
<blockquote> Let <span class="math-container">$X$</span> be a vector space, equipped with a norm <span class="math-container">$\Vert\cdot\Vert$</span>. Let <span class="math-container">$V$</span> be a subspace of <span class="math-container">$X$</span>. Suppose that <span class="math-container">$V$</span> contains some...
For the first one, suppose that $B(0,r)\subset V$, for every $x\in X, x\neq 0$, $u={r\over 2}{x\over{\|x\|}}\in V$, this implies that $x={{2\|x\|}\over r}u\in V$. For the second, suppose that $B(x,r)\subset V$, let $u\in B(0,r)$, $x+u\in B(x,r)\subset V$, we deduce that $x+u\in V$, since $V$ is a vector space, $u=(x+u...
Hint: think about lines through the centre of the open ball (in the first case) and through the origin as well (in the second case): this reduces the first part to the 1-dimensional case and the second part to the 2-dimensional case.
https://math.stackexchange.com
559,425
[ "https://physics.stackexchange.com/questions/559425", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/15559/" ]
Doppler effects are calculated based on the velocity of the sound <em>source</em>. Suppose the side of a swerving car (which is moving) grinds a guardrail (which is &quot;not&quot; moving). Will the screech sound higher-pitched to pedestrians ahead of the car than to those behind it?
The answer is yes and no. Part of the grinding noise will probably be local to the guard rail - for example the frequencies generated directly from deformation of the guard rail - these will not be Doppler-shifted. Another part of the grinding noise will probably be local to the car - for example the frequencies genera...
The answer is yes. As a simple picture, imagine that the car hits the barrier at two points, A and B. Now imagine that at each point, the collision creates a single outgoing wavefront. To a person standing in front of the car, the wavefronts will be closer together because the wavefront from point A will have had more ...
https://physics.stackexchange.com
308,158
[ "https://softwareengineering.stackexchange.com/questions/308158", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/181877/" ]
In C++, it is possible to write an overriding for a base class's method even if the visibility declaration of the two don't match. What are the possible design considerations under the decision of not considering the visibility in the overriding rule? Consider this piece of code as an example: <pre><code>class A{ ...
<blockquote> The above compiles in clang, and running it prints B::f, showing that it is possible to call a private function of B from outside the class, thus breaking encapsulation. </blockquote> The encapsulation isn't broken. It's B that's semi-broken. B publicly inherits from A. A's public interface <em>is</...
For what it's worth, this actually has a semi-practical use. In the scenario you have set up, you can only use objects of type <code>A</code> or <code>B</code> via the interface defined by <code>A</code>. The function <code>B::f</code> is only callable via <code>virtual</code> dispatch, not directly. For example: <pr...
https://softwareengineering.stackexchange.com
466,102
[ "https://physics.stackexchange.com/questions/466102", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/225303/" ]
In a head-on collision of 2 objects with the same mass and speed in opposite directions, the vector sum of momenta before and after the collision stays the same and is equal to zero. I've read that if we assume that there's friction, then momentum in the system of two objects will not be conserved, because some momenta...
In the specific case you mention, both the momentum and the change in momentum cancels <span class="math-container">$$p_1(t) = -p_2(t), \qquad d p_1(t)/dt = -d p_2(t)/dt.$$</span> This is because the total external frictional force <span class="math-container">$F$</span> acting on the objects cancels, and <span class="...
Well as per codename47 suggested you it's all correct. See momentum is conserved in the system even if you take the two particles as the system and friction is the external force. See friction has the same effect in opposite directions for the two bodies and when added vectorially the net friction on the system would...
https://physics.stackexchange.com
132,707
[ "https://math.stackexchange.com/questions/132707", "https://math.stackexchange.com", "https://math.stackexchange.com/users/26447/" ]
Suppose $Y_1, Y_2$ are from a random sample of the uniform distribution on $[0, 1]$. How do I compute the variance of the geometric mean of two points in the interval $[0, 1]$? I know the geometric mean is $X=(Y_1 Y_2)^{1/2}$. I can't compute the variance since I'm not sure how to find the expected value of a radical....
<strong>Hint</strong>: This is one of those instances where it helps to understand <strong>linearity of expectation</strong> and the product structure that occurs due to <strong>independence</strong>. Recall that for an arbitrary random variable $X$ with finite second moment, $$\newcommand{\E}{\mathbb E} \mathrm{Var}(...
Let $X = \sqrt{Y_1 \cdot Y_2}$. Then, for $0\leqslant x\leqslant1$, $$ F_X(x) = \mathbb{P}(X \leqslant x) = \mathbb{P}(Y_1 Y_2 \leqslant x^2) = \mathbb{E}_{Y_2}( Y_1 Y_2 \leqslant x^2 | Y_2)) = \mathbb{E}\left( \min\left(1, \frac{x^2}{Y_2} \right) \right) = \int_0^{x^2} 1 \mathrm{d} y + \int_{x^2}^1 \frac{x^2}{y} \m...
https://math.stackexchange.com
258,240
[ "https://physics.stackexchange.com/questions/258240", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/88965/" ]
A line in my textbook says.. ' if we employ any other process that is not adiabatic, say an isochoric process, to take the system from one temperature to another, we shall need a series of reservoirs in the temperature range T1 to T2 to ensure that at each stage the process is quasi static ' What does this line mea...
There are two components in this discussion. When we say two systems are in equilibrium, the two systems have the same temperature. When a process is a reversible process, the system is changing in a sequence of equilibrium states. Intuitively speaking, if we let the system change by 1 degree C from temperature A to t...
<blockquote> ' if we employ any other process that is not adiabatic, say an isochoric process, to take the system from one temperature to another, we shall need a series of reservoirs in the temperature range $T_1$ to $T_2$ to ensure that at each stage the process is quasi static ' </blockquote> This means if we wan...
https://physics.stackexchange.com
21,709
[ "https://mathoverflow.net/questions/21709", "https://mathoverflow.net", "https://mathoverflow.net/users/4692/" ]
For example, I find the first group isomorphism theorem to be vastly more opaque when presented in terms of commutative diagrams and I've had similar experiences with other elementary results being expressed in terms of exact sequences. What are the benefits that I am not seeing?
Holy cow, go <em>beyond</em> the first homomorphism theorem! For example, if you have a long exact sequence of vector spaces and linear maps $$ 0 \rightarrow V_1 \rightarrow V_2 \rightarrow \cdots \rightarrow V_n \rightarrow 0 $$ then exactness implies that the alternating sum of the dimensions is 0. This generalizes...
If you are asking why very elementary results like the first isomorphism theorem are phrased in the language of exact sequences/commutative diagrams (rather than why this language is used at all), then there are (at least) two answers: (1) for those who are used to using this language, they frequently think about even...
https://mathoverflow.net
24,794
[ "https://datascience.stackexchange.com/questions/24794", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/41525/" ]
Say we have a pandas series with the following values <code>[np.nan, np.nan, 1, np.nan, 2, np.nan]</code> What is the most efficient way fill the nan value with 0 in the middle. so we have <code>[np.nan, np.nan, 1, 0, 2, np.nan]</code> In other word, how to we do interpolation with a fixed value, or a <code>.fi...
Current solution, I am using <pre><code>def interpolate_with_fixed(s, value=0): i = s.first_valid_index() j = s.last_valid_index() s.loc[i:j].fillna(value, inplace=True) return s </code></pre>
I think your solution is quite idiomatic. Here is an alternative solution: <pre><code>In [355]: s.loc[s.notnull().idxmax() : s[::-1].notnull().idxmax()].fillna(0, inplace=True) In [356]: s Out[356]: 0 NaN 1 NaN 2 1.0 3 0.0 4 2.0 5 NaN dtype: float64 </code></pre>
https://datascience.stackexchange.com
1,270,524
[ "https://math.stackexchange.com/questions/1270524", "https://math.stackexchange.com", "https://math.stackexchange.com/users/220061/" ]
Evaluate the integral below. $ \int^{+\infty}_{-\infty} \frac{x^2}{{(x^2-8x+20)}^2} \, dx $ I feel that I know how to do this problem, but I'm getting caught up in all the calculations. I've been approaching the problem the way we were taught in class. This is what I've done so far: 1) I rewrote it as $\lim_{\to\i...
If you want to use the residue theorem, then be careful. The two poles (at $z=4\pm i2$) are of second order (since the quadratic term is squared). You can still close the contour in the upper-half plane. Thus, $$\int_{-\infty}^{\infty}\frac{x^2}{(x^2-8x+20)^2}dx=2\pi i \,\text{Res}_{z=4+2i}\left(\frac{z^2}{(z^2-...
You can actually do this one on the real line by ordinary integration. Let $x = u+4$, then you are finding $$ \int_{-\infty}^\infty \frac{u^2}{(u^2+4)^2} du + 8 \int_{-\infty}^\infty \frac{u}{(u^2+4)^2} du +16 \int_{-\infty}^\infty \frac{1}{(u^2+4)^2} du $$ The middle term is zero since each $\int_{-a}^a$ is an inte...
https://math.stackexchange.com
27,069
[ "https://quantumcomputing.stackexchange.com/questions/27069", "https://quantumcomputing.stackexchange.com", "https://quantumcomputing.stackexchange.com/users/15679/" ]
So in the single-qubit case, we can write any unitary operation as an instance of the following parametrized unitary: <span class="math-container">$$U(\theta, \phi, \lambda) = \begin{bmatrix} \cos(\theta) &amp; -e^{i\lambda}\sin(\theta) \\ e^{i\phi}\sin(\theta) &amp; e^{i(\lambda+\phi)}\cos(\theta) \\ \end{bmatrix}$$<...
There <em>is</em> some parametrized matrix form for a 2-qubit unitary, but it would be <em>extremely</em> inconvenient to work with. An <span class="math-container">$n$</span>-qubit gate is an element of the group <span class="math-container">$SU(2^n)$</span>, which has dimension <span class="math-container">$2^{2n} - ...
What I propose here could possibly be simplified further, but that's at least a first direction. First, any unitary can be written as <span class="math-container">$U=e^{-it/\hbar \widetilde{H}}$</span> for some <span class="math-container">$t$</span> and <span class="math-container">$\widetilde{H}$</span> (the Hamilton...
https://quantumcomputing.stackexchange.com
190,589
[ "https://mathoverflow.net/questions/190589", "https://mathoverflow.net", "https://mathoverflow.net/users/52860/" ]
I am looking for reference books and research articles which cover analysis of uniformly convex and locally uniformly convex and strictly convex Banach spaces.
By the Yoneda embedding, any category is a full subcategory of its category of presheaves. For this to be valid, the collection of objects of the category has to be a set. So if you enlarge the universe to make this the case then you can make any category concrete. That being said, I "don't believe in" (the usefulne...
As already noted above, any category can be considered concrete after a base change to a suitably large universe. However, doing so would be completely missing the point of concreteness. The underlying topos of sets should really be considered not as a first-class object, but rather as a background reality within which...
https://mathoverflow.net
36,286
[ "https://mechanics.stackexchange.com/questions/36286", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/22374/" ]
My car will not start. A month ago it wouldn't start. At that time it was still cranking (weakly) but not starting. I bought a new battery and installed it. It still wouldn't start until I jumped it (which doesn't make sense since it's a new battery) and then it started. I took the old battery back and the worker s...
To differentiate between the starter and the alternator you can check the battery voltage – should be about 12.6 with the engine off and 13.5-14.2 with the engine running if the alternator is doing its job. You may have a failing starter. You can get a good take on this by taking a current reading while trying to star...
There's a potential third posibility, which is the positive battery cable to the starter. In order to evaluate this, you should perform what is called a <em>voltage drop</em> test on the cable, using a voltmeter connected between the positive battery post, and the major cable lug on the starter. Observe the voltage...
https://mechanics.stackexchange.com
107,540
[ "https://mathoverflow.net/questions/107540", "https://mathoverflow.net", "https://mathoverflow.net/users/8628/" ]
Let $X$ be a non-empty set. Consider $\mathcal{P}(X)$, the power-set of $X$. We say that $a,b \in \mathcal{P}(X)$ form an edge if and only if their symmetric difference is a singleton, i.e. $\textrm{card}((a\setminus b) \cup (b\setminus a)) = 1$. It is clear that for a finite set $X$ the resulting graph has chromatic...
Yes, for $X$ infinite the resulting graph also has chromatic number 2. To see this, just use the fact that a graph is bipartite if and only if it does not contain an odd cycle (this remains true for infinite graphs). An odd cycle in your graph quickly leads to a contradiction due to parity reasons.
The affirmative answers by Tony Huynh and Gjergji Zaimi are correct, but it may be worth noting that both depend on the axiom of choice. For example, although each of the components (as described in Gjergji's answer) is 2-colorable, it has (exactly) two 2-colorings, and you need to choose one, in each component, in or...
https://mathoverflow.net
68,762
[ "https://physics.stackexchange.com/questions/68762", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/21817/" ]
In Feynman's path integral formulation, in order to calculate the probability amplitude, we sum up all the possible trajectories of the particle between the points $A$ and $B$. Since we know precisely that the particle will be at $A$ and $B$, does it mean that the uncertainty of the momentum is infinite?
Position/momentum Uncertainty, and path integral formulation are exactly the same thing. Suppose you cut the time interval in time $t_0= t_A, t_1,....,t_n=t_B$. At time $t_0$, the particle is at the position $x_0=x_A$. Because we know the position, uncertainty about momentum is infinite, but this simply means, that, ...
If you are using non-relatavistic quantum mechanics then yes the momentum uncertainty is infinite. If you want to include Lorentz invariance you need to use quantum field theory in which case you describe the evolution of a field with the path integral formalism and interpret particles as disturbances in the field.
https://physics.stackexchange.com
2,375,588
[ "https://math.stackexchange.com/questions/2375588", "https://math.stackexchange.com", "https://math.stackexchange.com/users/467909/" ]
I know it is the <em>norm</em> of a vector $a$ which generalizes the length (that is what inner products bring from geometric vectors to the rest of vectors) of a vector $a$ in three-dimensional space. What I do not know is why the formula is like that. Thank you
It comes form the fact that, given two vectors <span class="math-container">$a$</span> and <span class="math-container">$b$</span>, <span class="math-container">$\langle a|b\rangle=\|a\|\cdot\|b\|\cdot\cos\theta$</span>, where <span class="math-container">$\theta$</span> is the angle between them. Therefore, if <span c...
It comes from <em>Pythagoras' theorem</em>: In $\mathbf R^2$ (resp. $\mathbf R^3$), the usual inner product of vector $u=(x,y)$ and $u'(x',y')$ (resp. $(x,y,z)$ and $(x',y',z')$ is given by $$\langle u, u'\rangle=xx'+yy',\qquad\langle u, u'\rangle=xx'+yy'+zz'$$ So we see the length of vector $u$, which is $\sqrt{x^2...
https://math.stackexchange.com
251,136
[ "https://dba.stackexchange.com/questions/251136", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/86987/" ]
In the database, I have a field as <code>status</code> which can have a value of 1, 2, 11, 12, 21, 22 1, 11, 21 Stands for processing 2, 12, 22 Stands for completed. I am doing this query to get all data with sorting.. <pre><code>select se.*, cam.name, cam.exid, u.api_key, u.api_id from snapshot_extractors se ...
You can sort using an expression: <pre><code>order by case when se.status in (2, 12, 22) then 1 when se.status in (1, 11, 21) then 2 else 3 -- just in case end </code></pre> This would sort rows with status "processing" before rows with "completed"
If there are no other statuses than 1, 2, 11, 12, 21, 22, then <pre><code>order by mod(se.status,2) </code></pre> might be a little faster.
https://dba.stackexchange.com
905,873
[ "https://math.stackexchange.com/questions/905873", "https://math.stackexchange.com", "https://math.stackexchange.com/users/136585/" ]
For how many integral value of $x\le{100}$ is $3^x-x^2$ divisible by $5$? I compared $3^x$ and $x^2$ in $\mod {5}$ i found some cycles but didn't get anything
The binomial formular is $(a + b)^2 = a^2 + 2ab + b^2$ If you apply it: $$(5 - 2)^2 = 5^2 + 2\cdot5\cdot(-2) + 2^2 = 25-20 + 4 = 9$$ The second binomial formular is $(a - b)^2 = a^2 - 2ab + b^2$ If you apply it: $$(5 - 2)^2 = 5^2 - 2\cdot5\cdot 2 + 2^2 = 25-20 + 4 = 9$$ Your mistake was, that you used the second...
You have actually done a blunder !! $(5-2)^2=5^2-(2\times5\times2)+(-2)^2=25-20+4=9.$ Note that $(a-b)^2=a^2-2ab+b^2$
https://math.stackexchange.com
59,213
[ "https://dsp.stackexchange.com/questions/59213", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/43472/" ]
What is the definition of point to point ? does the "point" mean single device or single antenna? I mean,can one transmitter with multiple antennas and one receiver with multiple antennas be called point to point ?or we should only call it MIMO? If there are 2 transmitters,t1 &amp; t2,and 2 receivers,r1 &amp; r2,and ...
First of all, it's not correct to say "poles should (always) be inside the unit circle for an LTI system to be stable" ; unless it's implied that system is also causal. Otherwise, if the system is noncausal, then its poles should be outside of unit circle for the system being stable. For IIR systems that are described...
From the difference equation alone you cannot tell if a system is causal or not. For example, the difference equation <span class="math-container">$$y[n]=-a_1y[n-1]-a_2y[n-2]+b_0x[n]\tag{1}$$</span> can be used to describe three different systems. The first one is a causal system, as suggested by the form given in <s...
https://dsp.stackexchange.com
7,071
[ "https://cs.stackexchange.com/questions/7071", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/4422/" ]
<strong>Question 1:</strong> What is the average access time for a 3-level memory system with access time $T_1$, $2T_1$ and $3T_1$? (Hit ratio $h_1$ = $h_2$ = 0.9) The solution given is: $0.9[T_1] + 0.1(0.9[2*T_1] + 0.1[3*T_1]) = 1.11[T_1]$ <strong>(Method 1)</strong> Here, they have considered the page won't be cop...
I think, that the part <code>with some other useless information...</code> in your problem specification must contain some information on solving your problem. As I was trying to calculate the numbers that you got I found some errors, and I thought there must be some more input. Let me first explain: Your formulas are...
It's a design choice for the cache. So if you are designing a cache, do both and examine the consequence in term of performance, complexity of the design and other impacts in order to make your choice. If you are trying predicting for a given cache, look at its spec. And note anyway that cache have often a more comp...
https://cs.stackexchange.com
404,853
[ "https://mathoverflow.net/questions/404853", "https://mathoverflow.net", "https://mathoverflow.net/users/167165/" ]
Let <span class="math-container">$R$</span> be noncommutative unital ring and <span class="math-container">$M$</span> a projective (right) <span class="math-container">$M$</span>-module. Assume that <span class="math-container">$R$</span> embedds into <span class="math-container">$M$</span> as a right -module. A) If <s...
For (A) a ring <span class="math-container">$R$</span> is selfinjective if it is injective as an <span class="math-container">$R$</span>-module (on e should say left or right). By definition of injective this means <span class="math-container">$R$</span> has a complement in any module. Examples include Frobenius and qu...
B) A standard situation is the injective envelope <span class="math-container">$I(R)$</span> of <span class="math-container">$R$</span>. There is always an embedding <span class="math-container">$R \rightarrow I(R)$</span> and rings where <span class="math-container">$I(R)$</span> is additionally projective are called ...
https://mathoverflow.net
56,092
[ "https://mathoverflow.net/questions/56092", "https://mathoverflow.net", "https://mathoverflow.net/users/3898/" ]
Dear forum members, Does anyone have a clear example of an amenable group with exponential growth? Is real that if G is virtually amenable (has an amenable subgroup of finite index) then it is amenable? I am sort of novice in advanced group theory. All your comments are more than welcome. Many thanks
any solvable group which is not virtually nilpotent has exponential growth. For an example, take a semi-direct product of $Z$ and the direct sum $A$ of infinitely many copies of ${\mathbb Z}$ where the cyclic group acts by translations. It is not hard to see that the growth of the balls is exponential. In fact consider...
All solvable groups are amenable, but many have exponential growth. Look at J. Milnor's classic 1968 paper...
https://mathoverflow.net
250,079
[ "https://softwareengineering.stackexchange.com/questions/250079", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/126938/" ]
Good day. I have been told that a good practice for writing methods is to make the method only responsible for doing one thing. It made sense to me now that I look back upon it in retrospect. There are a couple of reasons I like coding in such a way - to me they are: <ol> <li>Code is Manageable</li> <li>Code is more ...
<blockquote> I have been told that a good practice for writing methods is to make the method only responsible for doing one thing. </blockquote> The common problem people have with this is that they take it too literally. If a function can only ever do one thing, how do you ever do more than one thing ever? If you...
It's really a bad idea to overuse delegates. Reasons are mainly about readability. Delegate's name can be changed to any name when it is passed in between classes without affect it's function. For example: <pre><code>FunctionA(){ Action&lt;int&gt; print = (x) =&gt; Console.WriteLine(x); FunctionB(print); } Fu...
https://softwareengineering.stackexchange.com
1,272,841
[ "https://math.stackexchange.com/questions/1272841", "https://math.stackexchange.com", "https://math.stackexchange.com/users/238937/" ]
Currently working my way through a maths problem, and I've hit a brick wall. <blockquote> A circus acrobat is launched from a cannon that is aimed at 75 degrees above the ground. He leaves the barrel at a height of 4 meters, travelling at 6.5 meters per second. If the net must be placed at a height of 5.5 meters ab...
Since your matrix does not have eigenvalues over the field $\mathbb{R}$, the only invariant subspaces would be the trivial ones you listed. Over $\mathbb{C}$ it is diagonalizable and so there are two additional invariant subspaces, namely the spaces spanned by the vectors $(i,1)$ and $(-i,1)$ respectively.
the matrix $$\pmatrix{1&amp;1\\-1&amp;1} = \sqrt 2\pmatrix{\cos (-\pi/4) &amp; -\sin (-\pi/4)\\\sin (-\pi/4)&amp;\cos (-\pi/4)}$$ represents a rotation by $-\pi/4$(quarter revolution clockwise) followed by magnification by a factor of $\sqrt 2.$ that means this transformation cannot have a one dimensional real invaria...
https://math.stackexchange.com
22,662
[ "https://mathoverflow.net/questions/22662", "https://mathoverflow.net", "https://mathoverflow.net/users/1832/" ]
Suppose $V_1$ and $V_2$ are two $(g,K)$ modules of some reductive group $G$ with maximal compact $K$. Let $P$ be the minimal parabolic of $G$, $U$ its unipotent part, and $u$ its Lie algebra. Suppose the quotients $V_1/uV_1$ and $V_2/uV_2$ are isomorphic as modules for the Levi component of $P$, then what else do we ne...
This is a comment, mostly on terminology that I think caused some confusion, not an answer, but I don't have enough "influence" to post this as a comment. For real reductive groups, the Jacquet functor $V\mapsto J(V)$ (Jacquet-Casselman functor, Jacquet module, etc) is defined <em>differently</em> from the nonarchimed...
EDIT: I assumed the OP was asking about reductive groups over non-arch local fields. Emerton raises the possibility that the question is actually about groups over R or C, and he's probably right. So the answer below is probably irrelevant. Do correct me if I'm wrong; I'm not an expert. But I thought that if $V$ was a...
https://mathoverflow.net
2,423,081
[ "https://math.stackexchange.com/questions/2423081", "https://math.stackexchange.com", "https://math.stackexchange.com/users/311110/" ]
The axiom of regularity: $\forall x, x=\emptyset \lor\exists y\in x $ $\forall z\in y$ , $z\notin x $. But what about the set $x = \{\{\emptyset\}\}$? From my understanding of the axiom, it states that there exists an element $y$ in $x$ such that $y$ and $x$ share no elements. In this case, it seems $y$ would have to...
The emptyset is <strong>not</strong> an element of every set - it's a <strong>subset</strong> of every set, but that's not the same thing. In particular, $\emptyset\not\in\{\{\emptyset\}\}$: the only element of $\{\{\emptyset\}\}$ is $\{\emptyset\}$, and that's not the emptyset ($\emptyset$ has no elements but $\{\empt...
<blockquote> the empty set is an element of every set </blockquote> Wrong.
https://math.stackexchange.com
275,023
[ "https://softwareengineering.stackexchange.com/questions/275023", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/71409/" ]
I'm writing a class to interface with a simple hardware device over a COM port. The device can configured to use various modes, so my class has a <code>SetOperatingMode</code> function, that takes in an <code>enum</code> of type <code>UsbDeviceMode</code>. It looks something like this: <pre><code>class UsbDevice { ...
Use a custom exception <em>when you want users to be able to programmatically distinguish between certain error conditions.</em> If that situation does not exist, you can throw a more "general" exception, and avoid creating the custom exception class. In the specific case of your <code>SetOperatingMode()</code> examp...
Creating a class is easy. It's not a time consuming process at all. Debugging code which hides the problems is hard. And time consuming. When deciding to create an exception or not the question you should be asking yourself is "is this behaviour normal, expected behaviour, or is this behaviour exceptional". In t...
https://softwareengineering.stackexchange.com
285,039
[ "https://mathoverflow.net/questions/285039", "https://mathoverflow.net", "https://mathoverflow.net/users/24757/" ]
Let $K$ be a field of characteristic $0$; let $\ell$ be any prime; and let $\mathrm{Mot}(K, \mathbb{Q}_{\ell})$ be a <em>Tannakian</em> category of motives over $K$ with coefficients in $\mathbb{Q}_{\ell}$. So, we may assume some conjectures which imply that our category of motives (defined with respect to any equivale...
The absolute Galois group is a quotient of the motivic Galois group. The $\ell$-adic cohomology defines a section to the quotient map only on $\mathbb{Q}_{\ell}$-points. This section gives the action of the Galois group on the $\ell$-adic cohomology (by definition). Such things are discussed in Saavedra Rivano's book a...
Compatibility with $\pi_0$ (if I understand what you mean by that correctly) follows from general nonsense from a commutative triangle between the functor taking an algebraic variety to its motive, $\pi_0$ taking a motive to a representation, and etale cohomology taking a variety to its Galois representation. Indeed, ...
https://mathoverflow.net
2,703,539
[ "https://math.stackexchange.com/questions/2703539", "https://math.stackexchange.com", "https://math.stackexchange.com/users/318984/" ]
Let $X$ be a normed vector space. Then for $x\in X$ we have that $$\|x\| = 0 \quad \text{if and only if} \quad x = 0.$$ Do we also have that for a sequence $\{x_n\}$ in $X$ $$\lim_{n\to \infty}\|x_n\| = 0 \quad \text{iff} \quad \lim_{n\to \infty} x_n = 0?$$ Can I take this to always be true?
In normed spaces in general, there is no definition of $\lim\limits_{n\to\infty} x_n = x$ except $\lim\limits_{n\to\infty} \|x_n-x\|=0.$
The meaning of the statement $\lim_{n\to\infty} x_n = 0$ is that for any $\varepsilon&gt;0$, we can find an $N \in \mathbb{N}$ such that for all $n&gt;N$, $$\lVert x_n - 0 \rVert &lt; \varepsilon$$ The meaning of the statement $\lim_{n\to\infty} \lVert x_n \rVert = 0$ is that for any $\varepsilon&gt;0$, we can find an...
https://math.stackexchange.com
2,326,738
[ "https://math.stackexchange.com/questions/2326738", "https://math.stackexchange.com", "https://math.stackexchange.com/users/287662/" ]
If topological space X is irreducible, then open sets must be big in the sense that every two open sets overlap. I have proven that open sets are dense in an irreducible space, which is another indication that they are big in some sense. However, I cannot seem to prove the converse. That is, do proper dense sets of an ...
Consider $I\subset \mathbb{C}$ and infinite numerable subset for example $\mathbb{N}$. $\mathbb{C}-I$ is dense in $C$, but it is not open for the Zariski topology since $I$ cannot be the set of zero of a finite number of polynomials.
For a very simple example, let $X$ be any space with more than one point with the indiscrete topology. Then $X$ is irreducible (the only nonempty open set is $X$ itself!). But <em>every</em> nonempty subset of $X$ is dense.
https://math.stackexchange.com
3,356,750
[ "https://math.stackexchange.com/questions/3356750", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
I was watching Professor Gilbert Strang's lecture on Linear Algebra, and in the video, he talks about when we can or cannot say that linear combinations of vectors span the entire region in that dimension. He said that if we had nine vectors, each of dimension 9, and if the vectors were all random, then the answer i...
Think of choosing two random vectors in the plane. The probability that they lie on the same line (so one is a multiple of the other) is <span class="math-container">$0$</span> - lines are very thin - so the probability that they are independent and thus span the plane is <span class="math-container">$1$</span>. In <s...
Well, let's first start in <span class="math-container">$2$</span> dimensions. If we pick the vectors, <span class="math-container">$(1,1)$</span>, and <span class="math-container">$(2,0)$</span>, it is apparent that they point in different directions and are linearly independent. Linear combinations of these two vect...
https://math.stackexchange.com
3,342,810
[ "https://math.stackexchange.com/questions/3342810", "https://math.stackexchange.com", "https://math.stackexchange.com/users/474105/" ]
What would <span class="math-container">$y''$</span> be of <span class="math-container">$\frac{dy}{dx}=3x+2y+xy$</span>? In other words, what is the result (<span class="math-container">$y''$</span>) if I differentiate <span class="math-container">$y'=3x+2y+xy$</span>? Can I do the following: Set <span class="math-c...
Given a map <span class="math-container">$f:D^n \rightarrow {\mathbb R}^m$</span> say, where <span class="math-container">$D$</span> is the domain of <span class="math-container">$f$</span>, the <em>components</em> of the map are the <span class="math-container">$n$</span> elements that make up the domain. For example...
If you have a map with two input variables like this <span class="math-container">$f(x_1,x_2)$</span> then <span class="math-container">$x_1$</span> can be referred to as "the first component". Now suppose <span class="math-container">$x_1$</span> is taken from a vector space <span class="math-container">$V$</span> and...
https://math.stackexchange.com
30,738
[ "https://cstheory.stackexchange.com/questions/30738", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/30568/" ]
I used to view it just as a set of bit strings of length $n$. What does it mean for it to be the Boolean hypercube? Does viewing it from the hypercube perspective give a useful insight in a certain context?
Strictly speaking, the "Boolean hypercube" is not the same as the set $\{0,1\}^n$. The Boolean hypercube is the <em>graph</em> whose vertices are the set $\{0,1\}^n$, and whose edges are defined as follows: two strings are adjacent if and only if they differ on exactly one bit. I guess that usually, people refer to $\...
The name "Boolean hypercube" is mainly just that &mdash; a name. But in one context it is useful to talk about <em>subcubes</em>. Namely, Harper's isoperimetric inequality shows that the set of measure $2^{-k}$ with least edge boundary is a co-dimension $k$ subcube.
https://cstheory.stackexchange.com
631,052
[ "https://physics.stackexchange.com/questions/631052", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/273709/" ]
Why does the internal energy of a ice- water system increase when a ice slab melts at 273K at atmospheric pressure? I don't understand how the internal energy tends to change when there is no change in the temperature at the melting point. Can someone clear my doubt?
The magic word you're probably reaching for is the latent internal energy. The process of melting is a first-order phase transition (form solid state to a liquid state) which needs energy, and this takes place at constant temperature (and also at constant pressure). This amount of energy is called the latent heat (also...
<blockquote> I don't understand how the internal energy tends to change when there is no change in the temperature at the melting point. </blockquote> Internal energy of the ice-water system consists of the sum of both kinetic and potential energy at the molecular level. A change in temperature only reflects a change i...
https://physics.stackexchange.com
174,511
[ "https://physics.stackexchange.com/questions/174511", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/31809/" ]
I am well aware of the maths of how to do all sorts of calculations using continuous charge distributions (like volume, space, and, line charge distributions) but when I think about it I couldn't get it. What is, really, a continuous charge distribution?
Even though a continuous charge distribution does not exist in nature, it is a very useful concept in situations where there are so many very small charge carriers that you don't see them individually. Think of it like water. If you are not using sophisticated tools, you can't see the molecules. It looks continuous. H...
a discrete charge distribution is approximated by a continious charge distribution if the ratio $$ \frac{\bar{d}}{D} &lt;&lt; 1 $$ for $D$ the smallest diameter of the distribution and $\bar{d}$ the mean distance of discrete charges in any subvolume of the distribution (e.g this ratio has to be small in any subvolume o...
https://physics.stackexchange.com
2,681,851
[ "https://math.stackexchange.com/questions/2681851", "https://math.stackexchange.com", "https://math.stackexchange.com/users/301884/" ]
I have seen that $$\frac{\partial \textbf{x}^T\textbf{B}\textbf{x}}{\partial \textbf{x}}=\textbf{x}^T(\textbf{B}+\textbf{B}^T)$$ and also $$\frac{\partial \textbf{x}^T\textbf{B}\textbf{x}}{\partial \textbf{x}}=(\textbf{B}+\textbf{B}^T)\textbf{x}$$ which suggests that $\textbf{x}^T\textbf{C}=\textbf{Cx}$? Is it always t...
These are two different convention. The first equation is the row convention and the second equation is the column convention. We shouldn't use two convention simultaenously. $x^TC$ is a row vector while $Cx$ is a column vector. They can't be equal.
Do not confuse. Different authors have proposed different definitions for derivative of a scalar relative to a vector. indeed you have considered two different definitions equal.If you see H.Khalil book of nonlinear control he has used the first and F.Lewis in optimal control has used the second.Logically you can not t...
https://math.stackexchange.com
556,028
[ "https://physics.stackexchange.com/questions/556028", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/106461/" ]
Particles can be diffracted due to their quantum nature and that is understood by their wave-like behavior. Clearly seen in e.g. plane wave solutions of the Schrodinger equation or a superposition of states which can be seen as a wave packet. Statistical interpretation tells that those wave functions are merely to de...
IMO you would likely be ale to apply the de Broglie wavelength into a Feynman path integral, allowed paths would be "n" (n is integer) times the de Brogle length. Diffraction is a 2 step process 1) the particle interacts with the EM field of the slit edge material 2) the particle must interact with the screen in a qua...
In a section of Heisenberg's <em>The Physical Principles of Quantum Theory</em>; he emphasizes Duane's perspective on corpuscular picture of diffraction/reflection and points out for example for a grating, if it is known that the particle will hit a certain <span class="math-container">$$\Delta x $$</span> of the grati...
https://physics.stackexchange.com
155,802
[ "https://mathoverflow.net/questions/155802", "https://mathoverflow.net", "https://mathoverflow.net/users/38085/" ]
Let $A$ be a C*-algebra and let $\mathcal{P}(A)$ denote the set of projections in $A$. If $p\in\mathcal{P}(A)$ commutes with everything in $\mathcal{P}(A)$ does it necessarily commute with everything in $A$? I feel like I should/did know this but I'm currently drawing a blank, so any help would be much appreciated.
The answer is yes, but I don't know where it is written. If $p$ is not central, then $pAp^\perp\neq\{0\}$ and one can take $x\in pAp^\perp$ such that $0&lt;\|x\|&lt;1/2$. Then, $$q:=\left(\begin{array}{cc} \frac{1+\sqrt{1-4xx^*}}{2} &amp; x\\ x^*&amp; \frac{1-\sqrt{1-4x^*x}}{2}\end{array}\right)\quad{\rm in}\quad \left...
[Below I consider only the unital case. I have to think about the non unital case, but it should be sufficient<br> to consider the associated $C^*$-algebra with unit $A\oplus K1$, with<br> $K$ the complex o real $*$-field] The positive answer, already given by professor Ozawa, is valid in every<br> $*$-symmetric $*$-r...
https://mathoverflow.net
348,881
[ "https://stats.stackexchange.com/questions/348881", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/204692/" ]
I'm reading deep learning by Ian Goodfellow et al. It introduces bias as <span class="math-container">$$Bias(\theta)=E(\hat\theta)-\theta$$</span> where <span class="math-container">$\hat\theta$</span> and <span class="math-container">$\theta$</span> are the estimated parameter and the underlying real parameter, respec...
In that paragraph the authors are giving an extreme example to show how being unbiased doesn't mean that a random variable is converging on anything. The authors are taking a random sample $X_1,\dots, X_n \sim \mathcal N(\mu,\sigma^2)$ and want to estimate $\mu$. Noting that $E(X_1) = \mu$, we could produce an unbiase...
<blockquote> As far as I understand, consistency implies both unbiasedness and low variance and therefore, unbiasedness alone is not sufficient to imply consistency. </blockquote> Right. Or using the slightly more lay terms of "accuracy" for low bias, and "precision" for low variance, consistency requires that we be...
https://stats.stackexchange.com
71,946
[ "https://security.stackexchange.com/questions/71946", "https://security.stackexchange.com", "https://security.stackexchange.com/users/55609/" ]
Let me start off by saying I don't know very much about encryption, hashing, cracking, etc. I'm just a typical computer enthusiasts, programmer and researcher with many questions. So, I've discovered that there's a thing called "Distributed Cracking" which is when many systems cluster together to focus-fire a Brute Fo...
The only defense you can have on a locally encrypted file is the strength of the password used to encrypt it. Also, using a secure encryption algorithm is important (AES is pretty standard right now). You are absolutely correct that brute-force cracking is 100% successful. The problem lies in the amount of time it tak...
If the file is retrieved from the filesystem to the attacker's system, there is no longer any gateway. The brute force can continue without any impediment. More complex keys or passwords do increase the time/cost of brute forcing, but 'eventually' (hopefully before the heat death of the universe), it could be cracked...
https://security.stackexchange.com