I want to create Worker and Student tables which contains a lot of similar information (First name, second name etc.), so I'm going to extract another like abstract table named Person, which will contain general information for Worker and Student tables.  Which is the best way to do that?  Also I need that ids will be unique i.e. there isn't the same id in Worker table and Student table.
What are the best practices for modeling inheritance in databases?  What are the trade-offs (e.g. queriability)?  (I'm most interested in SQL Server and .NET, but I also want to understand how other platforms address this issue.)
Often I see code blocks pasted into questions with no formatting, or terrible formatting.  It's sometimes quite a chore to fix these: you have to either manually space out each line, or paste the code into an IDE, format it there, and paste it back.  Could we have a button/function where you could highlight a code block, and it would turn this:  foreach (var i in stuff) { if (i==1) { Whatever(); } }   into this:  foreach (var i in stuff) {   if (i==1) {     Whatever();   } }   I realise the function would have to work differently based on the language in the code block. Perhaps  it could use the same rules as the prettify code.  Also, it wouldn't be a big deal if it gets the language wrong and breaks the code, since you can always just ctrl+z. Error: Declaration of MyClass::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl() I'm currently working on a WordPress site and whenever in the admin I go the Appearance > Menus page I get the following error:     ErrorException: Runtime Notice: Declaration of Walker_Nav_Menu_Edit::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl() in wp-admin/includes/nav-menu.php line 203   It seems like some sort of PHP compatibility issue. I'm running PHP 5.3.10 on my local dev machine.  What would be the best way to remedy this problem? What happens if light/particles exceeded the speed of light for a particular medium? I extracted simple example:  require 'pp' x = 1..3 pp x.map do |i| {:value =&gt; i, :double =&gt; (i*2)} end pp x.map { |i| {:value =&gt; i, :double =&gt; (i*2)} }  pp(x.map do |i| {:value =&gt; i, :double =&gt; (i*2)} end) pp(x.map { |i| {:value =&gt; i, :double =&gt; (i*2)} })   I am wondering why first pp produces:  [1, 2, 3]   While all the oders are giving:  [{:value=&gt;1, :double=&gt;2}, {:value=&gt;2, :double=&gt;4}, {:value=&gt;3, :double=&gt;6}]   I assume it has something to do with operator precedence. Where can I find good explanation? Is it possible to recognise hardware (router or network card) just by its MAC address? Just wondering if that is possible. Are there any naming conventions that would allow one to deduce whether the MAC address belongs to a router (of a specific brand), or a network card, etc.. What's the difference between postfix/smtp and postfix/smtpd A bit confused when reading through the logs of my smtp/mail server, I'm turning this questions to you guys.   In the maillog files I'm seeing entries for postfix/smtp as well as postfix/smtpd. I can also see that there are possible settings for smtp as well as smtpd in the file main.cf  Trying to find some reasonable explanation through google search seemed to be impossible, so here is my question to you guys.  My server was kind of compromised and the spam mails where going through postfix/smtp and not smtpd. Please help me to understand. Thanks in advance! $\lim_{x \rightarrow 0} f'(x) = L$ exists, does it follow that $f'(0)$ exists? Discrepancy in using adjective or adverb with “taste” I saw a video where the person copied a material from one object to another (Cycles).  How can I accomplish this? Prevent text selection after double click The user who first created a tag wiki is treated as owner for suggested edits was declined by the user who created the tag wiki excerpt, who doesn't yet have the reputation to be a trusted user. (The site is still in beta, and the reputation necessary to be a trusted user is 4000.)        Should the user who first proposed a tag wiki, or a tag wiki excerpt be the one who can unilaterally decide about a proposed edit for a tag wiki? The user who first proposed it isn't necessarily the one who knows if the tag's purpose can be better described with different words, nor does that user necessarily know if the tag has been lately used differently from how it was first used. Since a tag wiki is different from other posts, there should be an exception to the rule "the author of a post can unilaterally decide about any edits."  The paradox is then that the creator of a tag wiki still needs two users to approve their suggested edit. That's what happened in .        The funny fact is that in the revisions for the tag wiki, or tag excerpt (as in the screenshot), the tag wiki/excerpt is said to be created from the Community user.        This bug is  definitely . Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it? How to print without newline or space? Anonymous user feedback now in testing Anonymous and unregistered users with &lt; 15 reputation (the amount required to earn the upvote privilege) will now see       feedback   on every post in the area that a logged in user would see "add comment":    When the post area is moused over, the area expands to:     Was this post useful to you? [Yes] [No]     once clicked it will say     sending feedback...   and eventually     Thank you for your feedback.   The goal is to offer the 90% of our traffic that is anonymous users a way to provide more meaningful feedback on posts rather than passively incrementing a view counter.  This click data is currently being evaluated to see what we can do with it. Ideas welcome! How to I deal with unwrapped UVs orientation?   Delete the default Cube. Add a Cylinder Edit mode and edge select the Top and the Bottom and a single connecting edge. Make them into seams UV Unwrap (standard Unwrap mode)   The unwrapped UV now shows two circles above a row of quads. I can save this and open it in an image editor and paint over those areas and get the texture to align on the cylinder back in blender.  But, the pattern(just happens to be text) that was inserted in place of the row of quads is now upside down on the model. Any attempt to flip or align just makes things worse, from upside down to mirrored or the Top/Bottom not aligning.  So my real question is how could I have known that the quads represented an upside down view of the world?  Do other blender users export UVs and mark them with arrows and colours just to see how they align on a model before actually painting for real?  I tried selecting the edges in step 3 in different orders before making them into seams and it made no difference.  I also looked at the Normals but they appear to be only Inside/Outside not Up/Down.  Blender 2.70 What does "Ubuntu" mean, and why did they choose that particular name? In transformers, the ratio of the voltages equals the ratio of the turns - so double the output coil's turns and the output voltage doubles. Then, in order to conserve energy, current halves.  This makes perfect sense in terms of $\mathrm{P=VI}$, but what happened to $\mathrm{V=IR}$? Doubling voltage and halving the current seems to completely contradict this basic law. That is, of course, unless the resistance in the output circuit changes, with R proportional to $\mathrm{V^2}$ - but I don't see how this is possible.  So how can a transformer obey both laws? Can resistance change or am I missing something else? After discussion with colleagues regarding the use of the 'var' keyword in C# 3 I wondered what people's opinions were on the appropriate uses of type inference via var?  For example I rather lazily used var in questionable circumstances, e.g.:-  foreach(var item in someList) { // ... } // Type of 'item' not clear. var something = someObject.SomeProperty; // Type of 'something' not clear. var something = someMethod(); // Type of 'something' not clear.   More legitimate uses of var are as follows:-  var l = new List&lt;string&gt;(); // Obvious what l will be. var s = new SomeClass(); // Obvious what s will be.   Interestingly LINQ seems to be a bit of a grey area, e.g.:-  var results = from r in dataContext.SomeTable               select r; // Not *entirely clear* what results will be here.   It's clear what results will be in that it will be a type which implements IEnumerable, however it isn't entirely obvious in the same way a var declaring a new object is.  It's even worse when it comes to LINQ to objects, e.g.:-  var results = from item in someList               where item != 3               select item;   This is no better than the equivilent foreach(var item in someList) { // ... } equivilent.  There is a real concern about type safety here - for example if we were to place the results of that query into an overloaded method that accepted IEnumerable&lt;int&gt; and IEnumerable&lt;double&gt; the caller might inadvertently pass in the wrong type.  var does maintain strong typing but the question is really whether it's dangerous for the type to not be immediately apparent on definition, something which is magnified when overloads mean compiler errors might not be issued when you unintentionally pass the wrong type to a method. A weak converse of $AB=BA\implies e^Ae^B=e^Be^A$ from "Topics in Matrix Analysis" for matrices of algebraic numbers. It is a well known fact that if $A,B\in M_{n\times n}(\mathbb C)$ and $AB=BA$, then $e^Ae^B=e^Be^A.$  The converse does not hold. Horn and Johnson give the following example in their Topics in Matrix Analysis (page 435). Let $$A=\begin{pmatrix}0&amp;0\\0&amp;2\pi i\end{pmatrix},\qquad B=\begin{pmatrix}0&amp;1\\0&amp;2\pi i\end{pmatrix}.$$ Then $$AB=\begin{pmatrix}0&amp;0\\0&amp;-4\pi^2\end{pmatrix}\neq\begin{pmatrix}0&amp;2\pi i\\0&amp;-4\pi^2\end{pmatrix}=BA.$$ We have $$e^A=\sum_{k=0}^{\infty}\frac 1{k!}\begin{pmatrix}0&amp;0\\0&amp;2\pi i\end{pmatrix}^k=\sum_{k=0}^{\infty}\frac 1{k!}\begin{pmatrix}0^k&amp;0\\0&amp;(2\pi i)^k\end{pmatrix}=\begin{pmatrix}e^0&amp;0\\0&amp;e^{2\pi i}\end{pmatrix}=\begin{pmatrix}1&amp;0\\0&amp;1\end{pmatrix}.$$   For $S=\begin{pmatrix}1&amp;-\frac i{2\pi}\\0&amp;1 \end{pmatrix},$ we have $$e^B=e^{SAS^{-1}}=Se^AS^{-1}=S\begin{pmatrix}1&amp;0\\0&amp;1\end{pmatrix}S^{-1}=\begin{pmatrix}1&amp;0\\0&amp;1\end{pmatrix}.$$   Therefore, $A,B$ are such non-commuting matrices that $e^Ae^B=\begin{pmatrix}1&amp;0\\0&amp;1\end{pmatrix}=e^Be^A.$  It is clear that $\pi$ is important in this particular example. In fact, the authors say what follows.      It is known that if all entries of $A,B\in M_n$ are algebraic numbers and $n\geq 2,$ then $e^A\cdot e^B=e^B\cdot e^A$ if and only if $AB=BA.$   No proof is given. How does one go about proving that? A few months ago I was telling high school students about Fermat's principle.   You can use it to show that light reflects off a surface at equal angles. To set it up, you put in boundary conditions, like "the light starts at A and ends at B". But these conditions by themselves are insufficient to determine what the path is, because there's an extra irrelevant stationary time path, which is the light going directly from A to B without ever bouncing off the surface. We get rid of this by adding in another boundary condition, i.e. that we only care about paths that actually do bounce. Then the solution is unique.  Of course the second I finished saying this one of the students asked "what if you're inside an elliptical mirror, and A and B are the two foci?" In this case, you can impose the condition "we only care about paths that hit the mirror", but this doesn't nail down the path at all because any path that consists of a straight line from A to the mirror, followed by a straight line to B, will take equal time! So in this case the principle tells us nothing at all.  The fact that we can get no information whatsoever from an action principle feels disturbing. I thought the standard model was based on one of those!  My questions are   Is this anything more than a mathematical curiosity? Does this come up as a problem/obstacle in higher physics? Is there a nicer, mathematically natural way to state the "only count bouncing paths" condition? Also, is there a "nice" condition that specifies a path in the ellipse case? What should I have told that student?