1. 统计行数、单词数与字符数2. 单词认为是任何其中不包含空格、制表符或换行符的字符序列#include #include #define IN 1#define OUT 0main(){ int nl,nw,nc,input,state; nl = nw = nc = 0; s...
分类:
其他好文 时间:
2015-05-12 13:21:22
阅读次数:
161
2,8阅读 第一章 ?第一个案例 在此案例中使用了, 方法的提取(extract method),方法的移动(move method),临时变量的清除,变量及函数名重构,switch类型重构(replace type code with state/strategy)等。 ...
分类:
编程语言 时间:
2015-05-12 11:49:01
阅读次数:
1707
题意:tsp问题,但是每个点可以最多走两次链接:点我转移方程见代码#include#include#include#includeusing namespace std;#define inf 0x3f3f3f3fint State[12];int vis[60000][12];int dp[600...
分类:
其他好文 时间:
2015-05-12 11:07:45
阅读次数:
120
sc query lanmanse2rver |find /i "state" |find /i "running" || (该服务没有运行时,要执行的命令)sc query lanmanse2rver |find /i "state" |find /i "running" &&(该服务运行时,要执...
分类:
其他好文 时间:
2015-05-11 14:45:12
阅读次数:
123
函数原型是这样的function drupal_prepare_form($form_id, &$form, &$form_state) {//---}1初始化一些变量 $form['#type'] = 'form'; $form_state['programmed'] = isset($for.....
分类:
其他好文 时间:
2015-05-11 14:30:38
阅读次数:
179
函数原型是这样的function drupal_retrieve_form($form_id, &$form_state) {//--}1 把$form_id传到$form_state['build_info']['form_id']$form_state['build_info']['form_i...
分类:
其他好文 时间:
2015-05-11 14:17:21
阅读次数:
114
函数原型function drupal_build_form($form_id, &$form_state) {//---}1填充$form_state$form_state += form_state_defaults();2填充$form_state['input'] if (!isset($....
分类:
其他好文 时间:
2015-05-11 12:34:54
阅读次数:
154
现象:在Ubuntu登陆界面输入密码之后,黑屏一闪并且出现了check battery state之类的文字之后,又跳转到登录界面。原因:主目录下的.Xauthority文件拥有者变成了root,从而以用户登陆的时候无法都取.Xauthority文件。说明:Xauthority,是startx脚本记...
分类:
系统相关 时间:
2015-05-10 12:49:28
阅读次数:
211
sc query|find "tomcat6" && echo yes || echo nosc query|find "eventlog" && echo yes || echo nosc query|find "eventlog" STATE=4 && echo yes || echo nos....
分类:
其他好文 时间:
2015-05-10 12:41:20
阅读次数:
136
一.先说思路
//1.数据库加三个字段,state:(0:未激活,1:激活成功),ActiCode:(放激活码),token_exptime(过期时间,用来验证激活邮件是否过期)
//2.用户填写资料,点击注册,插入数据成功,state字段默认是0,同时生成一个ActiCode(用传过来的邮箱、密码、和当前时间加密形成)也存入数据库
//3.发送邮件。。。提示用户登录邮箱激活。。。邮件中带一...
分类:
其他好文 时间:
2015-05-09 15:06:47
阅读次数:
261