码迷,mamicode.com
首页 >  
搜索关键字:bad rquest    ( 2212个结果
【笔记】JavaScript编码规范- jQuery
jQuery对象变量使用前缀$ // bad var sidebar = $('.sidebar'); // good var $sidebar = $('.sidebar'); 缓存jQuery查询 // bad function setSidebar() { $('.sidebar').hide(); // ...stuff... $('.sidebar').css({ '...
分类:编程语言   时间:2015-05-20 11:26:33    阅读次数:118
【笔记】JavaScript编码规范- 存取器
对于属性,访问器函数不是必须的。 如果定义了存取器函数,应参照getVal() 和 setVal(‘Hi’)格式。 // bad dragon.age(); // good dragon.getAge(); // bad dragon.age(25); // good dragon.setAge(25); 如果属性时boolean,格式应为isVal() or hasVal()...
分类:编程语言   时间:2015-05-20 09:45:38    阅读次数:165
【笔记】JavaScript编码规范- 构造函数
在原型对象上定义方法,而不是用新对象重写它。重写使继承变为不可能:重置原型将重写整个基类. function Jedi() { console.log('new jedi'); } // bad Jedi.prototype = { fight: function fight() { console.log('fighting'); }, block: function block() ...
分类:编程语言   时间:2015-05-20 09:43:12    阅读次数:153
Could not find main class.
MyEclipse 导入项目之后 运行“Could not find main class. Program wll exit.”报错:bad version number in .class filejdk版本问题修改成一致Window --> Preferences -->Java --> co...
分类:其他好文   时间:2015-05-19 18:15:59    阅读次数:158
【笔记】JavaScript编码规范- 类型分配&强制转换
执行强制类型转换语句。 String // bad // => this.reviewScore = 9; var A= this.reviewScore + ''; // good var totalScore = '' + this.reviewScore; // bad var totalScore = '' + this.reviewScore + ' total score'...
分类:编程语言   时间:2015-05-19 14:47:52    阅读次数:109
【笔记】JavaScript编码规范- 命名规范
避免单字母名称,让名称具有描述性 // bad function q() { // ...stuff... } // good function query() { // ..stuff.. } 当命名对象、函数和实例时使用骆驼拼写法 // bad var OBJEcttsssss = {}; var this_is_my_object = {}; function c() {} ...
分类:编程语言   时间:2015-05-19 14:45:06    阅读次数:105
树莓派开发日记,2015,5,18,问题记录
Apache2 Problems1.Bad User Namewhen you keydown #apache2 in the shell.Tips will be like this apache2:bad user name ${APACHE_RUN_USER} well,I believe this is because /etc/init.d is not in your command...
分类:其他好文   时间:2015-05-19 10:44:11    阅读次数:130
【学习笔记】JavaScript编码规范- 注释
多行注释使用/**……*/,需要包含一个描述,所有参数的具体类型的值还有返回值。 // bad // make() returns a new element // based on the passed in tag name // // @param {String} tag // @return {Element} element function make(tag) { // ......
分类:编程语言   时间:2015-05-19 10:41:35    阅读次数:135
【学习笔记】JavaScript编码规范- 空白
使用制表符设置两(四)个空格,此功能一般在IDE中可配置。具体可根据实际要求。 // bad function() { ????var name; } // bad function() { ?var name; } // good function() { ??var name; } 在左侧大括号前面保留一个空格。 // bad function test(){ cons...
分类:编程语言   时间:2015-05-19 10:38:48    阅读次数:140
【笔记】JavaScript编码规范- 逗号和分号
不要再语句前面使用逗号。 // bad var story = [ once , upon , aTime ]; // good var story = [ once, upon, aTime ]; 不要有多余逗号:这会在IE6、IE7和IE9的怪异模式中导致一些问题;同时,在ES3的一些实现中,多余的逗号会增加数组的长度。在ES5中已经澄清(source) // bad var ...
分类:编程语言   时间:2015-05-19 10:38:13    阅读次数:132
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!