formatting

Dyanamically selecting which CSV fields are written

I am using FileHelpers to write some data out to a CSV file. FileHelpers is great because it lets me easily format the various fields using the FileHelper converters. Here is an example of a FileHelpers DelimitedRecord: [DelimitedRecord(",")] public class ShippedRecord { public string Customer; #quouted as can contain '...

Is there a DateFormatProvider that will use Windows localization information?

I'm writing a java gui application that has to display dates. Since this application is primarily going to run on Windows systems, I would like to be able to use date & time formats that correspond to the Windows localization settings. I found DateFormatProvider class, in Java 6, which gave me high hopes ... but I haven't found an impl...

How to display a phone number with that green phone icon to the right just like in contacts

I have an application that I want to display a phone number (not one stored in contacts) with that green phone icon next to it much like in the contacts application. I've searched and can't find anything relating to this formatting in the documentation. ...

Branding SharePoint Search Result

Hi all, In my SharePoint site I have a list wich has a column that contains rich text in it. (i.e text with bold, color and italic style). Now when user perform search, If the search key word match with the data in rich text column it will show that record as a search result which is perfect. But the result in search result page show...

Show some formatted text in WPF which the user can copy to word

I want to show some formatted text in a client WPF application which the user can select and copy to word. It needs to be easily created by the app, and the biggest formatting thing inside is a table where some cells are right-aligned. What is best to use here? A richtext control is hard to fill (I think) and html is not easy to show, ...

Padding problem for text email using PadRight in C#

I have a question regarding encoding for text email messages using C# .net because I have mine as simple ASCII but when doing padding for formatting a recipt to the user the data is not lining up although when I check the lines in say NotePad++ they are exactly the same No. of character. Below is some code, can anyone tell me what I'm do...

Visual Studio reformats my pre-formatted HTML

When I put text directly into a <pre> tag and press Ctrl+K, Ctrl+D, the whitespace is preserved. <pre> This whitespace gets preserved.</pre> But when I put text in a tag nested within a <pre> tag, the whitespace is not preserved. <pre><code>This whitespace doesn't get preserved.</code></pre> Only text directly w...

CKEditor change names and tags in Formatting drop down

Hello! Where from can I edit the names and tags inserted when selecting an option from the Formatting drop-down in CKEDitor? Thank you. ...

how do i print currency format in php

hi guys, i have some price values to display in my page. i am writing a function which takes the float price and returns the formatted currency val with currency code too.. like fnPrice(1001.01) should print $ 1,000.01 ...

looking for tool that format and escape long text string to valid c char*

Hello all i looking for a tool that takes long text string to valid const char *fmt for example i want to set char* with this java script as string: http://code.google.com/p/swfobject/link text in simple words i need to properly escape the java script string so i could printf() it later i hope now its clear Thanks ...

Can I make Visual Studio place curly braces on the same line as an if statement (in HTML)?

In Visual Studio while designing MVC views (in .aspx or .ascx files) I often use if statements. When I auto-format (Ctrl-K,D), VS wraps the braces in this really ugly and hard to read way: <% if (Model.UserIsAuthenticated) {%> (some HTML goes here...) <% }%> Is there any way to make Visual Studio auto-format like this instead:...

how do i print currency format in javascript

hi guys, i have some price values to display in my page. i am writing a function which takes the float price and returns the formatted currency val with currency code too.. like fnPrice(1001.01) should print $ 1,000.01 ...

build a formatted string in oracle

I need to build a string from some columns into another column, the trailing zeros must be removed from month and day : YEAR=2008;MONTH=1;DAY=1;ID=1021; ... etc For the day piece I've used the TO_CHAR(D_RIC,'D') function to remove leading zeros. Is there a format option for months to remove starting zeros too ? ...

Access row data in jqGrid custom formatter

We have a grid with datatype json. We have the following custom formatter: function opsFormatter (cellvalue, options, rowObject){ '<a title=MA href=javascript:showDialog(' + rowObject[5] + ')>MA<a>' + '&nbsp;&nbsp;'; } Instead of rowObject[5] is there any object notation where we can specify the actual column name ("account")? ...

Java recognizing address information and breaking it apart into variables (no regex)

Hello, Does anyone have a recommended pseudo-algorithm for, given a string containing an address: Break apart the address apart into a Street variable, a City variable, a State variable, and a Zip variable The address string may be formatted in a number of different ways. For example, it may be comma separated or it may be separated b...

POI: Cell format for 2000 and above records is corrupted

Can anyone help me on how can I fix this one. I'm using vb.net 2003 and I've tried to generate a report in Excel using POI, but I have a problem when the records is above 2000, cell formats has been missing or corrupted for the next 2000 and above records. And when I'm opening the generated report and It shows a message of "To many diff...

Better String formatting in Scala

With too many arguments, String.format easily gets too confusing. Is there a more powerful way to format a String. Like so: "This is #{number} string".format("number" -> 1) Or is this not possible because of type issues (format would need to take a Map[String, Any], I assume; don’t know if this would make things worse). Or is the bet...

How to format a java string with leading zero?

Here is the String, for example: "Apple", and I would like to add zero to fill in 8 chars. I would like to show the result like this;' "000Apple" How can I do so? Thank you. ...

How to change MySQL date format for database?

We are using a MySQL database with FileMaker. It appears that when FileMaker is reading the MySQL tables, it will only accept dates in the format of m/d/y. Is there any way I can get our MySQL database to change its default format to be m/d/y instead of YYYY-MM-DD? I know I can use the DATE_FORMAT() function on individual SELECT queri...

lex_cast: Make formatted streams, unformatted

I once saw this nice little snippet of code below, here at SO: template<typename to_t, typename from_t> to_t lex_cast(const from_t &arg) { to_t ret; std::stringstream os; os << arg; os >> ret; return ret; } This mimics boost::lexical_cast. Usage: string tmp = ::lex_cast<string>(3.14); However, due to the default...