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"?> | |
<?dctm fileVersion="5.3.0.1" compatibilityVersion="5.3.0.1"?> | |
<ucfInstaller codebase="" loggerLevel="INFO"> | |
<app id="shared" version="7.0.0000.0507a" compatibilityVersion="5.3.0"/> | |
<platform os="all" arch="all"> | |
<runtime type="all" version="any"> | |
<nativelibs> | |
<lib version="7.0.0000.0507" href="ucf-client-installer.zip"/> | |
</nativelibs> | |
<defaults> |
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"?> | |
<?dctm fileVersion="5.3.0.1" compatibilityVersion="5.3.0.1"?> | |
<ucfInstaller codebase="" loggerLevel="INFO"> | |
<app id="shared" version="7.0.0000.0507" compatibilityVersion="5.3.0"/> | |
<platform os="all" arch="all"> | |
<runtime type="all" version="any"> | |
<nativelibs> | |
<lib version="7.0.0000.0507" href="ucf-client-installer.zip"/> | |
</nativelibs> | |
<defaults> |
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
#!/bin/sh | |
# | |
# JBoss standalone control script | |
# | |
# chkconfig: - 80 20 | |
# description: JBoss AS Standalone | |
# processname: standalone | |
# pidfile: /var/run/jboss-as/jboss-as-standalone.pid | |
# config: /etc/jboss-as/jboss-as.conf |
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
public void printClientInfo(HttpServletRequest request) { | |
final String referer = getReferer(request); | |
final String fullURL = getFullURL(request); | |
final String clientIpAddr = getClientIpAddr(request); | |
final String clientOS = getClientOS(request); | |
final String clientBrowser = getClientBrowser(request); | |
final String userAgent = getUserAgent(request); | |
logger.info("\n" + |
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.classification.ClassificationResult; | |
import org.apache.lucene.classification.Classifier; | |
import org.apache.lucene.document.Document; | |
import org.apache.lucene.index.IndexReader; | |
import org.apache.lucene.index.LeafReader; | |
import org.apache.lucene.index.SlowCompositeReaderWrapper; | |
import org.apache.lucene.search.*; | |
import org.apache.lucene.util.BytesRef; |
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
public class AnalyzerFactory { | |
public Analyzer analyzer(AnalyzerType type, FilterType filter) { | |
final CustomizableRussianAnalyzer analyzer = new CustomizableRussianAnalyzer(); | |
switch (filter) { | |
case STEMMING_AND_REMOVE_SHORT: | |
analyzer.ifNeedStemming(true).ifNeedRemoveShort(true); | |
break; | |
case STEMMING_AND_NOT_REMOVE_SHORT: |
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 kz.moe.classifier.classifier; | |
import kz.moe.classifier.index.MessageIndexer; | |
import org.apache.commons.io.FileUtils; | |
import org.apache.commons.lang.NotImplementedException; | |
import org.apache.lucene.analysis.Analyzer; | |
import org.apache.lucene.classification.ClassificationResult; | |
import org.apache.lucene.classification.Classifier; | |
import org.apache.lucene.document.Document; | |
import org.apache.lucene.index.IndexReader; |
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
{ | |
"date": "Dec 15, 2015 5:20:06 PM", | |
"title": "Пресс-тур в трассовый медико-спасательный пункт Жамбылской области", | |
"URL": "http://emer.gov.kz/index.php?option\u003dcom_content\u0026view\u003darticle\u0026id\u003d30909%3A2015-12-15-11-12-19\u0026catid\u003d20%3A2011-06-09-13-26-46\u0026Itemid\u003d5\u0026lang\u003dru", | |
"tags": [], | |
"type": "NEWS", | |
"notificationId": -1385396753, | |
"body": "\n В настоящее время в Республике Казахстан функционирует сформировавшийся Центр медицины катастроф, находящийся в состоянии постоянного развития на основе передового международного опыта медицины в области ликвидации чрезвычайных ситуаций.\n За годы существования служба медицины катастроф зарекомендовала себя, как самостоятельная отрасль здравоохранения страны, имеющая свой объект деятельности и присущие ей методы работы.\n Одним из приоритетных направлений деятельности Центра медицины катастроф является совершенствование системы оказания медицинской и психологической помощи пострадавшим при дорожно-транспо |
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
public static List<Message> readDocumentsFromFile() { | |
final List<Message> empty = new ArrayList<>(); | |
final Gson gson = new GsonBuilder().create(); | |
final Type listType = new TypeToken<List<CommonMessage>>() { | |
}.getType(); | |
final File file = new File("/tmp/kznews.json"); | |
try { | |
if (file.exists()) { | |
final FileReader fileReader = new FileReader(file); | |
final JsonReader reader = new JsonReader(fileReader); |
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 testBigDecimal() throws Exception { | |
final SecureRandom random = new SecureRandom(); | |
for (int j = 0; j < 30; j++) { | |
Timer.executeFunctionWithTimer(() -> { | |
int value = 0; | |
for (int i = 0; i < 1000000; i++) { | |
value = new BigDecimal(random.nextInt()).intValueExact(); | |
} | |
return value > 10; |
OlderNewer