|
by: Pierre Fortin |
last post by:
Hi!
"Python Essential Reference" - 2nd Ed, on P. 47 states that a string
format can include "*" for a field width (no restrictions noted); yet...
>>> "%*d" % (6,2) # works as expected
' 2'
Now, with a mapping....
|
by: neutrino |
last post by:
Greetings to the Python gurus,
I have a binary file and wish to see the "raw" content of it. So I open
it in binary mode, and read one byte at a time to a variable, which
will be of the string type. Now the problem is how to print the binary
format of that charater to the standard output. It seems a common task
but I just cannot find the...
|
by: Kevin |
last post by:
I am looking for a way in C# to format my output. I want
to be able to specify a disply width and then have the
variable printed at minimum with that width.
I can accomplish this is C and C++ as follows:
C - printf("%5d", someInt);
C++ - cout << setw(5) << someInt;
|
by: Steven D'Aprano |
last post by:
I have a sinking feeling I'm missing something really,
really simple.
I'm looking for a format string similar to '%.3f'
except that trailing zeroes are not included.
To give some examples:
Float String
1.0 1
|
by: MC |
last post by:
In C, printf allows us to specify a runtime (non-constant) field width
of a formatted value by using the * character. Is there something
like that for System.String.Format? In C#, I find myself having to
use concatenation, which is awkward to write and to read:
s.Format("{0," + fieldWidth.ToString() + "}", val);
Preferably, I'd like to...
|
|
by: tstephan |
last post by:
In the docs for String.Format there is an alignment component which
allows you to pad the field to a certain number of spaces.
e.g.
FormatFName = String.Format("First Name = |{0,10}|", myFName);
Pads myFName, width of 10 minimum
I am used to printf which allows a '*' to be used to specify a
variable to be used at runtime to specify the...
|
by: TommyC |
last post by:
Hi all,
I fail to write the image data to binary PGM format (P5).
Let's say i have to write a image data into PGM P5 format.
I have the information for width, height, Y_min, Y_max, XL, XR and the TEMPLATE1 (data matrix) ==>A region of interest from an image.
Y_min & Y_max = minimum and maximum of the height value.
XL & XR = min and max of the...
|
by: cshaw |
last post by:
Hello Everyone, I am having problems with a listbox control. I have a
page with a couple of labels and drop-down lists at the top, and then
below there is a table with two columns, the first column contains a
listbox and the second column contains some buttons. I am trying to
display it such that if the listbox is empty it will be at least...
|
by: kelvin.koogan |
last post by:
Using C++/CLI but I would imagine C# is the same.
What is the fastest to do the following operations
1) Compare two Strings without case-sensitivity.
2) Take a group of objects with 4 string fields and tabulate them, so
each field is in a column, in a single String, one line per object
with \n separating them, calculating the minimum...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
|