10 2011 档案

摘要:1 Tie::File建立一个list和file的关系,对list的操作会反映到file上去。use Tie::File;tie @array, 'Tie::File', filename or die ...;$array[13] = 'blah'; # line 13 of the file is now 'blah'print $array[42]; # display line 42 of the file$n_recs = @array; # how many records are in the file?$#array -= 2; 阅读全文
posted @ 2011-10-29 16:48 visayafan 阅读(3609) 评论(0) 推荐(0)
摘要:1 Path::File中两个函数的基本使用 2 代码举例: 3 more help 1 Path::File中两个函数的基本使用make_path( $dir1, $dir2, .... )make_path( $dir1, $dir2, ...., \%opts ) #\%opts表示哈希引用mkpath( $dir )mkpath( $dir, $verbose, $mode )mkpath( [$dir1, $dir2,...], $verbose, $mode )mkpath( $dir1, $dir2,..., \%opt )mode => $num 每个创建目录的权限位,默 阅读全文
posted @ 2011-10-29 15:53 visayafan 阅读(4383) 评论(0) 推荐(0)
摘要:1 数组与引用 2 声明的区别 3 访问的区别 4 添加行元素 5 添加列元素 6 访问与打印 6.1 运算符优先级 6.2 访问一个 6.3 遍历 7 切片 1 数组与引用此处引用相当于C中的指针。 二维数组第一列不存储具体元素而是存储指向该行一维数组的引用。2 声明的区别数组用如下形式声明: 数组名前加@,之后用()。my @AoA = ( [ "fred", "barney", "pebbles", "bambam", "dino", ], [ "george", &q 阅读全文
posted @ 2011-10-29 15:02 visayafan 阅读(20046) 评论(0) 推荐(1)
摘要:1 simpleprint "It matches\n" if "hello world" =~ /world/;print "It doesn't match\n" if "hello world" !~ /word/;$_ = "hello world";print "it matches\n" if m{world};print "it matches\n" if m!world!;print "it matches\n" 阅读全文
posted @ 2011-10-27 22:05 visayafan 阅读(1164) 评论(0) 推荐(0)
摘要:1template specialization 模板特化一般情况下类模板定义如下:template<class Window, class Controller>class Widget{ ... 泛化实现代码 ...};特化是指把类模板中指定的class T变成具体的类型:class Widget<ModalDialog, MyController>{ ... 特化实现代码 ...};其中ModalDialog和MyController是你自己另外定义的类.有了这个Widget的特化定义之后,如果你以后定义了Widget<ModalDialog, MyCont 阅读全文
posted @ 2011-10-21 17:32 visayafan 阅读(2452) 评论(0) 推荐(0)
摘要:edit 可以打开编辑器edit filename 将SQL*Plus缓冲区里面的内容复制到一个文件名为filename的文件里面并打开该文件get filename 把filename里面的内容复制到sql*plus缓冲区start filename 或者 @ filename 执行sql文件save filename 将sql*plus缓冲区里面的内容复制并保存到filename里SET PAGESIZE 100 --pagesize太小的话显示行数较多的结果会出现较多的HEADINGSET LINESIZE 100... 阅读全文
posted @ 2011-10-20 23:16 visayafan 阅读(351) 评论(0) 推荐(0)
摘要:1.内连接表名 INNER JOIN 表名 ON 条件等价于:FROM 表名, 表名WHERE 条件SELECT p.name, pt.name, pt.product_type_idFROM products p INNER JOIN product_types pt ON p.product_type_id = pt.product_type_idORDER BY p.name;表名 INNER JOIN 表名 USING (属性)注意:在SELECT中的属性不能加前缀,如pt.product_type_id会报错SELECT p.name, pt.name, prod... 阅读全文
posted @ 2011-10-20 22:35 visayafan 阅读(1481) 评论(0) 推荐(0)
摘要:oracle的nvl函数的用法通过查询获得某个字段的合计值,如果这个值位null将给出一个预设的默认值 select nvl(sum(t.dwxhl),1) from tb_jhde t where zydm=-1这里关心的nvl的用法,nvl(arg,value)代表如果前面的arg的值为null那么返回的值为后面的value 如: NVL(a,b)就是判断a是否是NULL,如果不是返回a的值,如果是返回b的值 通过查询获得某个字段的合计值,如果这个值位null将给出一个预设的默认值另一个有关的有用方法 declare i integer select nvl(sum(t.dwxhl),1) 阅读全文
posted @ 2011-10-20 21:56 visayafan 阅读(43873) 评论(0) 推荐(1)
摘要:注:左外连接中外连接操作符位于等于操作符的右边 右外连接中外连接操作符位于等于操作符的左边转自http://space.itpub.net/519536/viewspace-563019理解Oracle的各种连接方法的最有效的方法就是“躬亲”,在实践中去深刻理解内连接,左外连接,右外连接,全外连接的概念的和效果。1.创建测试表并准备测试数据sec@ora10g> create table a (a number(1),b number(1),c number(1));sec@ora10g> create table b (a number(1),d number(1),e numb 阅读全文
posted @ 2011-10-20 21:23 visayafan 阅读(801) 评论(0) 推荐(0)
摘要:FriendsTable of Contents1 friend with 2 butter up 3 be way too 4 get past 5 freaked out 6 let's just say / footage 7 screw you 8 i got to go 9 on good terms 10 benefit of the doubt 11 it meant a lot to me 12 meant to be 13 pearls of wisdom 14 who's who 15 dial down 16 blow off 1 friend withw 阅读全文
posted @ 2011-10-18 13:13 visayafan 阅读(247) 评论(0) 推荐(0)
摘要:TheMatrixTable of Contents1 the matrix 2 the matrix reloaded 3 the matrix revolutions 1 the matrixgrand two grand 两千美元R and R R and R = Rest and Recreation 休息和娱乐what good is what good is a phone call if you're unable to speak? 有什么用the honor is mine -It's an honor to meet you. -No… the honor 阅读全文
posted @ 2011-10-18 13:10 visayafan 阅读(205) 评论(0) 推荐(0)
摘要:S05.05Table of Contents1 All systems go, if you catch my drift 2 Something is obviously bugging you. What is it? 3 I just can't believe you signed up the space program without even talking to me. 4 Bernadette, an opportunit has come up that impacts both of us, and I'd like to discuss it. 5 I 阅读全文
posted @ 2011-10-18 13:02 visayafan 阅读(208) 评论(0) 推荐(0)
摘要:SQL01Table of Contents1 SQL注意事项 2 column heading default 3 arithmetic expression 4 Null value 5 column alias 6 concatenation operator 7 literal character strings 8 DISTINCT 9 DESCRIBLE 10 WHERE 1 SQL注意事项关键字大小写不敏感。 关键字不能缩写或分行写。 可以多行书写。 回车表新行 在SQL/Plus中每个SQL语句都以;结束 或/结束。2 column heading default缺省的head 阅读全文
posted @ 2011-10-17 22:14 visayafan 阅读(564) 评论(0) 推荐(0)
摘要:要使DMS_OUTPUT.PUT_LINE有效,可以登陆sqlplus后:set serveroutput on即可。使用中文xp下的dos date格式会默认为中文的‘04-9月-07’格式,可以修改为'DD-MON-YY'格式ALTER SESSION SET NLS_LANGUAGE=AMERICAN ; 或者ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'; 或在DOS窗口下修改set NLS_LANG=AMERICAN_AMERICA.ZHS16GBK 阅读全文
posted @ 2011-10-17 21:10 visayafan 阅读(737) 评论(0) 推荐(0)
摘要:>sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on 星期日 10月 16 08:08:45 2011Copyright (c) 1982, 2010, Oracle. All rights reserved.连接到:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL&g 阅读全文
posted @ 2011-10-16 20:17 visayafan 阅读(9514) 评论(0) 推荐(2)
摘要:1 帮助SQL*Plus: Release 11.2.0.1.0 ProductionCopyright (c) 1982, 2010, Oracle. All rights reserved.使用 SQL*Plus 执行 SQL, PL/SQL 和 SQL*Plus 语句。用法 1:sqlplus -H | -V -H 显示 SQL*Plus 版本和 用法帮助。 -V 显示 SQL*Plus 版本。用法 2:sqlplus [ [<option>] [{logon | /nolog}] [<start>] ] <... 阅读全文
posted @ 2011-10-15 14:12 visayafan 阅读(1375) 评论(0) 推荐(1)
摘要:小端字节序x86系列是little endian是指在存储时低位放在低地址。大端字节序PowerPC是big endian存储时高位放在低地址。例如存储0x1234,12是高位,34是低位。big endian存储:内存地址 低->高存储内容 12 34little endian存储:内存地址 低->高存储内容 34 12程序验证当前使用CPU的字节序:使用普通方法:强制类型转化#include <stdio.h>int main(int argc, char *argv[]){ int num = 0; int *p = &num; *((char *)p) 阅读全文
posted @ 2011-10-13 12:59 visayafan 阅读(1236) 评论(0) 推荐(0)
摘要:1eclilpse 快捷键M-/提示sysosystem.out.println(" ");main写出main语句C-e调出隐藏的tabC-d删除当前行C-M-down复制当前行到下一行C-M-up复制当前行到上一行M-up当前行与上一行换位置M-down当前行与下一行换位置M-right下一个编辑页面M-left上C-q定位到最后编辑的地方C-lgoto-lineC-m最大化当前的edit或viewC-S-/comment/uncomment blockC-/ or C-7comment/uncomment current lineC-ooutlineC-t快捷键显示当 阅读全文
posted @ 2011-10-07 21:51 visayafan 阅读(718) 评论(0) 推荐(0)