TinaCristal's Blog


  • Home

  • Tags

  • Categories

  • Archives

  • Search

Unable to determine SOCKS version from socks://127.0.0.1:1080/

Posted on 2018-05-22 | In linux

Unable to determine SOCKS version from socks://127.0.0.1:1080/

File “/home/dlnu/.virtualenvs/python2.7/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/socks.py”, line 154, in init
“Unable to determine SOCKS version from %s” % proxy_url
ValueError: Unable to determine SOCKS version from socks://127.0.0.1:1080/

Read more »

chmod和chown命令

Posted on 2018-05-22 | In linux

chmod命令

指令名称 : chmod

使用权限 : 所有使用者

使用方式 : chmod [-cfvR] [–help] [–version] mode file…

说明 : Linux/Unix 的档案调用权限分为三级 : 档案拥有者、群组、其他。利用 chmod 可以控制档案如何被他人所调用。

Read more »

pip安装模块时可能遇到的问题

Posted on 2018-05-22 | In 环境安装配置

(1)使用命令:sudo pip install numpy时,可能遇到:
The directory ‘/Users/huangqizhi/Library/Caches/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.

Read more »

复习BST树(java)

Posted on 2018-05-21 | In 复习

BST树算法掌握不够熟练 对递归有了更深的了解
找最大,最小节点,插入节点,查找节点,遍历不算太难 注意细心
删除某个节点有三种可能(考虑root节点是否为空)
1.删除叶子节点

2.删除只有左子树或者只有右子树的节点(要考虑它是否为根节点,考虑它是父节点的左孩子还是右孩子)

3.删除既有左子树也有右子树的节点(找大于它的最小值—->找右子树中最左边的节点,替换该节点位置的值,并删除这个最左边的节点(要考虑这个节点是否有右子树,是父节点的左孩子还是右孩子))

Read more »

Ubuntu设置和查看环境变量

Posted on 2018-05-20 | In linux

查看环境变量

env

env命令是environment的缩写,用于列出所有的环境变量

Read more »

Ubuntu下如何解压缩zip,tar,tar.gz,tar.bz2文件

Posted on 2018-05-20 | In linux

通过SSH访问服务器,难免会要用到压缩,解压缩,打包,解包等,这时候tar命令就是是必不可少的一个功能强大的工具。linux中最流行的tar是麻雀虽小,五脏俱全,功能强大。

Read more »

二叉查找树 BST

Posted on 2018-05-19 | In 复习

BST特点

在二叉查找树中:
(1) 若任意节点的左子树不空,则左子树上所有结点的值均小于它的根结点的值;

(2) 任意节点的右子树不空,则右子树上所有结点的值均大于它的根结点的值;

(3) 任意节点的左、右子树也分别为二叉查找树。

(4) 没有键值相等的节点(no duplicate nodes)。

Read more »

Leetcode 677. Map Sum Pairs

Posted on 2018-05-19 | In leetcode

Implement a MapSum class with insert, and sum methods.

For the method insert, you’ll be given a pair of (string, integer). The string represents the key and the integer represents the value. If the key already existed, then the original key-value pair will be overridden to the new one.

Read more »

周总结(3)

Posted on 2018-05-19 | In 周总结

生活

  • 这周,很丧的一周,早起了两天:星期一和星期五。上课的第一天和最后一天确实是跨越了一周。
    感觉不能这样自甘堕落了。
  • 偶然翻到一本书中夹着闺蜜两年前的画,渐渐想到刚入大学的我确实是变了很多。突然有很多感慨,但也不知道说些什么。了解你的人才会知道你做的很多的事,而懂你的人是那句不用多余的解释都会懂你。只是你太过孤冷,只是怕会伤害别人,只是与很多人渐行渐远。
  • 也许某一天,失去的东西都会以另一种方式归来。但在才华撑不起你的梦想的时候,你该知道你要做什么 而不是等待。
    Read more »

关于递归

Posted on 2018-05-18 | In python语法

递归调用栈溢出

在函数内部,可以调用其他函数。如果一个函数在内部调用自身本身,这个函数就是递归函数。

举个例子,我们来计算阶乘n! = 1 x 2 x 3 x … x n,用函数fact(n)表示,可以看出:

fact(n) = n! = 1 x 2 x 3 x … x (n-1) x n = (n-1)! x n = fact(n-1) x n

Read more »

1…383940…45

TinaCristal

443 posts
57 categories
55 tags
GitHub E-Mail
© 2020 TinaCristal
Powered by Hexo
|
Theme — NexT.Mist v5.1.4