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 example.xml; | |
import org.joox.Match; | |
import org.jsoup.Jsoup; | |
import org.w3c.dom.Document; | |
import org.w3c.dom.Element; | |
import javax.xml.parsers.DocumentBuilder; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import javax.xml.xpath.XPath; |
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 example.xml; | |
import org.w3c.dom.Document; | |
import org.xml.sax.SAXException; | |
import javax.xml.bind.JAXBContext; | |
import javax.xml.bind.JAXBElement; | |
import javax.xml.bind.JAXBException; | |
import javax.xml.bind.Unmarshaller; | |
import javax.xml.bind.annotation.XmlElement; |
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 example.xml; | |
import org.w3c.dom.Document; | |
import org.xml.sax.SAXException; | |
import javax.xml.bind.JAXBContext; | |
import javax.xml.bind.JAXBElement; | |
import javax.xml.bind.JAXBException; | |
import javax.xml.bind.Unmarshaller; | |
import javax.xml.bind.annotation.*; |
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
var React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var App = React.createClass({ | |
render: function() { | |
return ( | |
<div> | |
<label>value a</label> | |
<input type="radio" name="aradio" value="A" checked="checked" /> <br /> | |
<label>value b</label> |
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
#!/usr/bin/python3 | |
# -*- coding: utf8 -*- | |
import sys | |
from logging import getLogger, StreamHandler, DEBUG | |
handler = StreamHandler() | |
logger = getLogger(__name__) |
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 example.jaxrs; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
@Path("/") | |
public class HelloResource { | |
@GET | |
public String index() { | |
return "Hello World"; |
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 example.jaxrs; | |
import javax.validation.constraints.NotNull; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.QueryParam; | |
@Path("/") | |
public class HelloValidateResource { | |
@GET |
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
import javax.validation.constraints.DecimalMax; | |
import javax.validation.constraints.DecimalMin; | |
import javax.validation.constraints.NotNull; | |
import javax.validation.constraints.Pattern; | |
// ... | |
// ...... | |
// ... |
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 example.misc; | |
import org.json.JSONObject; | |
public class JsonCompare { | |
public static void main(String[] args) { | |
final JSONObject o1 = new JSONObject("{\'a\': 'hoge', b: 'bar', c: [1,3,5], bb: {e: 'あ'}}"); | |
final JSONObject o2 = new JSONObject("{b: 'bar', \nc:[1,\n3,5], a: \n'hoge', \"bb\": {e: '\\u3042'}}"); | |
System.out.println(o1.toString()); |