1. Bubble sortThe basic idea is: 22 compare the keywords of adjacent records, if the reverse order is exchangedThe best case for bubble sort time complexity is O (n), and the worst case is O (n^2)Improvement Idea 1: Set the flag bit, obviously if there is a trip without exchange (flag = false), indicating that the sort has been completedImprovement Idea 2: Record the last position of the marker, and the next step from the head to this position is OK.The original bubbling sort code is as follows:
Introduction The top command is a common performance analysis tool under Linux that shows the resource usage of individual processes in the system in real time, similar to the Task Manager for Windows.Top display system current process and other conditions, is a dynamic display process, that is, you can continue to refresh the current state through the user keys. If the command is executed in the foreground, it will monopolize the foreground until the user terminates the program. More accurately
=====================================================================================$ money (dollar sign)The delegate symbol for the variable substitution (Variable Substitution).vrs=123 echo "VRS = $vrs" # VRS = 123In addition, the Regular Expressions is defined as the end of the "line" (End-of-line). This is commonly used in grep, SED, awk, and Vim (vi).=====================================================================================Regular expressions for ${} variablesBash defines a numb
A detailed description of the various directories of the Linux (CentOS) systemTypes of File systemsLinux has four basic file system types: Normal files, directory files, connection files, and special files, which can be identified by the file command.Ordinary files: such as text files, C language meta code, shell scripts, binary executable files, etc., can be used cat, less, more, VI, Emacs to see the content, with the MV to rename.Catalog files: Incl
cat's ability to append content to a document;Ok?ok~North South De>Cat connects the contents of multiple files and outputs them to a new file;Suppose we have sir01.txt, Sir02.tx and Sir03.txt, and the contents are as follows;De>[[email protected] ~]# cat Sir01.txt123456I am testing[email protected] ~]# cat Sir02.txt56789Beinan tested[email protected] ~]# cat Sir03.txt09876Linuxsir.org testingde>I want to connect the Sir01.txt, Sir02.txt, and sir03.txt three files through cat (that is, the conte
[Tab] is followed by the first word of a sequence of instructions, then the command is complete; How are examples described? What do you mean by the first word of a sequence of instructions?When [Tab] is followed by the second word of a sequence of instructions, what is the description of the "file completion" instance? What is the second word of a sequence of instructions?If you install the Bash-completion software, you can do the "option/Parameter C
XFS description Data observation of file systemEXT Family dumpe2fs , while the XFS family uses xfs_info to observe[email protected] ~]# Xfs_info mount point | device file name[[email protected] ~]# DF--T/bootFilesystem Type 1k-blocks used Available use% mounted on/dev/vda2 xfs 1038336 133704 904632 13%/boot# That's right! It can be seen that the XFS file system! Take a look at the content! [Email protected] ~]# xfs_info/dev/vda21 meta-data=/dev/vda2 i
Function Description: Calculates the number of words.Syntax: WC [-clw][--help][--version][file ...]Supplementary note: With the WC instruction we can calculate the number of bytes, words, or columns of a file, if no file name is specified, or if the given file is named "-", the WC instruction reads the data from the standard input device. Assuming that no parameters are given, the WC instruction displays the number of columns, words, and bytesParamete
s Afterpropertiesset Method and Init-method configuration description in Pring1. Initializingbean.afterpropertiesset ()The Initializingbean interface class in spring provides a way for the bean to define the initialization method, which contains only one method: Afterpropertiesset ().The bean implements this interface and writes the initialization code in Afterpropertiesset ():It is not necessary to have a special configuration for the bean in the XML
tips, you can look at the framework's API document to find several major classes or interfaces, and then understand the overall framework model and the basic architecture (SPRINGMVC component architecture to see the first time), and then through these major classes, and interfaces to learn. In fact, like this relatively mature open source framework, the naming and annotation of the class is quite normative, as well as the specific use of some design patterns, code philosophy is very worthy o
services. The more famous is www.linux.com and www.real.com.II. system Structure of LVSThe server cluster system with LVS is composed of three parts: the most front-end load Balancing layer (Loader Balancer), the middle server group layer, with server array, the lowest data sharing storage layer, represented by shared storage. All applications are transparent to the user, and the user is only using the high-performance services provided by a virtual server. The architecture of LVS as shown belo
Description of the process and creation of the processLiu Xipeng 20135304"Linux kernel Analysis" MOOC course http://mooc.study.163.com/course/USTC-1000029000First, description of the process1, 1 Process descriptor Task_struck data structure (i)(1) The three main functions of the operating system: process management, memory management, file system.(2)Process Control block Pcb--task_struckTty_struck ConsoleDe
IntroductionThe top command is a common performance analysis tool under Linux that shows the resource usage of individual processes in the system in real time, similar to the Task Manager for Windows.Top display system current process and other conditions, is a dynamic display process, that is, you can continue to refresh the current state through the user keys. If the command is executed in the foreground, it will monopolize the foreground until the user terminates the program. More accurately,
IntroductionThe top command is a common performance analysis tool under Linux that shows the resource usage of individual processes in the system in real time, similar to the Task Manager for Windows.Top display system current process and other conditions, is a dynamic display process, that is, you can continue to refresh the current state through the user keys. If the command is executed in the foreground, it will monopolize the foreground until the user terminates the program. More accurately,
Tags: server min Memory Eve Start Row detailed access LinuA detailed description of the Hosts file under Linux
Host Name:Whether on the LAN or the Internet, each host has an IP address to differentiate between this host and its host, that is, the IP address is the host's number.Public network: The IP address is not easy to remember, so there is a domain name. Domain names exist only in the public network (the INtERNET), each domain name correspond
A detailed description of the file directory structure in the Linux operating system1. Directory structure and main content:1) the "/" root directory section has the following subdirectories:The/usr directory contains all commands, libraries, documents, and other files. These files will not be changed during normal operation. This directory also contains the main applications for your Linux distribution, for example, Netscape.The/var directory contain
: takes three positions, three positions in the order of read R, write W, execute x. If there is no permission, then-. In this example, what we see is r-x, which is in the written position--that there is no write permission, the group to which the file belongs has a readable executable, but no write permission.Other user privilege bits: Occupy three positions, three positions in the order of read R, write W, execute x, if there is no permission, then-. In this example, we look at the other user'
I. FTP instructionsThe common FTP in Linux system is vsftp, that is, very Security File Transfer Protocol. There is also a proftp (profession FTP). Here is also a simple description of the configuration under Vsftp.VSFTP provides 3 types of remote login options:(1) Anonymous login methodJust don't need username, password. You can log in to the server computer.(2) Local user modeYou need an account name and password to log in. And, this account name an
The interview in these days, I feel that the whole grasp of spring is still very weak. So we need to continue to strengthen.Here to explain the spring of these several aspects of the test, but the actual feeling is still wrong, this problem I think the need to really read the spring source code to say something to make sense. This kind of interview asks the law, also only is the interview the question law, to the actual grasp still has no slightest meaning. So I think there is a chance to read t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.