perl的模块和包:
和模块相关的关键字:
use module-name: 添加模块
use module-name qw/functionname/; #导入具体的函数
use module-name qw/ /; #不导入具体函数,需要用全路径调用函数
use module-name {}; #同上
do
no
import
package
requir...
分类:
其他好文 时间:
2015-04-23 17:26:59
阅读次数:
173
1. 问题背景在使用urllib2 module抓取web数据时,如果希望使用如何request header,减少传输时数据量。返回的数据,是经过gzip压缩的。直接按照 content.decode(“utf8”), 解码会出现异常,并且也无法检测网页数据的实际编码类型。2. 问题分析因为http请求中,如果在request header包含”Accept-Encoding”:”gzip, de...
分类:
编程语言 时间:
2015-04-23 13:16:48
阅读次数:
225
在Apache中加载PHP模块 1.打开Apache的配置文件httpd.conf(位于Apache2\conf 目录下)。 2.查找 “#LoadModule ssl_module modules/mod_ssl.so”,在下面添加:LoadModule php5_module "d:/local...
分类:
Web程序 时间:
2015-04-23 12:28:27
阅读次数:
161
这一节,我们就NS3第一个例子,也是最简单的例子hello 开始学习。
以下是 hello-simulator.cc 的源码:
---------------------------------------------------------------------------------------
#include "ns3/core-module.h"
//声明了一个叫Hello...
分类:
其他好文 时间:
2015-04-23 09:41:40
阅读次数:
484
注释的写法:/* Footer */内容区/* End Footer */class的命名:(1)标题栏样式,使用"类别+功能"的方式命名 .barNews { } .barProduct { }(2)模块结构css定议 模块标题 .module 模块标题 .moduleHead 模块包装...
分类:
Web程序 时间:
2015-04-22 23:55:51
阅读次数:
171
/* hash.js */ var crypto = require('crypto');module.exports = function(){ this.encode = function(){ var algorithm = arguments[0] ? arguments[0] ...
分类:
其他好文 时间:
2015-04-22 23:38:12
阅读次数:
199
xxxxxx.lib(xxxxxx.obj):fatalerrorLNK1112:modulemachinetype‘X86‘conflictswithtargetmachinetype‘x64‘1.先看看你的模块是否是64位,这个一般都是,如何配置64位工程,这里就不说了;2.查看该模块链接的静态库或者dll是否是64位的;Configuration-->kinker-->General--..
分类:
系统相关 时间:
2015-04-22 18:42:53
阅读次数:
248
Gruntfile.js里面配置:module.exports = function(grunt){ // 项目配置 grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), uglify: { ...
分类:
其他好文 时间:
2015-04-21 20:25:07
阅读次数:
143
module.exports = function(grunt) { // 项目配置 grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), clean:{//清除目标文件下文件 huzhao:{ ...
分类:
其他好文 时间:
2015-04-21 19:57:05
阅读次数:
105
1、dir(keywork)报错>>>dir(keyword)
Traceback(mostrecentcalllast):
File"<stdin>",line1,in<module>2、缺少相应的模块,使用import或者from...import来导入相应的模块,模块其实就是一些函数和类的集合文件,它能实现一些相应的功能,当我们需要使用这..
分类:
编程语言 时间:
2015-04-21 14:52:02
阅读次数:
138