Top "Formatting" questions

The process of transforming text or data for presentation.

Remove trailing zeros from decimal in SQL Server

I have a column DECIMAL(9,6) i.e. it supports values like 999,123456. But when I insert data like 123,4567 it becomes 123,456700 How …

sql tsql sql-server-2008 formatting decimal
How to format a string as a telephone number in C#

I have a string "1112224444' it is a telephone number. I want to format as 111-222-4444 before I store …

c# string formatting phone-number
How to format a number as percentage in R?

One of the things that used to perplex me as a newby to R was how to format a number …

r formatting
How can I pad an int with leading zeros when using cout << operator?

I want cout to output an int with leading zeros, so the value 1 would be printed as 001 and the value 25 …

c++ formatting cout
Format a Go string without printing?

Is there a simple way to format a string in Go without printing the string? I can do: bar := "bar" …

string go formatting string-formatting
Using Python String Formatting with Lists

I construct a string s in Python 2.6.5 which will have a varying number of %s tokens, which match the number …

python string list formatting string-formatting
Eclipse: Set maximum line length for auto formatting?

I am working with Java. If I hit Ctrl+Shift+F in Eclipse Helios, it will auto format my code. …

java eclipse formatting ide
Set TextView text from html-formatted string resource in XML

I have some fixed strings inside my strings.xml, something like: <resources> <string name="somestring"> <…

html android formatting textview
Excel CSV - Number cell format

I produce a report as an CSV file. When I try to open the file in Excel, it makes an …

excel csv formatting number-formatting
Format XML string to print friendly XML string

I have an XML string as such: <?xml version='1.0'?><response><error code='1…

c# xml formatting