I've noticed some C# code has the using statements within the namespace instead of at the top of the file.  For example, instead of this:  using System; namespace SomeClassNameSpace { public class SomeClass  { } }   They have this:  namespace SomeClassNameSpace { using System; public class SomeClass  { } }   Is this a matter of personal preference or is there a reason for having using statements inside or outside the namespace tag?
I have been running  over some C# code, and it keeps reporting that my using directives should be inside the namespace.  Is there a technical reason for putting the using directives inside instead of outside the namespace?
In C#, what is the best way to access a property of the derived class when the generic list contains just the base class.  public class ClassA : BaseClass {    public object PropertyA { get; set; } }  public class ClassB: BaseClass {     public object PropertyB { get; set; } }  public class BaseClass { }  public void Main {     List&lt;BaseClass&gt; MyList = new List&lt;BaseClass&gt;();     ClassA a = new ClassA();     ClassB b = new ClassB();      MyList.Add(a);     MyList.Add(b);      for(int i = 0; i &lt; MyList.Count; i++)     {         //I would like to access PropertyA abd PropertyB from the derived classes             } } How to stop a script from running if it's not root (and echo "Not running as root! Exiting...") I am not a native speaker. On a previous question of mine, I thanked for an answer by saying:     So the phrase is not an idiom, since it is applied in its literal sense.   I consciously chose since over because, because — well, I like that usage of since, even though I know that some (native speakers) don't like it. Nonetheless, that choice got me thinking for a while, and it occurred to me that I even could have used more alternatives, namely as or for, without changing the meaning.   So, on a general note, here are the alternatives:        Statement A (is true), because statement B (is true).   Statement A (is true), since statement B (is true).   Statement A (is true), as statement B (is true).   Statement A (is true), for statement B (is true).      Are these completely interchangeable? Or interchangeable in certain situations? Or can you point out any (not-so-)subtle differences between any of them? Are there even more synonyms? How to prove $\cos \frac{2\pi }{5}=\frac{-1+\sqrt{5}}{4}$? I would like to find the apothem of a regular pentagon. It follows from   $$\cos \dfrac{2\pi }{5}=\dfrac{-1+\sqrt{5}}{4}.$$  But how can this be proved (geometrically or trigonometrically)? Prove the following equality using mathematical induction: Prove the following equality using mathematical induction: For any integer $n \ge 1$  $$\sum_{i=1}^{n} \frac{1}{i(i+1)} = \frac{n}{n+1}$$  I understand for the base base I need to have $n=1$. If I substituted $n$ for 1 and $i$ for 1 I would get   \begin{align} \sum_{i=1}^{1} \frac{1}{1(1+1)} &amp;= \frac{1}{1+1} \\ \sum_{i=1}^{1} \frac{1}{2} &amp;= \frac{1}{2} \end{align}  As for the inductive step, I inputted $n +1$ but it did not work for me because honestly I did not know what to do with the $i$ and what I should do next.  How would I go about doing the next step and an explanation for $i$ would be helpful. Enumerate paragraphs and subparagraphs like sections but with letters I'm using pandoc and in my template.tex exists this code to make the paragraphs and subparagraphs to behave like sections.  % Redefines (sub)paragraphs to behave more like sections \ifx\paragraph\undefined\else \let\oldparagraph\paragraph \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} \fi \ifx\subparagraph\undefined\else \let\oldsubparagraph\subparagraph \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \fi   This code generate number like this:  1. chapter  1.1 section  1.1.1 subsection  1.1.1.1 subsubsection  1.1.1.1.1 paragraph  1.1.1.1.1.1 subparagraph   How to change this code to enumerate with letter like this:  1. chapter  1.1 section  1.1.1 subsection  1.1.1.1 subsubsection  1.1.1.1.a paragraph  1.1.1.1.a.a subparagraph Changing SRID of existing data in PostGIS? While importing my shapefile data to PostGIS, I did not select the proper Projection.  How do I now change the SRID of the data, without transforming the Coordinates? Change pivot or local origin of an object How can I change the local origin of an object, without changing the object location in the world space.  This is the object located at position (0,0,0) in the world space    This is the same object located at position (0,1,0) in the world space, but with its local origin offset so that the object is in the same place    Is there a way to do this in a single step? Is the uncertainty principle a property of elementary particles or a result of our measurement tools? In many physics divulgation books I've read, this seems to be a commonly accepted point of view (I'm making this quote up, as I don't remember the exact words, but this should give you an idea):      is not a result of our lack of proper measurement tools. The fact that we can't precisely know both the position and momentum of an elementary particle is, indeed, a property of the particle itself. It is an intrinsic property of the Universe we live in.   Then this video came out:  (skip to , if you're already familiar with the uncertainty principle).  So, correct me if I'm wrong, what we may claim according to the video is:     the only way to measure an elementary particle is to make it interact with another elementary particle: it is therefore incorrect to say that an elementary particle doesn't have a well defined momentum/position before we make our measurement. We cannot access this data (momentum/position) without changing it, therefore it is correct to say that our ignorance about this data is not an intrinsic property of the Universe (but, rather, an important limit of how we can measure it).   Please tell me how can both of the highlighted paragraphs be true or how they should be corrected. Where are the Stack Exchange data dumps? HDMI to VGA convert I just bought a new HP Pavilion dv7t Quad Edition laptop that has HDMI out. I already have a couple of monitors that are VGA and I'd like to hook up one of these to dual monitors.  I've read some sketchy reviews of products that try to convert directly from HDMI (digital) to  VGA (analog), so I was wondering if someone has a good recommendation on how to hook these two together. Schwarz's Lemma, fixed points question Aware abbreviating those commands need not always be helpful, I would like to know how to abbreviate them? The following is what I tried, which does not work:  \documentclass[11pt,handout]{beamer} \newcommand{\bframe}{\begin{frame}} \newcommand{\eframe}{\end{frame}} \newcommand{\ftitle}{\frametitle}   \author{Author} \title{Title}   \begin{document} \maketitle  \begin{frame} \frametitle{Outline}  \end{frame}   \bframe \ftitle{Introduction}  \eframe    \end{document}   At first I thought it might be the case that commands such as \bframe was already defined. But using \def instead still gives no desired result. Migrating to full Ubuntu after dual installation on WinXP I previously ran 12.04 alongside WinXP to see how it performed on my mom's older laptop.  i also migrated her email to Thunderbird. If I now convert from dual WinXP/Ubuntu to only run Ubuntu will things like her Thunderbird emails be transferred as part of the Ubuntu full install? Or must I do something else? I am fairly tech aware, but not a full IT boffin! .fbx export why there are no materials or textures? I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender? How do I set focus follows mouse? Is there a way to set up "focus follows mouse" behavior in Unity? Why can't I use Stack Exchange if I'm under 13 years old, or if I'm under 16 years old and from the EU? I was just reading the , and noticed something:  You must be at least 13 years old to access or use the Network or Services, including without limitation to complete a Stack Overflow account registration. By accessing or using the Services or the Network in any manner, you represent and warrant that you are at least 13 years of age. If you are under 13 years old, you may not, under any circumstances or for any reason, access or use the Services or Network in any manner, and may not provide any personal information to or on the Services or Network (including, for example, a name, address, telephone number or email address). If you are located within the European Union, you must be at least 16 years old to access or use the Network or Services, including without limitation to complete a Stack Overflow Account Registration.  I signed up for Stack Overflow when I was around 11 or 12 and I did provide my email address. Are you saying that my use of Stack Overflow was not legal? I'm 16 now (so I'm in the clear), but that just seems a little harsh. Is that possibly related to the age limit for accepting a binding contract/agreement (although I thought that was 18 in the U.S.)? Is there a way for users under the age of 13, or for users from the European Union who are under the age of 16, to use the site legally? I've setup a HTTPS and FTP site in IIS but how can I add users to use the FTP site?  Does they necessarily need an account with password in the computer to be able to use it? I just want to know if it's possible to get Cain and abel installed in ubuntu, it would really help my work instead of dual booting back to my windows 7 just to use it. THanks! "X Department" versus "Department of X" I would like to know whether these phrases "English Department" and "Department of English" have the same meaning. Thanks!