#define BTS_SAFE_DELETE(POINTER) \do { if (POINTER != 0) { BTS_DELETE(POINTER); POINTER = 0;} \} while (0)注意:宏定义必须在一行,否则报错!\ 表示本行未结束, 没有该连接符时,直接换行编译器会...
分类:
其他好文 时间:
2014-07-03 10:25:27
阅读次数:
186
第一种,写法最简单的。使用原生IO,一个字节一个字节读://一个字符一个字符读,太慢 int i;while((i=in.read()) != -1){ i = in.read(); arr[j++] = i;}这种方式非常的慢,极为不推荐。...
分类:
其他好文 时间:
2014-07-03 06:11:59
阅读次数:
209
读取文件:#直接读取for line in open("d:\serverlist.txt"): print(line)#使用readline()方法读取file = open('d:\serverlist.txt')line = file.readline()while line:print...
分类:
其他好文 时间:
2014-07-02 23:06:01
阅读次数:
173
编译服务程序报的各种错:
1. 环境变量配置好后运行tmboot –y启动管理进程和服务进程
2. 报类似这样的错:buildserv:error while loading shared libraries:libtux.so:can't openshared object file。解决如下:
exportLD_LIBRARY_PATH=$ LD_LIBRARY_PATH:/home...
分类:
其他好文 时间:
2014-07-01 15:54:32
阅读次数:
1571
题意:排序后字符串全排列
思路:好久没水一题了
#include
#include
#include
#include
using namespace std;
const int MAXN = 220;
char str[MAXN];
int main() {
while (scanf("%s", str) != EOF) {
int n = strlen(str);
...
分类:
其他好文 时间:
2014-07-01 15:09:17
阅读次数:
182
前两天写RTC中断 使用串口输出
发现程序会出现while(!(rUTRSTAT0 & 0x2));出不来的情况,但是中断是正常运作的
解决方法:
main函数增加:
U32 mpll_val = 0,consoleNum;
Port_Init(); //定义在2440lib.c...
分类:
其他好文 时间:
2014-07-01 14:36:56
阅读次数:
459
create function fun_getPY(@str nvarchar(4000))returns nvarchar(4000)asbegindeclare @word nchar(1),@PY nvarchar(4000)set @PY=''while len(@str)>0beginse...
分类:
数据库 时间:
2014-07-01 11:57:32
阅读次数:
258
public class FillQueueThread extends Thread {
private Queue queue;
public FillQueueThread(Queue queue){
this.queue = queue;
}
@Override
public void run() {
while(true){
try {
boolean a...
分类:
数据库 时间:
2014-07-01 11:20:37
阅读次数:
332
//这里实现 某个文件下的所有图片,并列出来!
header("Content-type:text/html;charset=utf8");
$handle=opendir('.');
echo "目录 handle: $handle\n";
echo "档案:\n";
while ($file = readdir($handle)) {
if(@eregi("[_\.0-...
分类:
Web程序 时间:
2014-07-01 11:19:52
阅读次数:
233
Ø 读取文件的时间
#!/bin/bash
for file in `ls /root`
do
stat $file>1.txt
sed -n "7p" 1.txt>2.txt
usetime= awk -F ":" '{print $2}' 2.txt
echo "time="$file $usetime
done
Ø 读取文件的每行while...
分类:
其他好文 时间:
2014-07-01 06:49:51
阅读次数:
204