• Static compilation of PHP and dependent extensions


    One day, when I was writing a framework using swoole, I realized such a problem. Although like the swoole extension, many PHP extensions can provide some features to facilitate developers’ development and use, they also caused some difficulties in deployment and distribution: not every Linux host and distribution version has a PHP environment, even if […]

  • Threshold segmentation and threshold implementation


    Binary thresholding First, select a specific threshold value, such as 127The new threshold generation rule is:The gray value of pixels greater than or equal to 127 is set to the maximum value (for example, the maximum 8-bit gray value is 255)The gray value of pixels with gray value less than 127 is set to 0 […]

  • Binary, bit operation, displacement operation


    Basic concepts of binary Binary is the carry system of every 2 carry, and 0 and 1 are the basic operators. Modern electronic computer technology uses binary, because it only uses two digital symbols: 0 and 1, which is very simple and convenient and easy to be realized electronically. The information processed inside the computer […]

  • Leetcode practice – bit operation (division of two numbers, numbers that appear only once, repeated DNA sequences, etc.)


    preface The operation of 0 and 1 is the bottom operation of the computer. All programs, no matter what language they are written in, must be transformed into a language that the machine can understand, that is, binary for basic operations, and these basic operations are the bit operations we want to talk about today. […]

  • File operation with Python


    What is a file A file is a named location in the storage area of the system, which is used to store some information for subsequent access. It can realize continuous storage in nonvolatile memory, such as on hard disk. When we want to read or write a file, we need to open the file; […]

  • Save c# stream as a file


    First read the stream into the byte array, and then write it to the binary file with binarywriter: using System.IO; //Streamfile is a stream type byte[] bytes = new byte[streamFile.Length]; streamFile.Read(bytes, 0, bytes.Length); streamFile.Seek(0, SeekOrigin.Begin); FileStream fs = new FileStream(“D:/a.jpg”, FileMode.Create); BinaryWriter bw = new BinaryWriter(fs); bw.Write(bytes); bw.Close(); fs.Close();

  • What is the use of common log files in MySQL database?


    Front end personnel must master MySQL database, and log files record various types of activities affecting MySQL database, so they must master knowledge. Today, Qianfeng AVA training editor will introduce you to the common log files in MySQL database. Common log files in MySQL database include error log, binary log, slow query log and query […]

  • Go [start]


    Recently, I started to learn go. While learning, I made a note to help myself and others. If there are mistakes, you are welcome to correct them. Thank you very much. install Take binary package as an example Download binary packagewget https://studygolang.com/dl/golang/go1.15.7.linux-amd64.tar.gz Unzip the downloaded binary package to the / usr / local directorytar -C […]

  • Learn a Linux command every day (52): where is


    Yesterday’s recommendation:Learn a Linux command every day (51): which Command introduction The whereis command looks for binary programs, code, and other related file paths. However, compared with find, the speed of where is search is very fast, because Linux will record all the files in the system in one database file. When users use the […]

  • GMP extended learning for operating arbitrary precision size in PHP


    For all kinds of development languages, integers have a maximum number of digits. If they exceed the number of digits, they cannot be displayed or operated. In fact, this is also a problem of accuracy loss after the accuracy exceeds the limit. In our PHP code, the largest integer is very large. We can use […]

  • Talk about rust webassembly in simple terms (I)


    What is web assembly Before December 2019, if you want to write a web page, you must be inseparable from the three good brothers of HTML, CSS and JS. After December 2019, W3C announced that webassembly had joined them. Why join webassembly after three brothers? Is it different from the previous one? In contrast to […]

  • Write OS kernel from scratch – load executable


    Series catalog Preface preparation BIOS boot to real mode GDT and protection mode On virtual memory Load and enter the kernel Display and print Global descriptor table GDT Interrupt processing Virtual memory perfection Implement heap and malloc First kernel thread Multithreading operation and switching Lock and multithreading synchronization Enter user status Process implementation system call […]