This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Excel = require('exceljs'); | |
| // create workbook & add worksheet | |
| var workbook = new Excel.Workbook(); | |
| var worksheet = workbook.addWorksheet('Discography'); | |
| // add column headers | |
| worksheet.columns = [ | |
| { header: 'Album', key: 'album'}, | |
| { header: 'Year', key: 'year'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Excel = require('exceljs'); | |
| // create workbook & add worksheet | |
| var workbook = new Excel.Workbook(); | |
| var worksheet = workbook.addWorksheet('Discography'); | |
| // add column headers | |
| worksheet.columns = [ | |
| { header: 'Album', key: 'album'}, | |
| { header: 'Year', key: 'year'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"lastUpload":"2019-07-19T04:46:15.655Z","extensionVersion":"v3.4.0"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var reader = new FileReader(); | |
| reader.readAsDataURL(blob); | |
| reader.onloadend = function() { | |
| base64data = reader.result; | |
| console.log(base64data); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sqlite3 = require('sqlite3').verbose(); | |
| var db = new sqlite3.Database('data/demodb02'); | |
| db.serialize(function() { | |
| db.run("CREATE TABLE IF NOT EXISTS counts (key TEXT, value INTEGER)"); | |
| db.run("INSERT INTO counts (key, value) VALUES (?, ?)", "counter", 0); | |
| }); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| *数组排序汇总 以下均为从小到大排序 | |
| */ | |
| var arr = [2,3,2,1,4,6,10,24,2,5,6]; | |
| /* 冒泡排序 */ | |
| function bubbleSort(arr) { | |
| var tmp; | |
| for(var i = 0; i < arr.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="description" content="判断类型"> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="description" content="编写一个javscript函数 fn,该函数有一个参数 n(数字类型),其返回值是一个数组,该数组内是 n 个随机且不重复的整数,且整数取值范围是 [2, 32]"> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> |
NewerOlder