Is there any difference between writing the following two? The code is for C#  String S1 = "The " + Item.Name + " is made of " + Item.Property + " and is at " + Item.Durability + "% durability."   against  String S2 = "The {0} is made of {1} and is at {2} % durability.", Item.Name, Item.Property, Item.Durability   ? Assuming that item is populated with, for instance, name of Axe, property of Steel, and durability of 50 as a string.
Let's say that you want to output or concat strings. Which of the following styles do you prefer?   var p = new { FirstName = "Bill", LastName = "Gates" }; Console.WriteLine("{0} {1}", p.FirstName, p.LastName); Console.WriteLine(p.FirstName + " " + p.LastName);   Do you rather use format or do you simply concat strings? What is your favorite? Is one of these hurting your eyes?  Do you have any rational arguments to use one and not the other?  I'd go for the second one.
How to reinstall Ubuntu in dual boot with Windows 10? I have Ubuntu 15.10 and Windows 10 dual-booted, but I want to reinstall Ubuntu in the same partition without making any changes or causing problems in the dual boot option and without removing Windows.  Is it possible? Any guide on how to do it? Prove: $\displaystyle\sum_{k=1}^n k k!=(n+1)!-1$ (preferably combinatorially)   It's pretty easy to think of a story for the RHS: arrange $n+1$ people in a row and remove the the option of everyone arranged to height from shortest to highest, but it doesn't hold up for the LHS.   Alternatively, trying to visualize the LHS, I noticed that it's like a right angle tetrahedra:  1  2!+2!  3!+3!+3!  ...  But it doesn't help to see a connection to the RHS.  Note: no integrals or gamma function nor use of other identities without proving them nor generating functions. For example:  "Last week, I found out that NASA stands for 'National Aeronautics and Space Administration.'"  or  "Last week, I found out that NASA stood for 'National Aeronautics and Space Administration.'" Comparing object properties in c# This is what I've come up with as a method on a class inherited by many of my other classes. The idea is that it allows the simple comparison between properties of Objects of the same Type.  Now, this does work - but in the interest of improving the quality of my code I thought I'd throw it out for scrutiny. How can it be better/more efficient/etc.?  /// &lt;summary&gt; /// Compare property values (as strings) /// &lt;/summary&gt; /// &lt;param name="obj"&gt;&lt;/param&gt; /// &lt;returns&gt;&lt;/returns&gt; public bool PropertiesEqual(object comparisonObject) {      Type sourceType = this.GetType();     Type destinationType = comparisonObject.GetType();      if (sourceType == destinationType)     {         PropertyInfo[] sourceProperties = sourceType.GetProperties();         foreach (PropertyInfo pi in sourceProperties)         {             if ((sourceType.GetProperty(pi.Name).GetValue(this, null) == null &amp;&amp; destinationType.GetProperty(pi.Name).GetValue(comparisonObject, null) == null))             {                 // if both are null, don't try to compare  (throws exception)             }             else if (!(sourceType.GetProperty(pi.Name).GetValue(this, null).ToString() == destinationType.GetProperty(pi.Name).GetValue(comparisonObject, null).ToString()))             {                 // only need one property to be different to fail Equals.                 return false;             }         }     }     else     {         throw new ArgumentException("Comparison object must be of the same type.","comparisonObject");     }      return true; } Most riders seem to say it's their groin, neck or lower back that starts hurting first after a decent distance has been ridden. For me it is my wrists.  I have no history of wrist pain (strains, breaks etc) so it can't be explained by that and I try to adjust my hand positions across my handlebars as often as I can.  My question has 2 parts:   1. Is there anything I can do to minimise pain in terms of riding position, gloves, exercises etc which will reduce soreness?  2. Why might this pain be occurring?  *I do all of my riding on paved roads on a road (Specialized Allez) bike. Is it now considered acceptable to follow a proper noun ... or any noun ... with a pronoun? E.g.      The President he issued a new executive order. Welcome back message suggests to upvote questions and answers even when questions are locked I just opened a URL to a question on programmers.SE and got the message:     But the question was locked, so I couldn't do what it asked me to do.  I consider this to be a very minor edge case bug and it's likely not worth investing developer time into it. But since this  I guess it's worth reporting even if it's just for making you aware of it. I am doing some challenges. This is one them. I am trying to brute-force 4 digit pin with the password to get my desired answer. After connecting to the port It prompts me to enter the password then space then 4 digit pin. I tried to brute-force the pin using the script:  #!/bin/bash   nc localhost 30002   sleep 2    for i in {0000..9999};       if [[ $(echo 'UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ $i' &lt;/dev/stdin) = ^Wrong*]];                         then          continue       echo '[+] Pincode Cracked! Pincode = $i'       fi   done  but it seems that this doesn't input the pass and pin to stdin, before i tried doing something like this -&gt; if [[ $(echo 'UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ $i') = ^Wrong* ]]; What am I doing wrong here? UPDATE: Okay, so after researching around. I wrote this: for i in {0000..9999} do     if [ (echo &quot;UoMYTrfrBFHyQXmg6gzctqAwOmw1IohZ $i&quot; | nc localhost 30002 | grep -o Wrong) == &quot;Wrong&quot; ]    then       sleep 0.1       continue    fi    echo &quot;- - - - - - - - - - - - - - - - - - - - - - - - [$i]&quot; done  This might even work but as you can see it opens new connections in the loop which makes it really slow and exhaust the system. Presentation of SL$(n,\mathbb{Z}_p)$ Encode/Decode URLs in C++ Does anyone know of any good C++ code that does this? Looking for a SF story regarding women growing things in their wombs I'm looking for the title and author of a short story or novelette that I read quite some time ago.   The main characters are two young women. One is taking correspondence courses, and is constantly being berated by the other one for hoping to rise above her station. They go out to pick up young men, to sleep with them, to get pregnant.  It's not a normal sort of pregnancy, though. The men have some sort of 'coded semen' which grow something other than a child in the woman's womb. It ends up being a product of some kind, which earns the woman money when it is 'born'. The one woman is very careful about who she chooses, as she can only do this so many times. The other... isn't so careful.   At the end, the careful, studious woman achieves what she has been working for - a letter from a government organisation that permits her to become the mother to a human being.  Thank you for reading my question. I've been looking for this story for years, now. Integral of $ 1 \, / \, (1 + a \, \cos(x) )$ Attributing contributions to academic work that occur in Stack Exchange A friend of mine misplaced his passport while staying in Jeju island. Normally I would advise him to just travel to Seoul, get an emergency passport from his embassy and fly back home without issues, but I know that Jeju island has a special immigration regime.   Are there any immigration checks on the way from Jeju island to Seoul? If not, can one travel that route without a passport? Unexpected gaps in IDENTITY column If $|G| = pq$,  $p,q$ primes, $p \gt q, q \nmid p-1 $, then how do I prove $G$ is cyclic without using Sylow's theorems? The latex file coding is not there but the pdf file is there I wrote all my coding in the .tex file. The next day when I opened it the coding is all gone and the pdf file is opening with it and is displayed as an output. How do I bring back my coding? Answers no longer sorted by score/votes For me at least,  has answers that are not sorted by score:    Is this normal?  I've tried refreshing the page a few times, but the order doesn't change... How to redirect and append both stdout and stderr to a file with Bash? Stein's lemma condition (Apologies if I break some conventions, this is my first time posting!)  I am working on proving Stein's characterization of the Normal distribution: for Z $\sim N(0,1)$ and some differentiable function $f$ with $E[|f'(Z)|] &lt; \infty$, $$E[Zf(Z)] = E[f'(Z)]$$ Writing the LHS expression in integral form and integrating by parts, I eventually obtain: $$E[Zf(Z)] = \frac{1}{\sqrt{2\pi}} \left[ -f(z) \cdot \exp \left\{ \frac{-z^2}{2} \right\} \right] \Bigg|_{-\infty}^{\infty} + E[f'(Z)]$$ Now I need to show that the first expression on the right hand size is zero. Intuitively, this seems clear because of the exponential term, but I am having trouble explicitly applying the condition on $f'$ to prove this rigorously. Any ideas?