Hi guys
I need to convert a string to a monetary format of {###}.###.###,##
that is
a value of 5461497702600
would become
54.614.977.026,00
The numbers become excessively large.
I am using
return string.Format("{0:#" + (val < 1000 ? "" : "\\.") + "##0.00}", val);
which returns for the example
54614977.026,00
(only one dot)
...
Hi,
what is the correct way to do indentation of a LaTeX document in Emacs (AucTex)?
For example when I have a list:
\begin{itemize}
\item orem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam enim urna, mattis eu aliquet eget, condimentum id nibh. In hac habitasse platea dictumst.
\item orem ipsum dolor sit amet, consectetu...
I know it's really a subjective question, but for best-practices (and readability), I can't seem to get a fix on the best way to format long strings of HTML. I typically do it like this:
echo '
<div>
<p>Content Inside</p>
<div class="subbox">
<ul>
<li>etc.</li>
<li>etc.</li>
<li>etc.</...
We have a large table (5608782 rows and growing) that has 3 columns Zip1,Zip2, distance
All columns are currently int, we would like to convert this table to use varchars for international usage but need to do a mass import into the new table convert zip < 5 digits to 0 padded varchars 123 becomes 00123 etc. is there a way to do this sh...
is there a way to control the text positioning in the datagrid cells in Flex so that all text in subsequent columns align on the same rows?
...
Is there any useful module on CPAN that returns number of biggest fractions of date interval, i.e. return integer number of years/months/days/hours/minutes/seconds between two dates, to use in sentence like "N days ago" or "M months ago"
...
I'd like to be able to write a time string that looks like this: 1:04:02.1 hours using printf.
When I try to write something like this:
printf("%d:%02d:%02.1f hours\n", 1, 4, 2.123456);
I get:
1:04:2.1 hours
Is it possible to add leading zeros to a float formatting?
...
hey guys,
i am trying to convert a date from yyyy-mm-dd to dd-mm-yyyy
however i dont know how the date function requires a timestamp and i cant get a timestamp form this string...
anyone an idea?
thanks
Matthy
...
I am attempting to create a list in XSL-FO using a square bracket. I have been able to get it working using the standard unicode bullet character (•) but I just can't seem to get it working for square brackets.
I have tried using ■, but that does not seem to work. It is important that i can get the square bullets working bec...
i'm currently in the process of conceptualizing an art piece for a gallery show next year, so this bizarre question of mine is more than just simple curiosity.
if i open up an image file (a .PNG) with Text Edit or Note Pad, the file is presented in textual characters. here's an excerpt:
ˇflG¿§vÑ$BaçC$
èœ≥à-ƒ…åGj!mëA»T‰dÚ%ryǬF1¢ƒQ∑P®...
I need to display text along with values of variables in a CEdit controlled Edit Control Box. How do I do it ? Currently I'm using SetWindowText(), but that only takes a string...how do I get a formatted string to display in the edit control?
Example: printf("The answer is %d\n",ans) -> how do i print the same message in a Edit Control...
I know how to use NSTimeZone to derive the offset for the current time in another time zone. NSDate always returns relative to GMT, so how do I derive a string with the proper time zone information? i.e. I take the current time where I am (in EST) and using NSTimeZone end up subtracting the 3 hours necessary to represent the time in PST....
Hi!
I am using solaris os.
from solaris im logging into sql plus.
my database is oracle 9i.
i am spooling the output of my query into a file.
i want in .csv format so that i can copy it into excel.
can any1 help me out.
my query is like.
select name,id,location from employee;
...
How print format string passed as argument ?
example.cpp:
#include <iostream>
int main(int ac, char* av[])
{
printf(av[1],"anything");
return 0;
}
try:
example.exe "print this\non newline"
output is:
print this\non newline
instead I want:
print this
on newline
...
Is there some sort of exception in Java to catch an invalid Date object? I'm trying to use it in the following method, but I don't know what type of exception to look for. Is it a ParseException.
public boolean setDate(Date date) {
this.date = date;
return true;
}
...
Hello,
I'm working on a LaTeX document and using lstlisting to display my Java source code. My setup looks like this:
\lstset{
basicstyle=\ttfamily,
keywordstyle=\bfseries,
language=Java,
frame=single,
aboveskip=11pt,
belowskip=11pt,
breaklines=true,
breakatwhitespace=false,
showspaces=false,
showstringspaces=false
}
The k...
I like to format all my HTML with tabs for neatness and readability. Recently I started using PHP and now I have a lot of HTML output that comes from in between PHP tags. Those output lines all line up one the left side of the screen. I have to use /n to make a line go to the next. Is there anything like that for forcing tabs, or any way...
Hi,
I want to post code snippets online (wordpress.com blog) - and have its whitespace formatted nicely.
See the answers suggested by this other SO question:
Those would be OK, except that I like to copy code to clip board or clip entire pages using Evernote - and they use either the <pre> tag or <table> (or both) to format the code. ...
I have few small basic problems :
How to format :
int i = 456;
to give output :
""00000456"
? I've tried %08d but it's not working. Next thing is a problem with conversion and then formatting. I have side and height of triangle, let's say int's 4,7, and 7 is the height. From formula for field we know that F=1/2(a*h). So how to get...
When I have to render textarea content to the front end I usually pass it thru a function that converts newlines to <br/> tags and double newlines signal paragraph tags so blocks of text get surrounded by <p> and </p> tags.
To save time I usually use a ready made PHP function from the wordpress codebase. You can get the link from the ma...