In an application I load strings from configuration of this format stackoverflow.com?questionId={0}. Obviously they're populated at run-time and used in query strings.  I want to log these strings at startup using a method:  void log(string message, params object[] vars)         {             string s = String.Format(message, vars);             Console.WriteLine(s);         }   However as you would expect String.Format throws an exception because calling: log(String.Format("Adding new feed '{0}'", "stackoverflow.com?questionId={0}")) - String.Format tries to substitute {0} inside 'log()'.  Is there an easy way I can escape the { characters so substitution isn't attempted?
How can brackets be escaped in using string.Format? For example: String val = &quot;1,2,3&quot; String.Format(&quot; foo {{0}}&quot;, val);  This example doesn't throw an exception, but it outputs the string foo {0}. Is there a way to escape the brackets?
When is it OK to shrink a Database? I know shrink is the devil: It reverses page order and is responsible for skin cancer, data fragmentation, and global warming.  The list goes on... That being said, say I have a 100 GB database and I delete 50 GB of data -- not on one table, but a general pruning of old data on a database wide level, covering 90% of the tables -- does this constitute an appropriate use case for shrinking the database?  If not, what are the appropriate steps to take to clean house after removing such a high percentage of data from a database?  I can think of two: Rebuild Indexes and Update Stats. What else? Do spice containers need to be hermetic? Spice containers purchase  I'm planning on upgrading my spice storage. Reading some advice online (e.g. , and ) I came to the conclusion that spice containers should:   Not be exposed to direct sunlight and high temperatures Be airtight   Which means that either you store it inside of some closed cupboard/wardrobe/room or you have containers which do block light and are in a relatively shady place. And the containers need to be airtight.  Available solutions  I've been browsing for some containers available online in my country and the 2 most sensible options I've seen are these:       The problem  The first one is hermetic (it has some rubber around the lid) but it's clear glass. The other one does not have the rubber, just a regular twist-off lid, but it's amber glass.  It'll be hard for me to find any space inside of cupboards to store all of my spices (I need at least 30), so I'd rather buy amber glass container, which I believe will effectively block the sunlight, even when kept on the counter. But I can't find any hermetic amber-glass containers, only ones with regular lid.  The question  Is that regular twist-off lid enough to keep spices airtight and fresh? Or should I focus on buying a hermetic container (like the one in clear glass). I could then for example paint them black to block the sunlight. I'm creating an application which lets you define events with a time frame.  I want to automatically fill in the end date when the user selects or changes the start date.  I can't quite figure out, however, how to get the difference between the two times, and then how to create a new end Date using that difference. Python does not find packages installed without Anaconda Including the interaction but not the main effects in a model Where is the BIOS stored? From :     BIOS software is stored on a non-volatile ROM chip on the motherboard. ... In modern computer systems, the BIOS contents are stored on a flash memory chip so that the contents can be rewritten without removing the chip from the motherboard. This allows BIOS software to be easily upgraded to add new features or fix bugs, but can make the computer vulnerable to BIOS rootkits.   Since ROM means Read-Only Memory,  why can the BIOS contents be rewritten?  Does the "flash memory chip"  mean the same as the "non-volatile ROM", both meaning where BIOS is stored? I'm looking to get that from a graph. but problem is that graph is in image form. Now I want to extract data in excel from that graph. how can i do it? I'm using office 2003. Coming from a java background, one of the things I am used to is telling the JVM what the maximum heap size should be.  If the running program tries to swallow more than is allowed, and the garbage collector cannot free any more resources, then OutOfMemoryError is thrown and it all goes bang.  So setting the maximum heap size is important in Java.  Does this apply in .net?  Can you set the heap size limits?  Does the CLR just keep growing its heap until it reaches the machine's physical limits?  Or is it not an issue in .net for some subtle reason that my Java blinkers stop me from seeing? How do I fix gaps around my lean-to greenhouse? Should I be able to 'manually' rotate the headset? I am trying to display certain features in a shapefile-based layer using QGIS. I have found the subset function in the properties panel, which does exactly what i want, but is too tedious given that I have to manually sift through a large number of features. Is there a quicker way to do this?  I am using both shapefiles and postGIS best,  dietmar Is there a Google Drive client available? How to integrate $\int x^2 \sin^2(x)dx$ I don't know how to integrate $\int x^2\sin^2(x)\,\mathrm dx$. I know that I should do it by parts, where I have  $$ u=x^2\quad  v'=\sin^2x \\  u'=2x \quad v={-\sin x\cos x+x\over 2}$$  and now I have  $$ \int x^2\sin^2(x)\,\mathrm dx = {-\sin x\cos x+x\over 2} x^2 - \int 2x{-\sin x\cos x+x\over 2}\,\mathrm dx\\ ={-\sin x\cos x+x\over 2} x^2 - \int x(-\sin x\cos x+x)\,\mathrm dx\\  $$  so I have to calculate $$ \int x(-\sin x\cos x+x)\,\mathrm dx=-\int x\sin x\cos x\,\mathrm dx+\int x^2\,\mathrm dx$$  I know that $\int x^2\,\mathrm dx = {1 \over 3}x^3+C$ but I don't know what should I do with $$\int x\sin x\cos x \,\mathrm dx$$ Should i use parts again or what? Please help. How can I change the font of the top bar without changing the shell theme? I am using Ubuntu GNOME 17.04. I want to change the font of the GNOME top bar from the default font by Adapta to Fira Sans. I already have all the fonts, I just want to change the font of the top bar so it doesn't look out of place compared to everything else. What really allows airplanes to fly? What aerodynamic effects actually contribute to producing the lift on an airplane?  I know there's a common belief that lift comes from the Bernoulli effect, where air moving over the wings is at reduced pressure because it's forced to travel further than air flowing under the wings. But I also know that this is wrong, or at best a minor contribution to the actual lift. The thing is, none of the many sources I've seen that discredit the Bernoulli effect explain what's actually going on, so I'm left wondering. Why do airplanes actually fly? Is this something that can be explained or summarized at a level appropriate for someone who isn't trained in fluid dynamics?  (Links to further reading for more detail would also be much appreciated) Let $K$ be a field and $f \in K[x]$ a polynomial of degree $n&gt;0$. Assume that $E$ is an extension of $K$ such that $f$ can be expressed as a product of linear factors over $E$:  $$f(x)=\gamma (x-\alpha_1)(x-\alpha_2)\dots(x-\alpha_n).$$  I want to show that $\lvert K(\alpha_1,\dots,\alpha_2) : K \rvert$ is a divisor of $n!$. I also want to show that if $\lvert K(\alpha_1,\dots,\alpha_n): K \geq (n-1)!$ then $f$ is irreducible over $K$ or $f$ already has a root in $K$.  The problem has a hint. It says: "Use induction on $n=\deg f$. If $f=gh$ in $K[x]$ with $\deg g =r$ and $\deg h=n-r$, then $r!(n-r)!$ is a divisor of $n!$.  Any idea for solving this problem would be appreciated. How I can recover files when the folder shows empty but the files are not deleted? Where do ultra-high-energy cosmic rays come from? Physicists have detected an amazing variety of energetic phenomena in the universe, including beams of particles of unexpectedly high energy but of unknown origin. In laboratory accelerators, we can produce beams of energetic particles, but the energy of these cosmic rays far exceeds any energies produced on Earth. So my question is, from where do these  come from? I really can't understand what Leonard Susskind means when he says in the video  that information is indestructible.  Is that information that is lost, through the increase of entropy really recoverable?   He himself said that entropy is hidden information. Then, although the information hidden has measurable effects, I think information lost in an irreversible process cannot be retrieved. However, Susskind's claim is quite the opposite. How does one understand the loss of information by an entropy increasing process, and its connection to the statement “information is indestructible”.  Black hole physics can be used in answers, but, as he proposes a general law of physics, I would prefer an answer not involving black holes. Is the harmonic oscillator potential unique in having equally spaced discrete energy levels? I was wondering if the good old quadratic potential was the only potential with equally spaced eigenvalues. Obviously you can construct others, such as a potential that is infinite in some places and quadratic in others, but that's only trivially different. I am not referring to equally spaced as a limiting behavior either, I mean truly integer spaced.  Any ideas? If not, is there a proof for its uniqueness?  If there are other potentials with equally spaced eigenvalues, can one use them as starting points for a free-field QFT? It would be interesting to know if there is a deeper mathematical relation between all of these potentials and whether they could be used to study interacting systems.