Skip to main content
Filter by
Sorted by
Tagged with
-3 votes
2 answers
154 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,326
0 votes
1 answer
121 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
0 answers
45 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
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
1 vote
1 answer
126 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
1 answer
145 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
0 votes
2 answers
66 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
0 votes
1 answer
268 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
0 votes
0 answers
65 views

While working with numpy, I observed something strange. When I print a variable using print() and I format the print usingprint(f'{<variable>:.9f}) gives different values. For example, or I am ...
spacemanspiff's user avatar
1 vote
0 answers
76 views

I would like to convert a set of floats to strings with 3 significant digits, e.g. 10.00 --> 10.0 10.10 --> 10.1 101.10 --> 101 Using "{:.3g}".format(x) results in 10, 10.1, 101 ...
SebaMarino's user avatar
4 votes
1 answer
151 views

In Ruby, you can parse a string into a DateTime based on a given format string, for example: 3.2.4 :001 > DateTime.strptime(Time.now.to_s, '%Y-%m-%d %H:%M') Sat, 17 Aug 2024 13:31:00 +0000 3.2.4 :...
Ben G's user avatar
  • 26.9k
1 vote
1 answer
74 views

I am currently working on some Python code that will be executed by a larger C# web project. The C# code uses NLog to create log files. I have got my Python logger logging to the same file. Also, I ...
ysi_d's user avatar
  • 71
0 votes
1 answer
77 views

I know this is likely a duplicate question and for that I am sorry. I have been looking for a way to format a custom string, that is pulling values from SQL database. I have read many S.O. on ...
Primdonm's user avatar
0 votes
1 answer
859 views

I am looking for a solution that is the most convenient for casual, exploratory notebook use. I have several functions that output strings with multiple lines. When this appears in the output cell of ...
escapecharacter's user avatar
2 votes
3 answers
2k views

I have a snippet where I generate a string that includes an original number (original_number) and its corresponding Roman numeral (roman_number). I want to format this string so that the original ...
aarondn's user avatar
  • 21
0 votes
1 answer
129 views

Here I have a code for a function that creates a formatted table.It currently works but I want to optimise it considering "Setting an item of incompatible dtype is deprecated and will raise an ...
okijuh123's user avatar
0 votes
1 answer
619 views

I need a label to show a number in the range of thousands. I'm not using thousand separator as per requested, but I want the user to be able to focus on the thousands. For example if I were to show &...
Dean Thomas's user avatar
0 votes
3 answers
702 views

a=str(141528231211101319151414.0) print(a) # 1.4152823121110133e+23 This string was printed with scientific notation. I do not understand why. I am using mpmath to deal with arithmetic operations ...
user409's user avatar
  • 125
0 votes
1 answer
151 views

I'd like to format a float so that it has at most 3 fractional digits, but if the last fractional digit(s) are 0 then omit them. input : expected output 1.1234 : 1.123 1.120 : 1.12 1.100 : 1.1 1.0 : 1 ...
Gavriel's user avatar
  • 19.3k
3 votes
2 answers
260 views

I am searching Splunk using powershell via API and get a list of data that contain dates (not in DateTime format). The API call is performed by a Function that works fine and it works for the inital ...
Jhowel's user avatar
  • 63
-3 votes
1 answer
160 views

I am working in google sheets. Excel also works. I have column called "funds." This column has names of venture funds, such as Accel, A16z, and Sequoia. One fund in each row. I have another ...
pynewbee's user avatar
  • 669
0 votes
3 answers
752 views

Context I am receiving numbers as strings in Python 3 and want to transmit them as strings in order to preserve accuracy so that the upstream server can convert the numbers-as-strings to decimal....
NeilG's user avatar
  • 4,128
0 votes
1 answer
124 views

I have been working though Fluent Python 2nd Edition by Luciano Ramalho. On page 5 he writes that he has attempted to adopt the f string syntax throughout the book, although there are times when str....
caseycronyn's user avatar
0 votes
2 answers
567 views

I have a series of numbers that can be either large integers, or very small decimals. I would like numbers with more than four digits to be displayed in scientific notation. At first, I considered a ...
Matthew Fournier's user avatar
1 vote
1 answer
127 views

I am looking at other code on a Java practice. Here is his code: import java.util.Arrays; import java.util.stream.Collectors; public class StripComments { public static String stripComments(...
RockBottom1114's user avatar

1
2 3 4 5
87