A detailed explanation of common modules in python

1.time module import time s = time.localtime() # Convert the time into the formatted time, and obtain the struct time format such as mm / DD / yyyy through time.struct_time(tm_year=2018, tm_mon=3, tm_mday=11, tm_hour=19, tm_min=53, tm_sec=31, tm_wday=6, tm_yday=70, tm_isdst=0) s=time.gmtime() #UTC time zone s=time.time() # Returns the cur ...

Posted by pattyb on Sun, 05 Apr 2020 10:08:38 -0700

angularjs service Custom Service

order Before learning service, we should understand what the "service" is used for. In fact, this service is just like the "service" in real life, such as: hairdressing service, foot washing service So what are the services of AngularJS? In AngularJS, a service is a function or object that can be used in yo ...

Posted by Tainted Kitten on Sun, 05 Apr 2020 08:26:52 -0700

Using Nginx server to publish front page

As an http server, Nginx can be used as a web page static server. Before deploying static resources, let's learn about the Nginx configuration file user nobody; #Start the process, usually set equal to the number of CPUs worker_processes 1; #Global error log and PID file #error_log logs/error.log; #error_log logs/error.log notice; #error ...

Posted by condoug on Sun, 05 Apr 2020 01:51:52 -0700

Spring cloud gateway dynamic routing

Summary Online project publishing generally has the following schemes: Downtime release Blue green deployment Rolling deployment Grayscale release This kind of release is usually released at night or during major version upgrade. Because it needs to be stopped, now everyone is studying Devops scheme. Blue green deployment requires t ...

Posted by Maq on Sat, 04 Apr 2020 23:15:39 -0700

Implementation of Sogou AI API in Python 3

1, background a. Sogou has also released its own AI API, including identity card ocr, business card ocr, text translation and other APIs, with average accuracy in the initial test. b. Based on Python 3. c. It also has its own signature to generate this piece. With the foundation of goose factory, it is relatively simple to write. d. However ...

Posted by udendra on Sat, 04 Apr 2020 21:45:08 -0700

ThinkPHP5.0+APP+ Alipay payment server development

Working environment, Alipay account is company, app application and secret key configuration are my own application, and the process is temporarily skipped. 1, Preparations appid, application private key, application public key, Alipay public key 2, Profile 'alipay'=>[ 'appId' => '20180300000000', 'gatewayU ...

Posted by hchsk on Sat, 04 Apr 2020 20:08:39 -0700

The conversion of java bean and map

There are many ways to convert JavaBeans and map s, such as: 1. Through ObjectMapper, first convert bean to json, then convert json to map, but this method is relatively convoluted and inefficient. After testing, it takes 12 seconds to cycle 10000 beans!!! Not recommended 2. Through java reflection, get the properties and values of the bean c ...

Posted by noblegas on Sat, 04 Apr 2020 14:06:23 -0700

JWT simple expiration time is wrong

Today, I used node to write in the background, used token for login authentication, and then used a simple JWT simple. However, I found that the set expiration time was not correct, and I didn't prompt for expiration all the time, but it was clearly the expired time, so I checked the source code of JWT simple. My path, under the root directory ...

Posted by sergeidave on Sat, 04 Apr 2020 13:40:41 -0700

Encapsulation of Android logstore Logger and the problem of AS3.0 log not being aligned

It doesn't matter how to introduce loggers. There are a lot of them on the Internet. This article records the encapsulation of loggers in use and the use of loggers in Android Studio 3.0 and above. Encapsulation of Logger When using any third-party library, if you can encapsulate it once to replace it later, o ...

Posted by yuan22m on Sat, 04 Apr 2020 12:10:11 -0700

The direct assignment of js leads to the failure of assignment in the loop

There is a problem in writing js, that is to say, I assign values to an object through the value of the loop in the for loop value, but the printed results of each assignment will be the last assigned value, and then I started the debugger, and found that there is no problem with my debug execution, but if I don't debug, all as ...

Posted by JADASDesigner on Sat, 04 Apr 2020 10:55:16 -0700