Level 1: File reading and writing Knowledge points 1.HDFS file creation and operation steps step1: Get the FileSystem object; step2: Write through FSDataOutputStream; step3: Output the file content through FSDataInputStream. Programming requirements Get the system settings of hadoop and create an HDFS file in it. The file path is /user/hadoop/myfile; Add the string https://www.educoder.net in […]
Tag: min
Call opencv library programming to display pictures and student ID names under Ubuntu
Article directory 1. Principle of Chinese character dot matrix font library (1), Chinese character encoding 1. Location code 2. Internal code (2) Dot matrix font structure 1. Bitmap font storage 2. 16*16 dot matrix font library 3. 14*14 and 12*12 dot matrix fonts (3). Acquisition of Chinese character lattice 1. Use location code to obtain […]
DevChat is an all-in-one AI programming assistant that helps you “overwhelm your friends with one enemy and three scrolls”
What is DevChat and what can it help us with? DevChat is a product of OpenAI, an AI that can conduct programming-related conversations. This means you can use it to solve some programming problems or get advice about programming. You can provide code snippets and ask questions and it will help as much as possible. […]
Bipartite graph determination and maximum matching of bipartite graphs
1. Definition of bipartite graph A bipartite graph is a special undirected graph whose nodes can be divided into two disjoint sets, so that there are no edges connecting any two nodes in the same set, but there are no edges between nodes in different sets. Connected by edges. In other words, if an undirected […]
python concurrent programming (5)
Detailed explanation of IO model Blocking IO (blocking IO) In the blocking IO model, when a process needs to read data from a device (such as a hard disk), it must wait for the data from the device to be ready before it can continue execution. This waiting process is blocking because it prevents further […]
Netty–file programming
3. File programming 3.1 FileChannel FileChannel working mode FileChannel can only work in blocking mode Get FileChannel cannot be opened directly. FileChannel must be obtained through FileInputStream, FileOutputStream or RandomAccessFile. They all have getChannel methods. The channel obtained through FileInputStream can only be read The channel obtained through FileOutputStream can only be written Whether it […]
Weather display based on Wemos D1 Mini Pro development board
1. Basic introduction This project designs a weather display that can be controlled by touch. It is mainly composed of Wemos D1 Mini Pro and TFT display. Wemos D1 Mini Pro is used as the main control chip of the device to send out Wi-Fi signals and receive corresponding instructions. It transmits the received information […]
Strategy Enumeration: Eliminate the graceful use of if-else in projects
Text/Zhu Jiqian I remember when I first came into contact with JAVA object-oriented programming, if I encountered a large number of process judgment statements, almost the whole screen was filled with if-else statements. There were so many that I forgot where the head and where was the tail. However, even if the screen was filled […]
shell – regular expression, sed streaming editor
Regular Expressions Overview Overview Use a “string of symbols” to describe data with common attributes Basic regular list Extended regular list Prepare materials [root@localhost ~]# head -5 /etc/passwd > user [root@localhost ~]# cat user root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin Test ^ $ [root@localhost ~]# grep root user root:x:0:0:root:/root:/bin/bash [root@localhost ~]# grep ^root user root:x:0:0:root:/root:/bin/bash [root@localhost […]
Algorithm: Explanation of dynamic programming ideas (C/C++)
I accidentally reviewed the review with my colleagues two days ago and found that the algorithms in the previous functional business were really unsightly. The entire algorithm structure exceeds 50 lines…all if, else. The main focus is a customized explanation of a special problem, but this also exposed multiple problems. In fact, in many development […]