I want to retain the leading "00" when a value is incremented by one,below val has "00349",when i increment and print it becomes 350,how to print as 00350 retaining the leading "00"  val = 00349 val = val + 1 print val --&gt;prints as 350,i want to print as 00350
What is a Pythonic way to pad a numeric string with zeroes to the left, i.e. so the numeric string has a specific length?
I never really bothered to keep my Hotmail contact information up to date, so now that I connected it to Windows 8, suddenly I see all this outdated contact information or people I've long stopped talking to.    I don't see any buttons or options where I can click to delete someone.  So how do I clean up my Windows 8 People app and remove these contacts? I was working on a tower and painted my own texture for it. I saved halfway though and took a break. When I returned to my little project, I could paint on the image and it shows up in the material view but not the render. I did everything in my power but still couldn't understand why?  I have used:   Nodes, including mapping and insert UV coordinates. Unwrap UVs Used lights Deleted and replace nodes Deleted and replace Mat Removed image and replace it Reload image Painted on mesh   Even though use blender, I am not a programmer. So I find it really helpful if someone could give me an answer. Your summary page shows "N Edits to your posts" for the selected time period but you really have to be looking for it.  Could we add edits to the notification feed? You could put the reason for the edit (entered--or not--when the editor changes it) and just a link to the post. Mobile web refresher, part 3 Sum of two uniform random variables A linear operator commuting with all such operators is a scalar multiple of the identity. My book uses the argument that the multiplicities of a few macrostates in a macroscopic object take up an extraordinarily large share of all possible microstates, such that even over the entire lifetime of the universe, if each microstate had an equal chance of being accessed, fluctuations away from equilibrium would never occur.  My question to this statistical proof is this: In the real world, is there really an infinitesimal but nonzero chance that macroscopic systems could access some of the more unlikely macrostates (e.g. heat transfer from a cold object to a hot object)? Left ideals of $M_n(K)$ Prove that $\sqrt[n]{n!}$ is increasing and diverges I have to prove that $a_n$ is (strictly) increasing and diverges  $a_n = \sqrt[n]{n!}$ ;  n $\in$  $\ \mathbb{N}$  From sequence I see that $a_n$ increasing to infinitive.  $\sqrt[1]{1!}=1 ,\  \sqrt[2]{2!} \approx 1.41, \  \sqrt[3]{3!}  \approx 1.81 ,...,  \sqrt[n]{n!} $ $|A \cup B| = \mathfrak{c}$, then $A$ or $B$ has cardinality $\mathfrak{c}$. PHB says 'once per turn,' so, it would seem that a Rogue with Sentinel, for example, could "consistently" deal Sneak attack twice per round (whether the enemy triggers an OA or the melee weapon attack provided by the Feat).  So, can rogues deal sneak attack damage with any weapon attack outside their turn? (obv. one that meets the standard requirements--finesse, adv or adj ally) I keep seeing custom flags in the queue from question askers who are incredibly irritated because there is a big, prominent box at the top of their question. It's just a list of other questions which may have the answer they desire, and is only even displayed to them because the question is not closed yet.  This question may already have an answer here: [list]  But to an ordinary user, it is not at all clear that the box is only shown to them, or that it will go away on its own if their question never actually gets closed. Could the text for this notice be altered to make it more clear that:  They are just suggestions for the person to view. Potentially if they agree with one, they should vote to close their own question as a duplicate of it.  Their question is not closed yet. If they disagree with the duplicates suggested, they should clarify their question and explain why it's not a duplicate.   I was thinking of an altered wording such as:  You might be able to find an answer to your question here: [list] If those answers do not fully address your question, please [edit your question] to clarify your exact problem.  I went with a more direct wording for the bolded title. Since the notice is only displayed to the asker, it makes more sense to talk directly to them in the message rather than making it feel like it's supposed to be addressing the entire audience of the site. Emphasize that only that person is seeing it by talking to them. It would also be helpful to append a &quot;More info&quot; link at the end of the message that links them to some further documentation about duplicates, and explains how the notice works - particularly that it will go away eventually or change to a proper duplicate notice if the question does get closed. Implementing i18n string translation in a custom module? I have a custom module I've built which essentially acts as a repository of custom CTools keywords that users can arbitrarily define. The issue I'm facing is I need to be able to translate these user-defined strings, so I think I need to implement string translation using the i18n_string module.  I have never worked with translation or localization before, so I'm a bit lost with regards to going about how to implement this. I think I'm on the right path with i18n_string though. Can someone experienced with i18n provide examples that I can look at so I can learn the proper way to implement this? Probability to choose specific item in a "weighted sampling without replacement" experiment Given $n$ items with weight $w_n$ each -- what is the probability that item $i$ is chosen in a $k$-out-of-$n$ "weighted random sampling without replacement" experiment? Can a closed-form solution that depends only on $w_i / w_\cdot$ be derived ($w_\cdot = \sum_j w_j$.)?   EDIT: A solution that depends only on $w_i / w_\cdot$ is impossible. Assume $n=3$, $i=1$, $w_1 = 1$, and two cases: (1) $w_2 = 1, w_3 = 1 + \varepsilon$, (2) $w_2 = 2, w_3 = \varepsilon &gt; 0$. In case (1) the probability is almost $2/3$, in case (2) it is almost $1$, but in both cases $w_1 = 1$ and $w_\cdot = 3 + \varepsilon$.  What I have tried so far to solve the problem:  Let $P^n_k(w, i)$ be the probability that item $i$ is chosen in an $k$-out-of-$n$ experiment with weight vector $w$. In the first draw, the item is chosen with probability $w_i / w_\cdot$. Otherwise, we are looking for the probability to choose this item in a $k-1$-out-of-$n-1$ experiment, with the same weight vector except for the item that has been selected. Hence:  $$ P^n_k(w, i) = w_i / w_\cdot + \sum_{j \neq i} w_j / w_\cdot \cdot P^{n-1}_{k-1}(w - j, i) $$ $$ = w_\cdot^{-1} \left( w_i + \sum_{j \neq i} w_j \cdot P^{n-1}_{k-1}(w - j, i) \right) $$  with $w-j$ being "the vector $w$ without the $j$th element".  How to solve this recurrence relation? (If it is correct at all...) Compact operators on an infinite dimensional Banach space cannot be surjective I am reading a book about functional analysis and have a question:      Let $X$ be a infinite-dimensional Banach-space and $A:X \rightarrow X$ a compact operator. How can one show that $A$ can not be surjective? How do I free up more space in /boot? Objective-C for Windows What would be the best way to write Objective-C on the Windows platform?  Cygwin and gcc? Is there a way I can somehow integrate this into Visual Studio?  Along those lines - are there any suggestions as to how to link in and use the Windows SDK for something like this. Its a different beast but I know I can write assembly and link in the Windows DLLs giving me accessibility to those calls but I don't know how to do this without googling and getting piecemeal directions.  Is anyone aware of a good online or book resource to do or explain these kinds of things? Chance of selecting the last k pages in correct order from a set of n pages I have a set of documents numbered 1 to n. If I arrange the documents randomly, what is the chance of selecting the last k pages in the correct order if I select them at random from the documents?   Because order is important, I use the following formula:  $\displaystyle\frac{n!}{(n-k)!}$  From this I calculate how many ways there are to select k pages from n pages in the correct order. I need to have the last k pages. Which I can do in only one way. So is the chance   1/$\displaystyle\frac{n!}{(n-k)!}$?   It seems unlikely. It seems to me spontaneously that the chance should be smaller. Text not very readable on different image backgrounds I've come here seeking for a bit of design help or advice on how I could possibly improve the following:  Like the title says, I'm having a website banner with multiple text displayed on different images as backgrounds. Now, since most of the images are dark, I've set the font color as white. But even then, some of the text is not very readable on a couple of images like:    Since I'm working with CSS, I've tried different options such as:  Adding Text Shadows:    CSS:  text-shadow: 3px 3px 0px #000;  Also tried, creating a semi-transparent box around the text:      I feel the box one looks out of place.  I've created a  for anyone who knows CSS. If not, please feel free to advice me based on your imagination alone.  PS: You could also advice on using a different font if that would help it stand out better. How to Regex search/replace only first occurrence in a string in .NET? It seems the .NET Regex.Replace method automatically replaces all matching occurrences.  I could provide a MatchEvaluator delegate that returns the matched string after the first replacement, rendering no change, but that sounds very inefficient to me.  What is the most efficient way to stop after the first replacement?