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
^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$ | |
// Match | |
2009-12T12:34 | |
2009 | |
2009-05-19 | |
2009-05-19 | |
20090519 | |
2009123 |
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
private static String ztrim(String string) { | |
int length = string.length(); | |
int st = 0; | |
char[] val = string.toCharArray(); | |
while (st < length && (val[st] <= ' ' || val[st] == ' ')) { | |
st++; | |
} | |
while (st < length && (val[length - 1] <= ' ' || val[length - 1] == ' ')) { | |
length--; |
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
<!-- junii2 --> | |
<field name="title" type="text_ja" indexed="true" stored="true" /> | |
<field name="alternate" type="text_ja" indexed="true" stored="true" multiValued="true" /> | |
<field name="creator" type="text_ja" indexed="true" stored="true" multiValued="true" /> | |
<field name="subject" type="text_ja" indexed="true" stored="true" multiValued="true" /> | |
<field name="NIIsubject" type="text_ja" indexed="true" stored="true" multiValued="true" /> | |
<field name="NDC" type="string" indexed="false" stored="true" multiValued="true" /> | |
<field name="NDLC" type="string" indexed="false" stored="true" multiValued="true" /> | |
<field name="BSH" type="string" indexed="false" stored="true" multiValued="true" /> | |
<field name="NDLSH" type="string" indexed="false" stored="true" multiValued="true" /> |
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.xml.datatype.DatatypeConfigurationException; | |
import javax.xml.datatype.DatatypeFactory; | |
import javax.xml.datatype.XMLGregorianCalendar; | |
import java.util.Date; | |
import java.util.GregorianCalendar; | |
import java.util.TimeZone; | |
public class XMLGregorianCalendarConversionUtil { | |
private static DatatypeFactory datatypeFactory = null; |
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
$.getScript('/path/to/script.js', function(data) { | |
eval(data) | |
}) |
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 fs = require('fs'); | |
fs.readFile('path/to/file.json', 'utf8', function(err, data) { | |
if (!err) { | |
var data = JSON.parse(data); | |
console.log(data); | |
} else { | |
console.log(err); | |
} | |
}) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/terms/" xmlns:opds="http://opds-spec.org/2010/catalog" xmlns:lang="ja"> | |
<id>http://example.com/all.opds</id> | |
<title>サンプル出版社のOPDS取得フィード</title> | |
<updated>2012-04-03T15:00:00.000Z</updated> | |
<icon>http://example.com/favicon.ico</icon> | |
<author> | |
<name>サンプル出版株式会社</name> | |
<email>support@example.com</email> | |
<uri>http://example.com/support</uri> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/terms/" xmlns:opds="http://opds-spec.org/2010/catalog" xmlns:lang="ja"> | |
<id>http://example.com/all.opds</id> | |
<title>サンプル出版社のOPDS取得フィード</title> | |
<updated>2012-04-03T15:00:00.000Z</updated> | |
<icon>http://example.com/favicon.ico</icon> | |
<author> | |
<name>サンプル出版株式会社</name> | |
<email>support@example.com</email> | |
<uri>http://example.com/support</uri> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/terms/" xmlns:opds="http://opds-spec.org/2010/catalog" xmlns:lang="ja"> | |
<id>http://example.com/all.opds</id> | |
<title>サンプル出版社のOPDS取得フィード</title> | |
<updated>2012-04-03T15:00:00.000Z</updated> | |
<icon>http://example.com/favicon.ico</icon> | |
<author> | |
<name>サンプル出版株式会社</name> | |
<email>support@example.com</email> | |
<uri>http://example.com/support</uri> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/terms/" xmlns:opds="http://opds-spec.org/2010/catalog" xmlns:lang="ja"> | |
<id>http://example.com/all.opds</id> | |
<title>サンプル出版社のOPDS取得フィード</title> | |
<updated>2012-04-03T15:00:00.000Z</updated> | |
<icon>http://example.com/favicon.ico</icon> | |
<author> | |
<name>サンプル出版株式会社</name> | |
<email>support@example.com</email> | |
<uri>http://example.com/support</uri> |