Can't imagine any terser way of doing this than
Ain't it groovy :)
println "teststring"[4..6]
Ain't it groovy :)
println "teststring"[4..6]
Go to the command prompt and, issue
>attrib -r -s c:\some\directory
>attrib -r -s c:\other\directory
set shell = Wscript.CreateObject("Wscript.Shell")
shell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 0, "REG_DWORD"
set shell = Wscript.CreateObject("Wscript.Shell")
shell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 1, "REG_DWORD"
-DskipTests=true
to any mvn
calls.
REM Uncomment following if you want to clean local repo on each run
REM rmdir /S /Q "%HOMEPATH%\.m2\repository\com\mygroup\id"
call mvn -f ProjectA\pom.xml clean install
if not "%ERRORLEVEL%" == "0" goto error
call mvn -f ProjectB\pom.xml clean install
if not "%ERRORLEVEL%" == "0" goto error
call mvn -DskipTests=true -f ProjectC\pom.xml clean install
if not "%ERRORLEVEL%" == "0" goto error
exit
:error
@echo Build Failed
pause
call
before the mvn commands:
cd ProjectA
call mvn install
cd ..
cd ProjectB
call mvn install
cd ..
call
Since our original announcement of Mercurial support, Git has grown significantly more popular and user-friendly, and on the technical side, it has added an efficient “smart” HTTP protocol that fits with Google’s HTTP-based infrastructure. (Note that this feature is only available in version 1.6.6 and later.)
git init
/ hg init
away.
File.eachLine{}
vs loading file in a list and then iterating with for
, the closure still works out faster on the whole. I have not tested this for different file sizes, but damn, whatever it may be new File(file).eachLine{}
just rocks :)
def file = "input.txt"
// just to heat up the jvm :)
new File(file).eachLine{
it.toUpperCase()
}
// with closure
start = System.nanoTime()
new File(file).eachLine{
it.toUpperCase()
}
println System.nanoTime() - start
// with loop
start = System.nanoTime()
lines = new File(file).readLines()
for (line in lines){
line.toUpperCase()
}
println System.nanoTime() - start
// read lines into a list
lines = new File(file).readLines()
// with list.each {}
start = System.nanoTime()
lines.each { line->
line.toUpperCase()
}
println System.nanoTime() - start
// with loop over list
start = System.nanoTime()
for (line in lines){
line.toUpperCase()
}
println System.nanoTime() - start
Run # 1 Run # 2 Run # 3 Run # 4 4792229 4773791 4840280 5428064 11169576 10254934 10791595 12546008 2638604 2424610 2477969 2466514 465702 315403 315403 412063
System.properties.each { k,v->
println "$k = $v"
}