Blog | 博客

urlencode encoding in js

urlencode encoding encodeURIComponent in js (the specific content of the encoding) Decode decodeURIComponent (the specific content of the decoded code) Rationale: Encode the components of the URL individually, not for encoding the entire URL … The post urlencode encoding in js first appeared on Lenix Blog . This article is reprinted from https://blog.p2hp.com/archives/9069 This site […]

urlencode encoding in js Read More »

this points to the problem, the onclick event is bound to the label this points to the problem

<input type=”button” value=”modify” οnclick=”changeContent()”> The function changeContent written in onclick on the element is equivalent to calling the function directly. The this used in the function points to the global object window, instead of pointing to the element Then to get the object of the node where the onclick is located, we need to pass

this points to the problem, the onclick event is bound to the label this points to the problem Read More »

JS implements a method for randomly generating strings (length can be specified)

1. Define a random interception string const _charStr = ‘abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789’; 2. Define the randomly generated index function /** * 随机生成索引* @param min 最小值* @param max 最大值* @param i 当前获取位置*/ function RandomIndex(min, max, i){ let index = Math.floor(Math.random()*(max-min+1)+min), numStart = _charStr.length – 10; //如果字符串第一位是数字,则递归重新获取if(i==0&&index>=numStart){ index = RandomIndex(min, … The post JS implements a method to randomly

JS implements a method for randomly generating strings (length can be specified) Read More »

Fire cloud 20220712

Original link: https://synyan.cn/t/40113 The burning cloud every summer is also a must-shoot item. Yesterday’s one was more like a fire dragon, but unfortunately I got off work late, so I didn’t have time to shoot in the scenic spot, so I could only perfunctory in the car. fire cloud fire cloud Read the full article

Fire cloud 20220712 Read More »

On Jordan Peterson’s Current Situation and Buterin’s Commentary on the Bestseller “Network Nation”

Original link: https://www.camelliayang.com/blog/df-on-jp-and-vb-on-ns Photo by Jr Korpa on Unsplash “Professor Lobster” Jordan Peterson was recently banned from Twitter for publicly criticizing transgender Elliot Page (formerly Ellen Page). He released a video that seemed to “declare war”, which caused dissatisfaction and complaints from leftist netizens. 00 My online teacher, David Fuller, wrote an article commenting on

On Jordan Peterson’s Current Situation and Buterin’s Commentary on the Bestseller “Network Nation” Read More »

Does it make sense to count the bug rate of thousands of lines of code?

Original link: https://www.kingname.info/2022/07/13/bug-rate/ My conclusion: Statistical bug rates make sense. But it is meaningless to count the bug rate of thousands of lines of code. Why is the 1000 lines of code bug rate meaningless? A company recently came up with a scheme to quantify the job performance of programmers. It is called千行代码Bug率. In a

Does it make sense to count the bug rate of thousands of lines of code? Read More »

One skill a day: Convert the time described in natural language into a standard format

Original link: https://www.kingname.info/2022/07/13/nlp-datetime/ If you’ve used Tick List or Todoist, you should know that they have a very useful feature, which is to automatically recognize the time in tasks, such as: 1 Email the boss next Tuesday at 3pm It is automatically recognized as: Today, in the official account fan group, a classmate named NowAnti

One skill a day: Convert the time described in natural language into a standard format Read More »

Walking Evening News: The Secret History of Gold Medalists

Original link: https://sehseh.substack.com/p/513 Good night, The horror movie “Curse” broke into the top 10 of Netflix’s movie rankings, setting a stage record, and the score on China’s Douban platform has also become a topic of conversation, and the phenomenal Korean series “Squid Game”, which broke the “one-inch subtitle barrier”, also Another history, won 14 nominations

Walking Evening News: The Secret History of Gold Medalists Read More »

WPS: Completely close advertising by the end of next year at the latest

Original link: https://www.munue.com/301.html On July 13, WPS official Weibo posted again in response to the recent Internet rumors that “WPS deletes user’s local files”. WPS reiterates that there will be no auditing, locking or deletion of users’ local files. In addition, in response to advertising questions, WPS said that it will completely shut down advertising

WPS: Completely close advertising by the end of next year at the latest Read More »

Desires and habits to maintain output

Original link: https://scottyeung.top/2022/keep-up-output/ I have always said to maintain the habit of outputting, but in the more free and flexible time during school, I really felt that maintaining output is not a difficult thing. Basically, there are many extensive and diverse inputs every day. When you have an idea, you can open OneNote or take

Desires and habits to maintain output Read More »