L,wang

坚持改革,开放人性的弱点……

2018年12月4日

Regular Express 匹配中文,所有中文标点符号

摘要: import re import requests text=requests.get("https://movie.douban.com").text #1.匹配汉字 \u4E00-\u9FA5 re.findall('[ \u4E00-\u9FA5]+',text) #参考 https://ww 阅读全文

posted @ 2018-12-04 18:23 L,wang 阅读(539) 评论(0) 推荐(0) 编辑

2018年9月29日

转 VS Code C++配置较靠谱的一篇

摘要: VS Code C++ Env 配置 阅读全文

posted @ 2018-09-29 06:39 L,wang 阅读(190) 评论(0) 推荐(0) 编辑

2018年9月23日

“奇技淫巧” 话递归

摘要: 经典递归例子汇总与点评: 2 1. N!,求N的阶乘 2 2. 1+2+3+.....+n,求前N项和 2 3. Fibonacci数列,F(n)=F(n-1)+F(n-2) 2 4. GCD(a,b),求最大公约数 3 5. Hanoi塔,从A移到C 3 6. 回文数判定 4 7. 杨辉三角 4 8. 快速排序,二路归并 5 1. 快速排序 5 2. 二路归并 6 9. Bs Tree(二叉树的前,中,后序遍历) 6 10. 全排列 9 11. 8 Queen problem 10 12. 约瑟夫环问题 11 阅读全文

posted @ 2018-09-23 02:16 L,wang 阅读(566) 评论(0) 推荐(0) 编辑

2018年9月4日

大数据处理N!(21<N<2000)

摘要: 输入: 每行输入1个正整数n,(0<n<1000 000) 输出: 对于每个n,输出n!的(十进制)位数 digit, 和最高位数firstNum。(n!约等于 firstNum * 10^[digit-1] ) 方法一: 利用数学库及相关知识。 采用蛮力,根据定义,直接求解! 所谓n!的十进制位数 阅读全文

posted @ 2018-09-04 23:08 L,wang 阅读(182) 评论(0) 推荐(0) 编辑

2014年5月5日

linux安装svn authz权限错误注意事项

摘要: http://www.ccdream.com/s/hacker/54.html 阅读全文

posted @ 2014-05-05 10:08 L,wang 阅读(301) 评论(0) 推荐(0) 编辑

2014年2月27日

Linux Shell shortcut

摘要: Ctrl+a跳到第一个字符前Ctrl+x同上但再按一次会从新回到原位置Details see below:Linux shell shortcut 阅读全文

posted @ 2014-02-27 22:22 L,wang 阅读(385) 评论(0) 推荐(0) 编辑

2013年10月9日

Linux Shell 2>&1 &

摘要: 转脚本如: nohup /mnt/Nand3/H2000G >/dev/null 2>&1 & 对于& 1 更准确的说应该是文件描述符 1,而1一般代表的就是STDOUT_FILENO,实际上这个操作就是一个dup2(2)调用.他标准输出到all_result,然后复制标准输出到文件描述符2(STDERR_FILENO),其后果就是文件描述符1和2指向同一个文件表项,也可以说错误的输出被合并了.其中0表示键盘输入 1表示屏幕输出2表示错误输出.把标准出错重定向到标准输出,然后扔到/DEV/NULL下面去。通俗的说,就是把所有标准输出和标准出错都扔到垃圾桶里面 阅读全文

posted @ 2013-10-09 14:45 L,wang 阅读(245) 评论(0) 推荐(0) 编辑

2013年9月26日

Disable the screen switching about VI

摘要: If you want to disable the screen switching, and you don't want tochange your termcap, you can add these lines to your .vimrc: > :set t_ti= t_te=The default of my terminal tool XShell is screen switching, after editing from vim.If you want to enable it, pls refer to vim help screen:) 阅读全文

posted @ 2013-09-26 17:21 L,wang 阅读(156) 评论(0) 推荐(0) 编辑

2013年8月16日

Shell if 判断之detail

摘要: 参考:http://blog.chinaunix.net/uid-20788517-id-3135826.html 阅读全文

posted @ 2013-08-16 01:19 L,wang 阅读(190) 评论(0) 推荐(0) 编辑

2013年7月10日

Tips for VNCServer config

摘要: Tips for VNCServerAfter the ClearCase server reboot by Jingwei, my vncserver background process is also being shutdown. then I use vncservercmd to create a new connection to wait VNCView connect again. but always report the following log:xauth: error in locking authority file /home/xr/wangliang1/.Xa 阅读全文

posted @ 2013-07-10 16:05 L,wang 阅读(266) 评论(0) 推荐(0) 编辑