记一次使用opencsv解析csv文件时碰到的坑 最近在开发过程中需要解析csv文件,公司用的解析工具是opencsv,在根据opencsv的官方文档去解析时发现csv文件中含有繁体字,使用其自带的CsvToBean来转换会出现异常com.opencsv.exceptions.CsvRequiredFieldEmptyException: Number of data fields does not match number of headers.于是我这里想到的方法是使用CsvReader来读
linux shell可以识别4种不同类型的引字符号: 单引号字符' 双引号字符" 反斜杠字符\ 反引号字符` 1. 单引号 ( '' )# grep Susan phonebook Susan Goldberg 403-212-4921 Susan Topple 212-234-2343 如果我们想查找的是Susan Goldberg,不能直接使用grep Susan Goldberg phonebook命令,grep会把Goldberg和phonebook当作需要搜索的文件 # gre
我们知道java中可以用MessageFormat.format来格式化字符串.这个方法在我们的实际开发中经常用到,有点类似模板,这样我们就不需要用很恶心的拼接字符串了.如下面 String s1="my blogWebSite is {0} and sinaWeiBo is {1} "; String s2=MessageFormat.format(s1,"http://www.3lai8.com","http://weibo.com/javaee6&q
$current_account_url='<a class="mini-button" iconcls="icon-edit" onclick="printabc('html/达能益力贸易(深圳)有限公司-[101]广东 2016-04-01-2016-04-30对账单.html')">查看/打印1</a>'; $sql_url="update tools_current_account set current
centos下面, awk '{...}' 和 awk "{...}" 差别是很大的: [ywt@YuWentao]$ echo "a b c d 1 2 3 4" | awk '{print $2}' b [ywt@YuWentao]$ echo "a b c d 1 2 3 4" | awk "{print $2}" a b c d 1 2 3 4 简单来说,双引号无法正常工作, 一不小心敲错简直天壤之别.
The Q-quote delimiter can be any single- or multibyte character except space, tab, and return. If the opening quote delimiter is a [, {, <, or ( character, then the closing quote delimiter must be the corresponding ], }, >, or )character. In all oth