Export excel data from the front end - jsonToExcel

Keke, I haven't blogged for a long time...   In the work, we met the pure front end, and exported the data to excel file. Start of text:   The first step of installation depends on: npm i xlsx Step 2 write the export function: import XLSX from 'xlsx' const exportJsonToExcel = (dataArr) => { const now = new Date() const wopts ...

Posted by Atanu on Mon, 02 Dec 2019 21:08:37 -0800

Ten sorting algorithms -- detailed explanation of heap sorting (Java source code)

Heap sorting is a sort algorithm designed by using the data structure of heap. Stack is a structure of nearly complete binary tree, which satisfies the properties of stack at the same time: the key value or index total number of the child node is less than (or greater than) its parent node. Algorithm description The initial ...

Posted by Pie on Mon, 02 Dec 2019 20:35:16 -0800

20190116 - inserts a specific number into a sorted sequence without changing its collation

1. There is a sorted list. Now input a number and insert it into the list according to the original rule Analysis: the sorted list may be in ascending or descending order. You need to determine the sorting method of the list first. Take ascending order as an example. You need to consider four main situations: Case1: insert the first value if it ...

Posted by _off_axis_ on Mon, 02 Dec 2019 16:53:26 -0800

[luogu3709] [my string question]

Title Link meaning of the title It's enough to do two such questions a day to describe such a fairy. Really exercise Chinese ability. The meaning of a question is to give you a sequence and then ask for an interval at a time. Make it possible to take the data from this interval in strict ascending order. If the current acquisition number is le ...

Posted by yankeefan238 on Mon, 02 Dec 2019 11:09:24 -0800

Local storage local storage use

Store data localStorage.setItem("name","Amy") //Store the variable with name and Amy localStorage.name = "Amy"; // Equivalent to the above command localStorage // Storage{name: "Amy", length: 1} read data Read data localStorage.getItem("name") //Amy, read the value of the variable named name stored in the localStorage ob ...

Posted by eatc7402 on Mon, 02 Dec 2019 10:59:53 -0800

Drag implementation of vue module

It happens that in the previous interview, we met with questions to achieve drag effect At the time of interview, I simply answered the way and logic of implementation. Now I have nothing to do, and I have realized this thing. The principle is very simple and easy to write. Data driven, create an array with an initial length of 1 When dragging ...

Posted by r270ba on Mon, 02 Dec 2019 07:32:11 -0800

L3-004 tumor diagnosis (BFS) (30 points)

L3-004 tumor diagnosis (30 points) In the diagnosis of tumor diseases, it is very important to calculate tumor volume. Given the suspected tumor area marked in the scanning section of the lesion, please calculate the tumor volume. Input format: Input the first line to give four positive integers: m, N, L, T, where m and N ar ...

Posted by StathisG on Mon, 02 Dec 2019 05:46:34 -0800

Java Arabic numeral to Chinese expression

In the interview, the algorithm problem is to translate Arabic numerals into Chinese characters. For example, 123 is 123, 10080 is 1080 I tried to implement it myself. I found that the implementation was too cumbersome, there were too many codes, and there were places I couldn't think about easily. I posted my own writing method ...

Posted by Edwin Okli on Mon, 02 Dec 2019 04:57:16 -0800

Enhanced Fibonacci function Tribonacci

It's nice to meet the bigger brother of Fibonacci, AKA Tribonacci. It is basically like Fibonacci, but the last three (rather than two) numbers of the sequence are combined to generate the next one. So, if we want to start our Tribonacci sequence with the start [1, 1, 1] input, we have the following sequence: [1, 1 ,1, 3, 5, 9, 17, 31, ...] W ...

Posted by AcidRain on Mon, 02 Dec 2019 02:13:17 -0800

6 Use stack to solve the three-column Hanoi Tower problem

subject When N layers are found for the three-column Hanoi Tower, the optimal moving process and the optimal total moving steps are printed.The restriction cannot be moved directly from the leftmost tower to the rightmost, nor from the rightmost to the leftmost, but must go through the middle. thinking The modified Hannott ...

Posted by b0ksah on Mon, 02 Dec 2019 02:03:22 -0800