换域名

自从2005年12月17日开始使用WordPress写博客,搬家无数次,在我的折腾中以前都是丢日志,这次与之前不同,是更换域名。之前的日志先暂时放在原来的域名上,有时间了再慢慢往这边搬。
-EOF-

C++循环递增延时

C++循环递增延时,程序间隔一定时间读取一次数据,如果有数据,那么默认延时1S,如果没有数据,延时增加,直到增加到最大值为止,或者读取数据花费了两倍的限制时间等条件重置延时时长。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <time.h>
#include <iostream>
using namespace std;
 
void delay(int seconds){
    clock_t start = clock();
    clock_t lay = (clock_t)seconds*CLOCKS_PER_SEC;
    while((clock()-start)<lay)
    ;
}
int main(){
    static int delay_time=1;
    const unsigned int max_wait_time=5;//seconds
    clock_t start = clock();
    while(true){
        start = clock();
 
        //function place here begin
        //your can use i for example as run(&i); to get the value i
        //that suppose the function run have got a result
        int i=1;
        //cout<<"input:"<<endl;
        //cin>>i;
        //cout<<"output:"<<i<<endl;
        //if i is zero,reset delay time
        //function place here end
 
        if ( (clock()-start) < delay_time*CLOCKS_PER_SEC && delay_time < max_wait_time){
            delay_time++;
            cout<<"s++\n";
        }
 
        //reset condition, may can use one condition for this
        if ( (clock()-start) > 2*max_wait_time*CLOCKS_PER_SEC or i==0){
            delay_time=1;
            cout<<"s=1\n";
        }
        cout<<"delay "<<delay_time<<" seconds.\n";
        delay(delay_time);
    }
    return 0;
}

-EOF-

G1常用软件

智能机的好处就是可以装很多千奇百怪的软件,这是我安装的一些软件。

* AndFTP

FTP客户端

* Android File Manager

文件管理器

* AppManager

程序管理器

* Apps Installer

程序安装工具

* ASE

Lua/Python脚本运行环境

* Astrid

任务管理器

* Compass

指南针

* ConnectBot

终端

* Finance

财经股票信息

* FTPServer

FTP服务器

* Google 地图

谷歌地图

* Here I Am

GPS工具,显示所在位置

* LunarCal

中国农历

* Marine Compass

三维指南针

* Note Pad

记事本

* PicUP

图片上载工具

* Places Directory

利用GPS查询所在位置附近的信息的,餐馆,电影院,酒店等应有尽有

* RepliGo Reader

PDF阅读器,很爽,十多兆大的文件都能打开

* Scan2PDF Mobile Lite

利用摄像头将书扫描成PDF的软件

* ScanPaste

条形码/QR码扫描引擎

* Screenshot

截屏软件

* Smart Tac Toe

五子棋

* SwiFTP

FTP服务器

* Task Manager for Root Users

系统的任务管理器

* Tasks

ToDoList任务管理器

* Text Edit

文本编辑器

* TTS Service

语音引擎

* Twidroid

Twitter客户端

* Wifi 分析仪

Wifi链接状态分析工具,没什么大用,无聊时可以拿出来玩玩

* 条码扫描器

扫条形码的,跟上面的那个功能一样

* 磁盘详情

查看文件的磁盘使用信息

* 谷歌拼音输入法

这个不用解释了吧

-EOF-

Godaddy $2.99美元域名优惠

热腾腾烫手的Godaddy $2.99 .COM 域名优惠码,对 .COM, .US, .MOBI, .BIZ, .NET, .ORG, .CA, .CO.UK and .IN米有效。
优惠码:299buycom (或者点这里访问购买
有效期:2009年9月22日或者使用该优惠码的前7500名用户
适用范围:除了上述域名的类型限制外,仅用于新注册或者转移域名到Godaddy
付款要求:只接受信用卡或者支票支付
-EOF-