We are discussing the pros and cons of using id attributes versus class attributes in our website's HTML tags. I use IDs rather liberally. This includes the use of nested IDs such as:  &lt;body id="thisPage"&gt; &lt;div id="mediaSection"&gt; &lt;div id="mediaImages"&gt;  .... &lt;/div&gt;&lt;/div&gt;&lt;/body&gt;   In this case, MediaSection is a part of the page unique to this HTML file (referenced by the body tag with thisPage id). When I write CSS to style the mediaImages section it would look like this:  #thisPage #mediaSection #mediaImages {     vertical-align: bottom; }   I write the CSS rules like this for legibility purposes even though I know we just need #mediaImages. My co-worker says that this is bad practice: IDs are more expensive and could compromise browser performance because they give the web browser more information to keep track of. His recommendation is to use classes instead. For example, rewriting the above example:  &lt;body class="thisPage"&gt; &lt;div class="mediaSection"&gt; &lt;div class="mediaImages"&gt;  .... &lt;/div&gt;&lt;/div&gt;&lt;/body&gt;   Is there merit to using classes instead of ids for this situation?
When using divs when is it best to use a class vs id?   Is it best to use class, on say font variant or elements within the html? Then use id for the structure/containers?   This is something I've always been a little uncertain on, any help would  be great.
What is the meaning of this "let there be light" joke? Vectorize a PNG file in Adobe Illustrator CC 2017 I need to open a white PNG shape in Illustrator. I want to convert it into vector and change the color. In CS6 is very simple to do this. Can you help me to do this in CC? Detecting the system DPI/PPI from JS/CSS? I'm working on a kind of unique app which needs to generate images at specific resolutions according to the device they are displayed on. So the output is different on a regular Windows browser (96ppi), iPhone (163ppi), Android G1 (180ppi), and other devices. I'm wondering if there's a way to detect this automatically.  My initial research seems to say no. The only suggestion I've seen is to make an element whose width is specified as "1in" in CSS, then check its offsetWidth (see also ). Makes sense, but iPhone is lying to me with that technique, saying it's 96ppi.  Another approach might be to get the dimensions of the display in inches and then divide by the width in pixels, but I'm not sure how to do that either. Restore Python installation to default plus apt package dependencies Will higher temperatures damage a computer over time, even when not reaching the maximum temperature? For example, if the maximum is 105 degrees celcius, will the computer break faster when continually having it on 80 degrees celsius instead of, for example, 60 degrees celcius. How to test whether a file uses CRLF or LF without modifying it? I need to periodically run a command that ensures that some text files are kept in Linux mode. Unfortunately dos2unix always modifies the file, which would mess file's and folder's timestamps and cause unnecessary writes.   The script I write is in Bash, so  I'd prefer answers based on Bash. Sometimes I hear people say something like the example below. Is it correct to use the word since in this manner?     Mosquitoes are surviving on earth since millions of years. Please clarify how entropy increases when matter gravitationally coalesces On John Baez's website, , he discusses the problem of how entropy increases when a cloud of ideal gas collapses gravitationally (no black holes - keeping it simple).  But he doesn't give away the answer - instead he implies that, I presume, either gravitons or photons are released during collapse and these increase the overall system entropy.  Can someone please answer which it is, gravitons or photons?  If gravitons (or gravity waves), then does this mean that pre-20th century physicists, with no notion of gravity waves, would have concluded that gravitational attraction violates the 2nd law?  And if photons, then what about if the gas particles were totally neutral - wouldn't they not emit any EM radiation in that case?  Or am I wrong that gravitons or photons are the answer? Thanks! Ackermann function - how to calculate the number of times it calls itself Purely for my own amusement I've been playing around with the .  The Ackermann function is a non primitive recursive function defined on non-negative integers by:  $A(m,n) = n+1$, if $m=0$  $A(m,n) = A(m-1,1)$, if $m&gt;0$ and $n=0$  $A(m,n) = A(m-1,A(m,n-1))$, if $m&gt;0$ and $n&gt;0$  I'm not interested in values of the function itself, rather I'm interested in the number of recursions the function takes to arrive at a value. For example:  $A(1,2) = A(0,A(1,1)) = A(0,A(0,A(1,0))) = A(0,A(0,A(0,1))) = A(0,A(0,2)) = A(0,3) = 4$  That's 6 steps, so if we define $RA(m,n)$ as the number of recursions to calculate $A(m,n)$, then $RA(1,2) = 6$.  I made a short Excel macro to calculate $RA(m,n)$ for any given $m$ and $n$. The problem I have is that $RA(m,n)$ grows even faster than $A(m,n)$ and I quickly run out of stackspace. The table below shows $RA(m,n)$ for very small values of $m$ and $n$. The numbers shown for $RA(3,10)$ and $RA(4,1)$ are the number of steps before crashing!    A formula for $RA(1,n)$ is trivial, and it is relatively easy to see that $RA(2,n) = 5(n+1) + 4n(n+1)/2$.  So my questions: can anyone see an explicit formula for $RA(3,n)$? More generally, does a formula exist for $RA(m,n)$, in the same way that $A(m,n)$ can be expressed using Knuth arrows?   For the low values shown of $m$ and $n$, $RA(m,n)$ looks about order of magnitude larger than $A(m,n)$. Can we prove that $RA(m,n) &gt; A(m,n)$ for all $m,n$. Intuitively, it should be.  For bonus points, can $RA(m,n)$ be expressed in terms of $A(m,n)$? How do you distinguish between magic effects that bypass immunity and those that don't? This question was triggered by .  Basically, it goes like this: If you have a weapon with a certain magical effect, let's say the minor property unbreakable (can not be broken, requires special means) or temperate (no harm in temperatures between -20 to 120 F), it can bypass the immunity of something like a Werewolf because it is magical instead of mundane. This goes for any minor property because those properties are under the Magic Items portion of the DMG on pg.143.  How does this differ from a pair of gauntlets with the exact same effect being used as an improvised weapon (emphasis added for clarity) from dealing damage in the same manner to the same Werewolf? Or something that's clearly not a weapon like a Shield of Missile Snaring being used to bash an opponent? How to change LCD brightness from command line (or via script)? Small Caps and Bold Face I can't seem to have both the small caps and boldface styles on a line:  \huge\sc\bf Hello   This will generate bold text, and if the \sc is placed after, it will generate small caps text but not bolded. They seem to override each other, so is there any way to apply them both? I am using field image to insert image into article. The image can't show in article body.   How do I insert the image into article? How can I repeat the header but not the caption with longtable? I am trying to set up a longtable where the header is repeated on every new page but the caption only appears once at the top of the page.  The table is defined as follows:  \begin{longtable}{|l|l|l|} \caption{the table caption} \label{tab:11swpkg}\\ \hline \rowcolor{gray} HeaderCol1 &amp; HeaderCol2 &amp; HeaderCol3\endhead     \hline\hline Item11 &amp; Item12 &amp; Item13 \\ \hline Item21 &amp; Item22 &amp; Item23 \\ \hline Item31 &amp; Item32 &amp; Item33 \\ \hline \end{longtable}   This nearly works because the header is indeed repeated after a page break but so is the caption. How can I get rid of the caption after a page break? Why does pdfTeX hang on this file? Could you please help me computing    $\Big\lfloor\underbrace{\sqrt{2017+\sqrt{2017+...+\sqrt{2017}}}}_\text{2017 roots}\Big\rfloor$? 24% tax on first pay in the UK? Quite a similar thread to others I've seen here - hope I'm not repeating the same questions again!   I just got my first payslip after arriving in the UK and noticed that the tax is far higher than the HMRC rate for my salary bracket.     I did some research but couldn't find any reason why I would be taxed at 24.23% of my gross this month AND then an additional amount for NI.    I have about £640 back pay from April that is only being paid now,but even so, it doesn't explain the rather large discrepancy between the HMRC rate and what I'm seeing here.   Any ideas? Failed upgrade from Ubuntu 19.10 to 20.04 "Please update the microcode" While installing the Ubuntu 20.04 updates during upgrade from 19.10 to 20.04, my screen suddenly went completely white and displayed a message saying  Please logout and try again.  But I could not locate my cursor and so I switched off my laptop. After restarting it again, it was showing an error message saying  Please update the microcode  Why did this happen? How can I solve this problem? Identify this YA book series about dragons, acid blood, and dangerously cold nights I'm trying to remember the name of a series of books about a boy who works with dragons.  Dragon's blood (or maybe it was slobber?) is acidic, and the children who wrangle these dragons often end up with deep pock marks.  On this world, days are like ours but nights get very cold, requiring anyone stuck outside to find a shelter until dawn (not the false dawn)  The other thing I remember is that in one of the books by slicing open a dragon and spending the night, the character emerged with special dragon powers. C++ handling very large integers I am using the RSA Algorithm for encryption/decryption, and in order to decrypt the files you have to deal with some pretty big values. More specifically, things like   P = C^d % n   = 62^65 % 133   Now that is really the only calculations that ill be doing. I have tried using Matt McCutchen's BigInteger Library, but I am getting a lot of compiler errors during linking, such as:  encryption.o(.text+0x187):encryption.cpp: undefined reference to `BigInteger::BigInteger(int)'  encryption.o(.text+0x302):encryption.cpp: undefined reference to `operator&lt;&lt;(std::ostream&amp;, BigInteger const&amp;)'  encryption.o(.text$_ZNK10BigIntegermlERKS_[BigInteger::operator*(BigInteger const&amp;) const]+0x63):encryption.cpp: undefined reference to `BigInteger::multiply(BigInteger const&amp;, BigInteger const&amp;)'   So I was wondering what would be the best way to go about handling the really big integers that come out of the RSA Algorithm.  I heard that a possibility would be to declare your variables as a double long, so...  long long decryptedCharacter;   but I'm not sure exactly how big of an integer that can store.    Well for example, I try to compile and run the following program using dev C++:  #include iostream  #include "bigint\BigIntegerLibrary.hh"  using namespace std;  int main() {     BigInteger a = 65536;     cout &lt;&lt; (a * a * a * a * a * a * a * a);     return 0; }   then I get those errors.  Derek, I thought that by including the BigIntegerLibrary.hh file, that the compiler would go through and compile all the necessary files that it will use.  How should I try and compile the program above in order to resolve the linking errors?