原生js
文章平均质量分 57
niuyueyang
这个作者很懒,什么都没留下…
展开
-
nodejs stream请求
客户端 let file = {path: '文件路径', file: '文件名字'} const req = http.request({ host:'localhost',//远端服务器域名 port:3000,//远端服务器端口号 method:'POST', path:'/upload',//上传服务路径 headers:{ 'Content-Type':'multipart/form-data', 'Connection':'keep-alive', 'file': file原创 2021-12-10 17:26:07 · 583 阅读 · 0 评论 -
原生js--直播弹幕
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> #wrapper{ width: 100%; height: 400px; background-color: #000;原创 2020-12-11 17:37:50 · 267 阅读 · 0 评论 -
gitlab ci/cd自动化部署流程
环境安装 nginx安装(这里不做讲述) git安装 gitlab安装 gitlab-runner nginx默认指向/gitci/ci/dist目录,这里我们在root账户里只创建/gitci,至于/ci/dist使我们在其他用户gitlab-runner里面完成,下面是具体操作 gitlab-runner安装流程 curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/scri原创 2020-12-03 18:53:37 · 4028 阅读 · 2 评论 -
js算法--计算右侧小于当前元素的个数
题目 给定一个整数数组 nums ,按要求返回一个新数组 counts 。数组 counts 有该性质: counts[i] 的值是 nums[i] 右侧小于 nums[i] 的元素的数量。 分析 输入: [5,2,6,1] 1 输出: [2,1,1,0] 2 解释: 3 5 的右侧有 2 个更小的元素 (2 和 1). 4 2 的右侧仅有 1 个更小的元素 (1). 5 6 的右侧有 1 个更小的元素 (1). 6 1 的右侧有 0 个更小的元素. 代码 方案1 暴力法很简单,遍历每个原创 2020-11-16 10:19:55 · 435 阅读 · 0 评论 -
webRtc视频通话(jquery,node)
程序 nodejs,jquery 定义 WebRTC(Web Real-Time Communication) 网页即时通信 ,是一个支持网页浏览器进行实时语音、视频对话的API。 于2011年6月1日开源并在Google、Mozilla、Opera支持下被纳入万维网联盟的W3C推荐标准 WebRTC组成 ...原创 2020-10-12 14:18:47 · 798 阅读 · 0 评论 -
缓存设置(失效时间)
/* * @desc 缓存 * @params * preId {String, Number} 缓存前缀 * time {Number} 缓存时长 * @author niuyueyang * @date 2020/08/05 * */ const BaseStorage = function (preId) { this.preId = preId || 'WEIBO-'; this.time = -1; } BaseStorage.prototype = { status: {原创 2020-08-05 17:58:17 · 1215 阅读 · 0 评论 -
canvas签字
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/> &l...原创 2019-09-03 15:36:06 · 192 阅读 · 0 评论 -
前端连线
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>获取坐标点位置,并连接点</title> <style> *{margin:0 ;padding:0;} ....原创 2019-07-17 15:50:41 · 1763 阅读 · 3 评论 -
js拖拽排序
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style> *{ margin: 0; padding: 0; } ul { list-style: no...原创 2019-07-11 15:23:46 · 934 阅读 · 0 评论 -
(转发)前端路由history模式与hash模式
history模式(推荐) <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-eq...转载 2019-05-13 01:36:31 · 306 阅读 · 0 评论