I currently have a 20A breaker with 12/3 wire leading to a double gang box which contains two 15A receptacles, that leads into another double gang box with two more 15A receptacles. I'd like to replace the very last receptacle on the circuit with a switch which will be wired to a lamp socket. The lamp socket will have a 60W equivalent LED bulb. I only have 14/3 wire on hand, which I know is not rated for use with a 20A breaker. Is my assumption that I should not pigtail the 14/3 into the existing 12/3 wiring correct? Or is it okay because it is the last leg of the circuit or because the light will draw like half an amp? If it is not safe to use the 14/3 wiring, how would it be different if I wired a plug on on the end of the 14/3 wiring and just plugged it into the existing receptacle? This last part is really what I am hung up on.
I'm rewiring a a small part of a wall and I'm confused about a combination of the NEC and the products that I'm able to find.  I'm working on a 20 amp circuit (with 12g wire of course).  I'm connecting 4 receptacles each in their own box, 15 amp receptacles for normalcy.  But the terminals don't seem to accept 12g wire, even on the screws.  My first reaction was to make pigtails 14g pigtails, so that the 14g tap goes directly to the receptacle and is not used to feed the rest of the circuit.  12g in the box, 12g out of the box, and 14g inside the box only.    Is that type of splice allowed, or should I look harder for a 15 amp outlet that can more easily accept 12g wire?
Which equals operator (== vs ===) should be used in JavaScript comparisons? I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==? dropping trailing '.0' from floats I'm looking for a  way to convert numbers to string format, dropping any redundant '.0'   The input data is a mix of floats and strings. Desired output:  0   --> '0'  0.0 --> '0'  0.1 --> '0.1'  1.0 --> '1'  I've come up with the following generator expression, but I wonder if there's a faster way:  (str(i).rstrip('.0') if i else '0' for i in lst)   The truth check is there to prevent 0 from becoming an empty string.  EDIT: The more or less acceptable solution I have for now is this:  ('%d'%i if i == int(i) else '%s'%i for i in lst)   It just seems strange that there is no elegant way to handle this (fairly straightforward) case in python. What is a good book to study linear algebra? I'm looking for a book to learn Algebra. The programme is the following. The units marked with a $\star$ are the ones I'm most interested in (in the sense I know nothing about) and those with a $\circ$ are those which I'm mildly comfortable with. The ones that aren't marked shouldn't be of importance. Any important topic inside a unite will be boldfaced.  U1: Vector Algebra. Points in the $n$-dimensional space. Vectors. Scalar product. Norm. Lines and planes. Vectorial product.  $\circ$ U2: Vector Spaces. Definition. Subspaces. Linear independence. Linear combination. Generating systems. Basis. Dimesion. Sum and intersection of subspaces. Direct sum. Spaces with inner products.  $\circ$  U3: Matrices and determinants. Matrix Spaces. Sum and product of matrices. Linear ecuations. Gauss-Jordan elimination. Range. Roché Frobenius Theorem. Determinants. Properties. Determinant of a product. Determinants and inverses.  $\star$ U4: Linear transformations. Definition. Nucleus and image. Monomorphisms, epimorphisms and isomorphisms. Composition of linear transformations. Inverse linear tranforms.  U5: Complex numbers and polynomials. Complex numbers. Operations. Binomial and trigonometric form. De Möivre's Theorem.  Solving equations. Polynomials. Degree. Operations. Roots. Remainder theorem. Factorial decomposition. FTA. Lagrange interpolation.  $\star$ U6: Linear transformations and matrices. Matrix of a linear transformation. Matrix of the composition. Matrix of the inverse. Base changes.   $\star$ U7: Eigen values and eigen vectors Eigen values and eigen vectors. Characteristc polynomial. Aplications. Invariant subspaces. Diagonalization.   To let you know, I own a copy of Apostol's Calculus $\mathrm I $ which has some of those topics, precisely:   Linear Spaces Linear Transformations and Matrices.   I also have a copy of Apostol's second book of Calc $\mathrm II$which continues with   Determinants Eigenvalues and eigenvectors Eigenvalues of operators in Euclidean spaces.   I was reccommended Linear Algebra by Armando Rojo and have Linear Algebra by , which seems quite a good text.   What do you reccomend? When I'm not exploring fresh caves or lands in minecraft, I'm busy trying to find deposits of diamond, gold and iron deep in the earth. So far I've just been digging around just above bedrock on a whim to look for these rare minerals but I've started thinking that I should be taking a more controlled, efficient approach to mining.  What is the optimal mining strategy that yields the most rare minerals while minimizing blocks removed and time spent digging and traveling?  Edit: The existing answers are great for mining, but no one has addressed travel time to and from the mine which is usually ~60 blocks downward and incredibly tedious. Solutions? How do I do a case-insensitive string comparison? How can I edit/create new launcher items in Unity by hand? Will Unity allow making custom launcher icons from .desktop files or via menu editing system? (Right now the launcher doesn't give the option to "keep in launcher" on all programs.  For some programs I use, I have to make custom launchers or .desktop files.  For instance, daily blender builds are generally just folders with an executable.  In basic Gnome or KDE, I can make a new menu entry with the menu editing system. Then, I can also add it to Docky either from the menu or by dragging a .desktop file to it. Unity launcher doesn't support drag and drop, so thats not a bug or anything, but when I open a .desktop file, it has unpredictable results. Most time it will not have "keep in launcher". Sometime it will have a pinnable item without the .desktop's icon, and if I pin the item to the launcher, it will not call upon the program again after closing it. I've also gotten it to just work with a .desktop file for celtx. What intuitively is "bias"? I'm struggling to grasp the concept of bias in the context of linear regression analysis.    What is the mathematical definition of bias? What exactly is biased and why/how? Illustrative example? Is it possible to create a URL link to a website on the home screen? Cannot suggest retag-only edit because "edits must be at least 6 characters" I was trying to suggest a retag of  on Seasoned Advice, but the system won't let me; I get the familiar message     Edits must be at least 6 characters; is there something else to improve in this post?   In general, that's not true for retagging; if you don't change the question body at all, it should work. I suspect the logic checking the edit is thrown off guard because of the title warning:     The question you're asking appears subjective and is likely to be closed       I found , but I cannot find any evidence (in SEDE) for invisible characters being present in the question's source. Also, that's supposed to be . Our company has multiple domains set up with one website hosted on each of the domains. At this time, each domain has its own authentication which is done via cookies.   When someone logged on to one domain needs to access anything from the other, the user needs to log in again using different credentials on the other website, located on the other domain.   I was thinking of moving towards single sign on (SSO), so that this hassle can be eliminated. I would appreciate any ideas on how this could be achieved, as I do not have any experience in this regard.  Thanks.  Edit: The websites are mix of internet (external) and intranet (internal-used within the company) sites. How do you generate all the permutations of a list in Python, independently of the type of elements in that list?  For example:  permutations([]) []  permutations([1]) [1]  permutations([1, 2]) [1, 2] [2, 1]  permutations([1, 2, 3]) [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1] As you can see from the image below, I have an issue with the text alignment of extra long chapter names. How can I fix it so that the text will not go further left than the start of the chapter name? That is, I don't want any text to be underneath the "Appendix A" part.  I added that red line just to show how I'd like it aligned, if possible.    Here's my MWE:  \documentclass{book} \let\cleardoublepage\clearpage  \RequirePackage{titletoc} \RequirePackage{tikz} \RequirePackage[explicit]{titlesec} \RequirePackage{DejaVuSansCondensed} \RequirePackage[normalem]{ulem} \RequirePackage[   left=2.25in,   right=0.75in,   top=1.25in,   bottom=1.25in,   marginparwidth=1.75in,   marginparsep=.25in,   asymmetric]{geometry}  \renewcommand*\familydefault{\sfdefault} % Set default font  %%% Table of Contents ---------------------------------------------------------- \setcounter{tocdepth}{1} % Show only Chapters and Sections  %%% Change font/color/layout of TOC \makeatletter \titlecontents{chapter}[-2em] {\color{cyan}\bfseries\LARGE\addvspace{3mm}} {\makebox[4.4em][r]{\@chapapp}\contentslabel{-0.25em}\hspace{1.9em}} {} {\hspace{3em}\contentspage} \g@addto@macro{\appendix}{%   \addtocontents{toc}{\protect\renewcommand*{\protect\@chapapp}{\protect\appendixname}}% } \makeatother  \titlecontents{section}[5.3em] {\color{cyan}\large\itshape\addvspace{3mm}} {\contentslabel{0em}\hspace{3.2em}} {} {\hspace{3em}\contentspage} [\addvspace{0mm}]  %%% Chapter Header ---------------------------------------------------------- \makeatletter \titleformat{\chapter}   {\normalfont\sffamily\Huge\scshape}   {}{0pt}   {\thispagestyle{empty}    % Remove page number on new chapters   %\setcounter{definition}{0}   \begin{tikzpicture}[remember picture,overlay]     \node[yshift=-3cm] at (current page.north west)       {\begin{tikzpicture}[remember picture, overlay]         \draw[fill=cyan] (0,-1) rectangle           (25cm,3cm);         \draw[fill=cyan] (0,-24) rectangle           (25cm,-25cm);         \ifttl@label% &lt;---------------------- Added condition on \ifttl@label           \node[anchor=west,xshift=.21\paperwidth,yshift=-.01\paperheight,rectangle]               {\color{white}\LARGE \MakeUppercase{\@chapapp} \Huge\thechapter};         \fi% &lt;------------------------------- end condition on \ifttl@label        \end{tikzpicture}       };    \end{tikzpicture}\endgraf   \vskip-.7cm   \color{cyan}\Huge\raggedright\leftskip-1cm    \noindent\MakeUppercase{#1}\endgraf   } \makeatother  \titlespacing*{\chapter}{0pt}{10pt}{0pt}{}  \titleformat{\section}{\color{cyan}\itshape\LARGE}{\llap{\thesection} #1}{1em}{}[\titleline{\color{cyan}\titlerule[1pt]}] \titleformat{\subsection}{\color{cyan}\normalfont\large}{\; #1}{1em}{}  \begin{document}   \tableofcontents   \chapter{Turing Machines}     \section{The Turing Machine}     \section{Variations of the Turing Machine}       %\subsection{Non-deterministic Turing Machines}     \section{The Church-Turing Thesis}   \chapter{Decidability}     \section{The Universal Turing Machine}    \appendix   \chapter{ON COMPUTABLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHEIDUNGSPROBLEM} \end{document} RECENTLY ON THE ANDROID SITE WE GOT  WRITTEN IN ALL CAPS.  THIS WAS SURPRISING TO ME, SINCE I ASSUMED IT WOULD HAVE BEEN CAUGHT BY THE QUALITY FILTER &mdash; BESIDES BEING INDICATIVE OF OTHER POST QUALITY ISSUES, IT'S AWFUL TO LOOK AT AND REQUIRES A LARGE AMOUNT OF EDITING TO FIX (EVEN IF YOU RUN IT THROUGH TOLOWER() FIRST).  WE ALL KNOW THAT CAPS LOCK IS , BUT STILL: CAN WE BLOCK THESE QUESTIONS?    RICK  RICK  OH MAN THAT STUFF JACOB G  IS COMEDY GOLD  RIIICK     Note to editors: This post looks exactly like it is supposed to look, as an example of a question in all-caps. Please do not replace the uppercase letters with lowercase. SQL group by day, show orders for each day I have an SQL 2005 table, let's call it Orders, in the format:  OrderID, OrderDate,  OrderAmount 1,       25/11/2008, 10 2,       25/11/2008, 2 3,       30/1002008, 5   Then I need to produce a report table showing the ordered amount on each day in the last 7 days:  Day,        OrderCount, OrderAmount 25/11/2008, 2,          12 26/11/2008, 0,          0  27/11/2008, 0,          0  28/11/2008, 0,          0 29/11/2008, 0,          0 30/11/2008, 1,          5   The SQL query that would normally produce this:  select count(*), sum(OrderAmount)     from Orders     where OrderDate&gt;getdate()-7     group by datepart(day,OrderDate)   Has a problem in that it will skip the days where there are no orders:  Day,        OrderCount, OrderAmount 25/11/2008, 2,          12 30/11/2008, 1,          5   Normally I would fix this using a tally table and outer join against rows there, but I'm really looking for a simpler or more efficient solution for this. It seems like such a common requirement for a report query that some elegant solution should be available for this already.   So: 1. Can this result be obtain from a simple query without using tally tables?  and 2. If no, can we create this tally table (reliably) on the fly (I can create a tally table using CTE but recursion stack limits me to 100 rows)? I recall having heard somewhere that the only 1-manifolds (second countable, Hausdorff, connected spaces locally homeomorphic to $\mathbb R$) are $\mathbb R$ and $S^1$. Is this true? If so, is there a reasonably elementary proof? I'm looking for a way to reinterpret an array of type byte[] as a different type, say short[]. In C++ this would be achieved by a simple cast but in C# I haven't found a way to achieve this without resorting to duplicating the entire buffer.  Any ideas? How to prove $|a^k|=n/\gcd(n,k)$ whenever $|a|=n$? I was wondering what the cardinality of the set of all real sequences is. A random search through this site says that it is equal to the cardinality of the real numbers. This is very surprising to me, since the cardinality of all rational sequences is the same as the cardinality of reals, and it seemed fairly intuitive to me that if cardinality of a set $A$ is strictly greater than the cardinality of the set $B$, then cardinality of $A^{\mathbb{N}}$ should be strictly greater than cardinality of $B^{\mathbb{N}}$. It turns out to be false.  Some technical answers have appeared in this forum elsewhere but I do not understand them. As I am not an expert in this topic, could some one explain me in simple terms why this is happening?  Also is the cardinality of all functions from reals to reals also the same as the cardinality of reals? I need this desperately but can't find it. Am I doing something wrong? How can I make my ad hoc iPhone application's icon show up in iTunes? I've got an iPhone app with icon file Icon.png.  This icon shows up properly when the app is on the phone itself, but it doesn't show up in the applications pane in iTunes.  What do I need to do to get it to show up properly?