ITeye博客

venceinfo的博客

venceinfo · 共 42 篇文章

转载:libCurl

原文地址: http://curl.haxx.se/libcurl/c/libcurl-tutorial.html 译者:JGood( http://blog.csdn.net/JGood ) 译者注:这是一篇介绍如何使用libcurl的入门教程。文档不是逐字逐句按原文翻译,而是根据笔者对libcurl的理解,参考原文写成。文中用到的一 些例子,可能不是出自原文,而是笔者在学习过程中,写的一些示例程序(笔者使用的libcurl版本是:7.19.6)。出现在这里主要是为了更好的说明 libcurl的某些api函数的使用。许多例子都参考libcurl提供的example代码。原文example中…

2013-05-25 08:46 · c/c++ · 评论(0)

删除所有.svn文件夹的批处理

@echo off echo ... begin ... for /D /R %%i in (.svn) do ( rd /s /q "%%i" 2>nul ) echo ... done ... echo. pause

2013-05-25 07:05 · bat · 评论(0)

简单代码统计脚本

#!/bin/bash #参数校验 if [ $# -ne 1 ]; then echo -e "\033[40;31;1mplease input your filename!\033[0m" exit 1 elif [ ! -f $1 ]; then echo -e "\033[40;31;1mfile:$1 doesn't exist!\033[0m" exit 1 fi file_name=$1 #总行数 all_num=`sed -n "$"= $file_name` #注释行数 note_num=`egrep "(^[[:space:]]*/\*)|([[:space:]]*//…

2013-05-25 07:00 · shell编程 · 评论(0)

获取项目中所有makefile文件

#!/bin/bash # 说明在DIVISON目录下执行,用于获取所有makefile文件,结果会按原目录结构保存 function back_makes { # 删除残留makes目录 rm -rf makes/ local MAKS=`find . -type f -name "*.mak"` local MAKS="${MAKS} `find . -type f -name "[mM]ake[fF]ile"`" for f in $MAKS do # find得到的文件可能是绝对路径,此时删头去尾得到中间路径 tempf=${f%/*} && tempf=${tempf#*/} # …

2013-05-25 06:56 · makefile · 评论(0)

一道面试题:AABCC输出为:A2B1C2

#include <stdio.h> #include <stdlib.h> // A2B2C2A2 void deal( const char *pIn, char *pOut) { const char *tmpIn; char *tmpOut; char count; // 字符计数器 char preCh; // 前一个字符 char curCh; // 当前字符 tmpIn = pIn; tmpOut = pOut; count = '1'; preCh = *tmpIn; while (*tmpIn++) { curCh = *tmpIn; // 如果前一个字符与当前字符相等,则…

2011-07-10 13:18 · c/c++ · 评论(0)

http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#101

http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1011230

2010-04-18 09:53 · 评论(0)

awk(转载)

http://techbbs.zol.com.cn/1/85_898.html

2010-04-14 14:39 · 评论(0)

转载一篇

sure you are all familiar with this situation: SQL> alter system kill session '152,33'; alter system kill session '152,33' * ERROR at line 1: ORA-00031: session marked for kill The session trying to issue the kill will hang for 60 seconds and then return this “session marked for kill” message. And …

2010-03-30 12:04 · oracle基础 · 评论(0)

linux好文章

http://linux.chinaunix.net/bbs/viewthread.php?tid=224780

2010-03-26 10:12 · shell编程 · 评论(0)

shell小结(15)

#!/bin/bash if [ ! $# -eq 1 ];then echo "need only one param!" exit 1 fi cat /etc/passwd | awk -F: '{print $1}' | grep -w $1 if [ $? -eq 1 ];then su - << huawei userdel -rf $1 1>> ok.log 2>> fail.log fi ------------------------------------------------------------------------------------------- #!/b…

2010-02-09 15:33 · shell编程 · 评论(0)

验证码

//返回验证图片,并将验证码保存到session中 public void getImage(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("image/jpeg"); response.setHeader("Pragma", "No-cache"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader("E…

2010-02-08 14:39 · java基础 · 评论(0)

基础1

String[] targetArray = targetIds.split("\\@"); String[] arr = sql.split("\\?"); String[] arr = sql.split("\\|"); Class.forName("oracle.jdbc.OracleDriver"); return java.net.URLEncoder.encode(msg, "UTF-8"); native2ascii -encoding gb2312 config_zh.txt config_zh.properties -----------------------------…

2010-02-08 14:37 · java基础 · 评论(0)

sql(4)

在含有子查询的SQL语句中,要特别注意减少对表的查询. Update 多个Column 例子: 低效: UPDATE EMP SET EMP_CAT = (SELECT MAX(CATEGORY) FROM EMP_CATEGORIES), SAL_RANGE = (SELECT MAX(SAL_RANGE) FROM EMP_CATEGORIES) WHERE EMP_DEPT = 0020; 高效: UPDATE EMP SET (EMP_CAT, SAL_RANGE) = (SELECT MAX(CATEGORY) , MAX(SAL_RANGE) FROM EMP_CATEGORIE…

2010-02-08 14:35 · oracle基础 · 评论(0)

sql基础(3)

//查看当前用户的缺省表空间 SQL>select username,default_tablespace from user_users; //查看当前用户的角色 SQL>select * from user_role_privs; //查看当前用户的系统权限和表级权限 select * from user_sys_privs; select * from user_tab_privs; //查看表的相关信息,如大小,所属表空间 select * from user_segments t order by t.segment_type; //查看索引的大小 select sum(bytes…

2010-02-08 14:17 · oracle基础 · 评论(0)

shell小结(14)

#输出换行符 echo -e "ok\r\n" #可见expr的优点 smInt=`expr $swapmemory / 1000000` fileLen=`expr length $filename` ------------------------------------------------------------------------------------------- #如何取得本机的IP: auto_get_IP() { HOSTNAME=`hostname` myIp=`grep $HOSTNAME /etc/hosts | grep -v "^#" | head -1 …

2010-02-05 14:10 · shell编程 · 评论(0)