#include #include #include #include #include "math.h"typedef struct LNode { int data; struct LNode * next; //指向下一个结点的指针 }LNode; typedef str...
分类:
编程语言 时间:
2014-11-09 17:59:07
阅读次数:
223
sscanf() - 从一个字符串中读进与指定格式相符的数据. 函数原型: Int sscanf( string str, string fmt, mixed var1, mixed var2 ... ); int scanf( const char *format [,argument].....
分类:
其他好文 时间:
2014-11-09 13:56:22
阅读次数:
265
测试一下 上次的测试很不爽 测试两下 再试一下 这个短路 void client(io_service &ios, deadline_timer &timer, const system::error_code &ec)
{ try{ cout str(100, 0); _sock...
分类:
其他好文 时间:
2014-11-09 12:27:47
阅读次数:
144
1.测试标题测试标题效果2.测试代码测试代码效果void client(io_service &ios, deadline_timer &timer, const system::error_code &ec){ try{ cout str(100, 0); _s...
分类:
其他好文 时间:
2014-11-09 12:26:40
阅读次数:
114
///给你一数字,删除其中的m位使其最小
///贪心:前面的数要小于后面的数
# include
# include
# include
# include
# include
using namespace std;
char str[1010];
int a[1010];
int c[1010];
int main()
{
int k,m,i,tt,len,j;
wh...
分类:
其他好文 时间:
2014-11-09 11:20:01
阅读次数:
151
[Description] Given a string, find the largest unique substring.e.g. str[] = "asdfghjkkjhgf"; sub[] = "asd";[Thought] create an auxiliary space 'r...
分类:
其他好文 时间:
2014-11-09 11:13:04
阅读次数:
142
while(true)
{
try
{
stringstr=Console.ReadLine();
if(str=="")
{
return;//这里退出也会执行finally语句
}
if(str=="1")
{
//实例化异常类,并设置其属性
Exceptionmyexception=newIndexOutOfRangeException();
myexception.Source="Source";
myexception.HelpLink="http://..
分类:
其他好文 时间:
2014-11-09 06:25:15
阅读次数:
196
功能:
对一个列表中的字符串小写
代码一:
l = ['Hello','World',20,'IBM','Apple']
J = []
for s in l:
if isinstance(s,str):
s.lower()
J.append(s.lower())
else:
s
J.append(s)
print J
代码二:
M = ['Hello','World'...
分类:
其他好文 时间:
2014-11-08 23:45:55
阅读次数:
404
一:实现之前先说一所find_first_of姊妹函数
(1)find_first_of(string &str, size_type index = 0):
查找在字符串中第一个与str中的某个字符匹配的字符,返回它的位置。搜索从index正向开始,如果没找到就返回string::npos
(2) find_first_not_of(cstring &str, size_typ...
分类:
编程语言 时间:
2014-11-08 22:11:35
阅读次数:
221
将后台程序(如php)发送过来的json数据转化为javascript的数组或者对象的方法十分简单,代码如下:1// 假设后台发送的json数据为 '{a:2,b:1}' 存储于str中2vardata = eval('('+ str +')');然而想将一个javascript对象转化为json格...
分类:
Web程序 时间:
2014-11-08 13:34:12
阅读次数:
260