Hi, I have these numbers:
5.25
10251.35
5
and I want them to be formatted with groups and always with 2 decimals ,XX
this is what .ToString("N2") does:
5,25
10.251,35
5
How can i make the '5' look like 5,00 too ?
And for multiple cultures of course (en: 5.0, de: 5,0 ...)
In fact this question has no sense, N2 should do it at all...
I am retrieving a twitter feed using a php file and it is returning the XML, however the date XML field is..
<created_at>Sun Nov 08 07:26:07 +0000 2009</created_at>
I am calling this inside flex from my
[Bindable] public var twitterData:XMLList;
using {data.created_at} how would I format this to read as a normal date? (i.e Sun Nov ...
Can i hide text in a DIV after a number of characters with jQuery?
So far I think it would go something like this - jQuery would cycle through the text until it gets to a certain number of characters. It would then wrap a DIV from that position to the end of the text which could then be hidden with the hide() method. I'm not sure how to...
One nice thing with jQuery is that the syntax (such as when chaining) allows your script to span multiple line breaks for ease of formatting and readability.
Is there an equivalent/preferred method when one is adding a large string of HTML?
For instance, it'd be nice to do something like this:
$("#theObject")
.doSomething()
....
I'm receiving a date field from a php file, and I need to format it.
I get this string: "2009-11-12 17:58:13"
I want to convert to "November 12, 2009 5:58:13 pm"
I tried to work with the Date class, but I get stuff like this:
Type Coercion failed: cannot convert "2009-11-12 17:58:13" to Date.
Anyone know of any good utilities for doin...
Often in Perl I want to print out column/row data, say, from a hash.
This is simple:
foreach my $k(keys %h)
{
print $k, "\t", $h{$k}, "\n";
}
However, if the key happens to have a varying length, then the formatting just looks very jagged. I've investigated format, and its typically too heavyweight for what I'm looking for, which i...
Is there a command-line Unix tool that will format/indent/prettify source code in different languages? I'm especially interested in Java, JavaScript, PHP, and XML, but ideally it would handle others.
(I'm not looking for something to generate syntax-highlighting markup; I already know of a few tools that do that.)
...
Hi there,
I am struggling with this. I have a value in seconds that I want to display in a label in HH:MM format. I have searched the internet for ages and found some answers, but either not fully understood them, or they seem like an odd way of doing what I want. If someone could help me out on this one that would be great! Bear in min...
I'm using DecimalFormat to format doubles to 2 decimal places like this:
DecimalFormat dec = new DecimalFormat("#.##");
double rawPercent = ( (double)(count.getCount().intValue()) /
(double)(total.intValue()) ) * 100.00;
double percentage = Double.valueOf(dec.format(rawPercent));
It works, but if i have a ...
I have richTextBox1, and here is the contents:
line one from my textbox is this, and i want this to be normal, arial, 8 point non-bold font
line two, i want everything after the | to be bolded... | this is bold
line three: everything in brackets i (want) to be the color (Red)
line 4 is "this line is going to be /slanted/ or with ital...
I want to typeset an algorithm in LaTeX. I'm using the algorithmic package and environment to do so. Everything is working great except when I add comments (using \COMMENT), they are output immediately after the statements. I would like for all the comments to be aligned (and offset from the statements). Is there an easy way to do so?
"...
I've been using LaTeX for a little while now to typeset my algorithms homework, and I really like the quality of the output as well as the ease-of-use. I'd like to starting using LaTeX in other classes as well, but non–computer-science subjects have more stringent formatting requirements than I've come across in CS. Most classes that req...
Hey. For a tutorial this week, one of the questions asks to create a function formatLines by using other functions formatLine and formatList, to format a list of lines.
My code looks like this;
type Line = String
formatLine :: Line -> String
formatLine l = l ++ "\n"
formatList :: (a -> String) -> [a] -> String
formatList f [] = []
fo...
Hello,
Working in VS2005 and recently experimenting with MS Expression Web 3 and WebDwarf.
I'm trying to get away from using tables to format data entry as well as find an edit tool that would help speed up what up to now has been size/position trial and error formatting.
To get labels and field to line up so that labels are aligned r...
Hi,
i am currently in the process of maintaining a legacy app. This has quite a few structures like:
QMap<QString, QMap<QString, QMap<QString, QMap<QString, QVariant> > > > Dep;
As interfaces are hardly used and I only need to make minor adjustments, I would like to keep the structure as it is, although some refactoring might be nee...
What's the correct way to do an ajax request, I've seen people using a returning render_to_string so that they can do all their formatting within python using the template language. eg~
return render_to_string('calendar.html', {
'self' : self,
'month' : self.today.month,})
with this as the javascript:
$('#django_calendar_response').h...
hi, here's my problem:
I want all texts in TextBlock, Label, MenuItem.Header to be displayed in upper case.
The strings are taken from a ResourceDictionary e.g.:
<TextBlock Text="{StaticResource String1}"/>
<MenuItem Header="{StaticResource MenuItemDoThisAndThat}
etc. (also for Label and other controls)
I cannot use a value c...
Hi everyone!
I'm using redmine and I'm trying to insert the special character "|" inside a table in a redmine wiki page. I don't want this character to be parsed as a column separator. I've achieved this by doing a < code >|< /code> around this character, but I don't want to use the code tag, since this character will gain code attribut...
Given the following GridView:
<asp:GridView runat="server" ID="GridMenuItemAttributes" DataKeyNames="MenuItemAttributeID" AutoGenerateColumns="false"
OnRowCommand="GridMenuItemAttributes_RowCommand" DataSourceID="DSMenuItemAttributes" OnRowEditing="GridMenuItemAttributes_RowEditing" >
<Columns>
<asp:BoundField HeaderText="D...
I dont like the way VS formats the code so, I've unchecked all 3 options in Text Editor / C# / Formatting.
I've also checked 'Ignore spaces in declaration statements'.
In most cases it works.
But when I'm surrounding code by eg. #region I noticed my declarations are reformatted (Removed TABs)
Is it a way to protect against ??
I'm u...