Array.prototype.values = function(){ let i = 0; let self = this return { next(){ const done = i>= self.length const value = done? undefined : self[i++ ...
分类:
其他好文 时间:
2019-12-27 00:17:40
阅读次数:
72
分享几个shell程序,便于linux期末复习 1.判断用户输入的数是否为回文数 1 #!/bin/bash 2 read in 3 res=`echo $in|rev` 4 if [ $res -eq $in ] 5 then 6 echo "$in is a huiwenshu!" 7 elif ...
分类:
系统相关 时间:
2019-12-27 00:14:58
阅读次数:
134
yield是ES6的新关键字使生成器函数执行暂停,yield关键字后面的表达式的值返回给生成器的调用者。它可以被认为是一个基于生成器的版本的return关键字。 yield关键字实际返回一个IteratorResult对象,它有两个属性,value和done。value属性是对yield表达式求值的 ...
分类:
其他好文 时间:
2019-12-26 17:43:03
阅读次数:
86
``` ~$ sudo apt --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies.... ...
分类:
其他好文 时间:
2019-12-26 11:23:25
阅读次数:
92
zlib模块作用: 压缩数据存放在硬盘或内存等设备 1、内存中数据的压缩与解压 #!/usr/bin/env python # -*- coding: utf-8 -*- import zlib import binascii original_data = b'This is the origin ...
分类:
编程语言 时间:
2019-12-25 14:30:54
阅读次数:
931
一、 Blue(100% red centre)> Rare/Bloody(75% red centre) > medium rare(50% red centre) > medium(25% red centre) > medium well(hint of pink) > well done(1 ...
分类:
其他好文 时间:
2019-12-25 01:34:56
阅读次数:
97
#!/bin/bash # 假设将sakila数据库名改为new_sakila # MyISAM直接更改数据库目录下的文件即可 mysql -uroot -p123456 -e 'create database if not exists new_sakila' list_table=$(mysql ...
分类:
数据库 时间:
2019-12-24 18:49:41
阅读次数:
148
1.首先你的提前创建一个kvm虚拟机主机,才能批量复制创建 1 批量复制已经安装好的系统盘 2 for i in `seq 144 145`;do cp centos7-1.img centos7-$i.img && echo $i ;done 3 4 批量复制已经安装好的配置文件 5 for i ...
分类:
其他好文 时间:
2019-12-23 18:30:45
阅读次数:
98
受到一位非常令我尊敬同事的影响,我最近在学习Python,不管学得好不好,我只管学。记得今年国庆期间有网友用Python的turtle方法画出了五星红旗。今天我也画出来了,精简了语句。把五颗星的参数(每颗星有四个参数,位置X,Y,角度,大小)提前放进列表里,使用for语句循环提取每颗星的参数进行作图。全文19句话,比较精炼。如果在sublime里编辑,最后再加上一句done(),防止运行完毕闪退。
分类:
其他好文 时间:
2019-12-22 09:14:14
阅读次数:
152
JS动画效果,注意事件函数中所传递的传递的参数及某些事件函数返回的函数 1.进入动画钩子:before-enter,enter,after-enter; 2.离开动画钩子:before-leave,leave,after-leave; 3.在enter钩子中的函数调用done()告诉Vue,JS动画 ...
分类:
Web程序 时间:
2019-12-21 13:43:19
阅读次数:
97