Skip to main content
-2 votes
2 answers
161 views

I'm receiving this date and time in US format from an upstream server I have no control over and can't change: 12/16/2024 11:30:23 AM I am trying to convert it to UK format using PowerShell: [DateTime]...
Joly's user avatar
  • 3,346
1 vote
1 answer
157 views

I'm learning C and trying to debug with printf calls. But, when I format a string with %s and have characters immediately after, they end up replacing the characters at the beginning. Example: printf(&...
Nicolas Gatien's user avatar
0 votes
1 answer
130 views

I am updating some legacy code that is a mixture of C and C++. I am using a modern compiler (C++17) and building with Makefile. I get a warning for this line of code: sscanf(data_buffer, "%d,%....
J. L.'s user avatar
  • 1
0 votes
2 answers
95 views

air_temperature = float(input()) print('{:C>.1f}'.format(air_temperature), 'C') Your output: 36.4 C Expected output 35.4C Error Message Why am I being told there is an extra space here that is ...
Alex Atheus's user avatar
0 votes
0 answers
46 views

This Excel-like layout is implemented using RecyclerView. For each EditTexts, the inputType is text because the requirement is to accepts these 2 formats: Numeric input (separated by comma each 3 ...
anta40's user avatar
  • 6,813
1 vote
1 answer
118 views

I need to format np.float64 floating values without leading digits before the dot, for example -2.40366982307 as -.240366982307E+01, in python. This is to allow me to write in RINEX 3.03 the values ...
EmmanuelMess's user avatar
0 votes
0 answers
37 views

"Streaming Text Formatting" – Formatting text that arrives in chunks from a stream. "Real-time Text Structuring" I am creating a web app using next.js and openai When I use openai ...
Zainy Shorts's user avatar
0 votes
0 answers
26 views

I am working on some old XAML that has a binding with a string format specified as {}{0,8:0.000} I believe the intent of this string format is to create a fixed length string with whitespace padding ...
Hugoagogo's user avatar
  • 1,676
1 vote
1 answer
127 views

When you convert some number to a string and pass in a format such as "00", it will insert 0's if the number doesn't have digits filling that spot. Example: 1.ToString("00") -> &...
the_pied_shadow's user avatar
1 vote
2 answers
118 views

I would like to understand what is going on with this code: float flt = 0.123F; string s1 = flt.ToString("0.#########"); // "0.123" string s2 = flt.ToString("N9"); ...
rory.ap's user avatar
  • 35.7k
1 vote
1 answer
153 views

I'm trying to specify a formatter to print mdspan of rank 2 as a matrix, quite useful. I would like at least for element formatting to work, e.g. std::println("{::.2e}", matrix) would print ...
olafwx's user avatar
  • 77
3 votes
1 answer
190 views

Given a tree-like data structure of nodes with each node having a property children that contains the children nodes from left to right, I wish to create a string representation of this data structure ...
Gigi Bayte 2's user avatar
  • 1,014
0 votes
2 answers
71 views

Is there a way to "bypass" the dot and "override" the decimals when typing a value in a TextBox in WPF formatted with a 2 decimals via StringFormat='{}{0:F2} ? When I type "1....
user avatar
-3 votes
3 answers
160 views

I have an array of 10 elements and I can each of the elements print on a new line formatted 6.2f with print(f'{myArray:6.2f}', sep="\n") But I would like to create string containing what ...
SoftwareTester's user avatar
0 votes
1 answer
271 views

I have the following Zig snippet: var buffer: [20]u8 = undefined; const precise_string = std.fmt.bufPrint(&buffer, "{d:.d}", .{ max, precision }) catch unreachable; std.debug.print("...
Palash Nigam's user avatar
  • 2,082

15 30 50 per page
1
2 3 4 5
289