下文转自http://blog.csdn.net/mayflowers/article/details/15688521.在Python中使用中文在Python中有两种默认的字符串:str和unicode。在Python中一定要注意区分“Unicode字符串”和“unicode对象”的区别。后面所有...
分类:
编程语言 时间:
2014-07-29 16:40:32
阅读次数:
299
assert这个函数在php语言中是用来判断一个表达式是否成立。返回true or false; 例如 <?php $s = 123; assert("is_int($s)"); ?> 从这个例子可以看到字符串参数会被执行,这跟eval()类似。不过eval($code_str)只是...
分类:
其他好文 时间:
2014-07-29 16:18:19
阅读次数:
212
字符串相加的时候尽量使用:join ????在while True 循环的时候,尽量使用:while 1 ????字符串处理: ????????分组 str.split(‘key‘) ????????列表翻转:list.reverse()...
分类:
编程语言 时间:
2014-07-29 16:17:09
阅读次数:
176
/** ?* 检查输入的一串字符是否全部是数字 ?* 输入:str ?字符串 ?* 返回:true 或 flase; true表示为数字 ?*/ function checkNum(str){ ? ? return str.match(/\D/) == null; } /** ?* 检查输入的一串字符...
分类:
Web程序 时间:
2014-07-29 16:12:39
阅读次数:
216
char c[]="hello"
是局部数据。
char * c = "hello"
全局数据,在静态存储区域。
#include
/* 例子一 */
const char * strA()
{
/* 正确 通过static开辟一段静态存储空间 */
static char str[] = "hello";
/* 错误 分配一个局部数据,函数结束内存的栈释放
返回后的结果是不确定的且不安全,随时都有被回收的可能*/
char str[] = "hello";
...
分类:
其他好文 时间:
2014-07-29 15:15:38
阅读次数:
227
第一步:NSMutableAttributedString与NSString关联
NSString *pingguString = [NSString
stringWithFormat:@"%@%@",pingguString1,pingguString2];
NSMutableAttributedString *str = [[NSMutableAttributedString
allo...
分类:
其他好文 时间:
2014-07-29 15:13:08
阅读次数:
177
解复用是多媒体开发中核心的功能。
解复用功能是从音视频信号源中分流出不同的音频和视频流;另外解复用一般属于一种主动操作,即从音视频信号源中取出。
数据流结构为Source->Demux->Stream
主要实现模式有:
1)直接模式:直接从信号源获取相应的音频或者视频数据。这种方式适合顺序读取和拥有帧位置元数据等信号源。
使用这种模式,实际是从Demux中直接获取数据,当然也可以从Str...
分类:
其他好文 时间:
2014-07-29 15:05:38
阅读次数:
204
#include
#include
#include
#define MAXN 5000+5
#define MAXM 200+5
typedef struct Dic{
char str[MAXN];
struct Dic* next;
}Dic;
Dic *head;
char word[MAXM];
int cnt=0;
int get_word();
void conver...
分类:
其他好文 时间:
2014-07-29 14:55:28
阅读次数:
156
1sting
Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3227 Accepted Submission(s): 1237
Problem Description
You will be given a str...
分类:
其他好文 时间:
2014-07-29 14:43:38
阅读次数:
222
#include
#include
#include
int get_word(int);
void convert_word();
int str_cmp();
char key[100][100];//保存关键词
char word[100];//保存从excuse中提取出来的词
char exc[100][100];//保存excuses
int cnt[100];//记录每个ex...
分类:
其他好文 时间:
2014-07-29 14:41:50
阅读次数:
197