1.for(var i = 0, max = myArray.length; i < max ; i++){ //用myArrayy[i]来做点什么 } 用max存储myArray的长度,防止每次循环去读取数组长度,尤其是当设计到DOM节点集合时,可明显提高效率.(2016-08-22) 2.function foo(){ var a = b = 0; } b会声明为全局变量.原因是:从右到左的赋值过程,首先是 b = 0 ,此情况下b是未声明的,然后是 var a = b;实际顺序为 var…
针对解压版本5.7.16(博主使用的这个版本.在某些低版本中部分命令失效) 一.初始化data目录(解压版解压后没有data目录) mysqld --initialize-insecure --user=mysql 二.修改root密码,连接数据库后use mysql 1.update mysql.user set authentication_string=password('123qwe') where user='root' and Host = 'localhost';新版Mysql已经…
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace notifyIconShow { public partial class notifyIconShow : F…
1.JSON对象转换为字符串 //JSON对象转字符串 function jsonParseString(o) { try { if (o == undefined) { return ""; } var r = []; if (typeof o == "string") return "\"" + o.replace(/([\"\\])/g, "\\$1").replace(/(\n)/g, "…
1.替换多个模板变量 var s="my javascript is very poor,who can help me?" var reg=/(\w*)my(.*)is(.*)can(.*)/g alert(s.replace(reg,"$1his$2was$3could")); //输出 his javascript was very poor,who could help me?…
BAT 前端开发面经 —— 吐血总结 目录 1. Tencent 2. 阿里 3. 百度 更好阅读,请移步这里 聊之前 最近暑期实习招聘已经开始,个人目前参加了阿里的内推及腾讯和百度的实习生招聘,在此总结一下一是备忘.总结提升,二是希望给大家一些参考其他面试及基础相关可以参考其他博文: Questions of FE Web basis summary FE knowledge fragment 每位面试官的面试时间基本都在 40-80 分钟,下面先简要介绍各个面试流程,问题详情见具体公司分…