base64 encoding and decoding of JS

Unicode problem solving There is a small pit that only supports ASCII. If you call btoa("Chinese"), an error will be reported: Uncaught DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range. DOMString in browser is UTF-16 encoding. If the input strin ...

Posted by sukanya.paul on Sun, 05 Apr 2020 22:49:35 -0700

Linux command -- file

File is used to view file types. Different from Windows system, Linux system does not reflect the file type through the file name, so you need to use the file command to confirm. [admin@local ~]$ file exe exe: Bourne-Again shell script text executable As above, use the file command to view the type of exe file, whic ...

Posted by kanikilu on Sun, 05 Apr 2020 15:50:44 -0700

c + + type conversion

concept The meaning of type conversion is to change the representation of a variable by changing its type to another type. In order to type one simple object into another you will use the type conversion operator. C-style cast is very simple, no matter what type of cast is: TYPE b = (TYPE)a C + + style type conversion provid ...

Posted by 3.grosz on Tue, 31 Mar 2020 15:10:41 -0700

Using MathJax to display MathML and LaTeX formulas in web pages

MathJax is an open source JavaScript display engine for LaTeX, MathML, and ASCII math representations for all modern browsers. Display MathML MathML is a mathematical markup language. It is a standard based on XML (a subset of Standard General Markup Language), which is used to write mathematical symbols and formulas on the Internet. Some brows ...

Posted by tullmejs on Mon, 30 Mar 2020 10:26:48 -0700

The thinking caused by the same or sequential characters in password verification. md

Thinking about password verification caused by the same or sequential characters [TOC] demand Although users hate this kind of complex password verification, sometimes for the sake of security, our system has to force users to set a higher strength password. For example: it is not allowed to have more than one character with the same or consecu ...

Posted by lalabored on Wed, 25 Mar 2020 09:05:54 -0700

How to decode URL in Java?

In Java, I want to convert it to: https%3A%2F%2Fmywebsite%2Fdocs%2Fenglish%2Fsite%2Fmybook.do%3Frequest_type In this regard: https://mywebsite/docs/english/site/mybook.do&request_type Here's what I've done so far: class StringUTF { public static void main(String[] args) { try{ String url = ...

Posted by Arya on Sat, 21 Mar 2020 07:12:15 -0700

Python3 Standard Library: codecs string encoding and decoding

1. Codcs string encoding and decoding The codecs module provides both stream and file interfaces to convert different representations of text data.Usually used to process Unicode text, but additional encoding is provided for other purposes. 1.1 Getting started with Unicode CPython 3.x distinguishes between text and byte strings.The bytes instan ...

Posted by melittle on Thu, 19 Mar 2020 18:54:34 -0700

On character encoding of text files

In win10 system, there are several character codes for TXT files, ASCII, ANSI, UTF-8, UTF-8 with BOM, UTF-16LE, UTF-16BE. In general, UTF-8 encoding is used by default. This encoding is universal and can express any language, but it also has the disadvantage that the encoding length is not equal. Her ...

Posted by devarishi on Mon, 16 Mar 2020 05:46:28 -0700

Matlab Chapter 3 - string

Chapter 3 string3.1 creation of string array 1. Direct input method 2. Using ASCII code 3. Using functions [example 3-1] direct input method >> a = 'hello' a = hello >> b = '''Hello''' b = 'Hello' >> c = [a,'',b,'.']#String array (an array, which is a string) c = hello'Hello'. ...

Posted by youngp on Mon, 16 Mar 2020 04:59:53 -0700

Compile HMI interface with C ා and communicate with PLC with USB-485. PLC uses DVP-12SE series of delta

1. First of all, I need to test the communication of PLC. I use XCOM serial port assistant to check the instruction manual of Delta PLC. I see that the default is the ASCII mode of MODBUS protocol. Specifically, I need to test the input and output according to the instruction manual. During this period, ...

Posted by ringartdesign on Mon, 16 Mar 2020 00:21:05 -0700