Applet deployment

First of all, wechat users need to log in automatically to check the session. If the session expires, log in again wx.checkSession({ success: function (res) { }, fail: function (res) { console.log("Need to sign in again"); wx.login({ success(res) { if (res.code) { ...

Posted by longhorn14 on Mon, 18 Nov 2019 08:38:32 -0800

TensorFlow learning Optimizer optimizer

Optimizer tf.train.GradientDescentOptimizer tf.train.AdadeltaOptimizer tf.train. AdagradOptimizer tf.train.AdagradDAOptimizer tf.train.MomentumOptimizer tf.train.AdamOptimizer tf.train.FtrlOptimizer tf.train.ProximalGradientDescentOptimizer tf.train.ProximalAdagradOptimizer tf.train.RMSPropOptimizer Gradient descent ...

Posted by HowdeeDoodee on Sun, 17 Nov 2019 10:55:39 -0800

Cas implementation of subsystem login and mutual kick

Implementation ideas 1. A class, which maintains a map of the logged in user, takes out the corresponding session of the last user every time when logging in, and adds an expired attribute ID lasthttpsession.setattribute (be ﹣ "your account is logged in at another location, and you are forced to log off") 2. Write ...

Posted by drorgo on Sat, 16 Nov 2019 09:21:31 -0800

Native PHP implements wechat authorization and obtains user information

The WeChat public number authorized to obtain user information is divided into three parts: 1: users agree to authorize and obtain code Jump to wechat authorization page and get the code value returned by authorization https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope= ...

Posted by jason.carter on Thu, 14 Nov 2019 06:38:25 -0800

Wechat applet wx.request gets response header

In the network request, sometimes we need to judge or operate according to some information in the response header. How to implement it in the applet? RequestTask = wx.request(Object object) can be implemented through the RequestTask object. Note: the basic library 1.4.0 is supported, and the lower version needs to be compatible ...

Posted by dennisjade on Wed, 13 Nov 2019 11:11:08 -0800

Crawling data without saving is just playing hooligan

We have experienced it for the first time, and the robustness of crawler code has been upgraded to PLUS. It's all analyzed to this point. Is there something missing? Yes, we haven't saved the data yet? Don't save it. Isn't it just a chore? Items Item is our container for storing data, which is similar to a dictionary in pytho ...

Posted by erupt on Wed, 13 Nov 2019 10:16:28 -0800

Java Web Implementation of verification code -- super simple code

1. Front end display HTML: <h3>Verification Code:</h3> <input type="text" name="validationCode" id="validationCode" placeholder="Please enter the verification code" lay-verify="required"> <img src="validate.jsp" id="validationCode_img" title="Invisibility?Change another one" onclick="loadimage();return false;" name="vali ...

Posted by mikefn on Wed, 13 Nov 2019 06:02:09 -0800

Simple application of beautiful soup and aiohttp crawling resources

Hong Kong Radio's program quality is quite good. One of the programs "five thousand years of China" shows historical stories in the form of sitcoms and narratives. From the legendary era to the Republic of China, it was first broadcast in 1983 to 2000. It is a very long-lived program. The voice of the version that can be found online ...

Posted by coelex on Tue, 12 Nov 2019 11:38:44 -0800

gdb debugging practice

One code #include<iostream> using namespace std; int func(int n){ int result=0; for(int i=1;i<=n;i++){ result+=i; } return result; } int main(){ int arr[10]; arr[0]=0; arr[1]=1; for(int i=2;i<10;i++){ arr[i]=arr[i-1]+arr[i-2]; } cout<<"arr[9]"<<arr ...

Posted by bigger on Tue, 12 Nov 2019 08:14:52 -0800

The implementation of delay message in ActiveMQ of SpringBoot

I. installation of activeMQ Please refer to the online tutorial for installation steps, which will not be introduced in this article II. Modify the activeMQ configuration file New configuration information of broker schedulerSupport="true" <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory=" ...

Posted by Jamesm on Tue, 12 Nov 2019 07:09:10 -0800