[code Notes] JS keeps function single responsibility and flexible combination

For example, in the following code, the order data requested from the server is as follows, which needs to be processed as follows1. Display corresponding value according to status (0-in progress, 1-completed, 2-order exception)2. Display startTime as yyyy MM DD from time stamp3. If the field value is an empty string, set the field value to '-- ...

Posted by iii on Sat, 07 Dec 2019 14:32:37 -0800

Online Process Recording for Network Deployment

Online Process Recording for Network Deployment Take the example of recommending similar items: reco-similar-product Project Directory Dockerfile Jenkinsfile README.md config deploy.sh deployment.yaml index offline recsys requirements.txt service stat You can see that there are many files in the directory. Here is a brief description of the rol ...

Posted by tomasd on Sat, 07 Dec 2019 13:38:56 -0800

Automatic generation of golang struct from mysql table structure

a lib for golang , generate mysql table schema to golang struct Automatic generation of golang struct from mysql table structure github address https://github.com/gohouse/converter install Download the executable directly: Download address golang source package: go get github.com/gohouse/converter Sample table structure CREATE TABLE `prefix ...

Posted by scast on Sat, 07 Dec 2019 13:30:25 -0800

[Xuefeng magnetic needle stone blog] python 3.7 quick start tutorial 7 Internet

Contents of this tutorial 7 Internet Internet access urllib urllib is a Python module for opening URL s. import urllib.request # open a connection to a URL using urllib webUrl = urllib.request.urlopen('https://china-testing.github.io/address.html') #get the result code and print it print ("result code: " + str(webUrl.getcode())) # read the d ...

Posted by esport on Sat, 07 Dec 2019 09:41:08 -0800

Development of django - configuration and use of mongodb

Today, I sorted out how to use mongodb in django project. The environment is as follows:ubuntu18.04, django2.0.5, drf3.9, mongoengine0.16 Step 1: configure mongodb and mysql in settings.py as follows (you can use both mysql and mongodb): DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # database engine 'NA ...

Posted by nimbus on Sat, 07 Dec 2019 05:53:20 -0800

Scrapy Crawler and Case Analysis

Due to the rapid development of the Internet, all the information is in a state of massive accumulation. We need to obtain a large amount of data from the outside world and filter the useless data in a large amount of data.We need to specify a crawl for our useful data, so there are now crawling techniques that allow us to quickly get the data ...

Posted by klance on Sat, 07 Dec 2019 04:35:57 -0800

Asynchronous programming using Hooks

This excerpt is from Rax's official website rax.js.org introduce Javascript is a single-threaded programming language. A single-threaded feature is that it can only handle one thing at a time, and the time-consuming execution of the current code task can block subsequent code execution.Asynchronous programming is an event-driven program ...

Posted by Trafalger on Sat, 07 Dec 2019 04:19:10 -0800

Introduction to Python crawler 33-100 "king of the sea" review data grabbing

1. Analysis before crawling of review data of Haiwang Haiwang was shown, and then the word of mouth exploded. For us, there's another movie that can be climbed and analyzed. It's so beautiful~ Excerpt a comment Just after watching zero field, Director Wen's movie has been very good, whether it's speed 7, chainsaw or soul summoning. Fighting ...

Posted by piet123 on Fri, 06 Dec 2019 22:20:22 -0800

How to smoothly and elegantly upgrade cert manager in Rancher 2.x?

Author: Nassos Michas European Dynamics SA, CTO If you are using Helm Chart provided by Rancher to install cert manager in the Kubernetes cluster managed by Rancher, you may have received a reminder from Let's Encrypt recently: Check the log of cert manager in the cluster, and you can see that Let's Encrypt refused to update the certificate ...

Posted by mewhocorrupts on Fri, 06 Dec 2019 21:59:40 -0800

Local refresh 1 of python anti crawl web page

# ajax dynamic loading web page # How to judge whether a web page is dynamically loaded? # Check the source code of the web page. If there is no data you want in the source code, try to visit the next page. When you click the next page, the whole page is not refreshed, but partially refreshed, most likely ajax loading # In case of ajax loading ...

Posted by pauleth on Fri, 06 Dec 2019 15:47:03 -0800