字符串题目就先告一段落了,又是在看balabala不知道在说些什么的英语。算法也很简单,用了几个库函数就搞定了。本来还担心题里说的replace-by为空的特殊情况需要特殊处理,后来发现按一般情况处理也能A过去。第一次RE是因为char t[]开小了。对了,strstr()函数我也是第一次用,对这个...
分类:
其他好文 时间:
2014-07-01 19:17:14
阅读次数:
224
由于C语言里面没有字符串,所以要输入和输出字符串,就用数组代替了也可以用 getsvoid String_003(){ char str[50]; gets(str); printf("%s",str);}记得,在字符串的后面要加一个 /0 否则,可能会加入一些其他的数组
分类:
编程语言 时间:
2014-07-01 17:56:05
阅读次数:
204
1 -- 查看表空间容量 2 SELECT UPPER(F.TABLESPACE_NAME) "表空间名", 3 D.TOT_GROOTTE_MB "表空间大小(M)", 4 D.TOT_GROOTTE_MB - F.TOTAL_BYTES "已使用空间(M)", 5 TO_CHAR(ROUND(....
分类:
数据库 时间:
2014-07-01 17:31:11
阅读次数:
316
select P.SPID, s.status, S.sid,S.serial#,S.username,S.machine,S.program,S.osuser,to_char(S.logon_time,'yyyy/mm/dd-hh24:mi:ss'),s.audsidfrom v$process ...
分类:
其他好文 时间:
2014-07-01 13:16:08
阅读次数:
239
select SYSDATE from dual t;--系统日期
select TO_CHAR(SYSDATE,'YYYY/MM/DD HH24:MI:SS') from dual t;--格式化日期
select TO_DATE('20140630 18:28:20','YYYY/MM/DD HH24:MI:SS') from dual t;--格式化日期
select sysdate,...
分类:
数据库 时间:
2014-07-01 10:49:03
阅读次数:
506
#include
char RandString();
int main( void )
{
int i=0;
char cTemp;
char sKey[9];
memset(&cTemp, 0, sizeof(cTemp));
memset(sKey, 0, sizeof(sKey));
sran...
分类:
其他好文 时间:
2014-07-01 08:05:02
阅读次数:
173
下面这个散列表的实现来自K&R,很经典。在其他场景中遇到的实现更复杂,基本原理不变,只是在hash算法,或者在快速查询上做了优化。
#include
#include
//具有相同hash值构成的链表
struct nlist{
struct nlist
* next;
char * name; //key-定义的名字
char ...
分类:
其他好文 时间:
2014-07-01 07:42:51
阅读次数:
158
#include
#include
int main( void )
{
char sFileName[128];
int iRet = 0;
memset(sFileName, 0, sizeof(sFileName));
sprintf(sFileName, "test.txt");
printf("R_OK[%d...
分类:
数据库 时间:
2014-07-01 07:41:30
阅读次数:
302
#include
#include
#define MAX_MSG_BUF_LEN 512
int iKey = 6004;
struct ipcmsgbuf
{
long mtype;
char mtext[MAX_MSG_BUF_LEN];
};
int main( void )
{
int qid;
cha...
分类:
其他好文 时间:
2014-07-01 06:50:31
阅读次数:
199
#include
#include
#include
static char out_ip[15] = "52.0.10.188";
static int out_port = 8888;
int main()
{
char sSendBuf[2049], sRecvBuf[2049];
int connfd = 0, iRet = 0, iSend...
分类:
其他好文 时间:
2014-07-01 06:31:44
阅读次数:
212