码迷,mamicode.com
首页 >  
搜索关键字:str1    ( 1981个结果
Codeforces Round #486 (Div. 3) B. Substrings Sort
Codeforces Round 486 (Div. 3) B. Substrings Sort 题目连接: "http://codeforces.com/contest/988/problem/B" Description You are given n strings. Each string ...
分类:其他好文   时间:2018-06-08 10:36:08    阅读次数:201
Python解码编码问题
一、先说说编解码问题 编码转换时,通常需要以unicode作为中间编码,即先将其他编码的字符串解码(decode)成unicode,再从unicode编码(encode)成另一种编码。 Eg: 1 2 str1.decode('gb2312') #将gb2312编码的字符串转换成unicode编码 ...
分类:编程语言   时间:2018-06-07 23:08:49    阅读次数:379
抓取ip的python脚本
抓取ip的python脚本:via1.py#!/usr/bin/pythonimportoshttp=os.popen(‘ifconfig|grep10‘,‘r‘).readlines()str1=‘‘.join(http)pid=str1.split()[1].strip(‘addr:‘)printpid:wqpythona1.py
分类:编程语言   时间:2018-06-05 16:20:32    阅读次数:164
抓取apache2的进程pid
抓取apache2的进程pid:via1.py#!/usr/bin/pythonimportoshttp=os.popen(‘netstat-ntpl|grep-w80‘,‘r‘).readlines()str1=‘‘.join(http)pid=str1.split()[6].strip(‘/apache2‘)printpid:wq
分类:Web程序   时间:2018-06-05 15:36:50    阅读次数:207
C++ string append方法的常用用法
append函数是向string的后面追加字符或字符串。 1).向string的后面加C-string string s = “hello “; const char *c = “out here “; s.append(c); // 把c类型字符串s连接到当前字符串结尾 s = “hello ou ...
分类:移动开发   时间:2018-06-03 22:19:33    阅读次数:223
JS对象、基本类型和字面量的区别
字面值: var str1='this is a simple string'; var num1=1.45; var answer1=true; 基本类型: var str2=String('this is a simple string'); var num2=Number(1.45); var ...
分类:Web程序   时间:2018-06-01 19:04:28    阅读次数:466
简简单单说个闭包
闭包的作用 一句话,闭包的作用:将方法存于变量。 至于闭包的原因或者目的,或者说,为什么将方法存于变量,稍后再说。 闭包的条件 为了尽量避免用一大段话描述一个概念,我们理性一点地把闭包的条件划分成3个: P.S. 闭包的例子 “Talk is cheap, show me your code.” 我 ...
分类:其他好文   时间:2018-06-01 10:47:41    阅读次数:173
实现两个字符串连接
char *Mystrcat(char*str1, char* str2){ if (str1 == NULL || str2 == NULL) return NULL; char*temp = str1; //申请指向字符的指针 while (*str1 != '\0') { str1++; // ...
分类:其他好文   时间:2018-05-30 19:27:30    阅读次数:157
python ord()与chr()用法以及区别
ord()函数主要用来返回对应字符的ascii码,chr()主要用来表示ascii码对应的字符他的输入时数字,可以用十进制,也可以用十六进制。 例如:print ord('a) #97 print chr(97) #a print chr(0x61) #a 一个简单的程序来灵活运用。 str1='a ...
分类:编程语言   时间:2018-05-29 10:23:45    阅读次数:411
C#double转化成字符串 保留小数位数
double temp=3.1415926; (F)Fixed point:string str1=temp.toString("f1");//保留一位小数 四舍五入 结果:3.1 (F)Fixed point:string str2=temp.toString("f2");//保留两位小数,四舍五 ...
分类:Windows程序   时间:2018-05-25 01:36:44    阅读次数:268
1981条   上一页 1 ... 57 58 59 60 61 ... 199 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!