Javascript变量和属性的区别 变量和属性在javascript中的区别在很多文章中都说变量其实就是属性,但是它们之间有一定的区别,例如:在全局作用域下,var a = "hello";b = "hello";从字面上看,它们的区别是一个前面加了var,一个没有;它们的相同点都是全局的;那么a称之为变量,只不过它是全局变量;b称之为属性,它是window对象的属性,因为在全局作用域下,浏览器默
Jquery一些有用的但是不是经常使用的方法和属性 下面总结一些Jquery中非常有用的但是不是经常使用的方法和属性:1. closest()定义和用法closest() 方法获得匹配选择器的第一个祖先元素,从当前元素开始沿 DOM 树向上。如$("li.level-1").closest("ul"): 表示首先找到li标签的class为level-1的元素,再次找匹配选择器(“ul”)的第一个祖先元素。所以它会返回
CSS一些不常用但是有用的属性 下面总结CSS一些不常用但是非常有用的属性:1. CSS text-indent 属性text-indent 属性规定文本块中首行文本的缩进。将段落的第一行缩进 50 像素:p { text-indent:50px; }持续的更新中。。。
浏览器和服务器证书信任概念理解 关于浏览器和服务器之间证书信任的问题证书分为两种:一种是证书,一种是根证书;证书是指颁发者信任被颁发者,根证书是被颁发者信任颁发者。让我们举例来更详细的分析这两种证书的区别:1. 如颁发证书的机构CSDN可以颁发这两种证书。2. 当CSDN把证书颁给小李,说明小李是被CSDN所信任的;3. 当CSDN把根证书颁给大李,说明大李是信任CSDN机构的;4. 那么小李和大李彼此信
javascript自定义事件和方法的区别 一:首先看一下自定义事件和方法的实现方式1. Javascript的自定义事件:通常我们定义自定义事件的方法为:a. 定义 : this.MyClick = null;b.触发事件:在需要触发此事件的时候执行if(this.MyClick ){ //判断是否有定义,是防止其他模块没有注册此事件,导致调用Myclick()的时候出现exception thi
解决了Could not get lock /var/cache/apt/archives/lock 在ubuntu apt-get upgrade的时候,遇到:E: Could not get lock /var/cache/apt/archives/lock – open (11 Resource temporarily unavailable)E: Unable
Linux: Password for '(null)' GNOME keyring If you input the svn + path, It will be happenedPassword for '(null)' GNOME keyringGenerally, this situation occured in changing the i
linux shell中内置命令总结中 Linux建立文件的命令:1. vim test.c 打开并保存退出,就相当于建立一个文件2. touch test.c :建立一个文件,当这个文件存在时,touch表示把此文件同步到最新的更新时间,这个特性会在编译等阶段,尤其是不改变文件内容时很有用3. echo
linux set 命令的应用 The following example redirects the standard output into a file by using the > operator. By default, if the file already exists, then it wil
GTest编译以及实例分析 GTest编译方法:1. Google test 代码下载svn下载:svn checkout http://googletest.googlecode.com/svn/trunk/ gtest-svn例如你把你的代码放在/usr/src/gtest-svn 2. GTest静态
strlen和sizeof的区别 Strlen和sizeof有两个重要的区别:1. strlen计算字符串的长度时是不包含null byte; sizof计算字符串长度时是包含null byte的;2. 使用strlen会调用系统调用,sizeof在编译的时候就已经计算出相应的长度了。
Errno错误信息处理 Errno is a global variable, if you want to print the errno message about open error, and check why the error is happened.but the errno is an
关于fork,exec,waitpid以及fgets换行替换为null的说明 The following example is from the apue sourecode,but it is a very good example for understanding the fork,exec,waitpid concept ,especially f
APUE源码编译 APUE2源码在Fedora14下的编译 最近重温APUE,附源码编译指南一份:1. 源码获取从APUE的官网下载源码;2. WKDIR修改编辑源码解压生成的apue.2e文件夹下的Make.defines.linux修改WKDIR=/home/sar/apue.2e为你的apu
Linux删除svn保存的密码和用户名 ~/.subversion/auth/svn.simple/1233……把相关的username 下你自己的用户名和passwd下你自己的密码删掉,下次再对svn操作时就会让你重新输用户名和密码了。
wc命令应用 wc:print newline,word,and byte counts for each filewc vera.txt : line num word num byte numwc –l vera.txt: line numset $(wc vera.txt)echo $1: line numecho $2: word numecho $3: byte numecho $4: vera.txt
shell find:查找文件的运用 看起来似乎比较复杂:find . /( -name “_*“ -or -newer while2 /) -type f -print 在当前目录下查找(名字以_为开始的文件或者是比while2文件更新的文件)文件,而且是文件。-type f : 指定为文件-type d:指定为目录-name “文件名” find . -name “_*“ -newer while2 -t
grep:文件中查找字符串的运用 You use find to search your system for files, but you use grep to search files for stringsgrep [options] PATTERN [FILES]If no filenames are given, it searches standard input. $ grep e$ words2.txt :在文件words2.txt中查找以e结尾的字符串
#define 宏函数的运用 Write a format string to special file through the #define function and ##__VA_ARGS__ parameter.The following list is a example of writing a format log to ./log file. #include <stdio.h>#include <string.h>#define FormatLog(forma