上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 68 下一页
摘要: 返回前面起第一个字符的位置indexOf(“字符”); 它是从前面开始数(从左边开始数),而且只找第一个,然后返回该字符的位置,索引号都是从0开始的。返回的是个数值。 var txt = “abcdefg”; alert(txt.indexOf(“d”));结果是3 如果找不到该字符 返回-1 返回 阅读全文
posted @ 2019-03-05 22:58 anobscureretreat 阅读(200) 评论(0) 推荐(0)
摘要: def solution(s): max_len=0 f=0 l=0 s_x=set(s) for i in s_x: first_d=s.find(i) last_d=s.rfind(i) if(first_d==last_d): pass else: ... 阅读全文
posted @ 2019-03-05 22:08 anobscureretreat 阅读(195) 评论(0) 推荐(0)
摘要: print('{},{}'.format('chuhao',20)) 阅读全文
posted @ 2019-03-04 16:23 anobscureretreat 阅读(167) 评论(0) 推荐(0)
摘要: 转为string类型 阅读全文
posted @ 2019-03-04 16:14 anobscureretreat 阅读(841) 评论(0) 推荐(0)
摘要: 将文件夹名字从 v1.0.1 修改为 v1.0.2 阅读全文
posted @ 2019-03-04 15:51 anobscureretreat 阅读(2827) 评论(0) 推荐(0)
摘要: def hb(list1,list2): result = [] while list1 and list2: if list1[0] >> [1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 20] 阅读全文
posted @ 2019-03-04 11:47 anobscureretreat 阅读(1747) 评论(0) 推荐(0)
摘要: class Solution(object): def hb(self,list1,list2): result = [] while list1 and list2: if list1[0] < list2[0]: result.append(list1[0]) ... 阅读全文
posted @ 2019-03-04 11:46 anobscureretreat 阅读(131) 评论(0) 推荐(0)
摘要: class Solution(object): def addTwoNumbers(self, l1, l2): l3 = ListNode(0) current = l3 carry = 0 while l1 or l2: # 1,1 | None,1 | 1,None # Pad 0 if N... 阅读全文
posted @ 2019-03-04 10:41 anobscureretreat 阅读(135) 评论(0) 推荐(0)
摘要: class Solution(object): def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ dictionary = dict() ... 阅读全文
posted @ 2019-03-04 10:39 anobscureretreat 阅读(151) 评论(0) 推荐(0)
摘要: class Solution(object): def lengthOfLongestSubstring(self, s): d = "" f = "" for i in range(len(s)): if s[i] not in f: f += s[i] ... 阅读全文
posted @ 2019-03-04 10:32 anobscureretreat 阅读(141) 评论(0) 推荐(0)
摘要: >>>seasons = ['Spring', 'Summer', 'Fall', 'Winter'] >>> list(enumerate(seasons)) [(0, 'Spring'), (1, 'Summer'), (2, 'Fall'), (3, 'Winter')] >>> list(enumerate(seasons, start=1)) # 下标从 1 开始 [(... 阅读全文
posted @ 2019-03-03 12:15 anobscureretreat 阅读(116) 评论(0) 推荐(0)
摘要: 输出 阅读全文
posted @ 2019-03-03 01:29 anobscureretreat 阅读(176) 评论(0) 推荐(0)
摘要: 输出 阅读全文
posted @ 2019-03-03 00:35 anobscureretreat 阅读(212) 评论(0) 推荐(0)
摘要: target: numbers = ['2', '4', '1', '3'] 排序: 从小到大排序: 从大到小排序: 参考: https://blog.csdn.net/liao392781/article/details/80592761 阅读全文
posted @ 2019-03-03 00:20 anobscureretreat 阅读(559) 评论(0) 推荐(0)
摘要: 列表转字符串 字符串转列表 输出 阅读全文
posted @ 2019-03-03 00:17 anobscureretreat 阅读(305) 评论(0) 推荐(0)
摘要: 输出 阅读全文
posted @ 2019-03-03 00:14 anobscureretreat 阅读(171) 评论(0) 推荐(0)
摘要: 输出 阅读全文
posted @ 2019-03-03 00:13 anobscureretreat 阅读(275) 评论(0) 推荐(0)
摘要: display: inline-block设置为行内元素 阅读全文
posted @ 2019-03-01 15:31 anobscureretreat 阅读(3562) 评论(0) 推荐(0)
摘要: 设置内容 - text()、html() 以及 val() 我们将使用前一章中的三个相同的方法来设置内容: text() - 设置或返回所选元素的文本内容 html() - 设置或返回所选元素的内容(包括 HTML 标记) val() - 设置或返回表单字段的值 下面的例子演示如何通过 text() 阅读全文
posted @ 2019-02-28 18:06 anobscureretreat 阅读(152) 评论(0) 推荐(0)
摘要: demo1 demo2 阅读全文
posted @ 2019-02-28 13:18 anobscureretreat 阅读(176) 评论(0) 推荐(0)
摘要: css中有3种基本的定位机制:普通流(相对定位实际上看做普通流定位模型的一部分)浮动(float)绝对定位(固定定位是绝对定位的一种)所以在学习浮动之前,我们先要了解块级元素与内联元素(行内元素)。块级元素:块级元素一般当做容器使用,既可以容纳内联元素也可以容纳块级元素,例如div和p。常见的块级元 阅读全文
posted @ 2019-02-28 13:16 anobscureretreat 阅读(338) 评论(0) 推荐(0)
摘要: String(3333)+"%" "3333%" 阅读全文
posted @ 2019-02-28 11:22 anobscureretreat 阅读(158) 评论(0) 推荐(0)
摘要: setTimeout,延迟n秒后执行指定代码 clearTimeout,清除计时器 参考: https://blog.csdn.net/ainuser/article/details/78882473 阅读全文
posted @ 2019-02-28 11:19 anobscureretreat 阅读(6037) 评论(0) 推荐(0)
摘要: 对需要 str->unicode 的代码,可以在前边写上 import sys reload(sys) sys.setdefaultencoding(‘utf8′) 把 str 编码由 ascii 改为 utf8 (或 gb18030) 参考: https://blog.csdn.net/mindm 阅读全文
posted @ 2019-02-27 16:59 anobscureretreat 阅读(204) 评论(0) 推荐(0)
摘要: 为某个分支打tag 删除tag 推送: 阅读全文
posted @ 2019-02-26 17:23 anobscureretreat 阅读(148) 评论(0) 推荐(0)
摘要: sudo apt-get install python-pip 阅读全文
posted @ 2019-02-26 17:04 anobscureretreat 阅读(267) 评论(0) 推荐(0)
摘要: 再使用ls查看就可以了 阅读全文
posted @ 2019-02-26 16:58 anobscureretreat 阅读(426) 评论(0) 推荐(0)
摘要: Panda3D 是个开源的游戏及物理引擎(也支持ODE及Bullet). 相关链接:网站: https://www.panda3d.org/下载: https://www.panda3d.org/download.php?sdk使用手册: https://www.panda3d.org/manual 阅读全文
posted @ 2019-02-26 15:06 anobscureretreat 阅读(551) 评论(0) 推荐(0)
摘要: 将本地testdir拷贝到远程服务器tmp目录下 阅读全文
posted @ 2019-02-26 11:29 anobscureretreat 阅读(367) 评论(0) 推荐(0)
摘要: class Solution(object): def search(self, nums, target): """ :type nums: List[int] :type target: int :rtype: int """ left, right = 0, len(nums) - ... 阅读全文
posted @ 2019-02-25 19:32 anobscureretreat 阅读(180) 评论(0) 推荐(0)
摘要: 加入参数 阅读全文
posted @ 2019-02-25 19:01 anobscureretreat 阅读(1311) 评论(0) 推荐(0)
摘要: 如果提示如下 解决方法 参考: https://blog.csdn.net/u014610925/article/details/79642076 https://blog.csdn.net/haoyu_does/article/details/79779773 阅读全文
posted @ 2019-02-25 19:00 anobscureretreat 阅读(144) 评论(0) 推荐(0)
摘要: 解决方法: 如果安装的是GPU版本 如果你有一个GPU,你不应该关心AVX的支持,因为大多数昂贵的操作将被分派到一个GPU设备上(除非明确地设置)。在这种情况下,您可以简单地忽略此警告: 如果安装的是CPU版本(pip install tensorflow) 1.在代码中加入如下代码,忽略警告: 2 阅读全文
posted @ 2019-02-25 18:58 anobscureretreat 阅读(1155) 评论(0) 推荐(0)
摘要: js获取节点 父: parentNode 获取已知节点的父节点。 子: childNodes; 得到全部子节点 children 得到全部子节点 firstChild 获得第一个子节点 lastChild 获得最后一个子节点 兄弟:previousSibling 获取已知节点的前一个节点 nextSibling 获取已知节点下一个节点 jq获取节点 父: $('#').parent() ... 阅读全文
posted @ 2019-02-23 21:39 anobscureretreat 阅读(303) 评论(0) 推荐(0)
摘要: winver---------检查Windows版本 wmimgmt.msc----打开windows管理体系结构 wupdmgr--------windows更新程序 winver---------检查Windows版本 wmimgmt.msc----打开windows管理体系结构 wupdmgr--------windows更新程序 wscript--------window... 阅读全文
posted @ 2019-02-23 16:10 anobscureretreat 阅读(457) 评论(0) 推荐(0)
摘要: var alert=function(){return 1} var confirm=function(){return 1} var prompt=function(){return 1} 阅读全文
posted @ 2019-02-23 13:33 anobscureretreat 阅读(6120) 评论(0) 推荐(2)
摘要: Python拿来做爬虫的确很不错,但是字符串的编码的确是稍不留神就是一个坑,GBK编码和Unicode编码的转化出现问题也是很多的,今天在解析网页数据的时候出现上述错误,解决方案如下: one_str.encode("GBK","ignore") 由于在windows下的cmd中输出网页数据,加入上 阅读全文
posted @ 2019-02-23 13:32 anobscureretreat 阅读(1537) 评论(0) 推荐(0)
摘要: js中 ret = 1 == 1 ? 'true' : 'false' ret = 1 == 1 ? 'true' : 'false' ret = 1 == 1 ? 'true' : 'false' ret = 1 == 1 ? 'tr 阅读全文
posted @ 2019-02-23 13:30 anobscureretreat 阅读(353) 评论(0) 推荐(0)
摘要: 在ie6和ff2.0下测试通过。 阅读全文
posted @ 2019-02-23 13:30 anobscureretreat 阅读(9738) 评论(0) 推荐(0)
摘要: $.ajax({ type:"post", url:url, data:{xxx:xx}, dataType: "json", success : function(data){ window.location.href="跳转的url,后边也可以拼接点data中数据作为参数"; }}); 如果是需要跳转到另外的页面,也可以用window.open(url); ... 阅读全文
posted @ 2019-02-23 13:29 anobscureretreat 阅读(1620) 评论(0) 推荐(0)
上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 68 下一页