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
348,805
[ "https://softwareengineering.stackexchange.com/questions/348805", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/272193/" ]
I'm training the new iOS developer who will replace me. However, the majority of views in the project is created with code (using a library to make Autolayout more concise). There is no storyboard in the project and the process of starting the app is also in code (AppDelegate). This makes the handover more troublesome...
It sounds like you've documented which view goes with which class and which source file. Pictures with a flow is a pretty good way to do that. It would also be important to document why you've done it this way, and if there are commonalities between the views what those are and the thinking behind why they are that way...
It's a good idea to have a comment at the top of each source file explaining what the code in each source file is good for, and what you would have to do as a user of the application to execute this code. You'd think that is common sense, but surprisingly often it isn't there. And then what you did: Have a screen sho...
https://softwareengineering.stackexchange.com
138,385
[ "https://softwareengineering.stackexchange.com/questions/138385", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/46389/" ]
I am quite new to source control and would like to know the differences between committing and patching? Also, how/when a patch is use and can it be used on a web application?
I'm not sure about git/mercurial, but here is what I think based on what I know about CVS, since I've used patches only there, though I'm pretty sure it works/is used the same way. When you "commit", you effectively override the remote version of the file with the one on your local repository. What you commit is in fa...
Patch can be applied anywhere -- to a working copy, or to a repository. It's just a file format that lists the changes necessary to bring code from one state to another. Version control need not be involved. A commit saves a set of code changes (similar to what a patch references) to the source code repository (e.g. ...
https://softwareengineering.stackexchange.com
392,782
[ "https://softwareengineering.stackexchange.com/questions/392782", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/171752/" ]
I am designing a toy project dealing with the bank account management in F# with Event Sourcing. I would like to get a bit of review (not really a code review) about my Commands and Events to see if things make sense to someone else. <pre><code>// Force to use a certain Guid generation function type BankAccountId = ...
We can discuss for ages what would be the best way, but the truth is that anything works as long as you are consistent with it. Your solution has a major drawback: you need one additional structure for each structure you have. It might work well in a small application, but it doesn't scale very well. An option would ...
I'm aware of three ways of signaling error from a C function: <ol> <li>Every function returns an error code. If a function needs to return data (for example, a result of an I/O operation), it writes the data to a pointer, which is provided by a parameter.<br> [This is the de-facto standard, which the O.P. had mention...
https://softwareengineering.stackexchange.com
323,310
[ "https://stats.stackexchange.com/questions/323310", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/162422/" ]
I have a question. I am trying to plot an adjusted Kaplan Meyer curve, that is a survival curve after having performed a regression and a multiple imputation. For that, I need to use the <code>survfit</code> function on a Cox regression obtained with mulitple imputation. Here is an example code <pre><code>library(da...
I found a way that is not correct but do part of the job: <pre><code>dummy_cox_impute &lt;- mice::complete(dummy_impute,"long",include = T) coxfit2 &lt;- coxph(Surv(treatment_duration,stopany) ~ seropositive,data = dummy_cox_impute) testimpute &lt;- survfit(coxfit2, newdata = data.frame(seropositive = 1)) </code></pre...
Basically this can't be done directly because the multiply imputed fit is different from a single fit as presented in a normal Cox model. When multiple imputation is performed, several possible datasets are generated and the model fitting process combines those fits into a single point estimate. If you wish to obtain s...
https://stats.stackexchange.com
61,922
[ "https://security.stackexchange.com/questions/61922", "https://security.stackexchange.com", "https://security.stackexchange.com/users/49340/" ]
Why doesn't software automatically detect password-cracking attacks, and thwart them? <hr> Long version: Suppose that someone tries a brute-force password-cracking attack on some program XYZ that requires password authentication. My understanding is that such an attack would consist of iterating over the set of "al...
Reasonably often, they do. Any reasonable system will lock you out if you make too many online attacks (or legitimate incorrect attempts) to access the account. The problem comes with offline attacks. The server (or whatever you are authenticating too) has to have something to compare the password to. This is typ...
For "online attacks", they do, to various extents and with varying success. Usually, it's merely an annoyance to the legitimate user and not a big deterrent for criminals.<br> For offline attacks it is impossible. If someone has your password database, you can't prevent them from doing something with it (though you can...
https://security.stackexchange.com
3,889,086
[ "https://math.stackexchange.com/questions/3889086", "https://math.stackexchange.com", "https://math.stackexchange.com/users/99503/" ]
I have some numbers <span class="math-container">$(a, b)$</span> which can take any values subject to certain inequalities <span class="math-container">$$a + b \geq s_1$$</span> <span class="math-container">$$a \geq s_2$$</span> <span class="math-container">$$b \geq s_3$$</span> What is the correct way to describe the ...
Take <span class="math-container">$n=p_1^{a_1}p_2^{e_2}\dotsm p_k^{e_k}$</span>. Then it's not difficult to show that <span class="math-container">$\sqrt{\smash[b]{(n)}}=(p_1p_2\dots p_n)$</span>, so the radical is prime if and only if <span class="math-container">$n$</span> is a prime power. Conversely, <span class="m...
We can prove that any power of a prime in <span class="math-container">$\mathbb{Z}$</span> is primary by hand. Let <span class="math-container">$I=(p^n)$</span> for a prime <span class="math-container">$p\in\mathbb{Z}$</span>. Suppose <span class="math-container">$xy\in I$</span>, but <span class="math-container">$x\no...
https://math.stackexchange.com
4,115
[ "https://computergraphics.stackexchange.com/questions/4115", "https://computergraphics.stackexchange.com", "https://computergraphics.stackexchange.com/users/56/" ]
It's common knowledge that branching in a GPU program is costly because it may have to run both the if and else logic for every pixel being evaluated in the same wave, but only applying each result to the appropriate pixels. I was curious if branching was still a performance issue if there is only an if statement and ...
If there is no divergence (i.e. all threads in a wave take the same branch) newer GPU's can skip all the work within the if-branch. If there's divergence, then code in both branches is executed, but thread execution mask basically defines which threads execute code in which branch (code in non-executed branches for thr...
<h1>Old Hardware</h1> Some older cards didn't used to jump instructions in warps, so this was indeed an issue. If you have a conditional with these cards, the inside logic of the conditional would still be evaluated even if the block wasn't entered by any of the pixels, vertices, etc. There's little you can do in this ...
https://computergraphics.stackexchange.com
151,485
[ "https://cs.stackexchange.com/questions/151485", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/150626/" ]
I have an interesting problem I need to solve. I have a list of about 200k two player matches containing about 22k unique players. I need to find the largest set of players that never played against each other. The first approach I did: <ol> <li>pair each player with a set of players he played against</li> <li>sort the...
<span class="math-container">$$2|y| = (|y|-|z|) + (|y|+|z|)\le \alpha |x| + |x| - 1.$$</span> So, <span class="math-container">$|x| \ge \frac2{1+\alpha}|y|$</span>. Since <span class="math-container">$y$</span> is an arbitrary child of <span class="math-container">$x$</span>, if node <span class="math-container">$x$</s...
First, note that if <span class="math-container">$T$</span> is an <span class="math-container">$\alpha$</span>-good tree, then for any node <span class="math-container">$x$</span> with children <span class="math-container">$y$</span> and <span class="math-container">$z$</span>, without loss of generality, <span class="...
https://cs.stackexchange.com
182,098
[ "https://stats.stackexchange.com/questions/182098", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/36049/" ]
I have read in a number of references that the Lasso estimate for the regression parameter vector $B$ is equivalent to the posterior mode of $B$ in which the prior distribution for each $B_i$ is a double exponential distribution (also known as Laplace distribution). I have been trying to prove this, can someone flesh ...
For simplicity let's just consider a single observation of a variable $Y$ such that $$Y|\mu, \sigma^2 \sim N(\mu, \sigma^2),$$ $\mu \sim \mbox{Laplace}(\lambda)$ and the improper prior $f(\sigma) \propto \mathbb{1}_{\sigma&gt;0}$. Then the joint density of $Y, \mu, \sigma^2$ is proportional to $$ f(Y, \mu, \sigma^...
This is obvious by inspection of the quantity the LASSO is optimizing. Take the prior for $\beta_i$ to be independent Laplace with mean zero and some scale $\tau$. So $p(\beta|\tau) \propto e^{-\frac{1}{2\tau} \sum_i|\beta_i|}$. The model for the data is the usual regression assumption $y \stackrel{\text{iid}}{\sim}...
https://stats.stackexchange.com
522,860
[ "https://physics.stackexchange.com/questions/522860", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/236156/" ]
<img src="https://i.stack.imgur.com/DMkhi.png" alt="displacement along x and y axis"> If the displacement is (21m) along x and y axis and the car takes 3 seconds to travel the distance, will the displacement and velocity be positive and negative at the same time since its moving along (-x) and (+y) axis? Edit: if an o...
Essentially, signs only belong to <strong>scalar</strong> values. A vector like <span class="math-container">$$\vec a=\begin{pmatrix}-1\\2\end{pmatrix}$$</span> has no sign in itself, only its coordinate values do. <strong>If you do see</strong> a sign on the vector, such as <span class="math-container">$$-\vec a=\...
When we describe motion in one dimension we associate a sign with velocity, but in 2D, the perpendicular directions are independent of each other, so we need 2 numbers (corresponding with x and y direction). Here, with assumed x and y axes, you'll say velocity is positive in y direction and negative in x direction. It'...
https://physics.stackexchange.com
9,837
[ "https://quantumcomputing.stackexchange.com/questions/9837", "https://quantumcomputing.stackexchange.com", "https://quantumcomputing.stackexchange.com/users/10043/" ]
In order to figure out if a given pure 2-qubit state is entangled or separable, I am trying to compute: the density matrix, then the reduced density matrix by tracing out with respect to one of the qubits, squaring the resulting reduced matrix, and finally taking its trace. Then, if the trace is <span class="math-conta...
In essence the calculations are correct, though those numbers <span class="math-container">$^2_i, ^2_i$</span> must be taken with modulus, because they are in fact <span class="math-container">$a_ia_i^*, b_ib_i^*$</span>. In general <span class="math-container">$^2_0$</span> is a complex number, so you can't write <spa...
I haven’t checked the content of your calculation, but, yes, conceptually that’s all correct. The idea of testing the purity and comparing to 1 is entirely predicated on notion that your initial state is normalised, so you did exactly the right thing.
https://quantumcomputing.stackexchange.com
600,048
[ "https://physics.stackexchange.com/questions/600048", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/122661/" ]
Does there exist a form of radiation which is blocked only by magnetic fields but not by matter. For example, alpha particles are blocked by both magnetic fields (they are deflected by the field) and matter (they are stopped by the matter). Is there a form of radiation where the radiation is blocked by the magnetic fie...
<blockquote> Does there exist a form of radiation which is blocked only by magnetic fields but not by matter. </blockquote> No there is not. All forms of charged radiation are deflected by magnetic fields. They also interact with matter and hence are blocked by matter (depending on the energy of the radiation and chara...
The answer depends to some extent on how strong is the magnetic field and how dense is the matter - but in principle, the answer is no. To have their trajectories altered by a magnetic field, the particles need to be charged. But charged particles interact strongly with matter. Obviously you could design specific situa...
https://physics.stackexchange.com
33,737
[ "https://dsp.stackexchange.com/questions/33737", "https://dsp.stackexchange.com", "https://dsp.stackexchange.com/users/5551/" ]
Currently I am learning dense optical flow by myself. To understand it, I conduct one experiment. I produce one image using Matlab. One box with a given grays value is placed under one uniform background and the box is translated two pixels in x and y directions in another image. The two images are input into the imple...
The relationship between SNR and $E_b/N_0$ is independent of the code rate. Note that $E_b$ is the energy per <em>data</em> bit (not the coded bits), and $R_b$ is the (uncoded) <em>data</em> bit rate. As long as you keep using these values, you can use the formula given in your question. Of course, when going from an u...
The answer to the question depends on the fact if the code rate implies a change in the bit rate f the system. The bit rate would be the rate of bits that come out of the system per second, and the code rate the rate between an uncoded length of data and the coded length of data. If the coding of the data does not imp...
https://dsp.stackexchange.com
173,920
[ "https://security.stackexchange.com/questions/173920", "https://security.stackexchange.com", "https://security.stackexchange.com/users/104285/" ]
Basically, I'm looking for an interface where the input would be the name of a malware, or its signature, and the output would be "malware found in the database" or "malware unknown" The tool must search in my own database (which could be outdated or have miscelaneous problems). This is to test my own, current, specif...
The FDE scheme varies between vendors, but the general idea is that there is a security chip on the device itself that combines data with the PIN/password in order to form the final encryption key. This means that even if you know the PIN or password, but you move the storage medium to a new device, it won't work. The ...
Short answer: It depends. Long answer: It depends mainly on the configuration of the encryption mechanisms and of the chosen encryption mechanism. There are too many options to list them all and compare them. Most common encryption mechanisms (such as Bit Locker, dm-crypt, VeraCrypt) can be configured to ask for a sec...
https://security.stackexchange.com
828
[ "https://cstheory.stackexchange.com/questions/828", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/533/" ]
It is easy to see that for any $n$ there exists a 1-1 mapping $F$ from {0,1}$^n$ to {0,1}$^{n+O(\log n)}$ such that for any $x$ the vector $F(x)$ is "balanced", i.e., it has equal number of 1s and 0s. Is it possible to define such $F$ so that given $x$ we can compute $F(x)$ efficiently ? Thanks.
Let's consider $n$-bit strings $x$. Definitions: <ul> <li>$f(x,i)$ = bit string $x$ with last $i$ bits complemented.</li> <li>$b(x)$ = "imbalance" of $x$: number of 1s in $x$ $-$ number of 0s in $x$.</li> </ul> Now fix a string $x$. Consider the function $g(i) = b(f(x,i))$. Observations: <ul> <li>$g(0) = b(x)$.</li>...
Use the mapping that preserves the lexicographical order. To find the $k$-th length-$n$ balanced vector with $n/2$ 1's, do it recursively: if $k\leq{n-1\choose n/2}$, then set the first bit 0 and then find the $k$-th length-$(n-1)$ vector with $n/2$ 1's to complete the remaining $n-1$ bits. Otherwise set the first bit ...
https://cstheory.stackexchange.com
366,029
[ "https://softwareengineering.stackexchange.com/questions/366029", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/18074/" ]
I'm working on a display library which in most cases works on a 2D plane but it has some components which display 2D projections of a 3D space. This domain has the notion of <code>Position</code>, <code>Size</code>, <code>Position3D</code> and <code>Size3D</code>. <code>Position</code> and <code>Size</code> are strai...
Remember that things can rotate. So there is no definitive way to do this. All you can do is set a convention. A popular one would pair this <img src="https://i.stack.imgur.com/SitTF.png" alt=""> with this: <img src="https://i.stack.imgur.com/I7DNd.gif" alt=""> But you shouldn't assume those words evoke these ima...
It may depend on the exact field that you're working in. Certainly in games and cinema, we refer to the third size element as depth. We even have depth buffers that store the distance from the viewer to an object or set of objects. I would think that CAD applications would do the same.
https://softwareengineering.stackexchange.com
362,475
[ "https://softwareengineering.stackexchange.com/questions/362475", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/289442/" ]
I was trying to create an integration test for my service where 100 clients would connect, login, send request, and log all responses for some configurable amount of time. I was build a class for the client using async sockets and it works fine. I started them all up using Task and Task.Factory, sent the login, and p...
Tasks and Threads exist for different purposes. Tasks are intended to be short running things which need to be run in the background. Threads represent an operating resource for concurrent execution. Internally, the TaskManager uses a Thread pool so that it can reuse threads to process more tasks. Threads are expen...
I don't think there is a problem with your test. I've used similar code for (basic) load testing and seen well over 100 concurrent tasks. I would guess there is a problem with the way you are logging. Are you simply measuring the number of concurrent connections your server can handle? For instance, the below code w...
https://softwareengineering.stackexchange.com
290,410
[ "https://softwareengineering.stackexchange.com/questions/290410", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/109315/" ]
I am drawing sequence diagram for large integration project where one system will initiate the REST call to another system and there is a proxy in middle which will pass through the request like A->b->C where b is a pass through system. I have shown 200 returned from C->b->A. I am wondering how do I depict when C re...
One way is to use <code>Fragments</code> like this: <img src="https://i.stack.imgur.com/JQdHf.png" alt="enter image description here"> But honestly: code is much clearer for such purposes. Avoid using a graphical representation where a few lines of (pseudo) code can clarify what a 1000 pictures obfuscate. Once (in th...
I have seen colleges try to cover every single possible exception and error condition in every use case and sequence diagram. The result has always been late delivery, hours spent in review and in the end very little benefit to the project. One way of thinking about it ala "Black Swan" by N. Taleb is that there are ju...
https://softwareengineering.stackexchange.com
89,617
[ "https://physics.stackexchange.com/questions/89617", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/21487/" ]
The <em>spin-singlet state</em> of a lattice spin-1/2 system is defined as $S_x\Psi=S_y\Psi=S_z\Psi=0$, where $S_\alpha=\sum S_i^\alpha(\alpha=x,y,z)$ are the total spin operators, in other words, a <em>spin-singlet state</em> is a spin state with <em>gobal $SU(2)$ spin-rotation symmetry</em>. On the other hand, a RVB ...
Yes, a spin-singlet state is also an RVB state. The valence bound states (singlet-product states) over-complete the Hilbert space of spin-singlet states.
The short answer is yes. One can convince oneself this is indeed the case by doing the dimensional counting as it was done by Everett You. However, it is by no means a proof. The problem is that the valence bond states are not linearly independent. Even though there are much more valence bond states than the number o...
https://physics.stackexchange.com
1,937,026
[ "https://math.stackexchange.com/questions/1937026", "https://math.stackexchange.com", "https://math.stackexchange.com/users/371315/" ]
The given fraction is: $(\frac{a}{b})^n \cdot (\frac{b}{c})^n \cdot (\frac{c}{a})^{n+1}$ The given solution is: $\frac{c}{a}$ What I have done so far: $(\frac{a}{b})^n \cdot (\frac{b}{c})^n \cdot (\frac{c}{a})^{n+1}$ | multiply $\frac{a}{b}$ and $\frac{b}{c}$ because of same exponent <br><br> $(\frac{ab}{bc})^n * ...
You're almost there: Note that: $$ \left(\frac{c}{a}\right)^{n+1} = \left(\frac{c}{a}\right)^n\left(\frac{c}{a}\right)^1$$ Your expression becomes: $$ \left(\frac{abc}{abc}\right)^n \frac{c}{a}$$ Does that help?
$$(\frac{a}{b})^n \cdot (\frac{b}{c})^n \cdot (\frac{c}{a})^{n+1}=$$ $$\frac{a^n}{b^n} \cdot \frac{b^n}{c^n} \cdot \frac{c^{n+1}}{a^{n+1}}=$$ $$\frac{a^nb^nc^{n+1}}{b^nc^na^{n+1}}=$$ $$\frac{a^nb^nc}{b^na^{n+1}}=$$ $$\frac{b^nc}{b^na}=$$ $$\frac{c}{a}$$
https://math.stackexchange.com
10,436
[ "https://mathoverflow.net/questions/10436", "https://mathoverflow.net", "https://mathoverflow.net/users/2906/" ]
Is there a theory of Newton-Puiseux type expansions which works to parameterize singular surface germs $F(x,y,z) =0$? Ideally, each branch would be the image of map of the form the $x = u^m, y = v^n, z = \Sigma_{i + j &gt; n} a_{i j} u^i v^j$ (after a linear change of the variables $x, y, z$).
I don't believe there is anything as general as that, but when your polynomial is over the complex numbers one can do the following. First shift and rotate coordinates so that you're working on a neighborhood of the origin where $F(0,0,0) = 0$ and $\partial_z^n F(0,0,0) = 0$ for some $n$. Then you can use the Weierstra...
If $k$ is an algebraically closed field of characteristic zero then the algebraic closure of $k((x))$ is $F = \cup k((x^{1/n}))$, the field of Puiseux series. In particular, the algebraic closure of $k(x)$ is contained in $F$. Now you want to look at the algebraic closure of $k(x,y)=k(x)(y)$, which is contained in the ...
https://mathoverflow.net
43,871
[ "https://dba.stackexchange.com/questions/43871", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/3768/" ]
<ul> <li>is possible, is there internal procedure to moving with database files if database runs, is not detached on Sql Server 2012/2008, <code>.... EDIT.... database is online, accesible for users, services running in Native OS</code></li> <li>moving from one disk to another, initialized in Windows OS as HDDs</li> <l...
<ul> <li>Looks like as not possible to move with database files in the case that database is online, all my attempts potentially can creating big trouble, because these files are used/locked by SQL sever and Native OS too</li> <li>stays using the features from VMWare tools, that are faster than plain file copy for one ...
If you have multiple data files for a database and you are trying to move one from one disk to another, I believe you can add new data file on the new drive to your filegroup, and then use ShrinkFile with the EmptyFile option on the file to be moved to migrate data from that file into the other files in the filegroup (...
https://dba.stackexchange.com
2,839,337
[ "https://math.stackexchange.com/questions/2839337", "https://math.stackexchange.com", "https://math.stackexchange.com/users/460809/" ]
I'm currently struggling with combinatorics, specifically with the problem: How many are the triplets of positive integers (x,y,z) such that x<em>y</em>z=84? And others of the same type. Does it have to do with congruences?
Any factor of $84 = 2^2 \cdot 3 \cdot 7$ has the form $2^{\alpha}3^{\beta}7^{\gamma}$. If the three factors are $x = 2^{\alpha_1}3^{\beta_1}7^{\gamma_1}$, $y = 2^{\alpha_2}3^{\beta_2}7^{\gamma_2}$, and $z = 2^{\alpha_3}3^{\beta_3}7^{\gamma_3}$, then \begin{align*} \alpha_1 + \alpha_2 + \alpha_3 &amp; = 2 \tag{1}\\ \b...
How many ways can 84 = 2×2×3×7 be factored into three positive integers?
https://math.stackexchange.com
333,019
[ "https://physics.stackexchange.com/questions/333019", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/155965/" ]
My knowledge in aerodynamics is very limited as I am doing just an introduction to the subject, and so I may not understand very complex explanations. I know that at some point laminar flow becomes turbulent flow, but why is this, and why does this occur in less distance if the surface is rougher? And why does turbu...
The simplest way to solve this - and particularly, the way that minimizes the chances of messing it up - is to switch over to a single coordinate that inside the delta function. In your case it's easy - just choose an appropriate polar representation: set \begin{align} q&amp; = A\, r\cos(\theta)\\ p&amp; = B\, r\sin(\t...
The idea here is to use the following property of the delta function: $$\int_{-\infty}^{\infty}\delta(f(x))g(x)\,\mathrm{d}x=\sum_{r}\frac{g(r)}{|f'(r)|}$$ Where the sum ranges over all values of $r$ such that $f(r)=0$. This is basically just what happens when you change variables to perform the integral. If we let ...
https://physics.stackexchange.com
158,486
[ "https://chemistry.stackexchange.com/questions/158486", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/117614/" ]
Combustion analysis of a hydrocarbon produced 33.01 g CO<sub>2</sub> and 4.84 g H<sub>2</sub>O. I was asked to find the empirical formula of the hydrocarbon. I used these molar mass values for my calculations: C - 12.0107 H - 1.00794 O - 15.9994 Here is my work: <pre><code>Molar mass of CO_2 = 12.0107 + 2*15.9994 = 44....
Let Hydrocarbon be of form <span class="math-container">$\ce{C_xH_y}$</span> Our combustion reaction becomes <span class="math-container">$\ce{C_xH_y}+(2x+\frac{y}{2})\ce{O_2}\implies x\ce{CO_2}+\frac{y}{2}\ce{H_2O}$</span> <span class="math-container">$1$</span> mole of hydrocarbon produce <span class="math-container"...
0.750//0.53732 = 1.396/1;Hydrocarbon, no heteroatoms, needs even number of H so ratio becomes 2.792/2. x4 = 11.18/8 X5= 13.96/10 X6= 16.72/12 best fit is 5times so becomes C14H10. Notice if one rounds off immediately the answer is nice and neat. Don't ever fall into that trap. Next step is MW determination; Rast me...
https://chemistry.stackexchange.com
98,451
[ "https://electronics.stackexchange.com/questions/98451", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/35113/" ]
I am creating a simple pic project that uses a PIC16F877A and I have noticed something that seems odd. Before using any code to change the state of the pins connected to port b, the port b pins are already high. Here is the code I am using in hi tech c with everything else removed to demonstrate the problem. I was won...
On reset, all port pins are configured as inputs. If they float high, and then you configure them as outputs, they will be driving high. So it's best to set all pins to their default state before writing to the TRIS registers to set them as outputs.
PORTB is set to an unknown value on power-up. Hitech C does not do anything to change that at start-up. <img src="https://i.stack.imgur.com/A4jLs.png" alt="enter image description here"> The weak pullups on PORTB are disabled at power-up by default. <img src="https://i.stack.imgur.com/3V0ww.png" alt="enter image de...
https://electronics.stackexchange.com
163,404
[ "https://mathoverflow.net/questions/163404", "https://mathoverflow.net", "https://mathoverflow.net/users/11765/" ]
Let $A=\{z\in\mathbf{C}:1/2&lt;|z|&lt;1\}$ be an open annulus. Let us cover $A$ by 3 open sets: $U_0,U_1$ and $U_2$ which we assume to be all homeomorphic to a 2 dimensional open disc. Moreover, we assume that $U_{ij}:=U_{i}\cap U_j$ are also homeomorphic to two dimensional open discs and that $U_0\cap U_1\cap U_2=\emp...
Functions $(f_0,f_1,f_2)$ as you requested do in fact exist. Your confusion comes from the fact that you are trying to impose the cocycle condition on the intersection $U_0\cap U_1\cap U_2$, which is empty. That is the $f_i$'s are such that $$ f_2(x) = f_1(x)+1\ \forall x\in U_1\cap U_2$$ $$ f_2(x) = f_0(x)+2\ \forall ...
Choosing appropriate branches of $f_j=\frac{1}{2\pi i} \log z$ gives $1$ on the $U_{ij}$ of your choice, and $0$ on the others. Adding multiples of these gives the desired cochain. On a related note, I found the following very perplexing at the time: $\bar{\partial}$ cohomology is trivial on the annulus as it's a Stei...
https://mathoverflow.net
540,217
[ "https://stats.stackexchange.com/questions/540217", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/331799/" ]
I’m looking at how temperature varies across age. Can you help me to choose the most appropriate linear model to this analysis? I’ve got multiple measures from 1 individual per age (13 in total), and in two cases only (11yo and 15yo) I've got 2 pieces of data from 2 individuals. This's an example of how my dataset look...
A mixed model is not indicated here, because you have only 3 individuals, so we would be asking the software to estimate a variance for a normally distributed variable (since random effects are assumed to be normally distributed) from only 3 observations of it. A more appropriate model would be: <pre><code>temperature ...
I would do it in two steps. First a oneway anova to check whether there are any significant differences between the individuals at all: <pre><code>fit &lt;- lm(temperate ~ id) anova(fit) </code></pre> If the anova is not significant then the differences between individuals are no larger than measurement to measurement ...
https://stats.stackexchange.com
24,694
[ "https://datascience.stackexchange.com/questions/24694", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/8432/" ]
As far as I understand it, the Neural Style Transfer uses a content image and a style image, and generate a new image based on the two images. It tries to find a set of pixel values such that the cost function <code>J(C, S)</code> is minimized. It does not have any labels associated in advance, but it has an output (g...
Neural style transfer is not really machine learning, but an interesting side effect/output of machine learning on image tasks. When performing neural style transfer using a pre-trained model, then a significant amount of supervised machine learning has already occurred to enable it. The style transfer algorithm <em>i...
Neural style transfer is part of convolution neural network but not machine learning. The way we define supervised and unsupervised learning is seems to be part of machine learning but it is not, supervised learning is just weather we are focusing on a desired output and whereas in case of unsupervised learning we don...
https://datascience.stackexchange.com
132,886
[ "https://physics.stackexchange.com/questions/132886", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/30329/" ]
Considering $X$ and $Y$ such that $[X,Y]=\lambda$, which is complex, and $\mu$ is another complex number, prove: $$e^{\mu(X+Y)}=e^{\mu X} e^{\mu Y} e^{-\mu^2\lambda/2}$$ My attempt (so far) is: Expand the exponent. $$\mu(X+Y)=\mu X+ \mu Y$$ and then split it. How can I introduce $\lambda$? <hr> Taylor expansion: $$...
This is a basic example of a BCH formula. There are many ways to prove it. For example, write the exponential as $$ \exp(\mu X + \mu Y) = \lim_{N\to \infty} \left(1 + \frac {\mu X+ \mu Y}N\right)^N = \dots $$ Because the deviations from $1$ scale like $1/N$, it is equal to $$ = \lim_{N\to \infty} \left[\left(1 + \fra...
There's a trick to proving this result which you would certainly be forgiven for not spotting! Consider the quantity $\exp(\mu X) \exp(\mu Y)$ which appears on the right hand side. Now differentiate this with respect to $\mu$. Say what!? Yeah, bear with me, just try it: $$\frac{d}{d \mu} \exp(\mu X) \exp(\mu Y) = X\e...
https://physics.stackexchange.com
442,144
[ "https://softwareengineering.stackexchange.com/questions/442144", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/156216/" ]
I keep running into this problem when programming, and I wonder if someone has written about it before, or maybe developed some ideas about it. For an example program, lets say I have a graphics program that stores, in a data file, a <code>Canvas</code>, <code>Layers</code>, and <code>Shapes</code>. Each <code>Canvas</...
That is a perfectly normal thing to happen. A Layer is still a layer, but for different purposes (UI or I/O) it's representation can be very different. Having a single class handle multiple representation would be at least a code smell to me, and bad practice most of the time. So you need (at least) as many classes as ...
Having two classes named “layer” is asking for trouble. Less so if they are in different namespaces but it can still cause confusion. So either make the classes identical so you only need one, or give them names that can be distinguished.
https://softwareengineering.stackexchange.com
40,843
[ "https://mechanics.stackexchange.com/questions/40843", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/2404/" ]
My car has been overheating at idle after a long period of time - perhaps 20-30 minutes in traffic. If I drive, it immediately starts to cool down again. I don't drive often so it hasn't been an issue but I would like to get it working properly. I took it into a mechanic to get checked out because diagnosing the probl...
It would be good to ask the mechanic to explain to you how they are sure that it is the head gasket – head gasket problems often share symptoms with other problems. One way that a head gasket failure could cause overheating would be if the gasket failed between a combustion chamber and the cooling system. Combustion g...
<h2>There are so many things that could explain slow overheating</h2> A compromised head gasket is just one of them. Other (less involved) reasons include: <ul> <li>a radiator fan that doesn't turn on when it should</li> <li>low coolant flow (e.g. failing water pump)</li> <li>debris inside or in front of the radiator...
https://mechanics.stackexchange.com
173,751
[ "https://physics.stackexchange.com/questions/173751", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/2394/" ]
Mine line of thoughts goes like this: <ol> <li>A propeller is effectively pushing itself away from molecules of air. </li> <li>The best any propeller can do is to create total vacuum in the front of itself.</li> <li>The maximum <em>suction pressure</em> of vacuum you can get is equal to the opposite of the atmospheri...
Don't forget that the aeroplane will be moving forward, so it's not relying on a vacuum filling ahead of the propellor to supply the latter with air. Now I daresay there are good engineering reasons why propellors are not efficient and even impracticable for supersonic flight, but I don't think there is a fundamental...
<h2>Not physically, but practically there are (currently) better alternatives.</h2> The limiting issue with propellers is similar to the limiting issue with helicopters: propellers work like wing sections in that they must accelerate flow to work; when you're near the speed of sound, this means you are going to cause s...
https://physics.stackexchange.com
62,591
[ "https://chemistry.stackexchange.com/questions/62591", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/37351/" ]
I've created an electrolysis setup by connecting a $6~\mathrm{V}$ battery to a cup filled with saline water via pencils; I am confused as to why only the negative pencil bubbles though. After running the setup for longer than five minutes, the water turns brown but so far that information has not been useful. Why is th...
Your setup, using table salt ($\ce{NaCl}$ plus additives) will initially electrolyse according to the following two reactions, separated by cathodic reduction and aniodic oxidation: $$\ce{2 H+ + 2 e- -&gt; H2 ^}\tag{CatRed1}$$ $$\ce{2 Cl- -&gt; Cl2 + 2 e-}\tag{AnOx1}$$ These reactions assume no counterions. However,...
Depends a bit on your voltage, but you might just be making chlorine at the anode. It's pretty soluble in water. I've always used sodium sulfate as the electrolyte.
https://chemistry.stackexchange.com
666,007
[ "https://physics.stackexchange.com/questions/666007", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/313881/" ]
I have a question regarding the behavior of an right-angled, air/electrical powered nutrunner. More specifically, the reaction torque that the operator is subject to during operation. When the tightening procedure is near completion, the tool acts on us with a sharp, counter-clockwise torque (assuming that the screw/nu...
You can calculate moments of inertia about any axis you want. But if the system isn't actually rotating around that axis, then you can't use it to (directly) calculate the rotation speed. Instead of all the parts moving with speed proportional to <span class="math-container">$r$</span> as the distance from your axis, ...
The CM of the system (the mass and the stick together) moves in a straight line and every point of the system rotates about the CM. I think the mistake arises from considering the mass m and the stick together as a whole system and writing the conservation of angular momentum about a point (middle of the stick) which i...
https://physics.stackexchange.com
102,586
[ "https://mathoverflow.net/questions/102586", "https://mathoverflow.net", "https://mathoverflow.net/users/20516/" ]
Suppose $(V^{2g}, g, \omega, J)$ is an almost Kahler manifold. ie. $(V,\omega)$ is a symplectic manifold with $\omega$-compatible almost complex structure $J$ ($J$ is a symplectomorphism) and such that $\omega(\cdot, J\cdot)$ coincides with a riemannian metric $g$ on $V$. Suppose further that $L$ is a lagrangian subm...
This is probably closer in spirit to what you're looking for than what you've received in the comments. If $(V^{2m}, J, \omega, g)$ is Calabi-Yau (which for me means that $J$ is integrable, and the first Chern class $c_1(V) = 0$), then one can say much more. In this case there exists a holomorphic nowhere vanishing $(m...
Take an open rectangle in $\mathbb R^2$ with side lengths $a$ and $b$. This is a Riemannian manifold, thus symplectic, and has an almost complex structure. The center line is a Lagrangian submanifold and has volume $a$. Two versions of this whole ensemble are symplectomorphic if $a_1b_1=a_2b_2$. So the volume of the c...
https://mathoverflow.net
70,843
[ "https://electronics.stackexchange.com/questions/70843", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/24428/" ]
I am in a muddle here, so thanks for making the effort to have a read. I understand that electrical power going into motor is given by: \$P_e=I^2R\$ I understand that mechanical power out is given by: \$P_m=\tau\cdot\omega\$ Where \$\tau\$ = Torque at motor output shaft Where \$\omega\$ = Speed at output shaft I ...
Some of your basic premise is correct : torque is proportional to current, and power DISSIPATED IN THE MOTOR ITSELF is a constant I^2*R, where R is the (constant) DC resistance of the motor, as measured across its terminals with the motor stationary. Now let's run the motor at current I. The V required is not IR. (If ...
The input power to a motor (any motor, not just DC) is always the voltage at the lead wires times the current into the motor (not I<sup>2</sup>R). The output power is, as you said, always speed times torque. The difference between the input power and the output power will always be greater than zero and is referred...
https://electronics.stackexchange.com
166,909
[ "https://physics.stackexchange.com/questions/166909", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/22463/" ]
First, I fully admit this is one of the physics problems that we have as a homework. However, I am totally clueless how I am supposed to solve this. I do have an answer that I am supposed to get, but I have no idea HOW I am supposed to get it. Basically, we have following picture: <img src="https://i.stack.imgur.com/...
Moment of inertia (with the x-axis as the axis of rotation): $I_x = \int (y^2+z^2) \rho dv$ Density $\rho$ is constant, volume element is $dv = dydzdx$. The integral over $x$ is simply the thickness $t$ of the triangle. Clearly it holds: $M= \rho t \frac{ab}{2}$. Integration interval: $z \in [0,b - \frac{b}{a}y], y \...
You are supposed to calculate $$ \int_A dA r^2 \sigma = \int_0^a dy \int_0^{b\left(1-y/a\right)} dz \ y^2 \sigma\left(y,z\right) $$ where $r = y$ is the distance of the differential mass $\sigma\left(y,z\right) dy dz$ from the $z$ axis, and $\sigma\left(y,z\right) = 2 M / \left(ab\right)$ is the (constant) mass densit...
https://physics.stackexchange.com
560,406
[ "https://physics.stackexchange.com/questions/560406", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/265836/" ]
I am studying tensor algebra for an introductory course on General Relativity and I have stumbled upon an ambiguity in tensor notation that I truly dislike. But I am not sure if I am understanding the situation properly. Suppose I find myself facing the following tensor: <span class="math-container">$$g_{ij}$$</span> T...
You are correct: a tensor can be viewed as a linear function in many different ways. We define a <span class="math-container">$(p,q)$</span> tensor <span class="math-container">$T$</span> as a function that takes <span class="math-container">$p$</span> covectors and <span class="math-container">$q$</span> vectors and r...
Forget tensors for a moment and just think about our old friend the matrix. Take a square matrix for example. You can multiply it onto a column vector and get back a column vector. Or you can put a row vector to the left and a column vector to the right, multiply them all together, and the outcome is a scalar. This is ...
https://physics.stackexchange.com
2,897,908
[ "https://math.stackexchange.com/questions/2897908", "https://math.stackexchange.com", "https://math.stackexchange.com/users/562471/" ]
<strong>The base case</strong>, $n = 0$: $$23^0+31^0+46=48$$ and $48 \bmod 48 = 0$. <strong>Inductive Hypothesis</strong>: Let's assume it is true for $n = k$. Then $$p(k) = 23^{2k} + 31^{2k}+46$$ $$ \Rightarrow p(k+1) = 23^{2\left(k+1\right)} + 31^{2\left(k+1\right)}+46 = 529\left(23^{2k}\right)+961\left(31^{2k}\righ...
Note that your $p(k)$ is written wrongly. \begin{align} 529(23^{2k}+ 31^{2k})+432(31^{2k})+46 &amp;= 529(23^{2k}+ 31^{2k})+9(48)(31^{2k})+46 \\ &amp;= 529(23^{2k}+ 31^{2k}+46)+9(48)(31^{2k})+46(1-529) \\ &amp;= 529(23^{2k}+ 31^{2k}+46)+9(48)(31^{2k})-46(528) \\ &amp;= 529(23^{2k}+ 31^{2k}+46)+9(48)(31^{2k})-46(48)(11)...
Note that $529 \equiv 961 \equiv 1 \mod 48$. \begin{align} p(k+ 1) &amp;\equiv 23^{2(k+1)} + 31^{2(k+1)} + 46 &amp;\mod 48\\ p(k+ 1) &amp;\equiv 529 \cdot 23^{2k} + 961 \cdot 31^{2k} + 46 &amp;\dots\\ p(k+ 1) &amp;\equiv 23^{2k} +31^{2k} + 46 &amp;\dots\\ p(k+ 1) &amp;\equiv p(k) &amp;\dots \end{align} Now use $p(k+1...
https://math.stackexchange.com
92,865
[ "https://mathoverflow.net/questions/92865", "https://mathoverflow.net", "https://mathoverflow.net/users/5337/" ]
Is the condition that a module is reflexive an open condition? That is, if $X$ is a smooth projective complex variety, $T$ a quasi-projective variety, and $F$ a finitely presented module on $X \times T$ that is $T$-flat, then we can form the locus $T' \subset T$ of points $t$ such that the restriction of $F$ to $X \...
This locus is indeed open. I will explain why using Kollar's "Hulls and Husks" (arXiv:0805.0576). More generally, this article studies in great detail when taking the double dual commutes with base change. First, we may restrict to the open locus of $T$ where $F_t$ is torsion-free (because reflexive sheaves are torsio...
I'll assume you meant to say that $F$ was locally finitely presented or coherent in your second sentence. The locus where $F$ is reflexive is the complement of the union of the supports of the kernel and cokernel of $F\to (F^\vee)^\vee$. This will be open. <strong>Postscript</strong> As Sasha points out the argument i...
https://mathoverflow.net
76,977
[ "https://softwareengineering.stackexchange.com/questions/76977", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/25471/" ]
I was recently approached by a software firm that specializes in Quality Assurance and Testing. Up until this point, the developers at our (small) company have been responsible for their own QA for the most part and we've had mixed results. We're at the point where we are ready to hire a full time QA guy, but I was cu...
I would recommend against this for one main reason that has nothing to do with the competence and capability of the particular outsourcing firm which has approached you (which I can't judge). For QA to work, once you get past the `developers do their own QA' stage, it needs to be a first-class member of your planning ...
Good testing is as important, if not more important than development. Not just anyone can test your stuff. You need to find people with lots of expertise in your problem domain. They should be people with as much, if not more, domain knowledge than your developers. If you're developing a health care app, for example, ...
https://softwareengineering.stackexchange.com
45,643
[ "https://softwareengineering.stackexchange.com/questions/45643", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/13384/" ]
I was recently hired in a big company (thousands of people, to give an idea of the size). They said they hired me because of my rigor and because I was, despite my youngness (i'm 25), experienced as a C/C++ programer. Now that I'm in, I can see that the whole system is old and often uses obsolete technologies. There i...
I was in a similar situation at my previous company, where I was at for 5 years. When I joined in 2004, they were: <ul> <li>still using Microsoft Access for their databases (even business critical ones)</li> <li>using Visual Basic 6 or Access/Excel VBA for development</li> <li>using a lot of third-parties instead of ...
<blockquote> They said they hired me because of my rigor and because I was, despite my youngness (i'm 25), experienced as a C/C++ programer. </blockquote> More likely because you're cheaper. <blockquote> Have you ever been in a similar situation </blockquote> Yes. <blockquote> what advices would you give me <...
https://softwareengineering.stackexchange.com
156,204
[ "https://electronics.stackexchange.com/questions/156204", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/37607/" ]
I have a PCB in front of me with a surface mount 5V voltage regualator. I'm wondering how I got about soldering this with just solder (I don't have paste). I have heat paste, but I'm wondering if pre-tinning the pad and heating it up afterwards from the side with the regulator will be equally effective if this is pos...
No need for solder paste. I use an RMA rosin flux pen (it works like a Sharpie) to coat the pads (especially the big one) with flux and then solder. Liquid flux with a brush works well too. Heat the big pad and tab from the side and introduce enough solder to get it thoroughly attached. If the board is reasonably fr...
Thermal conductive paste is pretty useless for this. In fact, I think it's sole consequence would be trouble. <ol> <li>Place part on pads.</li> <li>Solder pads.</li> <li>Enjoy.</li> </ol>
https://electronics.stackexchange.com
749,375
[ "https://physics.stackexchange.com/questions/749375", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/316052/" ]
Consider this easier formulation of the relativistic Lorentz force equation given by <span class="math-container">\begin{equation}\ \left(\frac{u'}{\sqrt{1-|u'|^2}}\right)'= E(t,u)+u'\times B(t,u). \end{equation}</span> Here, <span class="math-container">$E$</span> and <span class="math-container">$B$</span> denote re...
To start, I can't help but comment that using <span class="math-container">$u$</span> for position and <span class="math-container">$c$</span> for a speed that is not the speed of light is extremely confusing. But anyway, the reason is the same as in the classical equation: the acceleration is orthogonal to the velocit...
Magnetic part of the Lorentz force does zero work on point particle, because it is perpendicular to its velocity. Consequently speed can't change due to magnetic part of the Lorentz force. Electric part is needed to change speed. Geometrically, magnetic force only rotates the velocity vector, it can't change its length...
https://physics.stackexchange.com
201,747
[ "https://security.stackexchange.com/questions/201747", "https://security.stackexchange.com", "https://security.stackexchange.com/users/169954/" ]
Currently I am potentially facing impostor syndrome in regards to the role and skillset of blue team members (defence) and red team members (attack). I personally specialise in defence capabilities, such as secure system design, secure programming, secure website architecture, etc. For example, I have a thorough unde...
The idea that redteamers or pentesters are 'skilled up' from blueteamers is a misconception, plain and simple. In the same way that you can defend against XSS without necessarily knowing how to construct a complex XSS attack (which encompasses more than just the XSS code itself, i.e. the payload), you don't need to kn...
I have met various people who have worked both red and blue at some point, and they will pick one or the other for various reasons. Some enjoy the thrill and satisfaction of solving the puzzle and breaking in, while others may find it more enjoyable to be the one who gets to build an elaborate fortress and outsmart the...
https://security.stackexchange.com
576,928
[ "https://stats.stackexchange.com/questions/576928", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/251148/" ]
I am modelling time to failure of some units. All units are made my the same manufacturer and there are no recorded covariates to distinguish between the units. This means that the central, <span class="math-container">$95\%$</span> say, remaining useful life (RUL) prediction intervals for unit <span class="math-contai...
Let us assume, without loss of generality, that <span class="math-container">$\mu_X = \mu_y = 0$</span>. We then have: <span class="math-container">$$F_X(t) - F_X(-t) \geq F_Y(t) - F_Y(-t)$$</span> We observe that <span class="math-container">$\sigma^2_X = \mathbb{E}x^2$</span> (as we have set the expectation equal ...
For simplicity and without loss of generality we can set <span class="math-container">$\mu_X$</span> and <span class="math-container">$\mu_Y$</span> to zero (the variances of the shifted variables is the same), then we can write <span class="math-container">$$\sigma_X^2 = E[x^2] = \int_{-\infty}^{\infty}x^2f_X(x)dx = \...
https://stats.stackexchange.com
565,776
[ "https://physics.stackexchange.com/questions/565776", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/48841/" ]
Suppose that I am going to host a big party one month from now, and I have various liters of cold beverages that will need to be refrigerated by the time of the party. I have a fridge at home (which is on and being used under a normal everyday home fridge usage pattern); however, there is enough free space in it for th...
There is probably a slight energy advantage to putting the beer in the fridge. As explained by Joe Iddon, it will take a fixed amount of energy to cool your beers, and it always takes a certain amount of power to maintain the temperature of your fridge when it is on and closed. Considering only those two factors, it ma...
To get the beers from room temperature to &quot;cold&quot; temperature will require a fixed amount of energy to be transferred from the beers, given by <span class="math-container">$q=mC\Delta T$</span>. Once you have cooled the beer, and the beer is in an environment (the fridge) that is the same temperature, the beer...
https://physics.stackexchange.com
197,703
[ "https://softwareengineering.stackexchange.com/questions/197703", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/24081/" ]
We build products which often integrate with third party systems. Sometimes these systems error, which in turn causes our system to error. For example, we call a web service when a user updates their data after we've saved to our own database. While testing, the service on the other end is not functioning correctly....
Your question blurs the line between project management and software development. How do you define what is and isn't a "defect"? Are you logging a defect each time the web service fails? For me, I would put this down as a project issue. You still want to document the cause / research etc. you have put into it. I ...
I'd say that for the given example (if it is indeed a real world example) you should definitely be filing that as a defect in your own tracking software. The way I read that, the issue is that your system does not cope well with a third party failing. Even if it's a simple mechanism to record the event and inform someo...
https://softwareengineering.stackexchange.com
56,287
[ "https://dba.stackexchange.com/questions/56287", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/31995/" ]
We have one way transactional replication enabled on SQL Server 2008 databases. Due to some issues we had to run <code>DBCC checkDB</code>, bringing the database to single user mode. When we complete the <code>DBCC</code> activity and enable replication again, replication won't work. We had to initialize snapshot again...
3 important pieces of information are missing to pinpoint exactly what went wrong in your particular scenario: <ol> <li>What where the exact steps you took, from the moment you found a problem until the moment you discovered that replication didn't work?</li> <li>What was broken, what was repaired, what was lost? All ...
Replication makes the assumption that the publisher and subscriber are in sync at initialization and then applies changes from the transaction log to keep them in sync. If you do something that bypasses the transaction log (like I assume the DBCC does), then the two are out of sync and replication is blissfully unaware...
https://dba.stackexchange.com
273,738
[ "https://dba.stackexchange.com/questions/273738", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/214062/" ]
I am trying to work out where I can modify a schedule for a backup job that is running. The SQL Server was setup by a team before it was handed to us. We have a set of maintenance jobs in our SQL Server Agent which I can modify, but looking through the server logs there is another full backup that runs, backing everyth...
You can't pass a procedure as a bind variable. You should be able to dynamically build the entire anonymous PL/SQL block and execute that. Something like this <pre><code>declare l_plsql varchar2(1000); begin l_plsql := 'begin dbms_hs_passthrough.execute_immediate@mylink ... end;'; ...
You don't need to declare the return-code, you can even get it: <pre><code>declare s_sql varchar2(200); retcode nubmer; begin s_sql := 'begin :retcode := dbms_hs_passthrough.execute_immediate@mylink(''exec sp_get_names'') end;'; execute immediate s_sql using out retcode; end; / </code></pre>
https://dba.stackexchange.com
29,470
[ "https://chemistry.stackexchange.com/questions/29470", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/8208/" ]
I was cleaning my blinds today, and wanted to know what the primary components of dust are. I know that it is made of microorganisms and other particles, but I do not want to guess that it will be $\ce{N}$ or $\ce{Si}$. I can guess that other materials outside our house might have more than one component for dust. But...
The dust in the house mostly contains sand, dirt and dead skin cells. First, let's start with the easiest, <strong>sand</strong>. The chemical formulae of sand is $\ce{SiO2}$, so it contains silicon and oxygen. Next, dirt has rock, sand, and clay. Sand is made of silicon and oxygen. Rock is mostly made up of graphite...
Dead skin, like other organic compounds, contains carbon, hydrogen and oxygen, maybe some nitrogen as it may have protein in it. So basically, dust is made up of carbon, hydrogen, oxygen, nitrogen, silicon, phosphorus and some minor minerals (<em>Assan Reza chems. Hons.preparing civil service</em>).
https://chemistry.stackexchange.com
474,110
[ "https://electronics.stackexchange.com/questions/474110", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/238953/" ]
A MAC address of a computer can be spoofed by an FPGA which can be programmed as a network controller. I can set a custom MAC address to it. I turn off the motherboard's network interface controller in BIOS. I use the FPGA that is programmed as a network controller. A software can in no way fingerprint my computer. SSD...
An EDID emulator should work for this purpose. But sometimes the monitor does not even have a serial number in the EDID so you may not need any tricks.
Ok, we'll need to clear up a few things: <blockquote> A MAC address of a computer can be spoofed by an FPGA which can be programmed as a network controller. </blockquote> Um, yes. But any modern (think: the last 20 years "modern") network card also allows you to freely configure the MAC address it uses, so I think...
https://electronics.stackexchange.com
603,395
[ "https://physics.stackexchange.com/questions/603395", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/283859/" ]
I have learned about electric permittivity in two contexts: <ol> <li>How much a medium reduces the strength of the electric field (Like if I have a charged ball inside a vat of oil, the oil will polarize and create its own electric field in the opposite direction that reduces the strength of the net field)</li> <li>How...
More than your math, your assumptions are wrong. First, the Planck length is not “the smallest distance”. The Planck length is simply the scale at which we expect quantum gravitational effects to become large. At that scale it is expected that our current theories will break down, and the physical theory that works at ...
I think you are making a few mistakes in your reasoning, which I will try to straighten out for you. It might help if you imagine you are on a platform and I am on a train which passes you at the speed you mentioned, namely one Planck-length per second less than the speed of light. In my train, I can get out of my seat...
https://physics.stackexchange.com
122,425
[ "https://physics.stackexchange.com/questions/122425", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/43102/" ]
Recently I've seen a few talks and lectures about Quantum Field Theory. They explained what a "particle" means in a field, and that a large enough excitement in a certain field can excite another field (effectively creating a new particle), but they didn't mention <strong>how</strong> that interaction happens. Searchi...
Using the description of field theory, and it's true both in classical field theory and quantum field theory, fields interact because of specific terms in the Lagrangian or the Hamiltonian that depend on several fields. Or, equivalently, they interact because terms depending on one field appear in the equations of moti...
I am not an &quot;expert&quot;, but I would like to give a layman's answer here, if anything, so that it can be picked apart by people who know more, and possibly evolved into a layman's answer that gets closer to the truth. Fields &quot;interact&quot; by virtue of the fact that they occupy the same space. The fields p...
https://physics.stackexchange.com
353,077
[ "https://mathoverflow.net/questions/353077", "https://mathoverflow.net", "https://mathoverflow.net/users/152554/" ]
Brown's representability theorem gives us a very nice set of conditions to check that a (contravariant) functor <span class="math-container">$Hot^{op}\rightarrow Set$</span> is representable. Choose an object <span class="math-container">$X$</span> in <span class="math-container">$Hot$</span>. Then it is seems natural ...
Yes, sliced homotopy categories of pointed connected spaces satisfy Brown representability. (We had better be using <span class="math-container">$Hot$</span> to denote the homotopy category of pointed connected spaces, as Brown representability is false for the homotopy category of unbased or non-connected spaces.) T...
Edgar Brown wrote two papers on this topic: one in the Annals in 1962 that focused on the category of topological spaces, and a second one "Abstract homotopy theory" Trans. Amer. Math. Soc. 119 (1965). His second paper is very axiomatic, and I believe your situation is easily checked to satisfy his properties. (Chec...
https://mathoverflow.net
4,133,880
[ "https://math.stackexchange.com/questions/4133880", "https://math.stackexchange.com", "https://math.stackexchange.com/users/925445/" ]
<blockquote> Let <span class="math-container">$A = B^3((1,0,0),1) \cup B^3((-1,0,0),1)$</span> and <span class="math-container">$E = \overline{B^2}((1,0,0),1) \cup \overline{B^2}((-1,0,0),1)$</span>. Show that <span class="math-container">$A$</span> is disconnected and that <span class="math-container">$E$</span> is co...
If ZF is consistent, replacement does not hold here. In ZFC all the axioms hold in <span class="math-container">$V_{\omega_1}$</span>.
After Kirmayer's answer, I've figured out the answer to my revised question (which copies the original intention behind this posting). We seek to prove well ordered replacement, that is for any well ordered set <span class="math-container">$x$</span> and a definable function <span class="math-container">$f$</span> ther...
https://math.stackexchange.com
221,936
[ "https://security.stackexchange.com/questions/221936", "https://security.stackexchange.com", "https://security.stackexchange.com/users/222436/" ]
My MAC address has been spoofed by a neighbor to access my WiFi, positively. I know it's futile changing the WPA key or not broadcasting the SSID. What are my options at this point ?
In general, it's impossible to know for sure - even a seemlingly-perfectly-safe program could have vulnerabilities that mean it can be used for arbitrary actions - but here are some things to check for: <h3>Does the program do any of the following?</h3> <ul> <li>Reveal the contents of arbitrary files or devices.</li>...
It essentially boils down to the halting problem, you can audit the code or reverse engineer the binary, however even if there are no "features" that let you execute arbitrary commands there could still be vulnerabilities in the binary or sudo itself that could lead to arbitrary command execution as root for the enable...
https://security.stackexchange.com
1,626,310
[ "https://math.stackexchange.com/questions/1626310", "https://math.stackexchange.com", "https://math.stackexchange.com/users/307839/" ]
For each integer from 0 to 999, Max wrote the sum of its digits down.What is the average of the numbers that Max wrote down? I started to work this out by taking in mind that for the two-digit numbers there are two sums the same for all numbers but ten,but how do I proceed?
The average of the sum of the three digits is three times the average of the third (or second, or first) digit. The average third digit is the average of $0,1,2,3,4,5,6,7,8,9.$ Pairing these off from both ends of the sequence we see that there are 5 pairs having average $4.5$ each. Thus the average third digit is 4.5,...
For clarity let us say that all 1000 numbers have been written with 3 digits, padding with zeroes on the left if necessary. Computing the average is no more difficult that computing the sum of the numbers that Max wrote down. This you can do by computing the sum of the first digits of all 1000 numbers, then the sum o...
https://math.stackexchange.com
362,461
[ "https://stats.stackexchange.com/questions/362461", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/32212/" ]
ReLu is probably the most popular activation function in machine learning today. Yet, ReLu function outputs 0 when input data values are negative. ReLu totally disregards negative data. This may result in information loss. Is it better to avoid ReLu as activation function if input data has plenty of negative values?
No, because the activation function of choice isn't applied directly on the input data. The earliest it is applied is after the first layer: <span class="math-container">$a(Wx+b)$</span>, which is when the weights are properly initialized, leads to both positive and negative inputs into the activation. Edit: I specifi...
No, the data that feed into the activation function is already transformed, e.g., you are feeding X*W but not X.
https://stats.stackexchange.com
3,585,684
[ "https://math.stackexchange.com/questions/3585684", "https://math.stackexchange.com", "https://math.stackexchange.com/users/686050/" ]
<blockquote> Evaluate <span class="math-container">$$\lim\limits_{n\to \infty}\frac{[x]+[3^2x]+\dots+[(2n-1)^2x]}{n^3}$$</span> where <span class="math-container">$[x]$</span>, <span class="math-container">$[3^2x]$</span>, <span class="math-container">$[(2n-1)^2x]$</span> are the floor functions (the greatest integ...
This is known as an <em>extraneous solution</em>. Here's how it works: <span class="math-container">$$ \begin{align*} 1 &amp;= -1\quad &amp;(\text{clearly false})\\ 1^2 &amp;= (-1)^2\quad &amp;(\text{square both sides})\\ 1 &amp;= 1\quad &amp;(\text{clearly true (!!)})\\ \end{align*} $$</span> So you cannot assume that...
Squaring cannot be reversed, so all you have calculated is a necessary condition, namely <span class="math-container">$x=-2$</span>. This dosésn't mean it is sufficient, too. It is not, as back substitution showed. By squaring the equation, you created <span class="math-container">$(-1)^2=1^2$</span>, which is correct...
https://math.stackexchange.com
397,758
[ "https://stats.stackexchange.com/questions/397758", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/241297/" ]
What I can't grasp for a long time is <strong>how</strong> is the assumption about the probability distribution type made? Why do we assume that the human height is distributed exactly normally? Why not any other function that is numerically/shape-wise close to Gaussian? What is the reasoning behind it? I did not manag...
To choose a distribution, we must carefully consider the nature of the data being sampled. Some important criteria include (but are not limited to): <ol> <li>Discrete vs. continuous</li> <li>Non-negativity</li> <li>Symmetry</li> <li>Censoring and truncation.</li> </ol> Based on this, we can narrow down our choice fo...
In some cases, the Gaussian assumption can be justified by the central limit theorem. For instance, if the data consist of averages of heights of students in each school, we can treat each average follows a Gaussian distribution. In general, the Gaussian assumption can be too restrictive so people tend to use the sub...
https://stats.stackexchange.com
215,497
[ "https://math.stackexchange.com/questions/215497", "https://math.stackexchange.com", "https://math.stackexchange.com/users/43376/" ]
I'm trying to answer the question above.. But I'm not certain in either way. I tried to prove it by giving counter examples.. But it always failed.. Then i also tried to draw contradictions But that's not successful as well. Please give me some suggestion or ideas! p.s I forgot the condition that $f$ is in $L^1(\Bbb...
Using the property $\widehat{f\star g}=\widehat f\widehat g$ for $f$ and $g$ integrable, we get $(\widehat f)²=\widehat f$, hence for all $x$, $\widehat f\in\{0,1\}$. By the dominated convergence theorem, $\widehat f$ is continuous, so either $\widehat f=1$ or $\widehat f=0$. By Riemann-Lebesgue lemma, $\widehat f(x)\t...
Blaber here. Since $f \star f = f$ both $f$ and $f \star f$ are in $L^1$, therefore we can take their Fourier transform getting $$ \hat{f}^2 = \hat{f} $$ The function $\hat{f}(x)$ is continuous, and by the above relation $\hat{f}(x)$ can be only either $1$ or $0$ for all $x$. By the Riemann-Lebesgue lemma we know that ...
https://math.stackexchange.com
8,767
[ "https://chemistry.stackexchange.com/questions/8767", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/4661/" ]
<blockquote> How many moles of the substance are in 2.50 g of lead? </blockquote> <strong>What I did:</strong> Atomic mass of Pb: 207.2 amu (or g?) Applying unitary method, 1 mol of Pb -> 207.2 g; so, x -> 2.5 g $x = \frac{2.5}{207.2}= \pu{0.0121 mol}~\text{of}~\ce{Pb}$ Shouldn't it be like this?: 1 mol of Pb ...
Do not mix amu with mass of mol of substance! In your last formula you've forgot about Avagadro number. One Pb atom weighs $\pu{207.2amu}$ or $\pu{207.2amu} \cdot \pu{1.66\times10^{-24}g}$. But one $\text{mol}$ of Pb weighs $=\pu{207.2amu}\cdot \pu{1.66\times10^{-24}g}\cdot6.02\cdot10^{23}=\pu{207.2g}$
A gram-mole is the numeric value of atomic weight of the formula unit times grams. Given an amount of said stuff in grams, divide by the numeric value of atomic weight of the formula unit to output the number of gram-moles of stuff. One gram-mole contains Avogadro's number of formula units. Embroidering the answer a...
https://chemistry.stackexchange.com
341,321
[ "https://softwareengineering.stackexchange.com/questions/341321", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/6605/" ]
I have a bunch of classes which deal with validation of values. For instance, a <code>RangeValidator</code> class checks whether a value is within the specified range. Every validator class contains two methods: <code>is_valid(value)</code>, which returns <code>True</code> or <code>False</code> depending on the value,...
Most test frameworks have an explicit assertion for "Doesn't throw", e.g. Jasmine has <code>expect(() =&gt; {}).not.toThrow();</code> and nUnit and friends also have one.
This strongly depends on the language and framework used. Speaking in terms of <code>NUnit</code>, there are <code>Assert.Throws(...)</code> methods. You can pass them a lambda method: <pre><code>Assert.Throws(() =&gt; rangeValidator.EnsureValid(-5)) </code></pre> which is executed within the <code>Assert.Throws</cod...
https://softwareengineering.stackexchange.com
279,531
[ "https://electronics.stackexchange.com/questions/279531", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/117998/" ]
I have separate interrupting devices in an MCC bucket. One is a magnetic trip-overload 250A breaker, where the lowest trip setting is 1100A. The other is an electronic device that has 3 CT's and gives me options of trip class, ground fault, phase imbalance, etc... A 90kW, 3 phase 480V uncoupled motor is tripping the...
The USA National Electrical Code Table 430.52 and Section 430.54 say that the the maximum setting for an instantaneous-trip breaker shall be no higher than 800% of FLA for motors other than NEMA design B high efficiency motors and no higher than 1100% for NEMA design B high efficiency motors. If that is not high enough...
15x FLA is not at all unusual with modern energy efficient motors. This is not STARTING current, this is MAGNETIC INRUSH current that flows only for the first cycle (at most) as the magnetic flux is created in the motor windings and core. For that first cycle, there is no mutual induction yet, which is what accounts fo...
https://electronics.stackexchange.com
39,798
[ "https://mathoverflow.net/questions/39798", "https://mathoverflow.net", "https://mathoverflow.net/users/9068/" ]
We have some group word $w$ in $k$ letters. We say a $k$-tuple of group elements $\vec{g} = (g_1, g_2, \ldots , g_k) \in G^k$ satisfies the word $w$ if $w$ gives the identity at $\vec{g}$. More precisely: The word $w$ is an element of $F_k$, the free group on $k$ letters. The $k$-tuple $\vec{g}$ specifies some homom...
John, you know this already, and this is far from an answer, but I thought I'd say it here for the benefit of others who may want to think about the problem. Call a word $w(x_1,x_2,\dots,x_k)$ "groupy" in the variable $x_i$ if, for fixed values of the other variables, the set of values of $x_i$ such that $w$ is the id...
<strong>Edit</strong>: As John points out below, this doesn't work. Let's look at the example where $w=x_{1}^{2}$. I'm pretty sure that $p_{w}(G\rtimes \mathbb{Z}/2\mathbb{Z}) \geq 1/2$ for any group $G$ (where we take the non-abelian choice for the semi direct product,) since if $g\in G$ and $z$ is the generator of ...
https://mathoverflow.net
86,894
[ "https://mathoverflow.net/questions/86894", "https://mathoverflow.net", "https://mathoverflow.net/users/14547/" ]
Let $\Sigma$ be a compact connected oriented surface and $p:\tilde{\Sigma}\to\Sigma$ a finite regular cover. Consider the set $\Gamma$ of simple closed curves on $\tilde{\Sigma}$ obtained as a connected component of $p^{-1}(\gamma)$ where $\gamma$ is a simple curve in $\Sigma$. My question is: is it true that $\Gam...
As far as I know, this is open. In fact, I think the following weaker question is open. Let $\Theta$ be the set of loops $\gamma$ in $\widetilde \Sigma$ such that the image of $\gamma$ in $\Sigma$ is not a filling curve. If $\Sigma$ is not a pair of pants, is $H_1(\widetilde \Sigma ; \mathbb{Z})$ generated by $\Th...
If $\Sigma$ is a sphere, disk, annulus or torus, then this is true. If $\Sigma$ is a thrice-punctured sphere, then this is false. The only simple closed curves on a thrice-punctured sphere are parallel to the three boundary curves. In the preimage of a finite-sheeted cover, one obtains only boundary parallel curves, ...
https://mathoverflow.net
275,997
[ "https://dba.stackexchange.com/questions/275997", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/216169/" ]
I have a database that is about 400 gigs. The majority of the space is consumed by images of utility bills stored in string form as <code>varchar(max)</code> in a single table. It's a poor database design that I inherited. I have already exported the utility bills as pdfs to a network folder. Now I am trying to replace...
Microsoft Support has confirmed this is a bug in Sql Azure (not sure if it impacts Sql Server). My understanding is that if one drops some columns from the table then the next time that we rebuild the index, sql server will attempt reclaim the deleted column space (I'm vague on purpose here because I'm not entirely sur...
<code>MASKED WITH</code> is a quite new feature, and so is <code>RESUMABLE = ON</code>, and <code>ONLINE = ON</code> for that matter. So I think you have run into a small bug, that will take a few months to get fixed.
https://dba.stackexchange.com
141,530
[ "https://mathoverflow.net/questions/141530", "https://mathoverflow.net", "https://mathoverflow.net/users/36759/" ]
Let $k$ be an arbitrary field, and let $\varphi:A\to B$ be a morphism of abelian varieties over $k$. If $k$ has characteristic zero, then $\varphi(A)$ has the structure of an abelian subvariety of $B$ which is defined over $k$. Question: For an arbitrary field $k$, has $\varphi(A)$ the structure of an abelian subvari...
In general, if $f:G \rightarrow H$ is any homomorphism between smooth group schemes of finite type over a field $k$, the image $f(G)$ is always a smooth closed $k$-subgroup of $H$. (This is a special case of general results in SGA3, but it seems more instructive to give the direct argument in this case rather than wad...
Yes. A relevant reference is [SGA3, VI_A, 6.7 (i)] (in case the numbering is different, I am referring to the new edition); using the notation of loc. cit., in your situation $G/N$ will inherit connectedness, smoothness, and properness from $G$, and hence will be an abelian variety over $k$.
https://mathoverflow.net
384,525
[ "https://mathoverflow.net/questions/384525", "https://mathoverflow.net", "https://mathoverflow.net/users/70190/" ]
Are there any good approximations (especially upper bounds) for the quantity <span class="math-container">$E(\|X_1-X_2\|$</span>), where each <span class="math-container">$X_i$</span> is uniformly distributed in a rectangle <span class="math-container">$[a_i,b_i]\times[c_i,d_i]$</span>? It does not appear that I can d...
I tried to implement my proposal in a C-code. That is a mixture of analytic and numeric integration. It does <span class="math-container">$10^6$</span> rectangles with half-percent relative precision in about 16 seconds, which is a bit better than the corresponding Iosif's 30 minutes. You can play with parameters to tr...
Let <span class="math-container">$r=\frac12\sqrt{(a_1-a_2+b_1-b_2)^2 + (c_1-c_2+d_1-d_2)^2}$</span>, which is the distance between the centers of the rectangles. Then the distance between <span class="math-container">$(x_1,y_1)$</span> and <span class="math-container">$(x_2,y_2)$</span> is <span class="math-container">...
https://mathoverflow.net
436,033
[ "https://stats.stackexchange.com/questions/436033", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/204209/" ]
I have to solve the following question: <blockquote> Let <span class="math-container">$X$</span> follow the distribution with moment generating function <span class="math-container">$M_X(t)$</span> and Let <span class="math-container">$Y = aX + b$</span> follow the distribution with moment generating function ...
You don't need to use the density to show that <span class="math-container">$M_Y(t) = e^{tb} M_X(at)$</span> (if it is your question).<br> By definition, the moment generating function of a random variable <span class="math-container">$X$</span> is: <span class="math-container">$$ M_X(t) = \mathbb{E}[ e^{tX} ] $$</span...
Here is my suggestion: <span class="math-container">$M_Y(t)=\mathbb{E}[e^{tY}] = \mathbb{E}[e^{t(aX+b)}]=\mathbb{E}[e^{atX}e^b]=e^{tb}\mathbb{E}[e^{atX}]=e^{tb}M_X(at)$</span> If you wish, you can rewrite the mathematical expectations in terms of integrals over the pdf.
https://stats.stackexchange.com
307,228
[ "https://softwareengineering.stackexchange.com/questions/307228", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/68834/" ]
Say I have an array of strings, like this: <pre class="lang-cs prettyprint-override"><code>var folders = new[] { "Foo", "Bar", "Foo\Bar" "Foo\Bar\Baz" }; </code></pre> And that I have an object that represents a folder - something like this: <pre class="lang-cs prettyprint-override"><code>class Folde...
The following algorithm should do almost what you've asked for. <pre> paths : List&lt;String&gt; <i>;; your list of paths</i> tree : Folder = <b>NEW</b> Folder("") <b>FOREACH</b> path <b>IN</b> paths <b>DO</b> node : Folder = tree <b>FOREACH</b> component <b>IN</b> split(path, "/") <b>DO</b> next : ...
Let's assume you have an additional method <code>GetOrCreate(name)</code> that returns a folder for a given name, or creates it if no such folder exist, and that you have a <code>root</code> folder that contains your whole hierarchy. Then given a list of strings <code>path</code>, we can easily implement an iterative s...
https://softwareengineering.stackexchange.com
283,520
[ "https://softwareengineering.stackexchange.com/questions/283520", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/175635/" ]
Recently I was working with <strong>Behavior Driven Development</strong> approach in Rails using <code>RSpec</code> and <code>Capybara</code>. Everything looks okay and it even can speed up whole planning-development bridge in my work (by defining closely behavior of app than usual specification documentation). Anyway,...
Generally speaking, a software project is a collection of code, data and tests. Typically these should all live in the same repository. Using BDD or TDD means simply to check in (or at least develop) your tests before developing your code. It doesn't have to be any more complicated than that. So, the reason why no spe...
Honestly, this doesn't sound like something your VCS should care about. Your VCS should only care about the storage of, revisions to and merging of changes to your source code. The idea of a wishlist of features doesn't fit with any of those things. A wishlist of features is the domain of a product backlog (or somethi...
https://softwareengineering.stackexchange.com
170,440
[ "https://softwareengineering.stackexchange.com/questions/170440", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/69239/" ]
My coworkers and I have been bending our minds to figuring out why anyone would go out of their way to program numbers in a base other than base 10. I suggested that perhaps you could optimize longer equations by putting the variables in the correct base you are working with (for instance, if you have only sets of 5 o...
The usual reason for writing numbers, in code, in other than base 10, is because you're bit-twiddling. To pick an example in C (because if C is good for anything, it's good for bit-twiddling), say some low-level format encodes a 2-bit and a 6-bit number in a byte: <code>xx yyyyyy</code>: <pre><code>main() { unsig...
The main reason I use different bases is when I care about bits. It's much easier to read <pre><code>int mask=0xFF; byte bottom_byte = value &amp; mask; </code></pre> than <pre><code>int mask=255; byte bottom_byte = value &amp; mask; </code></pre> Or image something more complex <pre><code>int mask=0xFF00FF00; ...
https://softwareengineering.stackexchange.com
113,493
[ "https://physics.stackexchange.com/questions/113493", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/27898/" ]
There have been a few presentations now in which a live stage performance was simulated by what was described as a hologram. The most recent example of this was the Michael Jackson "appearance". How are these done? The classic hologram I am familiar with uses only one wavelength of laser light and constructs an interf...
A system at absolute zero will still have nonzero uncertainty in position and momentum. As an example, consider the simplest vibrating system, the one dimensional harmonic oscillator with (angular) frequency $\omega$ and mass $m$. In it's ground state (i.e. the lowest possible energy for the system) the position proba...
There will still be vibrations due to zero-point energy. So it's still impossible to know both its position and momentum.
https://physics.stackexchange.com
4,584
[ "https://quantumcomputing.stackexchange.com/questions/4584", "https://quantumcomputing.stackexchange.com", "https://quantumcomputing.stackexchange.com/users/4974/" ]
I am relatively new and interested in quantum computing. Specifically, I am interested in transforming an equation that I found on Wikipedia. But I did not quite understand the transformation. <span class="math-container">$ \frac{1}{\sqrt{2}}(\left|0\right&gt;_x\left|0\right&gt;_y-\left|1\right&gt;_x\left|1\right&gt;_...
You are not proving the equality in a correct way. By multiplying by the Hadamard matrix, you are changing the state you are trying to calculate, not demonstrating the equality you want to prove.<span class="math-container">$\def\ket#1{\lvert#1\rangle}$</span> In order to prove what you state at the beginning of the q...
You've started wanting to talk about <span class="math-container">$$ (|00\rangle-|11\rangle)/\sqrt{2}, $$</span> but you've then gone ahead and calculated <span class="math-container">$$ (H\otimes H)\cdot(|00\rangle-|11\rangle)/\sqrt{2}. $$</span> You should not expect these to be equal. On the other hand, the calcula...
https://quantumcomputing.stackexchange.com
9,624
[ "https://ai.stackexchange.com/questions/9624", "https://ai.stackexchange.com", "https://ai.stackexchange.com/users/20842/" ]
Problem: Fraud detection Task : classifying transactions as either fraud/ Non-fraud using GAN
Generative networks was the first popular class of topologies that had compound feedback, corrective signaling at more than one layer. In popular network designs such as MLPs (multilayer perceptrons), CNNs (convolutional neural networks), and LSTM (long short term memory) networks, the backpropagation is a single laye...
Yes, although the traditional technique is to use Anomaly Detection for this sort of problem. The reason for that is that the space of possible frauds is very much larger than the space of legitimate transactions and so it is difficult to model the former. The usual idea is to thoroughly explore the smaller space of le...
https://ai.stackexchange.com
49,189
[ "https://stats.stackexchange.com/questions/49189", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/20423/" ]
I am analyzing a survey data set. One of the items in the survey is: <pre><code>"I plan to work hard in my statistics course" 1=Strongly Disagree 2=Disagree 3=Neither Disagree or Agree 4=Agree 5=Strongly Agree </code></pre> No one selected option 1 of Strongly Disagree. This is to be expected but the functio...
You've actually hit on something of an open question in the literature. As you say, there are a variety of kernels (e.g., linear, radial basis function, sigmoid, polynomial), and will perform your classification task in a space defined by their respective equations. To my knowledge, no one has definitively shown that o...
Try the Gaussian kernel. The Gaussian kernel is often tried first and turns out to be the best kernel in many applications (with your bag-of-words features, too). You should try the linear kernel, too. Don't expect it to give good results, text-classification problems tend to be non-linear. But it gives you a feeling ...
https://stats.stackexchange.com
679,904
[ "https://physics.stackexchange.com/questions/679904", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/266148/" ]
In basic textbooks, the equation of continuity for non-viscous fluids through a pipe is usually written as <span class="math-container">$$ \rho_{2} A_{2} v_{2}=\rho_{1} A_{1} v_{1} \tag{1} $$</span> with <span class="math-container">$\rho$</span> and <span class="math-container">$v$</span> being the density and velocit...
If we assume that the density of the fluid in a given point of space is constant (e.g. the <strong>flow is steady</strong>, density does not change with time) then <span class="math-container">$\frac{\partial \rho}{\partial t} = 0$</span>. Then we get <span class="math-container">$$ \nabla \cdot(\rho \mathbf{v})=0 $$</...
It's worth beginning with making sense of the two equations. (1) says that the flow through cross section <span class="math-container">$A_1$</span> is equal to the flow through cross section <span class="math-container">$A_2$</span>. (2) makes sense when integrated over a volume. It says that the change of total mass o...
https://physics.stackexchange.com
5,154
[ "https://electronics.stackexchange.com/questions/5154", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/1575/" ]
I have multiple stationary baby items for my son Oliver that require a serious supply of batteries each month. I would like to hook a few of these stationary items up to wall warts to conserve the constant expense of alkaline purchase/recharging of batteries. I currently have two spare wall warts laying around the hous...
I'm surprised the rocker doesn't have a DC inlet already. You could connect the 9 V supply to a linear 1.5 V regulator, and it would be easy, but you'd be wasting a lot of energy. It would be better to just go to a thrift store and try to find wall warts that are close (more appropriate transformer turns ratio) to th...
The easy solution is to get a couple of rechargeable batteries and a charger, that will solve your problem... but it is a boring answer. The second is to use a switched regulator, but I don't know any good one that can be soldered by hand so...
https://electronics.stackexchange.com
590,252
[ "https://physics.stackexchange.com/questions/590252", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/121760/" ]
The potential energy of a dipole moment <span class="math-container">$\vec{p}$</span> in a uniform electric field <span class="math-container">$\vec{E}$</span> can be expressed as the negative dot product of the two vectors, with <span class="math-container">$U = 0$</span> defined at <span class="math-container">$90$</...
The deriative of a dot product with respect to the angle between the vectors is <span class="math-container">$$\frac{d}{d\theta} \mathbf A \cdot \mathbf B = \frac{d}{d\theta}AB\cos(\theta) = -AB\sin(\theta) = -|\mathbf A \times \mathbf B|$$</span> This is a mathematical identity, so it is always true regardless of what...
Your observation applies to any two vectors, physical or otherwise (except vectors that are aligned, in which case the meanings of <span class="math-container">$d/d\theta$</span> and <span class="math-container">$\hat r$</span> are not clear). It is easy to show this by realizing that your definition of <span class="ma...
https://physics.stackexchange.com
267,170
[ "https://softwareengineering.stackexchange.com/questions/267170", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/161073/" ]
Recently I was assigned a task of creating a calculator with functions addition, subtraction, multiplication, division and power using <strong>Object Oriented Programming</strong>. I successfully completed this task. However afterwards I reprogrammed the whole program without using Object Oriented <em>technique/method<...
C++ is not "just" an OO language, it is a multi-paradigm language. So it allows you to decide for or against OO programming, or to mix them both. Using OO techniques adds more structure to your program - from which you will benefit when your program reaches a certain size or complexity. This additional structure, howev...
<blockquote> How do professional programmers make judgement call on whether to go for OOP or not? It would be really helpful for me. </blockquote> For me, there are two decision points. First, sometimes it will be obvious at the beginning. There will be lots of similar types that all share common methods that diff...
https://softwareengineering.stackexchange.com
316,354
[ "https://softwareengineering.stackexchange.com/questions/316354", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/75181/" ]
I am always a huge fan of standards and think I finally decided on one of the many C++ naming standards. However, it almost seems moot because working with a couple of libraries where the standard use is to inherit the classes, the naming is now off when overriding. Now, I am not forced to actually inherit these clas...
That's the challenge with languages where the language community hasn't established a naming convention. One work around if (like you say in your case) there are only a few offending inherited functions, you could make your subclass a facade <pre><code>class YourClass: private LibraryClass { public: int you...
<blockquote> When having to inherit a third-party's class, how are naming conventions handled? </blockquote> <strong>TL;DR:</strong> It is almost always better to prefer composition over inheritance. <strong>Do not</strong> inherit from third party software, and that includes classes defined in the <code>std</code>...
https://softwareengineering.stackexchange.com
47,104
[ "https://chemistry.stackexchange.com/questions/47104", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/27302/" ]
<ul> <li>Why is $\ce{Ba(OH)2}$ Barium hydroxide not Barium dihydroxide? </li> <li>Why is Lithium carbonate $\ce{Li2CO3}$ instead of $\ce{LiCO3}$?</li> </ul> Is there a formula or is just the case for these two?
There is no other Ba(OH)<sub>x</sub> so there is no need to note a difference between several forms. This happens with any metal ion that only attains precisely one positive charge, whether it is +1 or +10. Lithium ions have +1 charge. Carbonate ions have -2 charge. Therefore to balance the charge in the formula we n...
This is the general process to write the formula for an ionic name. <ol> <li>Name: Metal [Charge] (Ani)de</li> </ol> Ex. Barium [Charge not needed] Hydroxide Manganese (IV) Oxide Lithium [Charge not needed] Carbonate <ol start="2"> <li>Charges: <ul> <li>if charge is given in parentheses, that is the charge for ...
https://chemistry.stackexchange.com
181,207
[ "https://mathoverflow.net/questions/181207", "https://mathoverflow.net", "https://mathoverflow.net/users/58327/" ]
We know that for a graph $G=(V,E)$, minimum edge coloring is a coloring of $E$, i.e., a partition of $E$ into disjoint sets $E_1, E_2, \dots, E_k$ such that, for $1 \leq i \leq k$, no two edges in $E_i$ share a common endpoint in $G$. Now how can we write an Integer linear program (ILP) to solve the minimum edge colo...
If $c$ is an upper bound for the number of colours (in case of doubt use $|E|$), then you could use binary assigment variables $x_{ie}$ for assigning colour $i$ to edge $e$. Then, for every two edges $e,f$ which share a node one can introduce a constraint $x_{ie} + x_{if} \leq 1$. Furthermore one introduces binary vari...
There is a well known integer program for coloring vertices, and so you can use the same idea for coloring edges. In particular, you have a variable $x_M$ for every (maximal) matching $M$, and you require that $$\sum_{M \ni e} x_M \ge 1$$ for every edge $e$ in your graph. You then minimize the sum of the $x_M$. The e...
https://mathoverflow.net
614,690
[ "https://physics.stackexchange.com/questions/614690", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/164488/" ]
The Ehrenfest theorem in quantum mechanics for a particle moving in one-dimension in an arbitrary nonuniform potential <span class="math-container">$V(x)$</span> is <span class="math-container">$$\frac{d}{dt}\langle p\rangle=-\left\langle\frac{\partial V(x)}{\partial x}\right\rangle,$$</span> and in three-dimension, it...
Your equation for time dilation is correct. Here is a derivation &quot;from scratch&quot;. We start with the Schwarzschild metric <span class="math-container">$$ d\tau^2=f(r)dt^2-\frac{1}{f(r)}dr^2-r^2d\theta^2,\tag{1} $$</span> where <span class="math-container">$f(r)=1-\frac{r_s}{r}$</span>, where <span class="math-c...
There are two time dilations to take into account <ol> <li>due to the speed of the person in orbit, <span class="math-container">$v$</span>, at radius <span class="math-container">$r$</span> </li> <li>due to the gravitational time dilation caused by mass <span class="math-container">$M$</span> at radius <span class="ma...
https://physics.stackexchange.com
219,469
[ "https://softwareengineering.stackexchange.com/questions/219469", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/109739/" ]
I have to write unit tests for some classes my group is developing. The classes are fairly simple, and I'm not sure how to best test them. <pre><code>public class MyObjectRegistry { private myDataSetMapper = new MyDataSetMapper(); public boolean StoreObjects(list&lt;MyObject&gt; myObjectList) { ...
So unit tests are there to test logic, not plumbing. You don't have any logic in your (albeit small) example so it dosent need testing. Generally speaking it should be obvious what needs testing in a method since it does one thing and its name tells you what it does. If that isnt the case you should probably look into...
The problem you are facing is the result of "bad" class design. Specifically MyObjectRegistry was not designed to facilitate unit testing. Luckily, reflection allows you to set private values of classes. Here is what I would do in your situation: <ol> <li>Create a mock version of MyObjectRegistry; probably using a ...
https://softwareengineering.stackexchange.com
155,473
[ "https://physics.stackexchange.com/questions/155473", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/68593/" ]
According to Ampere's law, is it possible to have both a conduction current and a displacement current at the same time? In the classical derivation of the displacement current using a parallel plate capacitor, the conduction current equals the displacement current. But only one of the latter are present at a given po...
Writing Ampere's law as $$\nabla \times \vec{H} = \vec{J} + \epsilon \frac{\partial \vec{E}}{\partial t},$$ the first term on the RHS is the conduction current density and the second term is the displacement current density. In a conductor, the induced current density $\vec{J} = \sigma \vec{E}$. So now if we induce a ...
Certainly it is possible to have both a conduction current and a displacement current at the same time. When your parallel plate capacitor is charging up, a different wire that runs through the volume between the plates can carry any current you wish, and then you have both sources for a magnetic field. It is also pos...
https://physics.stackexchange.com
9,699
[ "https://cs.stackexchange.com/questions/9699", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/6836/" ]
The Halting Problem is defined as: $H_{TM} = \{ \langle M, w \rangle \mid \text{\(M\) halts on input \(w\)}\}$ I'm not sure what it means. Is $H_{TM}$ a collection of Turing Machines such that all of them accept/reject the word $w$? Is that a specific word? Or does that mean any word in their alphabet? Thanks
The set (or language if you will) $H_{TM}$ is a set of <em>pairs</em> $(M,w)$ where $w$ is any string of your alphabet and $M$ is a Turing machine, and $M$ halts with $w$ as input. This means that a pair $P = (M,w)$ is in the set $H_{TM}$ if and only if $M(w) \downarrow$. <em>Deciding</em> this set is however not pos...
We first choose an alphabet of symbols that our Turing machines can read and write on the tapes. Typically we have three symbols: $0$, $1$, and "empty". A <em>word</em> is a finite sequence of symbols. If $u$ and $v$ are words we can form a new word $\langle u, v \rangle$ which represents the two words put together (t...
https://cs.stackexchange.com
159,151
[ "https://dba.stackexchange.com/questions/159151", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/74187/" ]
For example, does root always have all privileges on all databases? If I create a new database, will this user automatically have all privileges on the new database without having to run a GRANT command?
By default only root has full access to everything on the database. However, it is very easy to set it so that every user has access to the data in the database. The following is for a new user specifically: This is usually the more accepted way of granting privileges.<br> 1. On the root account I create a new databa...
Mysql by default creates a single or multiple <code>root</code> user accounts (this depends on the mysql version) that are indeed superusers and have full access to all databases that you create on that mysql server. However, these accounts are initialised as superusers and you can remove their access rights based on y...
https://dba.stackexchange.com
48,245
[ "https://chemistry.stackexchange.com/questions/48245", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/3898/" ]
I've heard from a few sources that over-voltage in a electrolysis cell for water will cause a greater heat buildup with no yield. Is this true, and if it is, why is it true? From my electronics background, voltage can be though of as electric potential, or thinking of it as water in a pipe for an analogy it is the stre...
To first order, the power dissipated in an electrochemical cell is equal to that of an electrical circuit: $P=IV$. Thus, as the overpotential necessary to achieve a given current throughput increases, the power consumption increases also. In the fluid flow analogy, think of an elevated overpotential as a throttling or...
You regard water in pipe as electrons in conductor, it's well. No yield means water pressure is not enough to wash the barrier away, increasing the water pressure is needed, the increment of water pressure is overvoltage. The barrier usually comes from polarization of electrode reaction (electrolysis of water).
https://chemistry.stackexchange.com
32,718
[ "https://mechanics.stackexchange.com/questions/32718", "https://mechanics.stackexchange.com", "https://mechanics.stackexchange.com/users/19703/" ]
My trolling motor for my boat has a black and a red connection. The red goes to the positive on the 12 volt battery. The black goes to the negative on the 12 volt battery. Could I connect the black to the giant metal boat I am driving, and then connect the negative on the battery to a different part of the metal boa...
You could do this, but you would not want to. By running current through the surface of the boat, you will induce a voltage potential across it. This voltage potential will cause current to flow from one part of the boat, through the water, to another part of the boat. This will cause electrolytic corrosion, which you ...
You could do what you are suggesting, but to what end? It seems to me you'd have a much greater chance for something to go wrong. Here are a few things to think about: If you are running your trolling motor off of both, there is the distinct possibility you'll drain both batteries and then you'd be stranded. Keeping t...
https://mechanics.stackexchange.com
320,900
[ "https://mathoverflow.net/questions/320900", "https://mathoverflow.net", "https://mathoverflow.net/users/44685/" ]
Is there any research on getting upper bound of the maximal possible number of consecutive positive integers which are less than <span class="math-container">$n!$</span> and NOT coprime with <span class="math-container">$n!$</span>? Easy to see that lower bound <span class="math-container">$\ge n$</span>, (example th...
More generally, for an integer <span class="math-container">$n \gt 1$</span>, let <span class="math-container">$L(n)$</span> be the largest number <span class="math-container">$k$</span> so that there is an integer <span class="math-container">$m$</span> where each of the <span class="math-container">$k$</span> consecu...
If I am not wrong, the question is totally trivial. I am finally writing "an answer" because I am finally tired of the comments which get ignored. ANSWER: Let <span class="math-container">$\ n\ge 3.\ $</span> The largest two consecutive integers which are NOT relatively prime to <span class="math-container">$\ n!\ $</...
https://mathoverflow.net
73,947
[ "https://quant.stackexchange.com/questions/73947", "https://quant.stackexchange.com", "https://quant.stackexchange.com/users/65516/" ]
How is call theta mathematically derived from Black Scholes Model (without approximation) ? Please help me understand each step mathematically.
A ‘wedge’ as understood by interest rate options traders is a structure of the form : long a cap/floor straddle struck ATM for a period of 1 yr starting in N years / short a N year into 1 year swaption straddle also struck ATM. Usually the cap/floor underlying is 3mo Libor but nowadays it can be daily SOFR. This transa...
I have never seen the <em>wedge</em> term in the literature, where do you get it from? Caps and floors are indeed insensitive to correlation, since they are <strong>baskets of options</strong> (caplets/floorlets), but <strong>this is not the case of swaptions</strong>. Indeed, their single payoff at <span class="math-c...
https://quant.stackexchange.com
21,347
[ "https://mathoverflow.net/questions/21347", "https://mathoverflow.net", "https://mathoverflow.net/users/5363/" ]
Say I have a black box generating data samples, and I want to estimate the parameters of the black box from the samples. The black box works like this: it has a parameter <strong>m</strong> (a real number), and to generate a value <strong>v</strong>, it first generates v0 according to a normal distribution (with mean ...
OK, let me fully address the question since there is no easy way out. The normal approach is to maximize the "likelihood" of the data under the parameter. The key question here is how to define likelihood for a mixed distribution. Let's use the standard approach as our guide. Parameter estimation is usually based on t...
<strong>Edit:</strong> This is an answer to a different question (see Emile's comment). I don't think the question you asked gets at the issue you want to talk about, because, as Mike McCoy said, the zero samples are irrelevant to the parameter estimation. You can just ignore the zeroes and estimate $m$ from the nonze...
https://mathoverflow.net
66,944
[ "https://electronics.stackexchange.com/questions/66944", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/23071/" ]
I want to understand the Math behind the Solar Power Panel Wattage requirement in order to charge 10 mobile phones (use 0.8A each) at the same time. No battery is required. Solar panel output is 12V DC.
Okay, you have 10 chargers that output 5.7V at 0.8A. Ideally we need to know the <em>input</em> specs, as the conversion from 100V-240VAC to the 5.7VDC will not be 100% efficent (usually on the plate there should also be the input ratings also) Anyway let's run some <em>rough estimate</em> numbers. Let's assume the...
I'm not sure what you're question exactly is, but I think \$P=V \cdot I\$ is what you're looking for. \$P\$ is power in Watts, \$V\$ is voltage in Volts, and \$I\$ is current in Amperes. You want \$10\cdot0.8=8A\$ with \$12V\$, so that gives you \$P=8\cdot12=96W\$.
https://electronics.stackexchange.com
2,963,939
[ "https://math.stackexchange.com/questions/2963939", "https://math.stackexchange.com", "https://math.stackexchange.com/users/602415/" ]
Six standard 6-sided dice are rolled, and the resulting numbers are multiplied together. What is the probability that the product is divisible by 125? I know that at least 3 of the dice have to be 5's and the rest can be anything. I had gotten 4320 possibilities.
Your observation that for the product to be divisible by <span class="math-container">$125$</span> requires that at least three of the dice to be rolled as a five is correct and needs no correction. Counting the number of favorable cases however has a mistake. Your attempt probably looked something like this: <ul> <...
Because <span class="math-container">$5$</span> is the only multiple of <span class="math-container">$5$</span> on a <span class="math-container">$6$</span>-sided die, the product is divisible by <span class="math-container">$125 = 5^3$</span> if and only if at least three of the dice show a <span class="math-container...
https://math.stackexchange.com
68,001
[ "https://cs.stackexchange.com/questions/68001", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/62509/" ]
Are there features in programming languages that allow you to directly access the $k^{th}$ bit of a number. Treating it like an integer. I'm not talking of using bit shifting to retrieve a number. But directly access the bit at index $i$ of a number as if it were an array. I'm looking at this feature to replace shift...
The answer depends on the programming language and, to some extent, on the CPU. For any practical purpose, though, extracting the $k$th bit is an $O(1)$ operation even on a "big integer" stored on several machine words, since in order to extract the $k$th bit, you can use the following algorithm: <ol> <li>Determine wh...
Felix has a <em>very</em> much more general capability. <pre> var x : 3 * 2 * 5 = (case 2 of 3, case 1 of 2, case 4 of 5); println$ x; var y = x :&gt;&gt; int; println$ y; var z : 2 ^ 5 = true, true, true, false, false; println$ z, z.1; var a = z :&gt;&gt; int; println$ a; </pre> Basically there is a concept called ...
https://cs.stackexchange.com
141,899
[ "https://softwareengineering.stackexchange.com/questions/141899", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/50687/" ]
Which elements must a requirement contain that it can be considered complete? Or if this works better - which questions should I ask about a requirement to find out if it is complete. I am not talking about the implementation of the requirement but the requirement itself. I am asking this from the perspective of an an...
To be considered complete, each requirement must be (at minimum): <ul> <li><strong>Unambiguous</strong> - each requirement can only mean one thing and can only be interpreted one way.</li> <li><strong>Atomic</strong> - each requirement cannot be broken down into multiple requirements.</li> <li><strong>Testable</strong...
When it's launched to production and verified by the PM. I know that's not what you're looking for because you want to ensure the requirements are correct before design, but that's not the way it works in the real world. Requirements are missed, misunderstood by the engineers, mis-stated by product, vaguely stated by p...
https://softwareengineering.stackexchange.com