摘要: Description Given a non empty, singly linked list with head node , return a middle node of linked list. If there are two middle nodes, return the seco 阅读全文
posted @ 2018-07-31 19:02 arcsinW 阅读(656) 评论(0) 推荐(0) 编辑
摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul 阅读全文
posted @ 2018-07-31 14:28 arcsinW 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
posted @ 2018-07-25 14:02 arcsinW 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when one of 阅读全文
posted @ 2018-07-24 19:23 arcsinW 阅读(142) 评论(0) 推荐(0) 编辑
摘要: S and T are strings composed of lowercase letters. In S, no letter occurs more than once. S was sorted in some custom order previously. We want to per 阅读全文
posted @ 2018-07-21 18:38 arcsinW 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 题目比较简单,实现一个复数乘法,输入输出都要求为字符串形式 大部分时间都花在写正则匹配实部和虚部了 两个复数 $a + bi$, $c + di$ $(a + bi) (c + di) = (ac bd) + (bc + ad)i$ 使用三个辅助变量 $$\begin{cases} t_1 = (a 阅读全文
posted @ 2018-07-20 17:42 arcsinW 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Description International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: "a" maps to " 阅读全文
posted @ 2018-07-20 11:38 arcsinW 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Description In a 2 dimensional array grid, each value grid[i][j] represents the height of a building located there. We are allowed to increase the hei 阅读全文
posted @ 2018-07-19 22:07 arcsinW 阅读(485) 评论(0) 推荐(0) 编辑
摘要: 1. Variable definitions : training examples' count $X$ : design matrix. each row of $X$ is a training example, each column of $X$ is a feature $$X = \ 阅读全文
posted @ 2018-06-13 20:44 arcsinW 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1. uninstall software install by yum install install by to uninstall this type 2. 同步系统时间 查看系统时间 同步系统时间 ntp常用服务器: 中国国家授时中心:210.72.145.44 NTP服务器(上海) :nt 阅读全文
posted @ 2018-06-04 19:24 arcsinW 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1. 修改redis设置 redis默认处在protection mode, 修改 , , 或者给redis设置密码, 将 这一行用 注释掉 2. 修改爬虫设置 向 加入以下设置 为master的ip加上redis的端口号 3. 修改爬虫代码 使爬虫继承自RedisSpider 增加一个 属性,这个 阅读全文
posted @ 2018-05-31 20:14 arcsinW 阅读(596) 评论(0) 推荐(0) 编辑
摘要: 0. 安装依赖 1. 安装 python 3.6.4 下载源代码并编译 检查python3.6.4是否安装成功 可以看到python3.6,pip3.6 修改软链接 这是未修改时的/usr/bin 只修改python3,这样就不会影响yum和其他程序的运行 2. install Twisted 3. 阅读全文
posted @ 2018-05-30 15:12 arcsinW 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 1. Variable definitions : training examples' count $y$ : $X$ : design matrix. each row of $X$ is a training example, each column of $X$ is a feature $ 阅读全文
posted @ 2018-05-29 20:49 arcsinW 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 1.range(x,y) [x,y) 2.dics 当key在dics中不存在时返回default的值,返回一个函数也是可以的 判断key在dic中是否存在 两种方法 foreach一个dic 单独循环key或者values 3.读写文件 python中文件被分为两种,text or binary 阅读全文
posted @ 2018-05-23 16:49 arcsinW 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 1. 配置git客户端 1.1 安装git bash "https://git scm.com/downloads" 1.2 设置ssh Key 查看是否有ssh key 没有则生成ssh key 将生成的公钥 (.pub为后缀) 上传到git网站上 1.3 设置用户名和邮箱 2. 管理项目 2.1 阅读全文
posted @ 2018-05-21 18:47 arcsinW 阅读(467) 评论(0) 推荐(0) 编辑