A collection of 106 posts


A collection of JavaScript tool functions used by front-end bigwigs-contains 95 tool function methods

01 Add the on method to the elementElement.prototype.on = Element.prototype.addEventListener;NodeList.prototype.on = function (event, fn) {、 []['forEach'].call(this, function (el) { el.on(event, fn); }); return this;};02 Add a trigger method to the elementElement.prototype.trigger = function(type, data) { var event = document.createEvent("HTMLEvents"); event.initEvent(

data structure

Data structure and algorithm: Finally, the breadth-first traversal of the graph can be explained clearly in three languages ​​(C, C#, JavaScript) (recommended collection)

Article DirectoryAnalysis of the breadth-first traversal process of the adjacency matrix storage graphC language to achieve queue programmingAdd the processing function of the graph to the programRe-analysis of resultsC# language implements the breadth-first traversal of the graph and displays the breadth-first traversal of the spanning treeJavaScript language implements the breadth-first

undergraduate design

Design and implementation of district heating network monitoring system for undergraduate graduation project

Design and implementation of district heating network monitoring system (undergraduate design)One login verificationTwo real-time trendsThree historical dataFour database establishmentConcluding remarks Direct effect: ①Landing page: ②Registration page ③Home page ④Alarm area ⑤Parameter zone ⑥Map and process This design is a graduate design for undergraduates. The subject is "Design and Implementation


Chat room application-jquery + node.js + websocket

1.index.js var app = require('express')(); var express = require('express'); var Server = require('http').createServer(app); var io = require('socket.io')(Server); var path = require('path'); var Router = require('./Router'); //配置body-parser var BodyParser = require('body-parser'); app.use(BodyParser.urlencoded({extend: false})); app.use(BodyParser.json()); //配置默认可以访问的静态资源目录 app.use(

full stack development

From the shallower to the deeper, explore the front-end download, mother no longer has to worry that I will not download (file download, picture download, screenshot download)

Article Directory1. Download method1. Browser download2.a tag triggers downloadWhat is base64Custom download file nameTwo, actual download1. File download2. Picture download3. Download screenshots (solve the blank problem of HTML2cavas screenshots)1. Download methodGenerally speaking, front-end downloading is generally divided into browser downloading and a tag triggering downloading 1. Browser downloadSometimes

online chat room project

Web online chat room (7) --- query channel list

table of ContentsQuery channel list interfaceInterface design documentWrite front-end ajax callback functionWrite servlet to implement doget methodWrite a method for operating the databaseAchieve resultsQuery channel list interfaceInterface design document请求: GET /channel 响应: HTTP/1.1 200 OK [ ok:true reason:xxx data{ channelId: 1, channelName: xxx } ] Write front-end ajax callback