C Language Notes 13_Sorting Algorithm

Sorting algorithm Bubble sort Bubble Sort is a simple sorting algorithm.It repeatedly visits the columns to be sorted, comparing two elements at a time, and swapping them if their order (for example, from large to small, and from A to Z) is wrong. Process demonstration: #include <stdio.h> void bubble_sort(int arr[], int len) { int i, ...

Posted by Warptweet on Sun, 29 Dec 2019 22:45:44 -0800

Getting started with Python

Getting started with Python 1, What is a list In order to store the operation data conveniently, python provides some built-in data structures. For example: list, tuple, dictionary, set, etc. The so-called "built-in" means that they are part of the python language, So they can be used directly in the program. 1. Structure of list p ...

Posted by LacOniC on Sun, 29 Dec 2019 09:47:14 -0800

How do I change directories (CDS) in Python?

cd as in a shell command to change the working directory. How do I change the current working directory in Python? #1 building This is an example of a context manager changing a working directory. It's more than anything else ActiveState version It's simple, but it can do the job. Context manager: cd import os class cd: """ ...

Posted by Darkness Soul on Sun, 29 Dec 2019 06:02:26 -0800

Seek help! Beautifulsop can't parse Baidu Homepage

Seek help! Beautifulsop can't parse Baidu Homepage In the python 3 compiler, first import the corresponding third-party libraries. Here, I only use urllib.request and beautiful Soup for testing. After the import, enter the following code in the shell to display the corresponding results. >>>url_1 = r'https://www.baidu ...

Posted by myitanalyst on Fri, 27 Dec 2019 08:41:42 -0800

MongoDB-4.2.2 install and configure account password for access

0. purpose Download MongoDB and install it. Set password access.The MongoDB official website will download the following three installation packagesMongodb-org-server-4.2.2-1.el6.x86 × 64.rpm × mongodb services, configuration files, startup scriptsMongodb-org-shell-4.2.2-1.el6.x86 × 64.rpm 񖓿 contains shell commands related to ...

Posted by GameMusic on Wed, 25 Dec 2019 06:42:05 -0800

[LINUX]CentOS7 configure jdk environment

[LINUX]CentOS7 configure jdk environment Please support originality and identify DannisTang (tangweixuan1995@foxmail.com) If the Java environment is installed under linux, but the java file path is not specified in the configuration file, the installation directory cannot be found with echo. Please refer to another article o ...

Posted by Vizionz on Sun, 22 Dec 2019 14:57:38 -0800

c + + configuration of vscode in Ubuntu

Create a new project directory, such as hello world; Create a new cpp file under the directory HelloWorld, such as helloworld.cpp; #include <iostream> #include <vector> #include <string> using namespace std; int main() { vector<string> msg {"Hello", "C++", "World", "from", "VS Code", "and the C++ extension!"}; fo ...

Posted by pleek on Sun, 22 Dec 2019 09:38:36 -0800

Memcached Memory Database Cluster

Overview of Memcached An Open Source High Performance Distributed Memory Object Cache SystemAll data is stored in memorySupports data of any storage typeSpeed up Web site access Memcached Caching Mechanism When a program writes a cache data request, the API interface of Memcached routes the KEY input routing algorithm module to a service in ...

Posted by MrKaraokeSteve on Tue, 17 Dec 2019 17:20:02 -0800

Tagging for my website (day 19)

When visiting the open source Chinese community, I found that each blog has a line of article labels, which are about the code types and modules used in the article. As shown in the following figure, my open source Chinese community address is: https://my.oschina.net/zhenfei. I'd like to think of my own website instead, and I'd like to add ...

Posted by feckless on Tue, 17 Dec 2019 09:40:13 -0800

Docker--DockerFile creates its own image

Echo edit, welcome to reprint, reprint please declare article source.Welcome to add echo WeChat (Micro Signal: t2421499075) to exchange learning.Never lose a hundred battles, never claim to be a constant winner, never fail, and always strive to move forward.- That's really powerful!!! As we use many of the images in the docker library, we can ...

Posted by cap97 on Mon, 16 Dec 2019 19:06:50 -0800