Python 3 standard library: base64 encoding binary data in ASCII
1. base64 encodes binary data in ASCII
The base64 module contains functions that transform binary data into a subset of ASCII suitable for transmission using the plain text protocol. Base64, Base32, Base16, and Base85 encode to convert 8-bit bytes into characters within the range of ASCII printable characters, leaving more bits to represent dat ...
Posted by Ne.OnZ on Sun, 12 Apr 2020 05:46:12 +0200
Tron blockchain PHP docking development package [support USDT-TRC20]
The TronTool development package is suitable for rapidly increasing the support ability of Tron/USDT-TRC20 digital assets for PHP applications, that is, it supports the application scenarios using its own Tron blockchain nodes, and also supports the lightweight deployment scenarios based on the official public API services of Tron. Official dow ...
Posted by Calcartman on Thu, 09 Apr 2020 17:42:20 +0200
Android solves the overlapping problem of Fragment using replace method
Android solves the overlapping problem of Fragment using replace method
Today, when using Fragment for replace switching, I found that there was no response:The layout is like this
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
...
Posted by mgason on Mon, 06 Apr 2020 05:46:04 +0200
python advanced (4) - text and byte sequence (coding problem)
Main content of this paper
character
byte
Structure and memory view
Conversion between characters and bytes -- codec
BOM ghost character
Continue tomorrow...
python advanced - Directory
The code in this article is placed on github: https://github.com/ampeeg/cnblogs/tree/master/python advanced
character
'''
Character encoding is a pro ...
Posted by misslilbit02 on Mon, 06 Apr 2020 05:04:58 +0200
Runtime stack frame structure local variable table explore slot reuse
Local variable table
As we know, the start of a method call is equivalent to the stack frame's stack in and out of the Java virtual machine stack.
Stack frame includes local variable table, operand stack, dynamic link, return address, etc.
Figure below: each thread corresponds to a Java virtual machine stack. There are many stack frames in t ...
Posted by briansol on Sun, 05 Apr 2020 00:58:38 +0200
Implementation of global parameter sharing for Alipay applet
Foreword:
For the matters of wechat applet global sharing control, please refer to: Wechat applet global sharing and forwarding control implementation - no need to configure the page separately from now on.
About the official sharing of Alipay applet's official sharing, see official documents. Page event handler onShareAppMessage(options: Obj ...
Posted by rob323 on Sat, 04 Apr 2020 10:51:53 +0200
Source code analysis of Django rest framework (3) -- throttling
Add throttling
Custom throttling method
Limit access to 3 times within 60s
(1) Create a new throttle.py under the API folder. The code is as follows:
# utils/throttle.py
from rest_framework.throttling import BaseThrottle
import time
VISIT_RECORD = {} #Save access records
class VisitThrottle(BaseThrottle):
'''60s Can only ...
Posted by synical21 on Sat, 04 Apr 2020 10:06:33 +0200
SAX parsing XML case Demo(2)
I. Introduction
Create a new class XmlParseHandler.java, which needs to inherit DefaultHandler or implement ContentHandler interface. Here we inherit DefaultHandler (implement ContentHandler interface), which is the core of SAX parsing. We need to rewrite the following methods we care about.
startDocument(): called at the beginning of docume ...
Posted by Crusader on Fri, 03 Apr 2020 09:06:33 +0200
JavaScript character and Unicode conversion Chinese character to Unicode code
Unicode is an industry standard in the field of computer science. JavaScript itself is written using the Unicode character set,
Sometimes we need to transcode the obtained value when we need to rearrange and compile a piece of text or content,
Make a note,
In fact, it mainly uses the charCodeAt() method and escape( ...
Posted by georgen on Wed, 01 Apr 2020 11:49:41 +0200
preHandle problem of adding and overriding parameters, overriding HttpServletRequestWrapper and Filter
Because HttpServletRequest in preHandle only has setAttribute, no setParameter and no add method
So there is no way to add parameters directly. I checked a lot of data from the Internet, basically speaking, I need to rewrite HttpServletRequestWrapper
Just do what you say. Check the blog on the Internet to see how others can realize it. Maybe be ...
Posted by saltious on Tue, 31 Mar 2020 23:23:36 +0200