知识
与慕
https://thesecondlight.github.io/
一起捞bug呀
展开
-
【js基础面试 简单问题】
js 面试题 基础面试题原创 2022-04-20 22:07:49 · 1240 阅读 · 0 评论 -
记录-git使用
在原有分支(oldBranch)上切出一个新分支(newBranch)切换到原有分支:git checkout oldBranchgit pull创建新分支git branch newBranchgit checkout newBranch推送到远程git push origin newBranch拉一下git pull原创 2021-10-15 15:47:08 · 108 阅读 · 0 评论 -
react---倒计时
react---倒计时import store from "../store"; //数据存储export const trans = (times) => { times = times / 1000; let hours; let minutes; let seconds; hours = Math.floor(times / 60 / 60 / 60); minutes = Math.floor(times / 60 % 60);原创 2021-10-07 18:28:41 · 200 阅读 · 0 评论 -
小页面排版
不知道还有别的办法可以把content放进intro那个div中,不用单独拿出来,也不会出现文字全部居中,不左对齐的情况<html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>黄欣欣老师</title> <style&原创 2020-12-17 17:15:01 · 121 阅读 · 0 评论 -
js 数组去重 indexOf splice
indexOflet arr=[1,2,2,3,4,5,1];let new Arr=[];for(let i in arr){ if(newArr.indexOf(arr[i])==-1){ newArr.push(arr[i]) }}splicelet arr = [1, 4, 3, 3, 3,];for (let i = 0; i < arr.length; i++) { for (let j = i + 1; j < arr.lengt原创 2020-12-17 14:16:12 · 191 阅读 · 0 评论 -
jq 复制内容到剪贴板
<input id="hide" type="text" style='opacity: 0;position: fixed;' value="wanjuchaoren1"/>//别人说不能隐藏input这个标签,建议透明度为0,定位一下,不然有空白的地方//下面的内容扔函数里面$("#hide").select(); // 选择对象try {var state = document.execCommand("copy");}catch(err){var state = fa原创 2020-11-20 15:33:57 · 298 阅读 · 0 评论 -
el-table中根据单元格中的值,改变单元格的颜色
在el-table中写上这个:cell-style="addClass"函数addClass判断一下行列,行的值为什么,return一个样式,很妙原创 2020-10-30 14:26:51 · 1400 阅读 · 0 评论 -
map修改数组中对象的值
大佬给出的示例我写的部分代码原创 2020-10-29 16:33:11 · 2299 阅读 · 0 评论 -
0-n内的素数
let n=10;nextPrime:for(let i =2;i<=n;i++){ for(let j=2;j<i;j++) { if(i%j==0) continue nextPrime } alert(i);}原创 2020-10-22 14:20:27 · 234 阅读 · 0 评论 -
js方法 随手记
new Date().toLocaleString()原创 2020-10-20 11:11:18 · 93 阅读 · 0 评论 -
简单的响应式布局 @media
屏幕大于1200px时,内容尺寸改变html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="./css原创 2020-10-18 18:52:07 · 141 阅读 · 0 评论 -
vue封装组件 父子传值 (弹框实例)
components/home.vue<template><div> <el-button @click="showDia">显示</el-button> <dialog-custom :dialogVisible="isShow" @close="closeDialog"></dialog-custom> </div></template><script>im原创 2020-09-24 11:20:26 · 1372 阅读 · 0 评论 -
js数组排序 根据数组中数组的某一个属性值/下标
1.根据数组中元素的下标 排序let arr = [ [1,5678],[8,1234],[2,0202]];function compare() { return function(a,b){ var value1 = a[0]; var value2 = b[0]; return value1 - value2; }}arr.sort(this.compare())结果:2.根据属性值let a...原创 2020-09-11 10:48:07 · 904 阅读 · 0 评论 -
layui+bootstrap使用后端提供的接口实现选择文件(目录生成并选择,层层递进 回退)
待修改,已经做了四天了.......放一个git地址https://github.com/thesecondlight/layui.tree原创 2020-07-27 19:51:46 · 703 阅读 · 0 评论 -
layui关闭指定弹出层(弹框)
var mylayer2=parent.layer.open({title:'选择目录',type:1,area:['500px','500px']});layer.close(mylayer2)...原创 2020-07-27 19:43:05 · 1256 阅读 · 0 评论 -
正则表达式 实用篇
1.正反斜杠的替换var a='C:\\User\\op'var b=a.replace(/\\/g,'/')结果:2.持续更新原创 2020-07-27 16:48:23 · 87 阅读 · 0 评论 -
vue滑动条实现圆颜色的改变
用input做一个滑动条,vue的监听事件来控制颜色的变化,可是不知道怎么利用循环,可以直接通过newVal数值的变化来直接操作color数组....后来发现可以通过控制RGB来直接改变颜色好像更简单...<!DOCTYPE html><html><head> <title></title> <scr...原创 2018-10-21 10:01:14 · 2459 阅读 · 0 评论 -
简单词云[一句话]
import wordcloudw = wordcloud.WordCloud(width=1000,height=500,background_color='white')w.generate('life is short you need python')w.to_file('2.png')原创 2018-12-03 15:06:46 · 305 阅读 · 0 评论 -
三国演义前三章生成词云
#coding:utf-8import matplotlib.pyplot as pltfrom wordcloud import WordCloud,ImageColorGenerator,STOPWORDSimport jiebaimport numpy as npfrom PIL import Imagefrom scipy.misc import imreadimg=imr...原创 2018-12-03 15:09:13 · 864 阅读 · 2 评论 -
海绵宝宝和派大星[三国演义姓名的重复]
#简单# import wordcloud## w = wordcloud.WordCloud(width=1000,height=500,background_color='white')## w.generate('life is short you need python')# w.to_file('2.png')#复杂#coding:utf-8h.jpgimport ...原创 2018-12-03 15:09:54 · 587 阅读 · 0 评论 -
git添加远程仓库,并上传文件到github
在自己电脑上,git bash输入ssh-keygen -t rsa -C "youremail@example.com"然后回车回车,找到.ssh文件,里面有id_rsa.hub复制内容到github的setting 新建一个随意title,粘贴然后可以在本地上传文件到github 总而言之,言而总之git initgit add .git ...原创 2018-12-05 17:05:43 · 221 阅读 · 0 评论 -
微信小程序登录-静态页面
效果:新加页面,app.json中新添一个login文件夹login.wxml<view class='allcon'><view><swiper style="height:400rpx" indicator-dots="{{true}}" autoplay="{{true}}" interval="{{2000}}" duratio...原创 2019-03-22 11:38:58 · 3981 阅读 · 0 评论 -
vue调用接口
真的可以用1.最简单的一种方法安装axios,npm install --save axios在main.js中引入import axios from '.axios'Vue.prototype.$axios=axios ①//如果Vue.prototype.$ajax=axios ,调用时写法如下②在想要调用接口数据的页面中,get后面的地址是你的接口地址...原创 2019-06-26 15:34:19 · 32001 阅读 · 13 评论 -
hexo框架建立博客以及上传到云服务器(git,nodejs,npm的安装&&一大片出错)
正确教程http://yumud.com/中搜索githubhttps://blog.csdn.net/dgut_guangdian/article/details/79326107用hexo框架建立一个自己的=。=博客,详细步骤如上。这是另外一个细腻教程https://blog.csdn.net/moumaobuchiyu/article/details/70312740我的实...原创 2018-10-14 14:27:52 · 170 阅读 · 0 评论