0
голосов
3ответов
906 просмотров

Whats the best way to display XML in a web form?

HI All, I have an XML output coming back from a ssh connection and want to display the results cleanly on a webpage. What control is best suited for passing an XML string? Do any of them give expand/collapse functionality as with IE? Thanks and Regards, Al

0
голосов
1ответов
523 просмотров

Formatting results using SQL select with JET

I have data in Excel files that I am pulling out using the MS JET OLEDB provider. The results of my select are being passed into a component that I cannot change to generate an HTML table on the fly. Some of my data files contain numbers that I need formatted with commas (#,###). As I said I c...

2
голосов
2ответов
1121 просмотров

How do I keep WordPress from formatting out leading spaces?

I'm trying to post some code snippets on my WordPress blog, but when I copy and paste, it strips out all the leading spaces from each line of code. It doesn't seem to have a problem with leading spaces being there in general, since I can add them back in manually, but it doesn't like them being ...

5
голосов
5ответов
4243 просмотров

What is the appropriate data type to use for storing numbers with leading zeroes?

In Access 2003 I need to display numbers like this while keeping the leading zeroes: 080000 090000 070000 What data type should I use for this?

0
голосов
7ответов
921 просмотров

Need some help with String.format

I'm trying to find a complete tutorial about formatting strings in java. I need to create a receipt, like this: HEADER IN MIDDLE '''''''''''''''''''''''''''''' Item1 Price Item2 x 5 Price Item3 that has a very long name.... Price '''''''''''''''...

18
голосов
6ответов
44839 просмотров

Add comma thousand separator to decimal (.net)

I have a decimal number, say 1234.500. I want to display it as 1,234.5. I'm currently converting it to a double to remove the trailing '0's. string.Format("{0:0,0}",1234.500) removes the decimal place, and other formatting options seem to use two decimal places regardless. Can anyone offer in...

180
голосов
19ответов
172135 просмотров

Xcode source automatic formatting

As a C# developer, I have become highly dependent on the automatic formatting in Visual Studio 2008. Specifically, I will use the CTRL + K , D keyboard shortcut to force things back into shape after my sloppy implementation. I am now trying to learn Objective-C and am missing certain features ...

5
голосов
7ответов
31108 просмотров

SQL - Converting 24-hour ("military") time (2145) to "AM/PM time" (9:45 pm)

I have 2 fields I'm working with that are stored as smallint military structured times. Edit I'm running on IBM Informix Dynamic Server Version 10.00.FC9 beg_tm and end_tm Sample values beg_tm 545 end_tm 815 beg_tm 1245 end_tm 1330 Sample output beg_tm 5:45 am end_tm 8:15 am ...

5
голосов
4ответов
2122 просмотров

How do you say something happened "x minutes ago" or "x hours ago" or "x days ago" in Ruby?

If I have a time variable in Ruby, how could I say that it refers to an event that happened one of the following: "x minutes ago" or "x hours ago" or "x days ago" Obviously if something happened 2 days ago, I would not want to say it happened such-and-such minutes ago.

1
голосов
2ответов
825 просмотров

Excel Conditional Formatting Using A Reference Range

I have a watch range with certain cells highlighted yellow. For each of these cells, there is a corresponding reference value all located within one column. I want to highlight all cells in my target range red for which the value in the corresponding reference cell matches the value in the targ...

2
голосов
5ответов
3583 просмотров

Enable or Disable multiple controls in Silverlight

What is considered the best way of enabling or disabling multiple controls in Silverlight at the same time (textbox, combobox, autocompletebox and the like)? I suppose I could bind the "IsEnabled" property of each control to a boolean property. That property only exists for interactive control...

0
голосов
2ответов
1159 просмотров

Android GPS Result Format

I have noticed with testing GPS locations, a value such as −123 might come up on Android as −23.83333336. Is there any way to format incoming GPS locations, such as within two decimal points? This way I can store values like −123.83 opposed to longer numeric values. I have checked out DecimalFo...

93
голосов
18ответов
234590 просмотров

Easy pretty printing of floats in python?

I have a list of floats. If I simply print it, it shows up like this: [9.0, 0.052999999999999999, 0.032575399999999997, 0.010892799999999999, 0.055702500000000002, 0.079330300000000006] I could use print "%.2f", which would require a for loop to traverse the list, but then it wouldn't work for...

2
голосов
1ответов
531 просмотров

Eclipse Code Format Behavior

My apologies if I'm missing something obvious but there's something that really bugs me about the Eclipse code formatter. I don't want it to make any lines of code longer, only shorter. Is there a way to force the formatter to behavior this way? Example 1: if (somethingIsTrue() || somethingEl...

0
голосов
3ответов
3465 просмотров

Formatting Excel cell with Microsoft Interop

I generate some Excel file with Microsoft Interop, no problem, I can create files, sheet, file, password protect. But I'd like : for a specific range allow only numbers for an another specific range allow only numbers but only 0 or 1 Do you have an idea how to do this ? Thanks,

2
голосов
1ответов
5674 просмотров

Export file as CSV in Crystal Report 11

Hi I am trying to export a report as CSV format from Crystal Reports 11, but the problem is that each string value is wrapped inside quotes, which I don't want. I tried to set the delimiter as space but it didn't works. Can someone please help me with this..? Here is my code: elseif ExportForma...

14
голосов
9ответов
57483 просмотров

Formatting Numbers as Strings with Commas in place of Decimals

I have the following number: 4.3 I'd like to display this number as 4,3 for some of our European friends. I was under the impression that the following line would do the trick: string ret = string.Format("{0:0,0}", 4.3); // returns "04", not "4,3" Am I using the incorrect string?

8
голосов
5ответов
2809 просмотров

Formatting Large Numbers with .NET

I have a requirement to format large numbers like 4,316,000 as "4.3m". How can I do this in C#?

0
голосов
7ответов
2903 просмотров

Parsing a date string using java.text.SimpleDateFormat

I have a weird problem, I need to parse a date string that looks like 1997-02-14T00:00:00.0000000+05:30. The odd thing about the date string is the time zone information. It's +05:30 instead of the usual +0530. I have the basic format string ready, yyyy-MM-dd'T'HH:mm:ss.SSSSSSSZ which would have...

68
голосов
13ответов
30523 просмотров

User-friendly time format in Python?

Python: I need to show file modification times in the "1 day ago", "two hours ago", format. Is there something ready to do that? It should be in English.

8
голосов
1ответов
1324 просмотров

JavaScript Whitespace Syntax Error

Why does this cause a syntax error for the return statement: var FOO = (function($) { return { init: function() { } } })(jQuery); Whereas this doesn't: var FOO = (function($) { return { init: function() { } } })...

0
голосов
1ответов
2722 просмотров

SQL reporting services report not showing date in correct format

i have built a reporting services report off SQL server 2005 and am having trouble getting the date to format correctly in a stand-alone textbox. The code i am using is as follows: ="Date: " & FormatDateTime(Parameters!date.Value, 2)) -- According to MSDN it should work off my systems cul...

