formatting

SQL 2005 For XML Explicit - Need help formatting

I have a table with a structure like the following: ------------------------------ LocationID | AccountNumber ------------------------------ long-guid-here | 12345 long-guid-here | 54321 To pass into another stored procedure, I need the XML to look like this: <root><clientID>12345</clientID><clientID>54321</clientID></root> The...

Numerical formatting using String.Format

Are there any codes that allow for numerical formatting of data when using string.format? ...

What is best blogging host for programmers/code formatting?

I was just reading how can you tell whether you're ready to start your own blog. The answers are so good and inspiring that I made rush to start my own blog using blogger and stopped right in my tracks. I looked on the menu bar as I was creating my first post, and duh, there's no nice "code sample" formatting option like the one on Sta...

Formatting text in WinForm Label

Is it possible to format certain text in a WinForm Label instead of breaking the text into multiple labels? Please disregard the HTML tags within the label's text; it's only used to get my point out. For example: Dim myLabel As New Label myLabel.Text = "This is <b>bold</b> text. This is <i>italicized</i> text." Which would produce ...

What do you (or your company) use for wiping a machine?

I have two computers, and I'm thinking about getting rid of one of them, but I want to make sure that it's clean of anything of mine before doing so. What have you used or does your company use for this purpose? ...

Javascript Beautifier

I am looking for a code beautifier that supports javascript and works on both windows and linux and can be used in batch scripts. Any recommendations? ...

Is there an automatic code formatter for C#?

In my work I deal mostly with C# code nowadays, with a sprinkle of java from time to time. What I absolutely love about Eclipse (and I know people using it daily love it even more) is a sophisticated code formatter, able to mould code into any coding standard one might imagine. Is there such a tool for C#? Visual Studio code formatting (...

What are generally accepted code formatting guidelines?

According to McCall's Quality Model, Product Revision is one of the three main perspectives for describing the quality attributes of a software product. Under the Product Revision perspective, maintainability, the ability to find and fix a defect, is identified as a key quality factor that impacts the ability to revise the software. Cle...

Displaying XML data in a Winforms control

I would like to display details of an xml error log to a user in a winforms application and am looking for the best control to do the job. The error data contains all of the sever variables at the time that the error occurred. These have been formatted into an XML document that looks something to the effect of: <error> <serverVaria...

Visual Studio 2005/2008: How can you share/force all developers to use the same formatting rulles?

I would like to have all developers on my team to use the same rules for formatting several types of code (ASPX, CSS, JavaScript, C#). Can I have visual studio look to a common place for these rules? I would like to not rely on export/import settings as that brings many settings along. I (for example) don't care what font colors the d...

How can I get markdown to format this code properly ?

Here is some code I could not get to format properly in markdown, this is straight C code, pasted into the text box with the '4 spaces' format to denote code: #define PRINT(x, format, ...) \ if ( x ) { \ if ( debug_fd != NULL ) { \ fprintf(debug_fd, format, ##__VA_ARGS__); \ } \ else { \ ...

Add alternating row color to SQL Server Reporting services report

How do you shade alternating rows in a SQL Server Reporting Services report? Edit: There are a bunch of good answers listed below--from quick and simple to complex and comprehensive. Alas, I can choose only one... ...

How do I force unix (LF) line endings in Visual Studio (Express) 2008?

Is there a way to always have LF line endings in Visual Studio? I can never seem to find it! ...

Sprintf equivalent in Java

Printf got added to Java with the 1.5 release but I can't seem to find how to send the output to a string rather than a file (which is what sprintf does in C). Does anyone know how to do this? ...

How can I reformat XAML nicely in VS 2008?

Visual Studio 2008's XAML editor (SP1) cannot reformat the XML into a consistent style. Which tools can I use to get a nicely formatted XAML file? Studio integration preferred. ...

DataTable to readable text string

This might be a bit on the silly side of things but I need to send the contents of a DataTable (unknown columns, unknown contents) via a text e-mail. Basic idea is to loop over rows and columns and output all cell contents into a StringBuilder using .ToString(). Formatting is a big issue though. Any tips/ideas on how to make this look ...

Is there an easy way in .NET to get "st", "nd", "rd" and "th" endings for numbers?

Hi, I am wondering if there is a method or format string I'm missing in .NET to convert the following: 1 to 1st 2 to 2nd 3 to 3rd 4 to 4th 11 to 11th 101 to 101st 111 to 111th This link has a bad example of the basic principle involved in writing your own function, but I am more curious if there is an inbuilt capacity...

What is this strange C code format?

What advantage, if any, is provided by formatting C code as follows: while(lock_file(lockdir)==0) { count++; if(count==20) { fprintf(stderr,"Can't lock dir %s\n",lockdir); exit(1); } sleep(3); } if(rmdir(serverdir)!=0) { switch(errno) { case EEXIST: ...

Is there an easy way to create two columns in a popup text window?

This seemed like an easy thing to do. I just wanted to pop up a text window and display two columns of data -- a description on the left side and a corresponding value displayed on the right side. I haven't worked with Forms much so I just grabbed the first control that seemed appropriate, a TextBox. I thought using tabs would be an easy...

How do I format text in between xsl:text tags?

I have an xslt sheet with some text similar to below: <xsl:text>I am some text, and I want to be bold<xsl:text> I would like some text to be bold, but this doesn't work. <xsl:text>I am some text, and I want to be <strong>bold<strong> </xsl:text> The deprecated b tag doesn't work either. How do I format text within ...