I'm making a program that tells the day of the week for any date in the past or future. In order to split the 4-digit year into the first 2 numbers for century and last 2 numbers for year in order for the formula to work right I used the following 2 lines of code: Int  y = yANDc / 100; Int c = yANDc % 100;  The problem is when I display the final output. If they typed in a 4-digit year between "xx00" and "xx09", it chops off any preceding "0"s. So, if they entered "2009", the final output would be written as "209".  Any ideas on how to fix this and format it to where it doesn't drop preceding "0"s?
How do you left pad an int with zeros when converting to a String in java?  I'm basically looking to pad out integers up to 9999 with leading zeros (e.g. 1 = 0001).
extended stars-and-bars problem(where the upper limit of the variable is bounded) I know that there is no vector space having precisely $6$ elements. Does every set have a group structure? Usage of Some: Does "some" require a plural or singular verb? In the search results of stackexchange.com/search?q=*, allow people to click on a tag and go to that website with the tag page open.   For example,  shows me this:        But clicking on the hovered-on tag takes me to  and the panda.   Instead, it should take me to    The math.SE URL is already there in  /#question-summary-608993 &gt; div.summary &gt; div.started.fr &gt; a #question-summary-608993 &gt; div.hot-question-site-icon &gt; a Are there specific techniques/filters for snowscapes? Why do airplanes experience negligible Coriolis force while bullets experience the Coriolis force in long range shooting, even though the mass of airplane is much bigger than a bullet? How can I tell what RAM will fit my computer? If I want to add more RAM to my computer, how can I buy something compatible? What kinds are there? How do I determine which kind my computer will accept and how much I can add? restore table from .frm and .ibd file? I have previously saved a copy of /var/lib/mysql/ddms directory ("ddms" is the schema name). Now I installed a new MySQL on a freshly installed Ubuntu 10.04.3 LTS by running apt-get install mysql-server, I believe version 5.1 was installed. After I copy the ddms directory under /var/lib/mysql, some of its tables work fine, these are the tables with an associated set of three files: a .frm file, a .MYD file and a .MYI file.  However, there are two tables with a different set of files: a .frm file and a .ibd file. These two tables didn't show up in the table list in phpMyAdmin. When I look at the error log, it says:  [ERROR] Cannot find or open table ddms/dictionary_item from the internal data dictionary of InnoDB though the .frm file for the table exists. Maybe you have deleted and recreated InnoDB data files but have forgotten to delete the corresponding .frm files of InnoDB tables, or you have moved .frm files to another database? or, the table contains indexes that this version of the engine doesn't support.   Please help with restoring these two tables. Thanks. Can we have a list of all the Stack Exchange domains somewhere, for firewall purposes? Limit of $\lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{\sqrt {n^2 +i} }$ $E$ is a measurable set of finite measure and $1 \le p_{1} &lt; p_{2} &lt; \infty$. Consider the linear space $L^{p_{2}}(E)$ normed by $||.||_{p_{1}}$. Is this space Banach? Why sum of two little "o" notation is equal little "o" notation from sum? Why sum of two little "o" notation is equal little "o" notation from sum?  $o( f(n) ) + o( g(n) ) = o( f(n) + g(n) ) ?$  For example:   $f(n) = n^3$  $g(n) = 1/n$   so    $o(f(n)) = n^2$  $o(g(n)) = 1/n^2$   and    $o( f(n) ) + o( g(n) ) = n^2 + 1/n^2$ $o( f(n) + g(n) ) = n^2$   Of course, I could write it like   $o( f(n) ) + o( g(n) ) = n^2 + o( g(n) )$ $o( f(n) + g(n) ) = n^2 + o( g(n) )$   My question is why? I don't understand it, because in first we always get two parameters. Getting a credit card exclusively for the sign-up bonus There are quite a few credit cards with exceptional sign-up bonuses (and then fairly average terms). If I signed up for one, fulfilled the spending conditions for the signup bonus, used that bonus, paid off the card and then cancelled it immediately after, would there be a significant impact on my credit history?  I suppose it would divert spending away from my primary credit card (the one I never close), which would reduce slightly the spending history I have on that card. Essentially, the record of my spending on these auxiliary cards would be erased when those cards were canceled. But is there a penalty to my credit score for closing a card beyond the loss of history that was on the closed card? In the NEW CANON why don't the Rebels abandon Yavin 4 before the Death Star Arrives? Matrix Group induction proof and order of elements question How can I echo a newline in a batch file? How can you you insert a newline from your batch file output?  I want to do something like:  echo hello\nworld   Which would output:  hello world How do I select an object in the 3D viewport? Does the condition $\lim\limits_{n\to\infty}\frac{a_{n+1}}{a_n}=1$ imply that $a_n$ convergent?  When I say convergent I mean to $L\in \mathbb{R}$ or to $\infty$ or to $-\infty$  I have a gut feeling this statement is false, just can't find a series which contradicts it.  Thanks a lot Simple enough question: is there some shell command (or GUI method) I can use that, given the path to a file on my system, tells me what package put it there? Assuming the file did in fact come from a package, that is.  Bonus question: what if it's a file that isn't installed on my system? Is there, say, a website that will let me look up a file and see what packages, if any, provide it? $p = x^2 + xy + y^2$ if and only if $p \equiv 1 \text{ mod }3$?