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
01:20:00 | |
2016-09-11 | |
2016-09-11 01:20:00.0 |
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
(stream != null) { | |
String encoding = getDefaultEncoding(); | |
if (encoding == null) { | |
encoding = "ISO-8859-1"; | |
} | |
try { | |
return loadBundle(new InputStreamReader(stream, encoding)); | |
} | |
finally { | |
stream.close(); |
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 com.wpg.demo.jdk8.stream; | |
import java.util.Arrays; | |
/** | |
* @author ChangWei Li | |
* @version 2017-02-15 10:14 | |
*/ | |
class NoMoreLoop { |
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
@Test | |
public void testArrayClone() { | |
UnsafeSequence[] unsafeSequences = new UnsafeSequence[10]; | |
for (int i = 0; i < unsafeSequences.length; i++) { | |
unsafeSequences[i] = new UnsafeSequence(); | |
} | |
UnsafeSequence[] unsafeSequencesClone = unsafeSequences.clone(); | |
System.out.println(Arrays.toString(unsafeSequences)); | |
System.out.println(Arrays.toString(unsafeSequencesClone)); |
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
#小版本号升级一个版本 | |
npm version patch | |
#中版号升级一个版本 | |
npm version minor | |
#大版本号升级一个版本 | |
npm version major |
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
<dependency> | |
<groupId>org.apache.zookeeper</groupId> | |
<artifactId>zookeeper</artifactId> | |
<version>3.4.9</version> | |
<exclusions> | |
<exclusion> | |
<groupId>org.slf4j</groupId> | |
<artifactId>slf4j-log4j12</artifactId> | |
</exclusion> | |
</exclusions> |
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
/*** | |
* 获得当前时间 | |
*/ | |
function getCurrentDate(){ | |
return new Date(); | |
}; | |
//今年以来的起止时间段 | |
function getThisYear(){ | |
//起止日期数组 |
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
//This sample is how to use websocket of Tomcat. | |
package wsapp; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; | |
import java.nio.CharBuffer; | |
import java.util.ArrayList; | |
import org.apache.catalina.websocket.MessageInbound; | |
import org.apache.catalina.websocket.StreamInbound; | |
import org.apache.catalina.websocket.WebSocketServlet; |
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
mvn -B -X archetype:generate -DarchetypeCatalog=local -DarchetypeGroupId=org.apache.karaf.archetypes -DarchetypeArtifactId=karaf-command-archetype -DarchetypeVersion=4.0.5 -DgroupId=com.wpg.demo -DartifactId=demo-karaf -Dversion=1.0-SNAPSHOT -Dpackage=com.wpg.demo.karaf -Dcommand=testKaraf -Ddescription="Test Karaf Archetype Command" -Dscope=test |
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
################################################################################ | |
# | |
# Licensed to the Apache Software Foundation (ASF) under one or more | |
# contributor license agreements. See the NOTICE file distributed with | |
# this work for additional information regarding copyright ownership. | |
# The ASF licenses this file to You under the Apache License, Version 2.0 | |
# (the "License"); you may not use this file except in compliance with | |
# the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
NewerOlder