This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:%s/r//g 删除DOS方式的回车^M | |
:%s= *$== 删除行尾空白 | |
:%s/^(.*)n1/1$/ 删除重复行 | |
:%s/^.{-}pdf/new.pdf/ 只是删除第一个pdf | |
:%s/<!--_.{-}-->// 又是删除多行注释(咦?为什么要说「又」呢?) | |
:g/s*^$/d 删除所有空行 :这个好用有没有人用过还有其他的方法吗? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scrot是一个命令行下使用的截图工具,支持全屏、窗口、选取、多设备、缩略图、延时,甚至可以截图完毕之后指定某程序打开截好的图片。 | |
在CentOS上的安装办法: | |
#yum install giblib giblib-devel | |
#wget http://linuxbrit.co.uk/downloads/scrot-0.8.tar.gz | |
# tar xvzf scrot-0.8.tar.gz | |
# cd scrot-0.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==Tempermonkey Script== | |
// ==UserScript== | |
// @name My Fancy New Userscript | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.1 | |
// @description enter something useful | |
// @match http://search.maven.org/* | |
// @require http://code.jquery.com/jquery-1.8.2.js | |
// @copyright 2012+, You |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.seveniu; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Permutation { | |
private int[] array; //传入数组 | |
private int num; //从数组中选出n个数 | |
private int[] result = new int[num]; //将选出的n个数存入数组 | |
private int count = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kaishengit.Util; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: niu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kaishengit.aopPivilegesManager; | |
import com.kaishengit.Util.ListUtil; | |
import com.kaishengit.dao.GroupDao; | |
import com.kaishengit.exception.ServiceException; | |
import com.kaishengit.pojo.Group; | |
import com.kaishengit.pojo.User; | |
import org.aspectj.lang.annotation.*; | |
import javax.inject.Inject; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
带 http 的,url ---> (http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.fasterxml.jackson.core.type.TypeReference; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.alibaba.fastjson.JSON; | |
import org.msgpack.MessagePack; | |
import org.msgpack.annotation.Message; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getElementsByXpath(xpath,document) { | |
var nodes = []; | |
var iterator = document.evaluate(xpath, document, null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null ); | |
try { | |
var thisNode = iterator.iterateNext(); | |
while (thisNode) { | |
nodes.push(thisNode); | |
thisNode = iterator.iterateNext(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local http=require("http") | |
local httpRequest = {} | |
function httpRequest:new() | |
local obj = {} | |
self.__index = self | |
return setmetatable(obj,self) | |
end | |
function httpRequest:getInstance() |
OlderNewer