7
голосов
2ответов
6237 просмотров

Format WPF Listview Column to show 2 only decimal points.

How can I format a WPF Listview Column to show 2 only decimal points?

83
голосов
16ответов
170417 просмотров

How can I format bytes a cell in Excel as KB, MB, GB etc?

I have a value in a cell that's in bytes. But nobody can read 728398112238. I'd rather it say 678.37GB To write a formula to format it relatively easy (here's one: http://www.yonahruss.com/2007/02/format-excel-numbers-as-gb-mb-kb-b.html) But is there any way to do this as a 'format'? I'd like t...

2
голосов
3ответов
6309 просмотров

How do I format DateTime or TimeZone/TimeZoneInfo to display Three letters?

I'm working with a spec that calls for a peculiar Datetime format that I haven't necessarily had to work with yet. At Process time, an OFX (1 not 2) datetime must be stamped (either DTCLIENT or DTSERVER) in a format like this: 20071015021529.000 however, in the examples it is shown: 200710...

1
голосов
4ответов
4109 просмотров

Formatting phone number

For a decent and standardized php function I want to format a user inputted string to a std. international phone number format. The string will be stripped from other characters as digits and +-signs. All spaces will be deleted. After that I want to format the different strings to a standardized...

0
голосов
3ответов
782 просмотров

Jquery GET - sending & recieving long, complex content, how to?

I have a review PAGE with a TEXTFIELD. User need to be able to write LONG STORY (1000 words+) may contain chars like ()*&^%$#@\/<> Once "save" is pressed I want to use Jquery GET -> to process content with PHP file. (save in mysql database) and return result. let's say I want to ...

5
голосов
1ответов
2609 просмотров

verb/lstinline text flows out of the line margins without line break in Latex

The listings package supports line breaks inside lstlisting environment. But it doesn't produce automatic line breaks for lstinline environment. For example, in the following paragraph the first line flows out of the margins: The parameters \lstinline|base_rmr_brain|, \lstinline|base_rmr_fat|, a...

3
голосов
3ответов
7147 просмотров

Java text formatting

How can I format a string of text, like givenname, surname, telephone etc to look like columns? this won't do it: String customer = "\t"+surname+"\t"+givenname+"\t"+blablabla

0
голосов
4ответов
1195 просмотров

How can I use RegEx to make sure a valid email is written in my TextBox>?

I'm a complete newbie to RegEx and I'm sure it'll be brilliant to use once I know how to use it. :P I have a couple of textBoxes and I was wondering if anyone could me acomplish what I need. In the EMail textbox, I'd like to make sure the user writes in a valid email. [email protected] Is there a way...