摘要: 好处:如可以方便的直接将字符串形式的list,tuple转换成Python 中的list,tuple。 具体见参考资料。 参考资料 "Be careful with exec and eval in Python" 阅读全文
posted @ 2016-11-26 23:00 BinWone 阅读(1899) 评论(0) 推荐(0) 编辑
摘要: 登录 其中, 和`pwd`分别代表学号和密码。 登出 或者输错密码或学号登陆失败直接退出登陆。 参考资料 1. "curl命令登录校园网关" 2. "curl 指令小结" 3. "curl网站开发指南" 阅读全文
posted @ 2016-11-24 20:42 BinWone 阅读(1653) 评论(0) 推荐(0) 编辑
摘要: Linux的查找命令有5个,分别如下: :在PATH变量指定的路径中,搜索某个系统命令的位置,并且返回第一个搜索结果; :用于区分某个命令到底是由shell自带的,还是由shell外部的独立二进制文件提供的。如果一个命令是外部命令,那么使用 参数,会显示该命令的路径,相当于 命令。type命令其实不 阅读全文
posted @ 2016-11-24 16:10 BinWone 阅读(242) 评论(0) 推荐(0) 编辑
摘要: Mac os 英文版下Sublime Text 3中文乱码问题 : install package 安装 ,`Codecs33 gbk` 三个包。 参考: http://ju.outofmemory.cn/entry/219849 阅读全文
posted @ 2016-11-23 21:13 BinWone 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 在Linux系统下,有很多命令可以查看文本文件的内容,如 等命令,当然还有 等文本编辑器。 cat: 从第一行开始显示全部的文本内容; tac: 从最后一行开始,显示全部分文本内容,与cat相反; nl: 显示文本时,可以输出行号; more: 按页显示文本内容; less: 与more差不多,也是 阅读全文
posted @ 2016-11-23 20:23 BinWone 阅读(1823) 评论(0) 推荐(0) 编辑
摘要: 参考资料 1. "Mastering Markdown" 2. "在stackoverflow上使用markdown" 3. "Markdown Cheatsheet" 阅读全文
posted @ 2016-11-23 11:21 BinWone 阅读(98) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/number of 1 bits/ Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known 阅读全文
posted @ 2016-11-21 22:14 BinWone 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 递归代码简洁。 递归的缺点: 1.递归是函数调用自身,函数调用有时间和空间的消耗:每一次函数调用,都需要在内存栈中分配空间已保存参数,返回地址及临时变量,而且往栈里压入数据和弹出数据都需要时间。 2.递归中有很多计算都是重复的(对存在重叠子问题的情形),从而对性能带来很大影响。比如:计算佩波拉契数列 阅读全文
posted @ 2016-11-21 21:18 BinWone 阅读(339) 评论(0) 推荐(0) 编辑
摘要: "153. Find Minimum in Rotated Sorted Array" Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., might become ). Find the 阅读全文
posted @ 2016-11-21 17:11 BinWone 阅读(138) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/rotate list/ Given a list, rotate the list to the right by k places, where k is non negative. For example: Given and k = 阅读全文
posted @ 2016-11-21 17:01 BinWone 阅读(123) 评论(0) 推荐(0) 编辑