Prototypes/Objects in javascript

1.javascript creates object new prototype chain function foo(){ } foo.prototype.z=3; var obj=new foo(); obj.x=1; obj.y=2; obj.z=5; console.log(obj.x);//1 console.log(obj.z);//5 console.log(typeof obj.toString());//string type console.log(ob ...

Posted on Mon, 01 Jun 2020 10:14:53 -0700 by James25

javascript practical writing summary

To Boolean type !!'a' With two negations, you can cast to Boolean type.   Transfer Number type // String Convert to Number console.log(+'45'); // Date output timestamp console.log(+new Date);   parseInt ~~, which also converts strings to numeric types. Round down. // ~~Convert string to numeric type, round down console.log(~~3. ...

Posted on Mon, 01 Jun 2020 02:00:15 -0700 by sazzie

Using Docker to publish razor wasm

Using Docker to publish razor wasm The files compiled by Blazor are static files, so we only need a web server that supports static pages.According to different projects, it will be arranged in different containers. For example, this article will show how to pack into docker step by step when there is no gateway demandHTTPSSince there is no gat ...

Posted on Thu, 28 May 2020 18:53:24 -0700 by matt_wilkes

Tips to solve ios incompatibility of mobile terminal with css position:fixed Property, no plug-ins required

Fixed settings at the bottom of the head of app for mobile development position:fixed , Android 2.2 has been implemented. However, in IOS 8 and below systems, when the keypad is activated, the problem of position floating will occur. As shown in the figure: How to solve: After consulting the data, I think of several solutions 1. Use ...

Posted on Thu, 28 May 2020 08:01:37 -0700 by witold

Using Vuex in nuxt

introduction Using Vuex in nuxt to reference in a modular way -- counter as an example Counter example directory structure directory structure js module writing // user.js // state is a function. Pay attention to the arrow function const state = () => ({ counter: 6 }) // mutations as an object const mutations = { increment(state) { ...

Posted on Thu, 28 May 2020 06:42:42 -0700 by sanand158

Zen reading notes of design patterns - 22 design patterns

Recently, I am reading Qin Xiaobo's Zen of design pattern. This article is another 2000 line long and watery note, recording 22 of the 23 design patterns mentioned in the book, basically copying the definition, advantages, disadvantages, applicable scenarios and demo of each design pattern mentioned in the book. It is recommended to read the o ...

Posted on Mon, 25 May 2020 08:52:40 -0700 by depsipher

Zero knowledge proof

In the past year, there have been many applications of zero knowledge proof. In this tutorial, we will first learn the basic concept of zero knowledge proof, use circle to build arithmetic circuit, use snarkjs to realize the whole process of zero knowledge proof, and use these knowledge to realize the two-tier expansion scheme zk rollup. Block ...

Posted on Mon, 25 May 2020 06:50:39 -0700 by BSlepkov

Java Web IDE implemented by Vue codemirror + java compiler

background Recently, my colleague told me a very interesting requirement: let the user (in the application scenario, generally for other developers) fill in the Java code snippet. The content of the code snippet is the inheritance class of the template class that has been specified, and implement the method of template class definition. Our ...

Posted on Sat, 23 May 2020 21:44:37 -0700 by jh21236

New features of JDK 1.8 -- functional interface

In the last article, we introduced the following new features of JDK 1.8. 1.Lambda expression 2. Method reference 3. Functional interface 4. Default method 5.Stream 6.Optional 7. Nansharm JavaScript engine 8. New date time API 9.Base64 Before that, I learned the first two Lambda expressions, method references, and this article is about function ...

Posted on Fri, 22 May 2020 05:43:03 -0700 by False

Submission of php form form

php forms inserting forms into Web pages Insert the form in the normal WEB page as follows: a relatively complete form will be created here to show all the elements and attributes in < form >. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>index</title> </head> < ...

Posted on Fri, 22 May 2020 01:05:11 -0700 by roba59