I know we can try and count the number of ways that they can add to 20, however this is much easier when there is only 2 or 3 dice. I believe there is a way to do this using combinations but I am not sure. I thought it was a stars and bars, so I wrote out  20 like -> 1 + 1 + 1 + 1 |+ 1 + 1 + 1 + 1| + 1 + 1 + 1 + 1 + 1 + 1 |+ 1 + 1 + 1 |+ 1 + 1 + 1  Which makes a 20 choose 4, however, this is over counting as each block of 1's can't be greater than 6 or less than 1.   Thanks for your help
I am trying to identify the general case algorithm for counting the different ways dice can add to a given number.  For instance, there are  with two 6-dice.  I've spent quite a bit of time working on this (for a while my friend and I were using Figurate numbers, as the early items in the series match up) but at this point I'm tired and stumped, and would love some assistance.  So far we've got something to this effect (apologies for the feeble attempt at mathematical notation - I usually reside on StackOverflow):  count(x):    x = min(x,n*m-x+n)    if x = n       1    else       some sort of (recursive?) operation   The first line simplifies the problem to just the lower numbers - where the count is increasing.  Then, if we're looking for the count of the minimum possible (which is also now the max because of the previous line) there is only one way to do that so it is 1, no matter the n or m.
Does Stack Exchange have an Economics section? Difference between '>' and '-gt' What's the difference between these:  SEC=$(mysql -hxxx -Pxxx -uxxx -pxxx -se "SELECT Seconds FROM tablename")  SEC=100   Both return the same result (100). But when I test it with:  if [ ${SEC} &gt; 1 ] then     echo "SEC GT 1" else     echo "SEC LT 1" fi   The first one returns:  "SEC GT 1"   The second one returns:  "SEC LT 1"   If however, I change it to:  if [ ${SEC} -gt 1 ]   then the result is reversed.  I'm assuming it's got something to do with the datatype, and that I presumbaly need to cast one or the other to get the same result.  It's just that at present it's messing up my testing, as I have to remember to change the IF section every time. Best way to remove an event handler in jQuery? I have an input type="image". This acts like the cell notes in Microsoft Excel. If someone enters a number into the text box that this input-image is paired with, I setup an event handler for the input-image. Then when the user clicks the image, they get a little popup to add some notes to the data.  My problem is that when a user enters a zero into the text box, I need to disable the input-image's event handler. I have tried the following, but to no avail.  $('#myimage').click(function { return false; }); Short connection at IAD (Dulles international airport) I am flying from New Orleans to Dulles (IAD) on United Express, and from IAD to Frankfurt on United. I have a short connection (45 minutes) in IAD.   I'm trying to figure out how can I make it:  Will I need to go throughout security and border check since I'm leaving the US? How big is IAD airport? and are there different terminals for domestic and international flights? If so, how long would it take to walk between them? TV identification: Short-lived TV show about a time traveller with a super-computer disguised as a credit-card It might have only been a pilot or a made for TV movie, but I remember a male time traveller who was for some reason in 90s US from a semi-distant future. He had in his possession a super-computer disguised as a regular credit card, which could hack things and I think spoke to him in a female voice.   Note: Not Quantum Leap - the time traveller and "credit card computer" might be keywords that people would hit upon, but 'Ziggy' the computer in QL was non-speaking, operated by a hologram and did not resemble a credit card - this one had its own voice and was disguised as a CC. An operator has closed range if and only if the image of some closed subspace of finite codimension is closed. Why not use tables for layout in HTML? It seems to be the  that tables should not be used for layout in HTML.   Why?  I have never (or rarely to be honest) seen good arguments for this. The usual answers are:   It's good to But this is a fallacious argument; . I guess it's true that using the table element for layout has little to do with tabular data. So what? Does my boss care? Do my users care?Perhaps me or my fellow developers who have to maintain a web page care... Is a table less maintainable? I think using a table is  than using divs and CSS.By the way... why is using a div or a span good separation of content from layout and a table not? Getting a good layout with only divs often requires a lot of nested divs. Readability of the codeI think it's the other way around. Most people understand HTML, few understand CSS. It's better for SEO not to use tablesWhy? Can anybody show some evidence that it is? Or a statement from Google that tables are discouraged from an SEO perspective? Tables are slower.An extra tbody element has to be inserted. This is peanuts for modern web browsers. Show me some benchmarks where the use of a table significantly slows down a page. A layout overhaul is easier without tables, see .Most web sites that need an upgrade need new content (HTML) as well. Scenarios where a new version of a web site only needs a new CSS file are not very likely. Zen Garden is a nice web site, but a bit theoretical. Not to mention its  of CSS.   I am really interested in good arguments to use divs + CSS instead of tables. In the 1960s I read book--an older children's book, I think--which I loved, and still remember, roughly.  I have no idea what the title is or who the author is, and I'm wondering if anyone knows this one:  Scientists had invented a device which they didn't fully understand, and which had puzzling effects.  For example, when a pencil was put into the machine, it disappeared, and then reappeared inside out: The lead was on the outside.  When people went into the machine, they came back dead, having died from fright.  Finally they sent a very open-minded person into the machine.  She was an artist, I think.  She was able to return alive, and described an alternate universe in which geometry was very different.  I distinctly remember that there were supposedly square triangles or four-sided triangles--or was it three-sided squares?  (This is, of course, a literally contradictory claim, but I didn't see the matter as clearly then.)  Thanks! What can I do to prevent passport stamps being put on blank pages? I'm running low on blank passport pages which are sometimes needed for full page visas such as those issued by Armenia, India, and Vietnam.  When I crossed the border into Turkey the other day I got my visa-on-arrival and stamp, but instead of putting it on a partly used page, which I have many, the guy at customs and immigration put them on a previously blank page. Now I have one fewer!  What can I do to prevent or at least reduce the chances of this happening?  It's worth remembering that there's likely to be a language barrier and it's always best to be ultra-nice to these border officials.  Has anybody heard of any trick such as sticking bit of paper in your passport, either blank, or looking a bit like visas? I have noticed that nobody ever stamps a page that has a remnant of something once stapled in there in Japan. There is a kind of stub that had its major part torn off along a perforation. Might I be able to emulate this somehow or would that even be worse making the blank pages invalid for full page visas due to having holes from staples? I know some things can get very picky when it comes to customs and immigration. Optional argument to \item I am typesetting an ordered list where the entries may appear out of order, but should be assumed in order otherwise. I don't want to have to jump through \setcounter hoops to do this. That is, I want something like  \begin{enumerate}   \item First   \item Second   \item[8] Eighth!   \item Ninth!   \item[4] Fourth \end{enumerate}   to give the following Good output, instead of the Bad output:    A minimum working example follows.  \documentclass{article} \usepackage{enumitem} % preferably something compatible with this guy \begin{document}  Good:  \begin{enumerate}   \item[1.] First   \item[2.] Second   \item[8.] Eighth!   \item[9.] Ninth!   \item[4.] Fourth \end{enumerate}  Bad:  \begin{enumerate}   \item First   \item Second   \item[8] Eighth!   \item Ninth!   \item[4] Fourth \end{enumerate}  \end{document}   It should be noted that I don't want to have to specify the period afterwards, in case my list using a different numbering, e.g. Roman. Compatibility with enumitem is preferred, but not required.  What is the correct way of going about this? Sorry for the title, it is not very evident and intuitive but I really do not how to tell it better...  Well, you know, several times, or better, many times, we use this form:  If I want to say:      "development of special weapons was   the first point in Hitler's   program..."   I will say this (a better form):      "special weapon development was..."   OK...  is it      "special weapon development"   or      "special weapons development" (note   the plural...)   what's the grammar rule in order to understand how to use this very used form? I have a Python program that uses the "threading" module. Once every second, my program starts a new thread that fetches some data from the web, and stores this data to my hard drive. I would like to use sqlite3 to store these results, but I can't get it to work. The issue seems to be about the following line:  conn = sqlite3.connect("mydatabase.db")    If I put this line of code inside each thread, I get an OperationalError telling me that the database file is locked. I guess this means that another thread has mydatabase.db open through a sqlite3 connection and has locked it. If I put this line of code in the main program and pass the connection object (conn) to each thread, I get a ProgrammingError, saying that SQLite objects created in a thread can only be used in that same thread.   Previously I was storing all my results in CSV files, and did not have any of these file-locking issues. Hopefully this will be possible with sqlite. Any ideas? Evaluate $\lim_{n\to \infty} \sum_{r=1}^n \frac {1}{2^r}\tan \left(\frac {1}{2^r}\right)$ Evaluate $$\lim_{n\to \infty} \sum_{r=1}^n \frac {1}{2^r}\tan \left(\frac {1}{2^r}\right)$$   I tried to create a telescoping sum but I couldn't. The last step I could reach was turning the limit into $$\lim_{n\to \infty} \sum_{r=1}^n \left(\frac {1}{2^r(1-\tan (2^{-r+1})} -\frac {1}{2^r(1+\tan (2^{-r+1})}\right) $$  But couldn't proceed further. Also I thought about Riemann sums but it was a pure dead end.  Any help would be greatly appreciated Show that the LU decomposition of matrices of the form $\left[\begin{smallmatrix}0& x\\0 & y\end{smallmatrix}\right]$ is not unique How can I show that every matrix of the form $\begin{bmatrix}0&amp; x\\0 &amp; y\end{bmatrix}$ has an $LU$ factorization and that even if $L$ is unit lower triangular there is not a unique factorization?  I am completely stuck. Any ideas would be greatly appreciated Are there any best practices for choosing the title of web pages? There are a lot of resources online oriented toward SEO, but not toward users.  My impression is that most sites have something similar to Product - Page. But there are cases when switching this around is more useful. For example, if mail clients displayed the title like this:  Inbox (3) - Gmail  Instead of:  Gmail - Inbox (3)  You would be able to see the message count, even if the title was cut off. (I'm pretty sure Gmail used to do this).  I assume the title is mostly ignored by users except when:   using boorkmarks finding the right tab in the browser   What are the considerations for users when choosing a web page title? Are there different considerations for the home page, pages behind a login, etc? StackExchange drop down hiding chat, blog and log out, concerns I'm trying to graph the function $y = \frac{x^2-4}{x-2}$.  I factored the numerator into $(x+2)(x-2)$, and then canceled the common factor (x-2), leaving the function as $y = x + 2$.    Is it acceptable to graph the original function as $y = x + 2$, a straight line with domain and range all real numbers?  Or do you have to restrict the domain as in the original function?  Thanks, Sean There is a $C > 0$ such that $\vert f(z)-f(w)\vert \leq C\vert z-w\vert$ for a holomorphic map into $B(0, R)$. Let $0&lt;\delta&lt;r$ and $R&gt;0$, and $a\in\mathbb C$. I want to show that there exists $C&gt;0$ such that for all holomorphic functions $f\colon B(a,r)\to B(0,R)$, we have $$ \vert f(z)-f(w)\vert\leq C\vert z-w\vert $$ for $z,w\in B(a,\delta)$.  I'm not sure how to approach this. I was wondering if I could use that $$ \left\vert\frac{f^{(n)}(a)}{n!}\right\vert\leq\frac{\Vert f\Vert_{C(a,\rho)}}{\rho^n} $$ for some $0&lt;\rho&lt;r$. I also have an expression from biholomorphic maps from $B(0,1)$ to itself, but I'm not sure if I could use that here. Any hints? releasing a second question concerning ordered stuff and set theory, which is very similar to my first question () which I'm putting here for reference.  The next problem that I'm stuck at in my book is this: we have an ordered triple $(a,b,c)$ and we want to define it using set theory. Why would $\{\{ a\} ,\{ a,b\} ,\{ a,b,c\}\}$ not work? The book requires from me to prove why it is not valid.  Additional info: I don't know how this matters but I'm gonna put it up anyhow. It is written within the book that the correct way to show it is $\{\{ a\} ,\{\{ a\} ,\{\{ b\} ,\{ b,c\}\}\}\}$  EDIT: Now, I consider that the correct case should matter. Besides pointing out why the first case is wrong I'm curious as to why the second one is correct What do you call the grouping of numbers based on the cardinality of digits in the square they produce?