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 you; | |
import clowns.Clown; | |
import clowns.Volkswagen; | |
public class You { | |
private static class BandOfClowns extends Clown { | |
final int id; |
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
// Constructs a Sierpinski triangle in a Unicode-aware console with fixed-width font | |
// Based on an idea from Olivier Croisier http://twitter.com/OlivierCroisier/statuses/148809114531799040 | |
int numOfLines = 16 //2^n | |
int[][] c = new int[numOfLines][numOfLines] | |
int delta = numOfLines | |
c[0][0] = 1 | |
println "${' '*delta--}\u25B2" | |
(1..<numOfLines).each { i-> |
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 org.jnegre; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import javax.xml.xpath.XPath; | |
import javax.xml.xpath.XPathConstants; | |
import javax.xml.xpath.XPathFactory; | |
import org.w3c.dom.Document; | |
import org.w3c.dom.Node; | |
import org.w3c.dom.NodeList; |