[Python 3 learning notes - basic syntax] learn about standard libraries in Python
Operating system interface
The os module provides many functions associated with the operating system.
>>> import os
>>> os.getcwd() # Returns the current working directory
'C:\\Python34'
>>> os.chdir('/server/accesslogs') # Modify the current working directory
>>> os.system('mkdir today') # Ex ...
Posted by mattsoftnet on Sun, 24 Oct 2021 11:27:01 -0700
[high frequency written interview in front field] question 10: JavaScript related
catalogue
1. Known array var stringArray = ["This", "is", "Baidu", "Campus"]
2. The string foo = "get element by ID" is known. Write function to convert it into hump representation
3. Known array var numberArray = [3,6,2,4,1,5]; Apply array API for operation
4. Output today's date in YYYY-MM ...
Posted by fuzzy1 on Fri, 22 Oct 2021 16:55:53 -0700
location Matching for Nginx &&rewrite
1. Common Nginx regular expressions
It's also mentioned in the blog before the rule, and it's important to mention it here.
^ : Matches the starting position of the input string
$ : Match end position of input string
* : Match the previous character zero or more times. Such as " ol*"Can match " o"And " ol","oll"
+ : Match t ...
Posted by pngtest on Mon, 18 Oct 2021 09:21:42 -0700
grep command exercise
1. Show / etc/passwd
Lines in the file that do not end with / bin/bash;
grep -v "/bin/bash$" /etc/passwd
2. Find the two or three digits in the / etc/passwd file;
grep -E '\<[0-9]{2,3}\>' /etc/passwd
3. Find the line in the / etc/rc.d/rc.sysinit or / etc/grub2.cfg file that starts with at least one white space character and is foll ...
Posted by hernan on Thu, 14 Oct 2021 11:51:12 -0700
#Mengxin log #1.Python script: the files are sent to the corresponding mailbox in batches according to the student number
Mengxin records his learning experience in some days.
preface:
The teacher sent me the corrected experimental report (. pdf) at noon. As a teacher assistant, I need to return each report to the corresponding students and register my grades. There are 5 + reports and ...
Posted by matthewst on Sun, 10 Oct 2021 05:09:25 -0700
Learning regular expressions in python
regular expressions are powerful tools and techniques for string processing.
regular expression uses a predefined pattern to match a class of strings with common characteristics. It is mainly used to process strings. It can quickly and accurately complete complex search, replacement and other processing requirements. It has important appli ...
Posted by lesmith on Sun, 10 Oct 2021 00:47:21 -0700
js regular expression learning
js regular expression learning
1. What is a regular expression?
Regular expressions describe the composition pattern of strings and are often used to check whether strings meet predetermined format requirements **Regular expressions describe rules bit by bit: * * it describes the form of strings bit by bit
<script>
// Cr ...
Posted by ozzythaman on Thu, 07 Oct 2021 07:51:03 -0700
USACO 2021 February Contest, BronzeProblem 1. Year of the Cow
Title Description
Farmer John's cows were very excited when they learned that they were celebrating the year of the ox recently. The year of the ox is always the favorite of dairy cows.
We know that the zodiac corresponding to each year in the Chinese calendar follows a 12-year cycle: ox, tiger, rabbit, dragon, snake, horse, pig, rat (ox, tig ...
Posted by scliburn on Wed, 06 Oct 2021 20:19:50 -0700
Use of easypoi - import verification
easypoi import verification
1, Basic verification of import
Now the product needs to verify the imported Excel. Illegal Excel is not allowed to be warehoused. You need to return specific error information to the front end and prompt the user. The error information needs to include line number and corresponding error.
Because EasyPOI supports ...
Posted by Supplement on Wed, 29 Sep 2021 15:28:35 -0700
regular expression
The java.util.regex package supports regular representation and includes two classes, Pattern (pattern class) and Matcher (matcher class). The Patterns class is the object used to express and state the search pattern used, and the Matcher class is the object that really affects the search.
1 Static method for checking strings
To determine if ...
Posted by irishpeck on Mon, 27 Sep 2021 09:32:38 -0700