I need a way to convert a number into formatted way by inserting comma at suitable places. Can it be done using regex?
Example:
12345 => 12,345
1234567 =>1,234,567
Hi,
Can someone who uses CJ's Commission Detail Service (REST) tell me what a sample XML response is for this query.
None of CJ's Web Services documentation indicates exactly how the XML is formatted and as I don't have any commission payments yet I can only guess the result.
I am trying to read an XML file into a data set using dataset.ReadXml(fileName, XmlReadMode.IgnoreSchema). XML contains data formatted in French eg 231,23 ie '.' in US is replaced by ',' in French. I get an exception Input string was not in a correct format.Can any one help me ?
I have the following line between my \maketitle and my \begin{abstract}:
\center{ \textsc{Some text here} }
This seems to cause the ENTIRE DOCUMENT to be formatted as centered. Why is this and how should I get around it?
Part two: Is there a way to get some text to appear only when the [draft] option is active.
For example, when the draft option is active, I want some text to appear between my title and abstract: "draft: do not cite without permission" or some such.
Func archiveDir($dir)
; Get all the files under the current dir
$allOfDir = _FileListToArray($dir)
Local $countDirs = 0
Local $countFiles = 0
$imax = UBound($allOfDir)
For $i = 0 to $imax - 1
If StringInStr(FileGetAttrib($allOfDir[$i]),"D") Then
$countDirs = $countDirs + 1
Else
$countFiles = $countFiles + 1
EndIf
Next
Local $allDirs[$countDirs]
Local $allFiles[$countFiles]
The error text is : "Array variable subscript badly formatted." and comes on this line:
Local $allDirs[$countDirs]
Any ideas?
Hey,
I want to use geoJSON-formatted Data in my iPhone app. THere is a JSON parser but no geoJason parser. Anyone can please help me? How do I have to edit the JSON parser to get geoJSON parsing successful?
Is there any geoJson parser for Objective-C out there?
Thanks a lot.
hello!
I need to extract the zipcode from file's line.
each line contains an adress and is formatted in a different way.
eg.
"Großen Haag 5c, DE-47559 Kranenburg"
or
"Lange Ruthe 7b, 55294 Bodenheim"
the zipcode is always a five digit number and sometimes follows "DE-".
I use Java.
Thanks a lot!
Hello,
I am trying to output some Java objects as JSON, they have List properties which I want to be formatted as { "People" : [ { "Name" : "Bob" } , { "Name" : "Jim" } ] }
However, I cannot figure out how to do this with XStream. It always outputs as { "Person" : { "Name" : "Bob" }, "Person" : { "Name" : "Bob" }
Is there a way to fix this? I've put together some sample code with a unit test in github if you need something more concrete to play with: http://gist.github.com/371358
Thanks!
I recently changed from Windows 7 to Ubuntu 10.04 as my default OS.
I formatted the hdd with windows 7 on it, but it still shows the boot loader at startup.
How do I remove the windows 7 bootloader?
Greetz
Background: I have been attempting to read the rating that is assigned in Adobe Bridge CS3 using the creative commons Metadata toolkit for php without success. I am using shared hosting so I do not have an oppotunity to recompile php with different modules.
Is php code available that could be used to read the rating that is embedded in the .jpg file? I have read that this is an xmp (xml) formatted section within the file.
What will the last words of some kind of programmer be?
Like:
LW of a Perl programmer:
I don't have to write documentation. The source is
formatted so well, I can read it
anytime later...
or
Im just going to write a regular
expression to find this, then I'm
done...
If I output a formatted date as follows:
DateTime.Parse("2010-06-02T15:26:37.789 +01:00").ToString("HH:mm:sszzz")
I get the expected result:
15:26:37+01:00
However, if I parse the same date, convert to UTC and output with the same format as follows:
DateTime.Parse("2010-06-02T15:26:37.789 +01:00").ToUniversalTime().ToString("HH:mm:sszzz")
I get this:
14:26:37+01:00
Now those two dates, the local and UTC versions, should be exactly the same but the outputted text represents two different times.
Why is this?
I'm using a pre-commit hook to lint-check PHP source submitted by our staff, and everyone's really happy with the results. The staff have agreed it would be useful to have the code re-formatted to follow (customizable) style rules on commit. Are there any FOSS scripts which can do this from the command-line?
Is there a way to format a UTC time into any arbitrary string format I want in java? Basically I was thinking of having some class take the timestamp and I pass it is string telling it how I want it formated, and it returns the formatted string for me. Is there a way to do this?
I want to generate a graph with a large decimal number like -106.63633167743683 or 52.132235169410706. But whenever I'm entering the value in Excel sheet it is giving me value like -106.63633167743600 (as I have formatted cell with 15 decimal places). It is replacing the value of last two digits by 0.
Can anyone help regarding this please?
How can I convert the nullable DateTime dt2 to a formatted string?
DateTime dt = DateTime.Now;
Console.WriteLine(dt.ToString("yyyy-MM-dd hh:mm:ss")); //works
DateTime? dt2 = DateTime.Now;
Console.WriteLine(dt2.ToString("yyyy-MM-dd hh:mm:ss")); //gives following error:
no overload to method ToString takes
one argument
I have a web site written using iUI so it is formatted well for iDevices. Is there a way to disable rotation of the page when the device is rotated? In other words, if somebody rotates the device, I would still want the page to stay in portrait mode.
I have a bunch of files. Some are unix line endings, many are dos. I'd like to test each file to see if if is dos formatted, before I switch the line endings.
How would I do this? Is there a flag I can test for? Something similar?
In my models I often use text fields that are intended to contain large pieces of textile-formatted input. I'd like to automatically obfuscate any email addresses that are entered into these text fields, so that when they're printed in a template they're not visible to spiders.
Is there a smart way to do this?
i have debian system in which i have mounted the OS on a ext-3 system . I have got a partition of 60 gb , which is formatted to ext-2 partition . Even if I mount , i cant write anything into it . How can i change that ? How can I make the disk writable?
Hi guys,
So I am relatively new to Python and I am having trouble working with 2D Lists.
Here's my code:
data = [[None]*5]*5
data[0][0] = 'Cell A1'
print data
and here is the output (formatted for readability):
[['Cell A1', None, None, None, None],
['Cell A1', None, None, None, None],
['Cell A1', None, None, None, None],
['Cell A1', None, None, None, None],
['Cell A1', None, None, None, None]]
Why does every row get assigned the value?
i want to log some information of every single request send to a busy http server in a formatted form,use log module would create some thing i don't want to:
[I 131104 15:31:29 Sys:34]
i think of csv format but i don't know how to customize it,and python got csv module,but read the manual
import csv
with open('some.csv', 'w', newline='') as f:
writer = csv.writer(f)
writer.writerows(someiterable)
since it would open and close a file each time, i am afraid in this way would slow down the whole server performance, what could i do?
From MBUnit I am trying to check if the values of two objects are the same using
Assert.AreSame(RawDataRow, result);
However I am getting the following fail:
======================
Expected Value & Actual Value : {RawDataRow: CentreID = "CentreID1", CentreLearnerRef = "CentreLearnerRef1", ContactID = 1, DOB = 2010-05-05T00:00:00.0000000, Email = "Email1", ErrorCodes = "ErrorCodes1", ErrorDescription = "ErrorDescription1", FirstName = "FirstName1"}
Remark : Both values look the same when formatted but they are distinct instances.
======================
I don't want to have to go through each property, can I do this from MbUnit
What is the class type used to create links in iPhone apps? Is it just a label with formatted text? How is the selection detected?
I am looking to have a Navigation Controller and have some text links on the root page. The user can then select any of the links, and the controller will go to the page for that link.