formating

In editor XML formatting.

Hi Anyone know of a simple system of getting xml formatted inside an editor. I mainly use textpad so that would be my main interest. What I'm really asking is that when I paste an xml string from a logfile or something into textpad that I can use a plugin or a third party tool to format the xml in textpad so it is readable. Edit: Than...

emacs function to wrap text with printfs

Some lanaguages, like Perl, support printing preformatted code: print <<EOL a line another line and another. EOL Some languages don't. For the ones that don't, I'd like to be able to write my text and then convert it to a bunch of printfs: printf "a line\n"; printf "another line\n"; printf "and another\n"; What's a good w...

Removing nonnumerical data out of a number + SQL

I'm trying find the best way to remove nonnumerical data from a varchar in SQL e.g. '(082) 000-0000' to '0820000000' or '+2782 000 0000' to '0820000000' The difficulty is i'm not always sure what number formats are coming in, as shown above, so I'd like like everything that is not a number removed essentially. Thanks in advance for a...

separating php and html... why?

So I have seen some comments on various web sites, pages, and questions I have asked about separating php and html. I assume this means doing this: <?php myPhpStuff(); ?> <html> <?php morePhpStuff(); ?> Rather than: <?php doPhpStuff(); echo '<html>'; ?> But why does this matter? Is it really important to do or...

HTML/CSS Formating question

Hi, Im just messing around with Ruby on Rails and HTML. This question isn't about RoR, but HTML and CSS. When I center my body, I get this: How can i get the bullets to be centered next to the text as well? Also, how can I get the while border collapse so its closer to the text? Thanks! Here is my code: My app layout: <!DOCTYPE h...

Zend_form rendering problem

Hi, I need a zend_form which will contain mostly checkboxes. I need to group them and also display a title for each group. e.g. Heading 1 Label1 Check1 Label2 Check2 Label3 Check3 Heading 2 Label4 Check4 Label5 Check5 Label6 Check6 First I don't know how to display the title ("headings")! Is there a way that you can add a label ...

Java DecimalFormat include all digits to the left

I'm trying to format an arbitrary length decimal so all of the numbers to the left of the decimal point are displayed but a maximum of 2 to the right are displayed (if they are non-zero). How can I specify in a DecimalFormat to display all numbers to the left rather than specifying the number of digits ahead of time? thanks, Jeff ...

Excel formating using JXL

I generating a excel sheet using jxl, a number of the columns have data that is preceeded by a hidden apostrophe. The apostrophe can only be seen when you click on the cell. I have looked and can't find a post that addresses this. Can anyone out there tell me how to remove this using jxl or any other. ...

Printf and hex values

So, I have a value of type __be16 (2 bytes). In hex, the value is represented as 0x0800 or 2048 in decimal. (16^2 * 8) So, when I printf this; I do this: printf("%04X", value); //__be16 value; //Print a hex value of at least 4 characters, no padding. output: 0008 printf("%i", value); //Print an integer. ou...

How get hours:minutes

Hi, I have a script here (not my own) which calculates the length of a movie in my satreceiver. It displays the length in minutes:seconds I want to have that in hours:minutes What changes do I have to make? This is the peace of script concerned: if len > 0: len = "%d:%02d" % (len / 60, len % 60) else: len = "" res = [ None ] I...

How to format the money using asian format

In India and other Asian countries money is formatted as following: The first three digits grouped in three then all other digits are grouped in pair of two. eg : 2,54,255.12 5,22,54,255.12 etc string money = String.Format("{0:#,##0.00}", 254255.12); gives the output 254,255.12 but the output required is 2,54,255.12 ...

how to format a transaction Id?

What is the best way to format a transaction id? Conditions Max 15 characters: XXXXXXXXXXXXXXX -All transaction must be unique -Can contain both numerical and alphabetical characters -May contain Year, month, day ...

PHP text formating: Detecting several symbols in a row

I have a kind of strange thing that I really nead for my text formating. Don't ask me please why I did this strange thing! ;-) So, my PHP script replaces all line foldings "\n" with one of the speacial symbol like "|". When I insert text data to database, the PHP script replaces all line foldings with the symbol "|" and when the script ...

C# Grid Cell Formating

IS There Any Event In C# Winform For Formating The Last Cell Or Last Row After Complete DataBinding. ...

vb.net what is a good way of displaying a decimal with a given maximum length

I am writing a custom totaling method for a grid view. I am totaling fairly large numbers so I'd like to use a decimal to get the total. The problem is I need to control the maximum length of the total number. To solve this problem I started using float but it doesn't seem to support large enough numbers, I get this in the totals column(...

Tools\addin's for formating or cleaning up xaml?

I'm guessing these don't exist since I searched around for these but I'm looking for a few tools: 1) A tool that cleans up my xaml so that the properties of elements are consistent through a file. I think enforcing that consistence would make the xaml easier to read. Maybe there could be a hierarchy of what comes first but if not alpha...

Changing date format to "%d/%m/%Y"

Hi Guys, Would like to change the date format in R. My data frame is shown below and would like to change all the date formats to "%d/%m/%Y" .Any help would be appreciated! df: id bdate wdate ddate 1 09/09/09 12/10/09 2009-09-27 Thanks, Bazon ...

Are there any good descriptions of scientific notation formatting using printf

Please no general printf descriptions. ...

Format Text Field While User Enters Data

Hello, so here is what I am trying to do. I have a birth date text field, while the user in puts text i want the field to automatically put it in the form YYYY-MM-DD. Basically while the user types it replaces the Y's M's and D's but leaves the hyphen. I am not sure how to go about this i may need a mask or something. I know this i...

Keeping the format of pasted text in a textarea without visible mark-up info.

I had a case where i copied bold text from a web page into a textarea of another page. On paste, the text area kept the text's bold format. When i pasted the same text into a text file i could see no mark ups or formatting info along with the text. How is the textarea keeping the format of the text? Thanks in advance. EDIT: How i...