def remove_js_css (content): """ remove the the javascript and the stylesheet and the comment content (<script>....</script> and <style>....</style> <!-- xxx -->) """ r = re.compile(r'''<scrip…
昨天向数据库中导入Excel数据时 由于空行 总是报错!下面附上两种去除空行的方法! 方法一.某行某列值为空时 DataView dv = dt.DefaultView; dv.RowFilter = "F1<>'' or F1 is not null";//F1为列名 System.Data.DataTable dt = dv.ToTable(); 方法二.整行为空时 protected voi…
读取文件cdays−4-test.txt 内容,去除空行和注释行后,以行为单位进行排序,并将结果输出为cdays−4-result.txt. cdays−4-test.txt的内容 #some words Sometimes in life, You find a special friend; Someone who changes your life just by being part of it. Someone who makes you laugh until you can't s…
2016.10.4 filetype indent on syntax on set nu ai ci si set sw= ts= set autochdir set backspace= color slate set mouse=a set cursorline "---------- windows 配置 cd e:\acm set gfn=consolas:h18 "gvim map<F4> :w <CR> :!g++ % -g -o %<.ex…
VIM的高级使用 转:http://www.cnblogs.com/itech/archive/2012/02/22/2363111.html 1)一些常用的Vim配置,在~/.vimrc中 syntax on 支持语法高亮 set nu 显示行号set nonu 不显示行号 set ai 设置自动缩进 set shiftwidth=4 设置自动缩进 4 个空格, 当然要设自动缩进先. set sts=4 即设置…