把manual entry手动加入到man中
比如, sudo cp http_load.1 /usr/share/man/man1/ man http_load
比如, sudo cp http_load.1 /usr/share/man/man1/ man http_load
Query: How well does this document match the search condition? A question of score Filter: Does the document match the search condition, or not? A question of true or false. Filters can be used for exact matching, range queries etc. Filtering is faster the querying because it doesn’t care about scoring.
无干货,仅供复制 位置信息类 package player.kent.chen.temp.lucene.span; import org.apache.commons.lang.builder.ToStringBuilder; public class KeywordLocation { private String file; /** * position in the token stream */ private int position; private KeywordLocation() { } public static final KeywordLocation createInstance(String file, int position) { KeywordLocation instance = new KeywordLocation(); instance.file = file; instance.position = position; return instance; } public String getFile() { …
package player.kent.chen.temp.lucene.synonymon; import java.io.IOException; import java.util.LinkedList; import java.util.List; import java.util.Queue; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.apache.lucene.analysis.tokenattributes.TermAttribute; import org.apache.lucene.util.AttributeSource; public class MySynonymFilter extends TokenFilter { private final TermAttribute termAttr; private final PositionIncrementAttribute piAttr; private final Queue<String> synonyms = new LinkedList<String>(); private AttributeSource.State attrsState; protected MySynonymFilter(TokenStream input) { super(input); this.piAttr = addAttribute(PositionIncrementAttribute.class); this.termAttr = addAttribute(TermAttribute.class); …
基本的输入输出: 稍微细化一下TokenStream类:
带点语病地说,Position Increment 代表token之间的“间隙值”。 一般来说,这个值等于1. 比如 Obama is a politician 分拆后, 引用 Obama – position1 is – position2 a – position3 politician – position4 1,2,3,4 以1累进 如果Position Increment大于1,则代表有的词省略了。 引用 Obama – position1 politician – position4 从1直接跳跃到4 如果Position Increment为0,则一般是因为Analyzer配上了同义词 引用 Obama – position1 politician – position4 statesman – position4 politician和statesman同义,它们的位置都是4
如果文档"中华人民"被分析成了"中华"和"人民",那么你用"华人"搜索就命中不到这个文档。
callback字符串中如果有JS源码,是可以进行注入攻击的。 服务端应该校验callback中是否有这种注入的东西,比如限定callback串只能由字母和数字组成
作为Java开发人员,你每天通过Synergy使Linux台式机和笔记本协作时,可能会面临一个困扰: 每天启动台式机上的synergy c时,你都要去动下台式机的鼠标和键盘,在台式机中输入笔记本的IP,最后再启动syngergyc c. 下面这个工具就是可以让你在笔记本上启动台式机的syngergyc c,并连接笔记本上的synergy server; 这样一来,你就可以彻底不碰台式机了。 使用前提: 1. 你的Linux台式机中已安装Syngergc,且syngergc命令在path中。 2. 你的Linux台式机基本不关机 工具安装办法: 1. 在linux台式机中部署下面的java servlet应用 package kent.web.synergyutil; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class SynergycServlet extends HttpServlet { private static final long serialVersionUID = -2286225907488120316L; @Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { …
先这样搞一下,找到文件被删除前的revision 引用 svn log –verbose|grep -5 homepage.jsp 假设revision是267,这样来查看它: 引用 svn cat http://svn-rep/web/src/main/webapp/web/jsp/homepage.jsp @267 如果要恢复它到本地,可以这样 引用 svn cat http://svn-rep/web/src/main/webapp/web/jsp/homepage.jsp@267 > web/src/main/webapp/web/jsp/homepage.jsp 以上方法有点糙,有心人可以去搜些更自动化的办法