Loading a class within a class
Including a relative path to a class file
C# LINQ find duplicates in List When to use self references or composition? Outlier Detection on skewed Distributions Under a classical definition of an outlier as a data point outide the 1.5* IQR from the upper or lower quartile, there is an assumption of a non-skewed distribution. For skewed distributions (Exponential, Poisson, Geometric, etc) is the best way to detect an outlier by analyzing a transform of the original function?  For example, distributions loosely governed by an exponential distribution, could be transformed with a log function - at which point is it acceptable to look for outliers based on the same IQR definition? Is it considered rude if you only ask Questions but almost never answer one yourself I have used the websites of SO a lot the past few months because I am busy with a large scale web project. I feel I get better answers here on SO than when I just do a Google search, maybe because I can be more specific here with my problem, and the responses are really fast.  Occasionally when I am not working I try to answer some questions, but the question almost always has an answer which is 'as good as' or 'better' than the answer I would supply.  So my question/answer ratio is about 20/1 something, if not more. When I look at my profile page I see a bucket-load of questions and almost nothing I answered myself.  Is this considered bad behaviour? I can see that this looks a little egoistic.  : One devoted to one's own interests and advancement. Sed -- Replace first k instances of a word in the file I want to replace only the first k instances of a word.  How can I do this?  Eg. Say file foo.txt contains 100 instances occurrences of word 'linux' .  I need to replace first 50 occurrences only. In the paper "Beautiful Code Compelling Evidence", by J.R. Heard -- Code is formated in a particular way which includes margin comments. I am looking for a way to do this as I think it is a very clear way to comment comment code in a literate programming style. Functional equations leading to sine and cosine It used to be that the new, super wide, touch friendly context menu style that Google introduced a few versions of Chrome ago could be turned off using the start up flag "--disable-new-menu-style".  As of Chrome 28, this is no longer the case, and as a desktop user it is very irritating to see menus that previously fit in the screen not to do so anymore — I don't think I can get used to it. Is there any way around it? If the flag is gone for good, can the style of the context menus be perhaps edited with custom css like the web inspector? Motivation behind the definition of ideal class group $(a,b) \mathbin\# (c,d)=(a+c,b+d)$ and $(a,b) \mathbin\&(c,d)=(ac-bd(r^2+s^2), ad+bc+2rbd)$. Multiplicative inverse? Let $r\in \mathbb{R}$ and let $0\neq s \in \mathbb{R}$. Define operations $\#$ and $\&amp;$ on $\mathbb{R}$ x $\mathbb{R}$ by $(a,b) \mathbin\#(c,d)=(a+c,b+d)$ and $(a,b) \mathbin\&amp;(c,d)=(ac-bd(r^2+s^2), ad+bc+2rbd)$ as addition and multiplication, respectively. Do these operations form a field?  I have shown that every axiom of the field is satisfied except for the "existence of multiplicative inverses" axiom. This is where I need help. We either need to show that this axiom fails and so we don't have a field or that the axiom $aa^{-1}=1$ is satisfied for every $a\neq 0 \in \mathbb{R}$  The multiplicative identity in this problem is $(1,0)$.  Any solutions or hints are greatly appreciated. Lie algebra and tangent space at the identity are isomorphic Define the Lie algebra $\mathfrak{g}$ of a Lie group G to be the set of all left-invariant vector fields of $G$. I want to prove that   $$          f: \mathfrak{g} \rightarrow T_eG \\              X \mapsto X(e) $$ is a linear isomorphism.  The only thing that I have left to prove is surjectivity.Letting $v\in T_eG$, we set $X\in \mathcal{X}(G)$ such that $\forall x\in G,\,X(x)=L_{x_{*,e}}(v)$ (I still have to show that such an $X$ is indeed a vector field on $G$). We get that  $$ f(X)=X(e)=L_{e_{*,e}}(v)=v $$  where the last equality holds because  $$       L_{e_{*,e}}(v)f = v(f \circ L_e) = v(f \circ id_G) = v(f) $$ for any $f\in C^\infty(G)$. (I am thinking of the tangent vectors as derivations).  Now all we have left to do is prove that such an $X$ is left-invariant, and it is therefore an element of $\mathfrak{g}$, but I do not know how. I tried to prove that  $$            \forall f\in C^\infty(G),\, L_{{x}_*,y}(X(y))f=X(L_x(y))f $$ but with no success. Whenever I try to get somebody to follow me in Skyrim they something in the lives with "You already have a follower.". The problem is, I don't.   I have not, to my recollection, had a follower at any given point in the game.  The only thing I can think of is that I have (spoiler)      finished Anriel's Endeavors and gotten him as a summon creature.    Or do I have a hidden follower that I can't remember. A dog or a horse perhaps? Note that I do not have a dog or horse following me now. I talked to dog once, and had a horse that died.  Is this a common/known issue? Is there a work around?  Any tips? I want to ask about two sentences, and what would be the correct way to form a question:   It's very important that we eat healthy food, ...........?  Which would be the correct question tag: (isn't it) or (don't we)? It's a must that all applicants follow the rules of the competition, ..........?  Which would the correct question tag: (don't they) or (mustn't they)?   Please could you tell me the correct answers, and, more importantly, why those are correct? Error message: qgis_core.dll missing I have a fresh install of QGIS 2.4. When trying to open a .shp file I get the error message below.  I've followed their advice and have done several re-installs and also cleared all qgis files from my system (Parallels on Mac OS X 10.6) before those re-installs. I've tried QGIS 2.2 which caused the same problem.  Funnily all worked for a day, the following day and since not anymore...  Has anyone come across this before? Why does my iPhone power off when the battery is down to 30%? Today I was walking using my iPhone 6S running iOS 9.3 as a pedometer and it shutdown.   When I got home and plugged it in, it said 30% capacity.   That seems strange. I would expect it for 2% or 5% to preserve RAM, but 30%? Maybe there is a setting I don't know about.   My question is: Why does my iPhone power off when the battery is down to 30%?   Edit: this is not a duplicate of the low battery crash as I witnessed the low power shutdown and it was not a crash. This is tricky. I would like to install Ubuntu on a machine that is intended to work as server, and for some reason I do not have an option to connect a screen to it.  I expect this may be similar to remote installation. However, there is currently no OS on that machine, so I will have to set up everything from scratch.  On the other hand, I do have a physical access to that machine. Therefore I can get it to boot from a CD/USB. But that's not enough.  Is there a way to do such installation remotely? Is there a version of Ubuntu image that comes with a SSH server preinstalled, and starts it once booted, so that I can boot the machine with such image, connect to it via SSH and process the installation from a different computer?  If not, what other options do I have? Kepler problem in time: how do two gravitationally attracted particles move? Two particles with initial positions and velocities $r_1,v_1$ and $r_2,v_2$ are interacting by the inverse square law (with G=1), so that  $$ {d^2r_1\over dt^2} = - { m_2(r_1-r_2)\over |r_1-r_2|^3} $$ $$ {d^2r_2\over dt^2} = - { m_1(r_2-r_1)\over |r_1-r_2|^3} $$  (the inverse square law along the line of separation). What is the complete solution of these differential equations? What is the position of the two objects as a function of time?  After reading a lot on Wikipedia, I've come to the definition of center of mass and relative coordinates:   $$R(t) ~=~ \frac{m_1 r_1 + m_2 r_2}{m_1+m_2}$$  $$\ddot{r}(t) r(t)^2 ~=~ (m_1+m_2)G$$  Where $R$ is the center of mass, and $r$ is the displacement between the particles... Is this correct? How do I proceed to solve the differential equation? Wilson and Fermat's Theorem Automatically generate thumbnails for all subfolders of a directory in Windows 7? How can one securely generate an asymmetric key pair from a short passphrase? Background info: I am planning on making a filehost with which one can encrypt and upload files. To protect the data against any form of hacking, I'd like not to know the encryption key ($K$) used for a file, so the user will have to asymmetrically encrypt $K$ and send it as well. The reason for this double encryption is that you can still share (individual!) files with other accounts by encrypting $K$ with the public keys of those users, too.  My problem is: How can a user can get a public and private key without the server saving/knowing the private key and without the user having to remember a passphrase of 250 hex characters?  Question: Is there a way to derive a key pair from a password, like PBKDF-2 does for symmetric encryption? Suggestions on rearranging the cryptographic steps in an easier way are welcome, too.  Alternatively: It is also possible to encrypt the private key with a PBKDF-applied password and store it on the server, but I'd like to keep things 'simple'. ;)  Note: At this point I don't care if it requires RSA, ECC or an obscure cryptography scheme.