Install [[Node.js]] from http://nodejs.org
npm install -g tiddlywiki
If it fails with an error you may need to re-run the command as an administrator:
npm install -g tiddlywiki
(Windows)
sudo npm install -g tiddlywiki
(Mac/Linux)
URL url = new URL(urlTarget); | |
HttpURLConnection connection; | |
method = "GET" // POST, PUT, ... | |
data = "" // for GET, otherwise e..g JSON | |
connection.setDoOutput(true); | |
connection.setDoInput(true); | |
connection.setRequestMethod(method); | |
connection.setRequestProperty("Content-Length", "" + Integer.toString(data.getBytes().length)); |
package testsupport; | |
import org.concordion.api.ResultSummary; | |
import org.concordion.internal.FixtureRunner; | |
import org.junit.runner.Description; | |
import org.junit.runners.model.FrameworkMethod; | |
import org.junit.runners.model.InitializationError; | |
import org.junit.runners.model.Statement; | |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
@Grapes([ | |
@Grab(group='org.apache.solr', module='solr-solrj', version='4.6.0'), | |
@Grab(group='org.slf4j', module='slf4j-api', version="1.6.6"), | |
@Grab(group='org.slf4j', module='slf4j-log4j12', version="1.6.6") | |
]) |
#这样的速度快 | |
sed -n '10,20p' test.txt | |
#用cat配合head或tail也可以,但大文件会内存溢出 | |
cat test.txt|head -n 30 |
npm install -g tiddlywiki
If it fails with an error you may need to re-run the command as an administrator:
npm install -g tiddlywiki
(Windows)
sudo npm install -g tiddlywiki
(Mac/Linux)
dim objShell | |
set objShell=wscript.createObject("WScript.Shell") | |
iReturnCode=objShell.Run("c:\testcopy.bat",0,TRUE) |
//$_G['uid'] 表示注册用户的的 id 号,如果用户已经登录,该变量非空! | |
//通过判断 $_G['uid'] 是否为空来判断用户是否已经登录,如果没有登录,则调用 showmessage 提示用户登录或者注册! | |
if(empty($_G['uid'])) { | |
showmessage('to_login', '', array(), array('showmsg' => true, 'login' => 1)); | |
} |
//在任意的class下通过以下方法获取到HttpServletRequest | |
HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest(); |
@Grab(group='org.gperfutils', module='gbench', version='0.4.2-groovy-2.1') | |
def b = benchmark { | |
'append' { | |
def f = File.createTempFile('file', 'append') | |
(1..1000).each { | |
f.append(it.toString()) | |
} | |
} | |
'writer' { |
title: My Slideshow | |
output: slideshow.html | |
author: | |
name: xxx | |
email: [email protected] | |
-- | |
# Hello, world! | |
## This is my slideshow |