Left Ear Listening Series Notes - Programming Paradigm Learning

Programming paradigm Generic programming (abstract types) Functions that exchange two numbers in an array public void swap(int[] arr, int index1, int index2) { int temp = arr[index1]; arr[index1] = arr[index2]; arr[index2] = temp; } Think about it?What's wrong with this function? It only supports array swapping of t ...

Posted on Fri, 03 Jan 2020 07:13:14 -0500 by coolbeansdude51

Summary on the function of online preview in JAVA

Spring boot wrote a small Demo, baidu online disk address: https://pan.baidu.com/s/1dS9M89GLR4AIVwJx4aMglg 1, Preparation before writing online preview function: 1. Install openOffice software, download address: http://www.openoffice.org/download/index.html 2. The jar package pom of jdconverter depends on the following &lt ...

Posted on Fri, 03 Jan 2020 04:31:07 -0500 by cueball2000uk

The correct method of function call between Linux kernel modules

It's A common thing that there is A call relationship between modules. Let's take two modules A, B and B as examples to explain how to use them correctly. In module A, use export symbol or export symbol GPL to export the functions to be provided to module B; Module B uses extern to declare the functions provided by module A t ...

Posted on Thu, 02 Jan 2020 22:30:24 -0500 by wedge00

Compiling ffmpeg with android ubuntu

1. Download the source code of ffmpeg 2. Create a new script compilation file, build u android.sh. if you want to compile other cpu formats, you can modify the assignment at the cpu #!/bin/bash make clean # The path of NDK is set according to its installation location export NDK=/home/gjh/android-ndk-r10e SYSROOT=$NDK/platfor ...

Posted on Thu, 02 Jan 2020 07:57:21 -0500 by kam_uoc

Bash script realizes the function of automatic package grabbing on Solaris/Linux

There are two kinds of OS products: Solaris and Linux. When troubleshooting, students on site are often required to grab the bag. In order to grab the package conveniently, a grab script is made with shell. The main functions are as follows: 1. Automatically identify the OS type, and use the corresponding packet grabbing comm ...

Posted on Thu, 02 Jan 2020 06:31:06 -0500 by dsantamassino

Centos7 extended disk space

1. View the disk and create a new partition View disk status fdisk -l Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors #Disk size Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x ...

Posted on Thu, 02 Jan 2020 05:51:59 -0500 by wkrauss

Linux virtual memory management (glibc)

In the exchange voucher system developed by using mysql as DB, with the continuous creation of partition tables, it is found that mysqld has a suspected "memory leak" phenomenon. However, no similar problem (the final reason is due to glibc's memory fragmentation) has been found after the detection by valgrind and other tools. Recent ...

Posted on Thu, 02 Jan 2020 02:15:10 -0500 by mbabli

nginx load balancing instance

Example overall framework:   Use VMware to build 5 Centos7 virtual machines (including clients), system version: CentOS Linux release 7.2.1511. The nginx version, MariaDB server version, PHP FPM version and PHPMyAdmin version of the instance are 1.12.2, 5.5.56, 5.4.16 and 4.0.10.20 respectively. All virtual machines in this instance have turne ...

Posted on Wed, 01 Jan 2020 00:14:30 -0500 by mubeena

[provide feasibility Script] RHEL 7/CentOS 7/Fedora28 rename network card name

Experiment Description: In many automation tasks, scripts often get information by reading configuration files. After the upgrade of red hat system (CentOS7/RHEL7), the naming method of "consistent network device interface" is adopted for network card naming, resulting in different network card names of different devices. In order to ...

Posted on Tue, 31 Dec 2019 19:33:59 -0500 by akmalsiddique

Linux-04-Linux system file type

Different from windows system, the file type of Linux is not distinguished by suffix. In Linux, all files and devices exist in the form of files, that is to say, in Linux, except files are directories. We use the ll command to view the files under the user [test@CentOS6 ~]$ ll Total dosage 4 -Rw-rw-r -- 1 test 0 August 10 1 ...

Posted on Tue, 31 Dec 2019 13:43:44 -0500 by amit.patel