if (!browser.ie && !browser.mac) { var UA = navigator.userAgent.toLowerCase().toString(); //判断是不是IE内核下的非IE版本 if ((UA.indexOf('360ee') > -1) || (UA.ind... ...
分类:
其他好文 时间:
2016-12-15 17:59:12
阅读次数:
155
不想欠题了..... 多打打CF才知道自己智商不足啊... A. Vladik and flights 给你一个01串 相同之间随便飞 没有费用 不同的飞需要费用为 abs i-j 真是题意杀啊,,,实际上我们只考虑01转换的代价一定为1如果目的地和起点相同 费用为0 不相同 肯定为1 因为0旁边必 ...
分类:
其他好文 时间:
2016-12-15 17:31:36
阅读次数:
323
Return a list of the words of the string s. If the optional second argument sep is absent or None, the words are separated by arbitrary strings of whi ...
分类:
其他好文 时间:
2016-12-14 18:33:10
阅读次数:
256
四、正则、 re模块: 作用:针对的对象:字符串, 课前引入: 例子一、 如何找到字符串内部的alex;?过去学习可使用方法:find、split、replace.但是字符串内置的方法很局限,只能实现完全匹配。 如果要找到:与a**开头的需求呢?就无法实现。要实现模糊匹配就得用到模糊匹配。 例子二、 ...
分类:
Web程序 时间:
2016-12-14 01:55:51
阅读次数:
157
先split,然后从第二个开始遍历,针对每次遍历作如下事情:获取第一个字符变为大写,其余变为小写 // 使用substring改造 ...
分类:
其他好文 时间:
2016-12-13 23:25:58
阅读次数:
171
#replace '' to np.nan dataframe.iloc[:,0].str.split(',',expand=True).replace('',np.nan) ...
分类:
其他好文 时间:
2016-12-13 16:13:41
阅读次数:
607
我们知道mvc可以通过js生成excel文件,同样在后台c#中一样可以生成excel文件。 首先我们要在后台中写如下方法: 我们看到,在c#中导出excel,这种方法可以通过画html中table的方式做出excel,而这种方法导出的表格是一个简单表格,在排版上还需要更多的斟酌。 在前台的时候,务必 ...
function string.split(str, delimiter) if str==nil or str=='' or delimiter==nil then return nil end local result = {} for match in (str..delimiter):gma ...
分类:
其他好文 时间:
2016-12-12 20:18:41
阅读次数:
356
面试的时候有问到我如果用空格分割一个字符串,其实是一个很简单的问题,但是自己突然忘记了,这里做一个对字符串和数组操作的常用方法的一个简单的复习。 字符串部分 1.split(); split() 方法用于把一个字符串分割成字符串数组。 语法 : stringObject.split(separato ...
分类:
编程语言 时间:
2016-12-11 18:41:54
阅读次数:
225