formatting

Format and draw text in UITableViewCell ala Twitterrific for iPhone

I would like to have formatted, clickable text and images inside a selected UITableViewCell. An example of the functionality I'm looking for can be seen in the iPhone Twitterrific app. When the user clicks on a cell, the cell is highlighted and the various links become highlighted and clickable. I've seen the idea of using a UIWebView i...

Microsoft Word Document Controls not accepting carriage returns

So, I have a Microsoft Word 2007 Document with several Plain Text Format (I have tried Rich Text Format as well) controls which accept input via XML. For carriage returns, I had the string being passed through XML containing "\r\n" when I wanted a carriage return, but the word document ignored that and just kept wrapping things on the ...

CVS line endings

We have a large number of programmers on different platforms all using CVS. We have developers using windows with TortoiseCVS (which uses cvsNT) We have developers using ubuntu 8.04 We have developers who have two boxes Ubuntu and windows. A wide range of different editors are used by different developers on different platforms. And...

C# - Excel Number Formatting Issue with International settings

I am trying to write to an Excel 2003 spreadsheet using c# 3.5. However I am unable to get this to function correctly across different country settings. The country settings are either English or German. These two settings have different decimal and thousands settings. Everything works fine unless a user has changed the decimal and thous...

Export Gridview to Excel with rows formatted as text

I have read serveral tutorials online and seem to be missing something. I am trying to have the leading 0's show up in columns by setting the format to text. Any suggestions would be appreciated. ''' <summary> ''' This is required for the grid view to export properly ''' </summary> ''' <param name="control"></param> ...

Formatting a large number with commas

I need to format a number so that there is a comma seperating the thousands place for any number over and including 10000. eg 10000 becomes 10,000 but 9999 remaains as 9999. I would like to do this using a format string as I do not want to have to test the data to see if what range it is in. Does anyone know how to do this? ...

vim, reformat text to initializers

I've a big file with lines that look like 2 No route to specified transit network 3 No route to destination i.e. a number at the start of a line followed by a description. And I'd like to transform that for use as a struct initializer {2,"No route to specified transit network"}, {3,"No route to destination"}, H...

A good rich text control for Silverlight

I'm looking for a good rich text control for Silverlight. The one on codeplex seems to be out of date and another free one I saw on vectorlight doesn't seem to save as RTF (it uses custom xml) or doesn't have printing capabilities. I'm thinking about dishing out some bucks for the Telerik, ComponentOne, or DevExpress rich text control, ...

Java library to "spell out" numbers in localized fashion

I'm looking for a java library that would be able to format numbers as words for specified locale, (e.g. 17 = seventeen, 1023 = one thousand twenty three for en_US). I need this to work with monetary amounts, so decimal fractions need to be supported. The only thing I found on Google was ICU project, particularly this class. It looks so...

Linux automated code formatting (PHP, JavaScript, HTML, CSS, MySQL)

I am seeking a Linux or PHP program to automate code formatting. Optimally it would handle many languages, but the priority is (highest first): PHP, JavaScript, HTML, CSS and MySQL. Comparability is nice, but not the most important feature. Context / use: automation via Subversion post-commit. I'm working with teams and want to alway...

ASP.NET: single and double quotes inside the text property of a Literal

Simple question, I know, but I can't seem to find a way to put both single and double quotes into the string of the text property of a Literal in asp.net <asp:Literal runat="server" id="Literal1" Text="This is my "text", isn't it pretty" /> For example, in the above code snippet. The string closes on the first double-quote around 'te...

How to modify RegularExpression to Parse vCard/vCalendar to allow a particular field type?

I have an vCard application that needs to read vCard Data, and have found a RegularExpression which gets the FieldName, Encoding and FieldValue from the file, here it is below: ^(?<FIELDNAME>[\w-]{1,})(?:(?:;?)(?:ENCODING=(?<ENC>[^:;]*)|CHARSET=(?<CHARSET>[^:;]*))){0,2}:(?:(?<CONTENT>(?:[^\r\n]*=\r\n){1,}[^\r\n]*)|(?<CONTENT>[^\r\n]*)) ...

Formatting (for money) with setText(String.valueOf)

In my code there are some calls to a method that set the values of some JTextFields fields[7].setText(String.valueOf(inv.get(currentDisplay).feeValue())); This works and it is doing what I want but the values look like this 81.65849999999999 How would I make the output of String.valueOf look like the normal output of System.out.pri...

How do I format a PRINT or WRITE statement to overwrite the current line on the console screen?

I want to display the progress of a calculation done with a DO-loop, on the console screen. I can print out the progress variable to the terminal like this: PROGRAM TextOverWrite_WithLoop IMPLICIT NONE INTEGER :: Number, Maximum = 10 DO Number = 1, MAXIMUM WRITE(*, 100, ADVANCE='NO') REAL(Number)/REAL(Maximum)*100 100 FORMA...

How to underline section-headings in LaTeX?

EDIT: As I see in the first answer, underline is the wrong word. I want a line under the section heading, separating the heading from the following text. I want to separate section headings from the following text with a horizontal line. At the moment I use the following: \newcommand{\tmpsection}[1]{} \let\tmpsection=\section \renewcom...

apt like column output - python library

Debian's apt tool outputs results in uniform width columns. For instance, try running "aptitude search svn" .. and all names appear in the first column of the same width. Now if you resize the terminal, the column width is adjusted accordingly. Is there a Python library that enables one to do this? Note that the library has to be aware...

How do I right-align my text in Python?

I have some data that I am displaying in 3 column format, of the form "key: value key: key: value key: value". Here's an example: p: 1 sl: 10 afy: 4 q: 12 lg: 10 kla: 3 r: 0 kl: 10 klw: 3 s: 67 vw: 9 jes: 3 t: 16 uw: 9 skw: 3 u: 47 ug: 9 mjl: 3 v: 37 mj: 8 lza: 3 w: 119 fv: 8 fxg: 3 x: 16 fl: 8 aew: 3...

Question about php formatting assignment:

I have an HTML form where the user can type in any number:5, 8, 4.2, 5.8, anything in terms of numbers (integers or doubles). However, I was wondering is it possible to have my php script round some of the numbers when entered into the html form, for example when a user enters 4.2, the php script should be able to round it to 4 or if it...

Ensuring configurable date format for each user across jsp's

Hi, JSTL provides the fmt:formatDate tag for formatting dates. The way to use it is: Now, in an application you do not want to specify the hardcoded format of "dd/MM/yyyy" in all your jsp's or other pages. Especially since you need to ensure that the format is configurable for the user. One possible solution is that you specify a form...

How do you format text/strings in VBA?

In the code below, I take some input parameters, either text or a cell, and combine them to form one string using the formatting I need. I need to make Task_Name bold, as well as text like "Lead :". I know you cannot make text in a variable bold, but how do I go about this? This cell I'm storing the value in is eventually used in a Wo...