Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
string-format
- Page 1
Evaluating OpenAI GPT 4.1 for Text Summarization and Classification Tasks
Programming
Computer Science
3 Weeks Ago
by usmanmalik57
… provided above. text: Title: {}\nAbstract: {}""".
format
(title, abstract) research_category = client.chat.completions.create( model= model…return outputs ``` Since the LLM model outputs are in
string
format
, we define a function that converts them into binary …
Re: String format
Programming
Software Development
15 Years Ago
by kvprajapati
…variables? As per java documentation the syntax of
String
.
format
is ... [CODE=Java] public static
String
format
(
String
format
,Object... args) [/CODE] If hours and minutes… are int type, [CODE=Java]
String
.
format
("%d:%d"…
String format
Programming
Software Development
15 Years Ago
by KimJack
… represents hours and minutes: hh:mm [code] public
String
getTime() {
String
time =
String
.
format
("%tI:%tM", hours, minutes); return time; } [/… error: "The method
format
(
String
, Object[]) in the type
String
is not applicable for the arguments (
String
, int, int)". Both…
string format
Programming
Software Development
13 Years Ago
by Kalle21
… i As Integer = 6 To count Step 3 montera += [
String
].
Format
("{1,2}", i) p += 1 If (p…i As Integer = 1 To count Step 6 montera += [
String
].
Format
("{0,10} {1,2}", i) p += 1…CODE] i get a error on this line montera += [
String
].
Format
("{0,10} {1,2}", i) Index (…
Re: String format
Programming
Software Development
15 Years Ago
by Ezzaral
You are using a
format
string
that applies to a Calendar instance with int parameters. If you already have the hours and minutes as int, use [icode]
String
.
format
("%d:%d", hours, minutes);[/icode] instead.
Re: String format
Programming
Software Development
15 Years Ago
by Ezzaral
[code=java]
String
time =
String
.
format
("%d:%02d", hours, minutes);[/code]
Re: String format
Programming
Software Development
15 Years Ago
by Xhamolk_
Simple Solution, although this has been already solved: [code=Java]
String
time =
String
.
format
("%d:%02d", Integer.toString(hours), Integer.toString( minutes) );[/code] ~ Xhamolk_
Re: string format
Programming
Software Development
13 Years Ago
by thines01
You're missing your second argument in the
format
statement: [CODE]
String
.
Format
("{0,10} {1,2}", i, SOMETHING_GOES_HERE) [/CODE]
String Format-Alignement
Programming
Software Development
14 Years Ago
by CrazyProgrammer
…,-20}{1,0}\n", add11, add21)); displayBox.AppendText(
string
.
Format
("{0,-20}{1,0}\n", add12, add22));… displayBox.AppendText(
string
.
Format
("{0,-20}{1,0}\n", add13, add23));… displayBox.AppendText(
string
.
Format
("{0,-20}{1,0}\n", add14, add24)); …
String.Format()?! Why is it used?
Programming
Software Development
16 Years Ago
by csharplearner
… understand.. and get enough info on net about
String
.
Format
(). Can someone please explain how is it useful?!… example.. but i see no use of using
String
.
Format
() here as.. use it or not.. the …class Exercise { static int Main(
string
[] args) { var wage = 22.45; var strDisplay =
string
.
Format
("Hourly Salary: {0}"…
Re: String.Format()?! Why is it used?
Programming
Software Development
16 Years Ago
by csharplearner
… sign? You would do something like this: [B]
string
message =
string
.
Format
("f3
format
is {0:f3}",123456); System.Windows.Forms.MessageBox… that also a part of the syntax? What is f3
format
? Is it some kind of…
string.Format Text Alignment
Programming
Software Development
9 Years Ago
by Mike Askew
…| Age"); Console.WriteLine("-------------------------------"); Console.WriteLine(
String
.
Format
("{0,-10} | {1,-10} | {2…Bill", "Gates", 51)); Console.WriteLine(
String
.
Format
("{0,-10} | {1,-10} | {…Edna", "Parker", 114)); Console.WriteLine(
String
.
Format
("{0,-10} | {1,-10} | {…
Re: String.Format()?! Why is it used?
Programming
Software Development
16 Years Ago
by ddanbe
… sign? You would do something like this: [B]
string
message =
string
.
Format
("f3
format
is {0:f3}",123456); System.Windows.Forms.MessageBox…
Re: String.Format()?! Why is it used?
Programming
Software Development
16 Years Ago
by csharplearner
… sign? You would do something like this: [B]
string
message =
string
.
Format
("f3
format
is {0:f3}",123456); System.Windows.Forms.MessageBox…
String.Format problem
Programming
Software Development
15 Years Ago
by scottlafoy
…My problem is, I am trying to
format
a number into a certian
format
. The number is 100072305608500 (this is…-056-08W5/00 I am using [CODE]return (
string
.
Format
("{##0/00-00-000-00W0/##}}", Convert.ToInt64…keep getting an error "
Format
Exception was unhandled Input
string
was not in correct
format
. Any help is appreciated. …
Re: String.Format problem
Programming
Software Development
15 Years Ago
by apegram
This works for me. [CODE] long number = 100072305608500L;
string
format
= "##0/00-00-000-00W0/##";
string
output = number.ToString(
format
); [/CODE]
Re: String.Format problem
Programming
Software Development
15 Years Ago
by ddanbe
… ConsoleApplication1 { class Program { static void Main(
string
[] args) { Int64 i = 100072305608500; Console.WriteLine(i.ToString(
string
.
Format
("##0/00-00-000-00W0…
String.format and aligning.
Programming
Software Development
14 Years Ago
by justinwarner
… how you get it all in a nice table like
format
, with all the columns/rows being equal and what not… better/more professional? Again, I'm using a
String
.
format
, and [CODE] public
String
getWorker() { return
String
.
format
("%s %s: SSN#: %d ", firstName…
Re: String.Format()?! Why is it used?
Programming
Software Development
16 Years Ago
by LizR
To learn more about
String
.
Format
- press F1 on it, it has examples and a lot of information on other formats and how to use it.
Re: String.Format problem
Programming
Software Development
15 Years Ago
by scottlafoy
Thank you very much! I have it working now with your help. The funny thing is, I have a prevoiuse one for a different number working [CODE]return (
string
.
Format
("{0:##-00-000-00W0}}", Convert.ToInt32(wellLocation)));[/CODE] but I couldnt get this one working. Thanks again.
Re: String.Format problem
Programming
Software Development
15 Years Ago
by DanielGreen
Hi! the error in your posted codeline is, that there are to much closing braces }} try this: [code] return (
string
.
Format
("{0:##-00-000-00W0}", Convert.ToInt32(wellLocation))); [/code] hope this helps Daniel
Need help with java string.format (prepayment calculation)
Programming
Software Development
20 Years Ago
by LoLo
… prepaymentAmt = Double.valueOf(input_prepayment).doubleValue(); try {
String
message =
String
.
format
("Loan Amount:"+" "+fmat.
format
(loanAmount)+"\n"+ "Interest…
Help me please to organise String.format
Programming
Software Development
13 Years Ago
by shean1488
…the ouput. I think I do something wrong with
String
.
Format
, can you please help me: I attached my …); //print each key and its value for(
String
key : sortedKeys) str+=
String
.
format
("\n%-10s%10d", key, map….get(key)); // display the map size str+=
String
.
format
("\n\n%-10s%10d\n%-10s%11b", &…
JavaScript String.format
Programming
Web Development
10 Years Ago
by AleMonteiro
… the equivalent of .NET
String
.
Format
(
String
, Args); Usages: 'Hello {0}'.
format
('DaniWeb!');
String
.
format
('{0} {1} {2}', 'Hi', 'Again', 'Good Fella');
String
.
format
('Hello {prefix} {name}', { prefix…
Client A sending coordinates to Client B in string format
Programming
Mobile Development
12 Years Ago
by DJ-DOO
…b. The problem is I send them in a
string
format
. In order to make use to make use of… } The transmit method is a follows private void Transmit(final
String
message) { Thread trans = new Thread(new Runnable() { public…unsure as to how to use the coorinates in
string
format
in the distanceTo() method or how to extract them…
Problem using String.Format inside Request.Form
Programming
Web Development
17 Years Ago
by cmhampton
… use the following code: [code=vb] If Not (Request.Form(
String
.
Format
(_ "ctl00$ContentPlaceHolder1$ActivateLevelZero$rptItems$ct{0}$chkIsActive"… it dynamically. If I write out the value from the
String
.
Format
, it is correct. Anyone have an idea what's going…
Re: how to add 2 dates that are in string format to get the next date
Programming
Web Development
16 Years Ago
by udaybhoite
hi guys [QUOTE=dickersonka;693294]First convert both
string
into date
format
then two dates can be add in vb.net using … to a date
format
and then using datediff & dateadd function user can add to diff. dates are in
string
format
[code] [/code…
how to add 2 dates that are in string format
Programming
Web Development
16 Years Ago
by agz86
hi all.i have 2 dates in
string
format
.i need to add these 2 dates to get the next date. is there any sql query for this?? Plz sum1 help me. urgent!! Thanx in advance...
how to add 2 dates that are in string format to get the next date
Programming
Web Development
16 Years Ago
by agz86
hi all.i have 2 dates in
string
format
.i need to add these 2 dates to get the next date. is there any sql query for this?? Plz sum1 help me. urgent!! Thanx in advance...
How to insert date in string format into MYSQL table as DATE data type
Programming
Databases
15 Years Ago
by ajay_p5
… that I am facing is: I have a date in
string
format
like 30 Jun 2009, how can I insert it into…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC