开发

js var 以及 let 的差异

 例子window.checklist=[{"boardname":"motor_board","cur":"1.0.0","new":"1.0.1"},{"boardname":"power_board","cur":"1.0.0","new":"1.0.1"},{"boardname":"imu_boar...
代码星球·2020-08-09

js for 循环示例

 //for循环vararray=[1,2,3,4,5,6,7];for(vari=0;i<array.length;i++){console.log(i,array[i]);}//forinvararray=[1,2,3,4,5,6,7];for(letindexinarray){console.lo...
代码星球·2020-08-09

js if判断示例

 if(pro==0){if(fla==0){console.log("%0pass")}else{$('#h_progress_bar.ui-progress').animateProgress(0,v,function(){fla=0;});}}elseif(pro==1){if(fla==1){cons...
代码星球·2020-08-09

js 全局变量

 window.a=12;...
代码星球·2020-08-09

js 定时器

 //定时器间隔0.5s,启动定时器后,等待3srefreshCount=function(){vartime=500;varinterval;//调度器对象。functionfun(){console.log("获取进度");}interval=setInterval(fun,time);//去掉引号就对了...
代码星球·2020-08-09

js 延时等待

 //延时器,2秒后执行函数functiontest(){alert("aaaa");}setTimeout(function(){test();},2000);//或者setTimeout('test()',2000); ...
代码星球·2020-08-09

shell 获得后台进程返回值

 获得后台进程返回值我们用“&”把进程放入后台以后,如果需要了解进程的执行情况,可以使用wait函数。默认情况下wait会等待任意子进程结束但是不会返回子进程的返回值。而以子进程的pid作为参数调用wait时,wait便能够返回该子进程的退出状态了。#!/bin/bashdir...

js switch 用法

 //获取星期//例子1varday=newDate().getDay();switch(day){case6:x="Todayit'sSaturday";break;case0:x="Todayit'sSunday";break;default:x="LookingforwardtotheWeekend";...
代码星球·2020-08-09

shell for 循环

 test.sh#!/bin/bashforstrin"C语言""http://www.bilibili.com""成立7年了""日IP数万"doecho$str>>demo.txt#将输入结果以追加的方式重定向到文件done 执行sudochmod+xtest.sh./test.shc...
代码星球·2020-08-09

shell 按行读取文件的内容

 test.py:#coding=utf-8importsubprocesscompilePopen=subprocess.Popen('gcchaha',shell=True,stderr=subprocess.PIPE)compilePopen.wait()print('thestatuscodeis:'...

shell 的多进程

 例子#!/bin/bashtemp_fifo_file=$$.info#以当前进程号,为临时管道取名mkfifo$temp_fifo_file#创建临时管道exec6<>$temp_fifo_file#创建标识为6,可以对管道进行读写rm$temp_fifo_file#清空管道内容functio...
代码星球·2020-08-09

>/dev/null 2>&1

 >/dev/null2>&1,将标准输出和错误输出到输入至/dev/null...
代码星球·2020-08-09

js 变量作用域

 例子<script>vara="heh"functionfindLove(){console.log(a);functionfindforyou(){vara="you";console.log(a);}functionfindother(){console.log(a)}findforyou(...
代码星球·2020-08-09

2>&1的意思

 2>&1的意思就是将标准错误也输出到标准输出当中....
代码星球·2020-08-09

Premiere Pro 中的键盘快捷键

 官网地址:https://helpx.adobe.com/cn/premiere-pro/using/default-keyboard-shortcuts-cc.html?mv=product&mv2=pr# 快捷键大全Windows:https://helpx.adobe.com/cn/...