接口的基本语法一: 1.使用interface 定义 2.接口当中的方法都是抽象方法 3.接口当中的方法都是public权限 接口的定义: interface USB { public void read(); public void write(); } 接口的实现: class USBPhone ...
分类:
其他好文 时间:
2016-09-03 18:16:04
阅读次数:
114
About Explicit Locking Ehcache contains an implementation which provides for explicit locking, using read and write locks. With explicit locking, it i ...
函数的使用 官方文档:https://docs.python.org/2/library/functions.html 查看帮助 按q退出。 实例: divmod() round() raw_input() 类似于bash中的read,注意它的输出都是Str类型的。 ...
分类:
编程语言 时间:
2016-09-02 18:47:22
阅读次数:
189
[root@slave~]#catmysqldump.sh
#!/bin/bash
#
echo"============================"
echo"mysqldump,youcanchoosewhichdatabasetobackup,ifnotIwillbackalldatabases"
echo"==========================="
read-p"Pleasetellmewhichdatabasedoyouwanttobackup===>"base
[-d/d..
分类:
数据库 时间:
2016-09-02 16:13:34
阅读次数:
233
一旦,我们建立好了tcp连接之后,我们就可以把得到的fd当作文件描述符来使用。 由此网络程序里最基本的函数就是read和write函数了。 写函数: ssize_t write(int fd, const void*buf,size_t nbytes); write函数将buf中的nbytes字节内 ...
分类:
其他好文 时间:
2016-09-02 15:51:03
阅读次数:
122
逐行地读取一个文件,典型的代码是: 这段代码看似可以正常工作,但是如果面对较大的文件时,性能开销极大。 Lua提供了io.read("*a")选项,这样可以一次性读取整个文件。 在Lua中,可以将一个table作为字符串缓冲。关键是使用函数table.concat,它将给定列表中的所有字符串连接起来 ...
分类:
其他好文 时间:
2016-09-02 13:23:39
阅读次数:
119
读本文章前,必须先有一些通过I/O模型的系统调用的基础,即 open() , create() , read() , write() , close() , lseek() 函数的调用。
原子操作
...
分类:
其他好文 时间:
2016-09-02 06:37:00
阅读次数:
267
表锁分为read和write read锁: lock table 表名 read; unlock tabls; #解锁 当前会话只能读取数据,不能插入数据。 其他会话能读取数据,不能插入数据,解锁后数据插入。 write锁: lock table 表名 write; 当前会话可以读书数据,可以插入数 ...
分类:
数据库 时间:
2016-09-02 00:44:23
阅读次数:
156
#!/usr/bin/envpython#coding:utf-8importosfromsubprocessimportPopen,PIPEdefgitPid():#拿到java系统进程值p=Popen([‘pidof‘,‘java‘],stdout=PIPE,stderr=PIPE)pids=p.stdout.read().split()returnpidsdefparsePidFile(pids):#访问VmRSS物理内存值并作累计sum=0foriinpids:fn..
分类:
编程语言 时间:
2016-09-01 16:34:52
阅读次数:
175
2. TCP keepalive overview In order to understand what TCP keepalive (which we will just call keepalive) does, you need do nothing more than read the n ...
分类:
其他好文 时间:
2016-09-01 14:28:59
阅读次数:
188