|
by: Rusty Shackleford |
last post by:
I have a Summer in front of me without any school, and I'd like to add a
new format for python print strings that will show any number in a
binary representation. For example:
>>> '%b' % 3
11
>>> '%b' % 5
101
You get the idea. I've written functions that return strings, so that
|
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: CSN |
last post by:
Is it possible to iterate over an array in plpgsql?
Something like:
function insert_stuff (rel_ids int)
....
foreach rel_ids as id
insert into table (rel_id, val)
values (id, 5);
|
by: durumdara |
last post by:
Hi!
I want to replace some seqs. in a html.
Let:
a-
b
= ab
but:
xxx -
|
by: fnoppie |
last post by:
Hi,
I am near to desperation as I have a million things to get a solution
for my problem. I have to post a multipart message to a url that
consists of a xml file and an binary file (pdf). Seperately the
posting words fine but when I want to create one multipart message
with both then things go wrong.
The binary file is converted and of...
|
|
by: mosi |
last post by:
Problem:
how to get binary from integer and vice versa?
The simplest way I know is:
a = 0100
a
64
but:
a = 100 (I want binary number)
does not work that way.
|
by: waterdriven |
last post by:
Hello;
I am a newbie.
A homework assignment was assigned and I am having trouble getting started.
The assignment reads:
Write a program to print out the binary value of a 16 bit number.
|
by: dmitrey |
last post by:
hi all,
could you inform how to print binary number?
I.e. something like
print '%b' % my_number
it would be nice would it print exactly 8 binary digits (0-1, with
possible start from 0)
Thank you in advance, D
|
by: hank |
last post by:
I have this code here, it converts decimal numbers to binary. There is
one problem. The output is printed 'in reverse' and I have no clue at all
how to solve this problem.
Output of program:
Decimal number: 10
Binary representation: 0101
(It should be 1010, and not 0101...)
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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...
|