The Java implementation creates a Zip package and writes it to a file

prefaceYou need to put some data into a zip compressed package. You can use ZipOutputStream. ZipOutputStream can write content directly into a zip package. Generally, ZipOutputStream is created by encapsulating a FileOutputStream. Before writing a file, you need to call putNextEntry once, and then use write to write byte [] type data. When writ ...

Added by shaunno2007 on Sat, 15 Jan 2022 13:36:42 +0200

[ten thousand words summary] webpack can only basic configuration, but not! Come and pack the actual case configuration together

🛴 preface stay The previous two articles In, we explained the introduction of webpack. However, after the introduction knowledge is understood, it must be applied to specific cases. Therefore, in the following article, we will lead you to learn about some actual case configurations of webpack, including the packaging configuration of t ...

Added by p.utsav on Sat, 15 Jan 2022 06:23:01 +0200

Webpack series - use of browser caching and Shimming

webpack and browser caching We use webpack to package our modular application. Webpack will generate a deployable / dist directory, and then place the packaged content in this directory. As long as the contents in the / dist directory are deployed on the server, the client (usually the browser) can access the server's website and its resources ...

Added by tukon on Sat, 15 Jan 2022 05:42:32 +0200

JavaScript implementation of binary tree traversal

JavaScript implements the first, middle and last order traversal of binary tree (recursive and non recursive) 1, A green binary tree 1,binary-tree.js const binaryTree = { val: 'a', left: { val: 'b', left: { val: 'd', left: null, right: null }, right: { va ...

Added by dniry on Sat, 15 Jan 2022 02:19:54 +0200

Using JavaScript to implement simple EventBus

What is EventBus? event bus refers to the bus Using a fixed bus stop to handle boarding and alighting events is compared to subscription and event distribution In programming, eventbus is usually used to transmit data in the form of publish and subscribe Subscribe to events in advance. When events are triggered, you can r ...

Added by Hitch54 on Sat, 15 Jan 2022 00:48:33 +0200

Use and difference between JS array Map and reduce (using Map type)

preface Today, I encountered a data processing problem. Although it was solved, the process seems very cumbersome, the code is not elegant, and the logic is very cumbersome. With reduce, it can be easily solved and beautiful. Let's learn about reduce first, and then give an example of how to use reduce and its difference from map I Use o ...

Added by chito on Sat, 15 Jan 2022 00:12:10 +0200

vue encapsulates ecarts and realizes dynamic adaptive change of size --- super useful

I First look at the effect: Hello, everyone, ⭐⭐⭐⭐⭐, Adhering to the principle of sharing happiness, I'm here again~ Ecarts is to copy and paste on the official website. Why package? 1. Reduce the amount of code. As long as the width, height and option configuration items are transmitted each time, the chart can be generated quickly. 2. ...

Added by patricklcam on Sat, 15 Jan 2022 00:09:06 +0200

Fabric.js three methods of changing pictures (including changing pictures in the group and caching)

Introduction to this articleI listed three in fabric JS to replace the picture.It also includes the operation of changing pictures in the group.Environment and versionChrome browser version: 96.0.4664.45Fabric.js version: 4.6.0I developed it in the native environment, and also provided a code developed in Vue3 environment (there is a link at th ...

Added by 10legit10quit on Fri, 14 Jan 2022 21:58:17 +0200

Take you to understand the most important API s in vue3 - ref and reactive

Knowledge Prospect: suppose you know vue3 the knowledge about setup in composite API. If you are just beginning to study, you can have a look Official documents , or My article. In vue3, there are two important APIs - ref and reactive. If you don't understand the principles of these two APIs, it can be said that you haven't learned vue3 wel ...

Added by perficut on Fri, 14 Jan 2022 19:37:38 +0200

js basics ajax and cors

1.DOM DOM is the interface for JavaScript to operate web pages, and its full name is "Document Object Model". Its function is to turn the web page into a JavaScript object, so that you can use scripts for various operations (such as adding and deleting content). node The smallest component of DOM is called node. The tree structure ...

Added by cqinzx on Fri, 14 Jan 2022 17:19:05 +0200