Is there a printf converter that prints in binary format?

I can print printf as a hexadecimal or octal number.Is there a format tag printed as binary or any cardinality? I'm running gcc. printf("%d %x %o\n", 10, 10, 10); //prints "10 A 12\n" print("%b\n", 10); // prints "%b\n" #1st floor This code should meet your needs for up to 64 bits.I created two functions, pBin & pBinFill.Both do ...

Posted by new_to_php2004 on Mon, 10 Feb 2020 19:04:34 -0800

A strange memcpy problem

When you see this title, you must be thinking about the bug s caused by memory overlap. I admit that you are right, but not all of them. If you are interested in this, you can continue to look down, and you will surely get something. First of all, I will briefly introduce the background. Recently, there is a strange problem in the company's pr ...

Posted by cordex on Sat, 14 Dec 2019 11:41:16 -0800

Introduce and install MySQL database in detail

Basic concepts of database data The symbolic record that describes things is called Data Including numbers, words, graphics, images, sounds, archives, etc Store in a unified format in the form of "record" surface Organize different records together to form a "table" It is used to store specific data data base A databas ...

Posted by hno on Tue, 03 Dec 2019 01:22:28 -0800

Centos7 compiles and installs nginx and sets the reverse agent

I. compile and deploy Nginx 1.12 Installation configuration: [root@localhost ~]# groupadd nginx [root@localhost ~]# useradd -s /sbin/nologin -g nginx -M nginx [root@localhost ~]# systemctl stop firewalld [root@localhost ~]# systemctl disable firewalld #Turn off selinux #Server file descriptors, etc [root@localhost ~]# yum install gcc gcc-c++ ...

Posted by MCP on Mon, 02 Dec 2019 10:13:31 -0800

gdb debugging practice

One code #include<iostream> using namespace std; int func(int n){ int result=0; for(int i=1;i<=n;i++){ result+=i; } return result; } int main(){ int arr[10]; arr[0]=0; arr[1]=1; for(int i=2;i<10;i++){ arr[i]=arr[i-1]+arr[i-2]; } cout<<"arr[9]"<<arr ...

Posted by bigger on Tue, 12 Nov 2019 08:14:52 -0800

oracle installation and visit [3] to install oracle 11g in CentOS7

After understanding the installation of Oracle 10g and 11g in win10, this article will cover the installation of Oracle 11g in CentOS 7. 1. Preconditions CentOS7 workstation installed jdk8 has been installed 2. Software download Baidu SkyDrive Links: https://pan.baidu.com/s/1u3Qjguim-7Z-4GoHDF8Pxg Extraction code: gwig 3. Co ...

Posted by limey on Wed, 06 Nov 2019 13:01:31 -0800

c + + copy constructors (focus on shallow and deep copies with pointers)

Today, my colleague asked a question about the copy constructor. The class contains pointers. Let's talk about the copy constructor of c + +. The copy constructor of c + + is a kind of constructor, which is the initialization of class objects. Only one parameter of the copy constructor is the reference of this class. Note that the default con ...

Posted by AbraCadaver on Wed, 23 Oct 2019 03:41:00 -0700

Oracle 12C Graphics & Quietly Installing Trample

1 Installation Planning ORACLE is installed on the new disk. The disk is mounted on u01. d01 and d02 are symbolic connections. The actual directory is under u01. parameter value Oracle base /d01/app/oracle Software location /d01/app/oracle/product/12102/dbhome_1 DATAFILEDESTINATION /d02/oradata RECOVERYAREADESTINATION /d02/fast_recov ...

Posted by clairian on Fri, 04 Oct 2019 17:38:11 -0700

MAC Builds Linux Cross Compiling Environment

MAC Builds Linux Cross Compiling Environment Preparation Run script Preparation Create a new case-sensitive hard disk partition with the disk tool of mac. Follow-up suggestions are made in this partition. Otherwise, there will be errors such as file missing. Running scripts requires gnu-sed, not ...

Posted by mjseaden on Fri, 04 Oct 2019 09:21:07 -0700

How to use Skywalking Agent?

How to use Skywalking Agent? If you don't know what Skywalking agent is, Please click here to see Probe perhaps Here's a quick look at agent Since most of my services are JAVA services, here are three ways to choose from using agent in Java Three ways: Using the Officially Provided Basic Mirror Building agent packages into existing base images ...

Posted by tpstudent on Thu, 29 Aug 2019 21:19:07 -0700