Math.ceil()向上取整 Math.floor()向下取整 Math.round() 四舍五入 Math.pow(n,x);n的x次方 Math.random()获取随机数0-1 [0,1) Math.Max() 第一步: 先定义一个变量, 接收字符串 var str='1234567890A ...
分类:
其他好文 时间:
2018-08-04 23:28:17
阅读次数:
342
1 # _*_encoding:utf8_*_ 2 # 3 # 4 # # 非原始字符串 5 # # 使用单引号包含的 6 # # 'abc' 7 # # str1 = 'aaa' 8 # # print(str1, type(str1)) 9 # 10 # 11 # # 使用双引号包含的 12 # ...
分类:
编程语言 时间:
2018-08-04 16:16:37
阅读次数:
169
我造轮子,你造车,创客一起造起来!塔克创新资讯【塔克社区 www.xtark.cn 】【塔克博客 www.cnblogs.com/xtark/ 】 本文介绍X-CTR100控制器 板载EEPROM存储芯片AT24C02的使用,EEPROM常用于参数存储,系统掉电后也可以保存数据。 对比FLASH容量... ...
分类:
其他好文 时间:
2018-08-03 14:45:31
阅读次数:
239
一、CONCAT(str1,str2,…) 返回结果为连接参数产生的字符串。如有任何一个参数为NULL ,则返回值为 NULL。 二、 CONCAT_WS(separator,str1,str2,...) CONCAT_WS() 代表 CONCAT With Separator ,是CONCAT() ...
分类:
数据库 时间:
2018-08-02 20:40:45
阅读次数:
804
替换 替换某一整行 str1替换为str2 将含有xhn的行中的str1替换为str2 将1-5行替换为两行: hello world 删除 删除空行 ...
分类:
其他好文 时间:
2018-08-02 18:19:31
阅读次数:
126
function strAdd($str1,$str2){ $res = []; if(strlen($str1) > strlen($str2)){ $str2 = str_pad($str2,strlen($str1),'0',STR_PAD_LEFT); $str = $str1; }else... ...
分类:
其他好文 时间:
2018-07-30 14:48:56
阅读次数:
166
1. 字符串拼接函数 :CONCAT(str1,str2,...) 2. 判断是否为null,为null就指定另外一个值:IFNULL(expr1,expr2) 3. 获取当前日期时间函数 :NOW() ...
分类:
数据库 时间:
2018-07-30 14:42:18
阅读次数:
160
上面的程序如果没有#include<string>,则cin>>str1将会报错,而string str1不会报错,那么std::string是在哪里定义的? 头文件之间的包含关系如下 #include <iostream> #include <istream> #include <ostream> ...
分类:
其他好文 时间:
2018-07-28 22:45:18
阅读次数:
198
String 字符串的声明:String string = “12345”; 1、字符串的拼接: String str1 = "123"; String str2 = "456"; 方法一: System.out.println( str1 + sr2 ); 方法二: System.out..pri ...
分类:
编程语言 时间:
2018-07-28 11:42:04
阅读次数:
154
在学习选择排序算法的时候,用到CopareTo方法。由于比较的数字,是自己随意输入的。 当我输入字符串“8”,它和字符串“16”比较时候。 显然,我原本以为“8”和“16”比较,结果是-1。实际并不是的。 至于,为啥字符串“8” 与字符串“16”对比,会返回1。这点原因,待确定。 //todo ...