web Common Object 02
Session
Effect
Identify a session, or confirm a user, and share data during a session (multiple requests from a user).Obtain
The request.getSession() method creates objects without sessions, or obtains session objects for the current session.Method
getId() - Get the session identifier
getCreationTime() ...
Posted by benjudy on Tue, 13 Aug 2019 02:37:54 -0700
web crawler explanation-urllib library crawler-basic usage-timeout settings-automatic simulation of http requests
Using urllib Library of python system to write simple crawler
urlopen() Gets the html source code for a URL
read() reads out the html source content
decode("utf-8") converts bytes into strings
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import urllib.request
html = urllib.request.urlopen('htt ...
Posted by Hypnos on Mon, 12 Aug 2019 06:06:47 -0700
Django Actual Warfare - Build a Personal Blog (06): Use Bootstrap 4 to overwrite template files
Configure Bootstrap 4
Bootstrap is an open source front-end framework for Web site development ("front-end" refers to the interface presented to end users) that provides font typesetting, forms, buttons, navigation, and a variety of other components to facilitate the development of dynamic ...
Posted by sansan on Sun, 11 Aug 2019 19:10:28 -0700
Simple and practical Socket framework DotNettySocket
Catalog
brief introduction
Generate Background
Usage
TcpSocket
WebSocket
UdpSocket
Ending
brief introduction
DotNettySocket is a.NET cross-platform Socket framework that supports.NET 4.5+ and.NET Standard 2.0+. It also supports TcpSocket, WebSocket and UdpSocket. Based on Microsoft's strong DotNetty framework, DotNetty Socket strives to p ...
Posted by perfume on Sun, 11 Aug 2019 17:51:40 -0700
Linux curl form login or submission and cookie use
This article mainly explains the implementation of form submission login through curl.A separate form submission is similar to a form login, so it's not a separate matter.
Note: Login for curl form submission does not apply to all websites because some websites have limitations or other checks in the background.We don't know what the restricti ...
Posted by JoCitizen on Sat, 10 Aug 2019 20:44:22 -0700
Daily silicon step, apply/call/bind self-realization
call/apply/bind is used in daily encoding by developers to implement "object impersonation", i.e. "display binding this".
The interview question, "call/apply/bind source implementation", is actually a comprehensive assessment of JavaScript fundamentals.
Relevant knowledge points:
Scope;
this points to;
Curitizatio ...
Posted by rawisjp on Sat, 10 Aug 2019 19:16:16 -0700
python data l-bytes and bytearray
bytes and bytearray
bytes: Can be seen as a set of numerical (0-256) (binary) str sequencesbytearray: can be seen as a list sequence of values (0-256) (binary)
bytes type
String bytes type
# The bytes type B "abc" will be returned
bs1 = bytes("abc","utf-8")
# You can use the 16-digit character representation of characters
bs2 = bytes ...
Posted by vwinstead on Sat, 10 Aug 2019 04:20:34 -0700
Transformer Principle and Code Interpretation
Principles and Code Interpretation (2)
brief introduction
Code Warehouse
Attention module
Self-Attention
FFN
Add & Norm
mask bias in attention
padding mask for input and output
bias in masked selft attention
EncoderStack
DecoderStack
Encode
Decode
Why move one to the right?
brief introdu ...
Posted by Vanness on Sat, 10 Aug 2019 03:26:57 -0700
JAVAScript Learning 2-Serialization, Escaping and Functions
Serialization:
Converting JS objects into JSON format
JSON.stringify(obj) serialization
JSON.parse(str) deserialization
var ls=[1,2,3,4];
var ls_st = JSON.stringify(ls);
var ls_ls = JSON.parse(ls_st);
document.write(ls_st); //[1,2,3,4]
document.write(ls_ls); //1,2,3,4
Transliteration:
Transliterate the Chinese character of the URL int ...
Posted by AndrewBacca on Fri, 09 Aug 2019 01:39:55 -0700
Explanation of Google Protocol Buffer (protobuf)
Code Walkthrough: Detailed Use of protobuf in caffe
[1] Proto file, take BlobShape in caffe.proto as an example
syntax = "proto2"; //Specify the protobuf version, default is v2, other versions: "proto3"
package caffe; // Finally generate c + + code: namespace caffe
message BlobShape { // ...
Posted by Ekate on Fri, 09 Aug 2019 00:47:41 -0700