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.mzeng.gzbus | |
import java.io.BufferedReader; | |
import java.io.DataOutputStream; | |
import java.io.InputStreamReader; | |
import java.net.HttpURLConnection; | |
import java.net.URL; |
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"?> | |
<configuration status="OFF"> | |
<appenders> | |
<Console name="Console" target="SYSTEM_OUT"> | |
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /> | |
</Console> | |
<RollingFile name="RollingFile" fileName="logs/app.log" | |
filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz"> |
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 com.jcraft.jsch.JSch | |
import com.jcraft.jsch.Session | |
import com.jcraft.jsch.UserInfo | |
import com.jcraft.jsch.Channel | |
import com.jcraft.jsch.ChannelExec | |
def sshHost = '10.1.2.132' | |
def sshUser = 'root' | |
def sshPass = '******' | |
def sshPort = 22 |
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
//http://logging.apache.org/log4j/2.0/manual/configuration.html#ConfigurationSyntax | |
import org.apache.logging.log4j.Logger; | |
static Logger logger = LogManager.getLogger(Bar.class.getName()); | |
logger.error("Did it again!"); |
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.wz.service.impl | |
import com.wz.service.IConfigService | |
import com.wz.service.IFileService | |
import com.wz.service.IMonitorService | |
import com.wz.service.ITagService | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.nio.file.WatchEvent; |
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
BufferedImage tar = _resize(f,s) | |
ImageIO.write(tar, "jpg", new File(fileName)); |
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
class ReflectTest { | |
def name | |
def height | |
def add(){ | |
println "add" | |
} | |
def add(a){ |
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 org.apache.lucene.analysis.Analyzer | |
import org.apache.lucene.analysis.standard.StandardAnalyzer | |
import org.apache.lucene.index.IndexReader | |
import org.apache.lucene.index.DirectoryReader; | |
import org.apache.lucene.queryparser.classic.QueryParser | |
import org.apache.lucene.search.IndexSearcher | |
import org.apache.lucene.search.Query | |
import org.apache.lucene.search.TopDocs | |
import org.apache.lucene.store.FSDirectory; | |
import org.apache.lucene.util.Version; |
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
// http://www.cnblogs.com/lcuzhanglei/archive/2012/08/01/2618381.html | |
// 对于要排序的字段,在索引的时候可以Field.Index.NOT_ANALYZED | |
import org.apache.lucene.analysis.Analyzer | |
import org.apache.lucene.analysis.standard.StandardAnalyzer | |
import org.apache.lucene.index.IndexReader | |
import org.apache.lucene.index.DirectoryReader; | |
import org.apache.lucene.queryparser.classic.QueryParser | |
import org.apache.lucene.search.IndexSearcher | |
import org.apache.lucene.search.Query |
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 org.apache.lucene.analysis.Analyzer | |
import org.apache.lucene.analysis.standard.StandardAnalyzer | |
import org.apache.lucene.document.Document | |
import org.apache.lucene.document.Field | |
import org.apache.lucene.document.LongField | |
import org.apache.lucene.document.StringField | |
import org.apache.lucene.document.TextField | |
import org.apache.lucene.index.IndexWriter | |
import org.apache.lucene.index.IndexWriterConfig | |
import org.apache.lucene.index.Term |
NewerOlder