HDFS Java API Programming

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 […]

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. […]

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 […]

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 […]