I was wondering if there is a plugin/tool for SQL Server Management Studio that will format your SQL?
I'm working with some large-ish stored procs that are a mangled mess of poorly formatted SQL and it'd be nice if I could just go "Select All -> Format SQL"
...
How can I achieve the following with a format string: Do 01.01.2009 ?
It has to work in all languages (the example would be for Germany). So there should only be the short weekday and then the short date.
I tried 'ddd d' (without the '). However, this leads to 'Do 01'.
Is there maybe a character I can put before the 'd' so that it is tr...
I am writing an application where one of the features is to allow the user to write an email template using Markdown syntax.
Besides formatting, the user must be able to use placeholders for a couple of variables that would get replaced at runtime.
The way this is currently working is very simple: the templates have the Pythonic %(var...
I have a DateTime class and wish to display it according to some format... in this case, I specifically want to format it as YYYYMMDD format.
What's the best C#/.NET API function for doing this?
...
By default eclipse indents with a hard tab character, how do I change it to spaces?
...
(Almost exact duplicate of http://stackoverflow.com/questions/408469/keeping-original-format-post-passing-through-awk submitted by same person.)
I have a simple question pertaining to gawk, illustrated below:
1 int blah (void)
2 {
3 if (foo) {
4 printf ("blah\n");
5 }
6 return ...
In my C# application, I use a regular expression to validate the basic format of a US phone number to make sure that the user isn't just entering bogus data. Then, I strip out everything except numbers, so this:
(123) 456-7890 x1234
becomes
12345678901234
in the database. In various parts of my application, however, I would l...
I am constantly forgetting what the special little codes are for formatting .NET strings. Either through ToString() or using String.Format(). Alignment, padding, month vs. minute (month is uppercase M?), abbreviation vs. full word, etc. I can never remember.
I have the same problem with regexes, but luckily there's Expresso to help me o...
I want to format an int as a currency in C#, but with no fractions. For example, 100000 should be "$100,000", instead of "$100,000.00" (which 100000.ToString("C") gives).
I know I can do this with 100000.ToString("$#,0"), but that's $-specific. Is there a way to do it with the currency ("C") formatter?
...
I have long recognized that any set of whitespace in an HTML file will only be displayed as a single space. For instance, this:
<p>Hello. Hello. Hello. Hello. Hello.</p>
displays as:
Hello. Hello. Hello. Hello. Hello.
This is perfectly fine, as if you need multiple spaces of...
Or, to be more clear, how can I format a block of text (in my case, to be included within a tooltip) such that some portions of the text come from bound values.
In plain C# I would use:
_toolTip.Text = string.Format("{1:#0}% up, {2:#0}% down",
Environment.NewLine, percentageOne, percentage2);
However the WPF XAML markup for a Tex...
In Vim emulation mode (viper + vimpulse) << and >> are working similarly to Vim's. I would just like them to indent with 2 spaces. How do I do that? (I know, trivial. But useful)
...
Is there a clean way to format a DateTime value as "Oct. 10, 2008 10:43am CST".
I need it with the proper abbreviations and the "am" (or "pm") in lower case etc etc.
I've done it myself but it's ugly so I'm looking for a different take on it.
Thanks.
...
How do you format correctly according to the device configuration a date and time when having year, month, day, hour and minute?
...
Hi, first time SO user :)
I know that I can format a number like this:
format-number($value, '###,###.00')
But I would like to remove the dot and the zeroes if $value is zero.
So,
37368 -> 37,368
2.666667 -> 2.66
Is this possible using just number formatting (doesn't seem like it) or do I have to do something along the lines of
...
Does an auto-formatting tool exist for vi that'll allow me to define per language preferences?
edit: I'm not looking for syntax highlighting. I'm looking for something that will apply formatting rules to my code. (Like brace positioning, spaces around oeprators, etc)
...
How can I get users local decimal separator character from GWT. I have found the NumberFormat utility, which only returns the whole format and provides parsing.
NumberFormat.getDecimalFormat()...
Is there a (simple) way to get the decimal separator, thousand separator from the decimal format.
...
I want to have a standard method of formatting "Show More" links in my HTML pages.
In HTML I use:
<span class="showMore">Show more details</span>
Then in the css, I have:
.showMore {color: #0E4B82; padding-left: 18px; background:url("images/icons/add.png") no-repeat 0px 0px;}
.showMore:hover {color:#F5891D; cursor: pointer; }
wher...
I'm looking for a routine that will format a string of numbers as a UK phone number. The routine should account for UK area codes that require different formatting (i.e. London compared to Edinburgh compared to Worcester) as well as mobile numbers.
My phone numbers are stored in the database as strings, containing only numeric character...
The HTML formatting in Visual Studio works great -- especially considering you can pick a selection and just format that. You can just select a tag or block, right click and do 'Format Selection'. You can also reformat the whole document.
However I like to use a lot of whitespace in my documents to keep things organized and the reformat...