In this fourth and last part of my monad tutorial, I will write about monad transformers. I will deal with only one of them, but it’s a start. I will ...
分类:
其他好文 时间:
2014-11-21 12:28:03
阅读次数:
150
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((...
分类:
其他好文 时间:
2014-11-21 06:58:22
阅读次数:
262
1、open&argument 1 my_file = open("output.txt", "w") hint:You can open files in write-only mode ("w"), read-only mode ("r"), readandwrite mode ("r+"...
分类:
编程语言 时间:
2014-11-21 01:22:23
阅读次数:
190
习题笔记今天解决一下 Higher Order Functions: Map, Filter, Reduce and more – Part 1 中最后的13个练习题,主要是关于闭包的(咦不对啊我明明是想看集合方面内容的。。。)。Write a function applyTwice(f:(Float -> Float),x:Float) -> Float that takes a functio...
分类:
编程语言 时间:
2014-11-20 22:02:09
阅读次数:
278
1、从文件类型上分可分为三种,
用ls-l查询,以“一”开头的是文件,以字母“d”开头的是目录(俗称文件夹),以字母“l”开头的是连接。
2、剩下的9个分别三个为一组每一组都有四种符号组成分别是“r”,“w”,“x”,“-”。
r(read):代表读的权限
w(write):代表写的权限
x (execuite):...
分类:
系统相关 时间:
2014-11-20 18:49:54
阅读次数:
209
#!/usr/bin/pythonimportreimportosimporturllibimportjsondefbuffer_line(monitor_log):buf=open("/etc/sae/apns_buffer.txt","r").read()bytes=os.popen(‘wc-c/data0/logs/%s‘%monitor_log).read().split("")[0]ifint(bytes)<int(buf):return0else:returnint(re.findall("..
分类:
编程语言 时间:
2014-11-20 15:43:01
阅读次数:
181
1、从文件类型上分可分为三种,用ls-l查询,以“一”开头的是文件,以字母“d”开头的是目录(俗称文件夹),以字母“l”开头的是连接。2、剩下的9个分别三个为一组每一组都有四种符号组成分别是“r”,“w”,“x”,“-”。r(read):代表读的权限w(write):代表写的权限x(..
分类:
系统相关 时间:
2014-11-20 15:35:03
阅读次数:
195
下面是一些衡量I/O闲忙程度的经用指标:磁盘利用率(disk utilization)磁盘队列长度(disk queue length)磁头/逻辑卷的读/写速率(read/write rates per spindle/logical volume)原始I/O(raw I/O):主要用于数据库应用交...
分类:
其他好文 时间:
2014-11-20 13:27:44
阅读次数:
236
To understand how the write-ahead log works, it is important for you to know how modified data is written to disk. SQL Server maintains a buffer cache...
分类:
数据库 时间:
2014-11-20 11:36:23
阅读次数:
160
我使用的框架是Struts2+Hibernate3+Spring,项目的后台数据库是Mysql,最近挪到正式服务器上了,处于一直打开服务的状态,就出现了java.net.SocketException: Software causedconnection abort: socket write er...
分类:
编程语言 时间:
2014-11-20 11:32:57
阅读次数:
214