`
文章列表

REST

http://www.ibm.com/developerworks/webservices/library/ws-restful/ http://blog.sina.com.cn/s/blog_628b45090100rnds.html http://shop.oreilly.com/product/9780596529260.do

java utf16 encoding

    博客分类:
  • java
Unicode的码空间从U+0000到U+10FFFF UTF16分为17个多文种平面(multilingual plane),其中基本多文种平面的范围是0x0000-0xFFFF,其他的成为辅助文本平面. 基本多文种平面的每个编码对应一个字符,或称作代码元,特殊的情况是: U+D800到U+DFFF之间的码位区段是永久保留不映射到字符,因此UTF-16利用保留下来的0xD800-0xDFFF区段的码位来对辅助平面的字符的码位进行编码。 从u+10000到u+10ffff的码位 辅助平面(Supplementary Planes)中的码位,在UTF-16中被编码为一对16比特长的码元(即32b ...

grep 实用例子

首先创建示例文件 $ cat demo_file THIS LINE IS THE 1ST UPPER CASE LINE IN THIS FILE. this line is the 1st lower case line in this file. This Line Has All Its First Character Of The Word With Upper Case. Two lines above this line is empty. And this is the last line. 例1 从单个文件中搜索特定字符串 Syntax: grep "litera ...
As its name implies, sed hold buffer is used to save all or part of the sed pattern space for subsequent retrieval. The contents of the pattern space can be copied to the hold space, then back again. No operations are performed directly on the hold space. sed provides a set of hold and get function ...
Sed reads line by line, removes any trailing new lines, places a line in a pattern space buffer, process as per the given commands and prints the pattern space. n case, if you want to delete all the newlines in a file, you cannot use the following method. Because newline is already removed and placed ...
Syntax: #sed -e 'command' -e 'command' filename Note: -e option is optional for sed with single command. sed will execute the each set of command while processing input from the pattern buffer. 让我们先创建示例文件 # cat thegeekstuff.txt 1. Linux - Sysadmin, Scripting etc. 2. Databases - Oracle, mySQL etc. 3. ...
“p” command prints the buffer (remember to use -n option with “p”) “d” command is just opposite, its for deletion. ‘d’ will delete the pattern space buffer and immediately starts the next cycle. Syntax: # sed 'ADDRESS'd filename # sed /PATTERN/d filename Let us first creates thegeekstuff.txt file t ...
Unix Sed Introduction sed is a “non-interactive” stream-oriented editor. Since its an “non-interactive” it can be used to automate editing if desired. The name sed is an abbreviation for stream editor, and the utility derives many of its commands from the ed line-editor (ed was the first UNIX text ...
无条件分支语法 $ sed ':label command(s) b label' :label - specification of label. commands - Any sed command(s) label - Any Name for the label b label – jumps to the label with out checking any conditions. If label is not specified, then jumps to the end of the script. 条件分支语法 $ sed ':label command(s) t la ...
The `s’ command is probably the most important in `sed’ and has a lot of different options. The `s’ command attempts to match the pattern space against the supplied REGEXP; if the match is successful, then that portion of the pattern space which was matched is replaced with REPLACEMENT. Syntax: #se ...
In this article, let us review how to extract part of one file and write it to another file using sed. Sed provides “w” command to write the pattern space data to a new file. Sed creates or truncates the given filename before reads the first input line and it writes all the matches to a file witho ...

sed tool basic

语法 sed [options] '{command}' [filename] 替换命令 's/{old value}/{new value}/' 例子 $echo The tiger cubs will meet on Tuesday afer school | sed 's/tiger/wolf/' The wolf cubs will meet on Tuesday afer school $echo The tiger cubs will meet on Tuesday after school | sed -e 's/tiger/wolf/' -e 's/after/befor/' ...
1 运行时绑定的能力 无论是java的继承方法重写,还是运用组合以达到子类覆盖父类的方法,还是spring的注入机制,还是sping的面向方向编程。所有这些东西都为了达到一个目的,那就是运行时绑定。确定运行时绑定的时机和方式对面向对象编程有着深刻的影响,是衡量一门语言是否成熟的标志。 2 加入中间层。 23种设计模式可以归结为一种核心思想,那就是代理模式。计算机中所有的复杂问题,如果引入中间层,那么这些问题都可以得到很好的解决。引入中简称的目的是为了降低耦合度,提高软件的灵活性和可维护性,以及可扩展的能力。面向对象中的面向接口同样是引入了一个中间层的思想。 3 自然语言。 可能不久的将来,会 ...

Solr FQA

1. Question: sometimes the after closing the SolrServer, there is a file write.lock generated in the folder $INDEX_HOME/index/write.lock. Then next time, you want to start the server, there is an exception complaining the IndexWriter is locked. 1. Answer:  Manually delete the write.lock file. or addi ...
=========================================================== How to build a Solr cluster(One Master, two Slaves) =========================================================== 1. Add below replication handler to solrconfig.xml in the example dir. <requestHandler name="/replication" class=&qu ...
Global site tag (gtag.js) - Google Analytics