formatting

PHPMailer AddAddress()

ok, i don't know how the data should be formatted for AddAddress PHPMailer function; i need the email to be sent to multiple recipients so i tried $to = "[email protected],[email protected],[email protected]"; $obj->AddAddress($to); but with no success. any help will be appreciated. thanks ...

Objective-C: How to format string as $ Price

Is their a built-in way of formatting string as $ price, e.g. 12345.45 converted to $12,345.45? ...

ASP.NET MVC View Code Formatting - braces <% } %>

Does anyone know how to configure visual studio to correctly format code segments within a View This annoys the crap outta me!: <select> <% foreach(Height height in ViewData.Model.Heights) {%> <option value="<%=height.ID %>"><%=height.Value%></option> <% }%> </select> It should be like this: <% foreach(Height height in ViewData.Mode...

Eclipse Spaces & Tabs

I like to display 4 spaces as tab in eclipse, with an actual width on the screen of 2 spaces. When I save the file, I'd like to have 4 spaces (represented as «.») for a tab: 1st.level ....2nd.level ........3rd.level In eclipse, I'd like to see this, where a tabstop (represented as «->>») should take the width of two spaces: 1st....

Silverlight Date Formats

Hello everyone, I'm getting some very strange date formatting issues in my Silverlight application. My local culture is set to UK, yet I am consistently seeing US dates popping up all over the place. I can easily hardcode these to UK format in specific loactions using: <UserControl ... Language="en-GB"...> But as I'm sure you'd all ...

How to setTimeStyle AM/PM to lowercase using the iPhone SDK

How can I set the AM / PM time style to lowercase? I'm using the following code and according to Apple's documentation this should returned these values as lowercase but it doesn't. [_detailsTimeFormatter setTimeStyle:NSDateFormatterShortStyle]; ...

Quickly getting to YYYY-mm-dd HH:MM:SS in Perl

When writing Perl scripts I frequently find the need to obtain the current time represented as a string formatted as YYYY-mm-dd HH:MM:SS (say 2009-11-29 14:28:29). In doing this I find myself taking this quite cumbersome path: man perlfunc /localtime to search for localtime - repeat five times (/ + \n) to reach the relevant section of...

Any way to Format or Write code in Google Document

I want to keep the snippets of code in My Google Document but when i paste the code it looks weird . Is there any way to format the code like we have in stackoverflow where the code is in colors ...

How do I add space between items in an ASP.NET RadioButtonList

I've got an ASP.NET RadioButtonList that displays four items using RepeatDirection="Horizontal" to display them on a single line. I'm using RepeatLayout="Flow" to avoid the markup for a table. However, this causes the items in the list to be placed right next to each other, which does not look good. So, I tried the table layout to tak...

Formatting plain text output for printing?

This may be a naive question, but bare with me. I have a program that outputs a report into plain text. The report must be plain text for it to load into a third party program. The report also needs to be printable. When dealing with plain text, what limits should I set on line size and number of lines on a page to get it to print reaso...

Cleanup PHP String from Web Form Input

I have a web-form that is getting customer information. The form is processed using PHP 5.1.6 so using the filter_input() will not work. The form has a text area along with some other standard fields. I am getting lots of strange formatting codes that are being stored in our MySQL database. How can I filter these results where they lo...

Using Tidy to clean HTML, HTML content is being changed, encoding problem?

I am fetching HTML from a smarty template and need to clean it (simply want to remove extra whitespace, and format / indent the HTML nicely), I'm using tidy to do something like: $html = $smarty->fetch('foo.tmpl'); $tidy = new tidy; $tidy->parseString($html, array( 'hide-comments' => TRUE, 'output-xhtml' => TRUE, 'indent'...

Reporting Services formatting

Im currently developing av price list using SQL Reporting Services. In that report I have a list which represents a item category, the list is connected to a datasource and is inceremented for each category in the database. Inside the list I have a table which outputs all items within that category. Everything is working as expected...

How can I format a nullable DateTime with ToString()?

How can I convert the nullable DateTime dt2 to a formatted string? DateTime dt = DateTime.Now; Console.WriteLine(dt.ToString("yyyy-MM-dd hh:mm:ss")); //works DateTime? dt2 = DateTime.Now; Console.WriteLine(dt2.ToString("yyyy-MM-dd hh:mm:ss")); //gives following error: no overload to method ToString takes one argument ...

How to format printf statement better so things always line up

I have this printf statement: printf("name: %s\t" "args: %s\t" "value %d\t" "arraysize %d\t" "scope %d\n", sp->name, sp->args, sp->value, sp->arraysize, sp->scope); It's inside a for loop, so it's printing multiple lines for a list of pointers. The proble...

How to display percent-values using ContentStringFormat?

Greetings to the enlightened ones! I'm playing on this for several hours now, but wasn't successful (perhaps because I'm quite new to WPF): I have a DataGrid whose DataContext is bound to a DataTable. The DataGrid is of fixed size and its purpose is to hold a value table y(x) (i.e. the headers show the x-values and the corresponding y-...

C# string format flag or modifier to lowercase param

Is it possible to specify some kind of flag or modifier to a string format param to customize it, something like the number formating flags? Example of want I want: String.Format("Hi {0:touppercase}, you have {1} {2:tolowercase}.", "John", 6, "Apples"); Wanted output: Hi JOHN, you have 6 apples. PS: Yes I know that I can change the ...

VBScript: What is the simplest way to format a string?

I have the following format: Value1 is {0} and Value2 is {1}. I need to replace the numbers in the brackets with strings. This is easily done in most languages using string.Format or something along those lines. How can I do this using only vbscript? I've tried: Replace (strFormat, "{0}", value1) Replace (strFormat, "{1}", value...

compliant formatted email

hi, i've been using php's pear Mail & Mail_Mime libraries to send well formatted html emails with/without attachments. some hosting companies don't have these libraries installed, and are reluctant to do so. so, i'm looking for a good technical source, tutorial, readable spec so i can write my own class using php's mail function... do...

CSS why add whitespace before rules?

CSS code formatting question: I have an old habit of adding a single space before the { starts a new CSS rule, like this: body { font-size: 16px } the whitespaces like this one between body and { add up throughout the css. Ideally, i'd prefer writing my rules like so (and thus saving whitespace): body{ font-size: 16px } Actua...