First, set GIST Language = markdown
code sample here
f sfsfsfsdfsdfsf sf sdfsdf sdfsdf sfsdf
s dfsdf sdf sdf sdf sdf sdf
Blahh blah
@ECHO off | |
COLOR 4F | |
SET NAME=setenv.bat | |
TITLE Script %NAME% | |
ECHO %NAME% ... | |
::------------------------------------------------------------------- | |
:: Script configuration | |
::------------------------------------------------------------------- | |
::SETLOCAL ENABLEDELAYEDEXPANSION |
@ECHO off | |
SETLOCAL ENABLEDELAYEDEXPANSION | |
COLOR 6F | |
IF EXIST C:\Users ( | |
::IF "%USERNAME%" NEQ "%RunAsUser%" | |
ECHO Current User is '%USERNAME%' | |
ECHO You may need to run this script as 'Administrator' user. | |
::SET "RunAsUser=Administrator" | |
::RUNAS /user:%RunAsUser% "cmd.exe /c %~f0" | |
) |
[user@www]# alternatives --install /usr/bin/java java /opt/jdk1.6.0_07/bin/java 2 | |
[user@www]# alternatives --config java | |
There are 2 programs which provide 'java'. | |
Selection Command | |
----------------------------------------------- | |
*+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java | |
2 /opt/jdk1.6.0_07/bin/java | |
@ECHO off | |
:: Demonstration of getting running directory name | |
ECHO _CD=%CD% | |
SET _SCRIPT=%~dpnx0 | |
SET "_PARENT=%~dpnx0" & CALL SET "_PARENT=%%_PARENT:\%~nx0=%%" | |
FOR /F "delims=\" %%a IN ("%~dp0") DO SET _RUNDIR=%%~nxa | |
ECHO _SCRIPT=%_SCRIPT% | |
ECHO _PARENT=%_PARENT% | |
ECHO _RUNDIR=%_RUNDIR% |
package tst; | |
/** | |
* http://testng.org/doc/documentation-main.html#testng-xml | |
* NOTE: Eclipse has a setting tha lets you specify the testng.xml file | |
* file: testng.xml | |
* <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > | |
* <suite name="NGSuite" verbose="-1" > | |
* <test name="RegressionTests" allow-return-values="false"> | |
* <classes> |
import java.util.HashMap; | |
import java.util.Map; | |
public class MemoryLeak { | |
public static void main(String[] args) { | |
Map<Key, String> map = new HashMap<Key, String>(1000); | |
int counter = 0; | |
while (true) { | |
// creates duplicate objects due to bad Key class |
package test.ra; | |
//import static com.jayway.restassured.specification.ResponseSpecification.*; | |
//import static com.jayway.restassured.matcher.RestAssuredMatchers.*; | |
//import static org.hamcrest.Matchers.*; | |
import static com.jayway.restassured.RestAssured.*; | |
import static com.jayway.restassured.path.xml.XmlPath.*; | |
import com.jayway.restassured.path.xml.element.Node; | |
// RestAssured source: http://grepcode.com/file/repo1.maven.org/maven2/com.jayway.restassured/rest-assured/1.6/com/jayway/restassured/RestAssured.java#RestAssured |
package test.ra; | |
import static com.jayway.restassured.RestAssured.*; | |
import static com.jayway.restassured.path.xml.XmlPath.*; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class SOAPDictionary { |
<EVENT> | |
<DATA> | |
<AA siteKey="8a52acdd377bc40501377f7366c16bd0"> | |
<DD siteKey="8a52acdd377bc40501377f7366c16bd1"> | |
<SMT siteKey="8a52acdd377bc40501377f7366c26bd8"> | |
</SMT> | |
<DDStatus siteKey="8a52acdd377bc40501377f7366c16bd2"> | |
</DDStatus> | |
<Address id="{http://www.site.com/rr}address_value_entity" siteKey="8a52acdd377bc40501377f7366c26bd3"> | |
</Address> |