码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
PHP学习笔记——字符串的操作
字符串的操作1.去除字符串的首尾空格和特殊字符 函数trim() 用于去除开始位置以及结束位置的字符 语法 string trim(string str[, string charlist]),其中charlist是可选参数,指定删除的字符串,携带的话,删除指定的字符,如果不携带的话,...
分类:Web程序   时间:2015-05-09 11:29:33    阅读次数:115
Java利用while循环计算1+1/2!+1/3!……+1/20!
1 public static void main(String[] args) { 2 double n = 1, sum = 0; 3 while (n <= 20) { 4 sum += 1 / Factorial(n); 5 ...
分类:编程语言   时间:2015-05-09 11:28:18    阅读次数:121
抽奖+冒泡程序留用
随机抽奖程序 string[] s = new string[] { "A", "B", "C", "D", "E", "F", "G" }; Random rand = new Random(); for (int i = 0; i < 50; i++) ...
分类:其他好文   时间:2015-05-09 11:26:31    阅读次数:109
Java - 杨辉三角
1 public static void main(String[] args) { 2 int triangle[][] = new int[10][];// 创建二维数组 3 // 遍历二维数组的第一层 4 for (int i = 0; i <...
分类:编程语言   时间:2015-05-09 10:09:44    阅读次数:126
Java - 九九乘法表
1 public class Test02 { 2 public static void main(String[] args) { 3 for (int i = 1; i <= 9; i++) { 4 for (int j = 1; j <= i;...
分类:编程语言   时间:2015-05-09 10:04:00    阅读次数:125
3. Configure the Identity Service
Controller Node:安装认证服务:1. sudo apt-get install keystone2. sudo vi /etc/keystone/keystone.conf[database]# The SQLAlchemy connection string used to conn...
分类:其他好文   时间:2015-05-09 10:02:43    阅读次数:125
String to Integer (atoi)
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca...
分类:其他好文   时间:2015-05-09 08:56:30    阅读次数:104
poj 1733(带权并查集)
题意:有n个结点,给出了q个操作,操作是a b string表示结点a到结点b的和是奇数或偶数,输出x(前x个操作都是正确的)。 题解:带权并查集经典题,因为结点可能有10,000,000,000个,所以需要离散化,不用的点就不考虑了。因为要a加到b,如果a==b无法找到各自的根节点并判断是否要合并,所以其实是mp[a - 1]到mp[b]并入集合。另外需要注意结点是有顺序的,父亲结点要大于等于子...
分类:其他好文   时间:2015-05-09 08:53:18    阅读次数:116
os 模块
os模块包含操作系统功能,类似unix c的api。主要包含:def ctermid(): """Return the filename corresponding to the controlling terminal of the process. :rtype: string...
分类:其他好文   时间:2015-05-09 08:49:14    阅读次数:175
Java之Mysql数据库DML语句执行
packagepy.db.com; importjava.sql.Connection; importjava.sql.DriverManager; importjava.sql.SQLException; importjava.sql.Statement; importcom.mysql.jdbc.PreparedStatement; publicclassDB_update{ publicstaticvoidmain(String[]args){ //TestUpdate(); Te..
分类:数据库   时间:2015-05-09 06:39:51    阅读次数:173
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!