This file contains hidden or 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
String path = "my/test/path/to/file.xml"; | |
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); | |
DocumentBuilder db = dbf.newDocumentBuilder(); | |
db.parse(new File(path)); |
This file contains hidden or 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 javax.jws.WebService; | |
import javax.xml.ws.Endpoint; | |
@WebService | |
public class Calculator { | |
public static void main(String[] args) { | |
Calculator.calculate(1, 1, "ADD"); | |
Calculator.calculate(2, 3, "MULT"); | |
Calculator.calculate(5, 2, "asdf"); |
This file contains hidden or 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
# requires xmllint and diff to be in the PATH | |
class Test | |
BPELVAL_DIR = "c:/projects/bpelval-proj/tool/Testcases" | |
BETSY_DIR = "c:/projects/betsy/src/main/tests/language-features" | |
def self.compute_wsdl_diffs | |
main_wsdl = "#{BETSY_DIR}/TestInterface.wsdl" | |
partner_wsdl = "#{BETSY_DIR}/TestPartner.wsdl" |
This file contains hidden or 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
["array","of","elems"].sort().each { | |
elem -> println "\\item \\tr{" + elem + "}" | |
} |
This file contains hidden or 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
class XmlAnalyzer { | |
public static final String[] commonNodes = ["process", "partnerLinks", "partnerLink", "variable", "variables", "import"] | |
public static void main(String[] args) { | |
if(args.length != 2){ | |
throw new IllegalArgumentException("Usage: PATH EXTENSION") | |
} | |
analyzeFilesInDirectory(new File(args[0]),args[1]) |
This file contains hidden or 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
/** | |
* Extracts zip files recursively (zips within zip files too). | |
*/ | |
class RecursiveUnzipper { | |
public static void main(String[] args) { | |
if(args != 3){ | |
println "Usage: TARGET LEFT RIGHT" | |
} |
This file contains hidden or 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
rm *.aux | |
rm *.bbl | |
rm *.log | |
rm *.pdf | |
rm *.pgf | |
rm *.dvi | |
rm *.synctex* | |
rm *.toc | |
rm *.blg |
This file contains hidden or 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 de.feki.layout.timeinserter; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.StringWriter; | |
import javax.imageio.ImageIO; | |
import javax.imageio.ImageReader; | |
import javax.imageio.metadata.IIOMetadata; | |
import javax.xml.transform.OutputKeys; |
This file contains hidden or 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 groovy.util.PermutationGenerator; | |
import java.util.LinkedList; | |
import java.util.List; | |
import com.google.common.collect.Ordering; | |
public class Choice { | |
public static void main(String[] args) { |
This file contains hidden or 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
require 'java' | |
require 'jruby/core_ext' | |
module WS | |
class WebService | |
def test() | |
puts "Call received at #{Time.new}" | |
# x = Result.new | |
# x.name = "asdf" | |
# return x |