Python built in function example

abs() Return the absolute value of the number >>> abs(-100) 100 >>> abs(10) 10 >>> all() Determines whether all elements in the given iteratable parameter iterable are true, and returns true if so, False otherwise >>> all([100,100,100]) True >>> all([3,0,1,1]) False >>> any() Returns False ...

Posted by ALEXKENT18 on Tue, 19 May 2020 02:21:17 -0700

PHP encryption extension library openssl

PHP encryption extension library Mcrypt extension library Summary: php upgrade from 7.0 to 7.1 discards an extension, that is, the mcrypt extension. Although the extension can be used normally on the installation, a warning will be given to tell us that the mcrypt related methods have been discarded and have been removed by 7.2. Therefore, it i ...

Posted by sloshire1 on Mon, 18 May 2020 08:15:14 -0700

JavaScript (3) - timer, form validation

When outputting strings and variables, strings must be quoted, variables written directly, and connected with connectors. 1.Date object new.Date() gets the current system date new.Date.getFullYear() returns the year in four digits new.Date.getMonth() returns the month < 0 ~ 11 > new.Date.getDate() returns a day of a month < 1 ~ 31 ...

Posted by suresh64633 on Fri, 01 May 2020 10:36:38 -0700

shell display user name and host name under Linux

Author: Tyan Blog: noahsnail.com  |  CSDN  |  Brief book 1. Problem description Recently, a little thing was reinstalled on the server. As a result, the login shell interface turned into - bash-4.2 $, which was ugly and inconvenient to use. The main reason is that scp needs user name and host name, so it was modified. 2. Solutions Mod ...

Posted by DigitalNinja on Thu, 30 Apr 2020 21:30:28 -0700

In depth understanding of mixed operation of characters and numbers / / use of EOF / / deep oj topic: String decryption

Today, let's learn how to deal with the mixed operation of characters and numbers. Speak with questions: Question A: String decryption Title Description Now let a, a stand for the number 0, B, B stand for the number 1, C, C stand for the number 2 Z. Z stands for the number 25. Enter K, B and string. Please decrypt ...

Posted by billiondevil on Thu, 30 Apr 2020 14:42:11 -0700

Python log processing module

                       . Its main advantages are as follows: 1. You can set different log levels to output only important information in the release version without displaying a large number of debugging information; 2. Especiall ...

Posted by Mucello on Mon, 27 Apr 2020 09:29:23 -0700

Python high order function practice [user defined high order function, map, reduce, filter, sorted]

I. overview scala is similar to higher-order function, which is a function that can receive another function as a parameter. 2, Import base package import random from functools import reduce 3, Custom higher order function #Define common functions and generate lists automatically def getList(): hList = list(range(5)) return ...

Posted by rledieu on Fri, 17 Apr 2020 07:59:20 -0700

Network data analysis of python learning

regular expression Actually, there are four main steps for reptiles: Clear goals (know where you are going to search or where you are going to search) Crawling (crawling all the contents of the website) Take out (get rid of the data that is useless to us) Process data (store and use as we want)Regular expressions, also known as regular expre ...

Posted by DasHaas on Mon, 13 Apr 2020 08:24:20 -0700

base64 encoding and decoding of JS

Unicode problem solving There is a small pit that only supports ASCII. If you call btoa("Chinese"), an error will be reported: Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range. DOMString in browser is UTF-16 encoding. If the input strin ...

Posted by sukanya.paul on Sun, 05 Apr 2020 22:49:35 -0700

Linux command -- file

File is used to view file types. Different from Windows system, Linux system does not reflect the file type through the file name, so you need to use the file command to confirm. [admin@local ~]$ file exe exe: Bourne-Again shell script text executable As above, use the file command to view the type of exe file, whic ...

Posted by kanikilu on Sun, 05 Apr 2020 15:50:44 -0700